You have a interface in the 10.16.15.0/24 net.

By default Linux will add a route to any local interfaces. How do you expect to contact devices on your 10.16.15.0/24 segment if you do not have a route for it? Do you want traffic to 10.16.15.0/24 to go via 10.16.21.254?

If so, simply remove the interface description for auto ens160:235.

The section to remove would be

auto ens160:235
iface ens160:235 inet static
address 10.16.15.235
netmask 255.255.255.0

To expand the answer a bit.

When you want to send a packet to an address, your OS looks in its routing table. Commonly, the routing table consists of two entries: your local subnet, that's reachable directly, and a default gateway. It may contain any number of routes however.

Routes carry a weight, commonly known as metric. This can be seen in sample output below:

default via 10.0.3.1 dev wlan0 proto dhcp metric 600
10.0.3.0/24 dev wlan0 proto kernel scope link src 10.0.3.48 metric 600

Routes are selected on basis most specific route, and if two equal routes exists, the lowest metric is preferred. The default route is really 0.0.0.0/0, so it is as unspecific as you get with IPv4. This means that this is a route of last resort, if no other routes match!

You have a directly connected interface, with a netmask of /24, or 255.255.255.0. This is way more specific than a netmask of /0, so regardless of weight, it will win. Traffic destined for 10.16.15.0/24 will be sent directly on the ens160:235 interface, without any routing.

This is probably the behavior you want. If you attach a host to a L2 network segment, it's because you want that host to communicate with other hosts on the same segment, without the overhead of routing.

If you do not want this behavior, I suggest that you explain why you do not want it. It is a non-standard solution, so it may require scripting. The proper way to do that is to call the script or command when the interface is up.

But again, that is probably not what you want.


Can some programs found in Ubuntu 18.04 be installed in other desktop environments?

TL;DR - yes, these Zoom and Night Light are only for GNOME.

As far as I can see from htop and other clues as

# find Zoom
$ grep -r Zoom /usr/share/applications/
/usr/share/applications/gnome-universal-access-panel.desktop:Keywords=Keyboard;Mouse;a11y;Accessibility;Contrast;Zoom;Screen;Reader;text;font;size;AccessX;Sticky;Keys;Slow;Bounce;Mouse;Double;click;Delay;Assist;Repeat;Blink;
/usr/share/applications/gnome-keyboard-panel.desktop:Keywords=Shortcut;Workspace;Window;Resize;Zoom;Contrast;Input;Source;Lock;Volume;

# find Night
$ grep -r Night /usr/share/applications/
/usr/share/applications/gnome-display-panel.desktop:Keywords=Panel;Projector;xrandr;Screen;Resolution;Refresh;Monitor;Night;Light;Blue;redshift;color;sunset;sunrise;

Their Exec fields are the following:

# Zoom
$ cat /usr/share/applications/gnome-universal-access-panel.desktop | grep Exec
Exec=gnome-control-center universal-access

# Night
$ cat /usr/share/applications/gnome-display-panel.desktop | grep Exec
Exec=gnome-control-center display

# Both
$ cat /usr/share/applications/gnome-keyboard-panel.desktop | grep Exec
Exec=gnome-control-center keyboard

They are shown only in:

# Zoom
$ cat /usr/share/applications/gnome-universal-access-panel.desktop | grep Show
OnlyShowIn=GNOME;Unity;

# Night
$ cat /usr/share/applications/gnome-display-panel.desktop | grep Show
OnlyShowIn=GNOME;Unity;

# Both
$ cat /usr/share/applications/gnome-keyboard-panel.desktop | grep Show
OnlyShowIn=GNOME;Unity;

above means only GNOME and Unity.

The top icon toggles GNOME specific configuation keys - for example Zoom toggles

/org/gnome/desktop/a11y/applications/screen-magnifier-enabled

between true and false. And this setting is expected to be applicable only to GNOME.

And Night Light toggles the GNOME-only configuration key:

/org/gnome/settings-daemon/plugins/color/night-light-enabled

So we can see that these Zoom and Night Light are related only to GNOME and Unity desktops.

Other desktop may have (or have not) alternatives for them. Night Light may be replaced with RedShift, accessibility tools are usually presented in desktops (for example MATE has mate-at-properties).


This command will exclude all processes having mary as a user or process name:

top | grep -v mary


In order to just build the python binary, after your step (above error), you can manually run

gcc -pthread -static -static-libgcc  -o python Modules/python.o libpython3.2m.a -lpthread -ldl  -lutil   -lm

the difference is -Xlinker -export-dynamic being removed.

But I did not test that binary for real use (just ran it and it runs).


Try to add in your /etc/hosts something like

 127.0.1.1    your-machine


can i use luckybackup to backup entire home dir to 16gb usb drive?

LuckyBackup works well for me backing up files from local disks formatted in ext4 to a 1TB NAS and for belt and braces from the first 1TB NAS to a secondary one.

If backing up to a USB device, you will need to ensure the device is properly mounted - perhaps by following the steps in this resource: https://vitux.com/how-to-manually-mount-unmount-a-usb-device-on-ubuntu/

It is very easy to set up and test (in silent mode) to check the effect of the commands you are issuing.


SWAP
We'll move from using a static swap partition, to a /swapfile.
Edit /etc/fstab
sudo swapoff -a # turn off swap
sudo -H gedit /etc/fstab # edit this file
comment out the line that looks something like this:
UUID=xxxx-xxxx-xxxx-xxxx-xxxx  none  swap       sw       0       0

Add the following line to the end of the file:
/swapfile    none    swap    sw      0   0

Save the edits.
Create /swapfile
Note: Incorrect use of the dd command can cause data loss. Suggest copy/paste.
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile
sudo swapon /swapfile     # turn on swap
free -h                   # confirm nnG RAM and 4G swap

Confirm this line in /etc/fstab... and confirm no other “swap” lines...
/swapfile    none    swap    sw      0   0

reboot                    # reboot and verify operation

Delete the old swap partition
Use gparted to delete the /dev/nvme0n1p6 partition.
Repartition
Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or lose data.
Keep these things in mind:

always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition

a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor

a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor

if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)

you begin any move/resize by right-clicking on the partition in the lower pane of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

Do the following...
Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.

boot to a Ubuntu Live DVD/USB, in “Try Ubuntu” mode
start gparted
move /dev/nvme0n1p5 partition all the way left
resize the right side of /dev/nvme0n1p5 right to make the partition ~60G (tailor to requirements)
note: /dev/nvme0n1p6 has already been deleted
move /dev/nvme0n1p7 partition all the way left
resize the right side of /dev/nvme0n1p7 all the way right
click the Apply icon


How to startup application only on schedule?

The command date +%u will output the day of the week as number. The command date +%k will output the current hour in 24h format. We can use command substitution $() and bash double brackets test [[ to create an appropriate condition:

bash -c '[[ $(date +%u) == [1-5] && $(date +%k) == 1[0-7] ]] && /path/executable'

[1-5] - is a regular expression that describes the working days of the week.
1[0-7] - is a regexp that describes the working hours, it will cover from 10:00 to 17:59.
/path/executable is a synopsis for the command/application that you want to run.
Within the expression [[ <condition-1> && <condition-2> ]], the logical and && means that both conditions must be fulfilled.

According to the question, you can use the above command within crontab, or with Startup Applications. For couple of reasons I would prefer to use Startup Applications.


Shutdown hangs when samba drive is mounted

The previous workaround for this was to create two softlinks to the script in /etc/init.d/umountnfs.sh. This will unmount the samba drive earlier in the shutdown sequence. I don't know if this could have other undesired consequences.

ln -s /etc/init.d/umountnfs.sh /etc/rc0.d/K15umountnfs.sh
ln -s /etc/init.d/umountnfs.sh /etc/rc6.d/K15umountnfs.sh


System randomly unresponsive, apps freezing, possibly related to videos in browser

In kernal versions 5+ there is a bug where browsers render the gpu and write to the disk at the same time. This happens on random machines not all of them.

The current fix is to install and set up "profile-sync-daemon" you may also need to enable Overlayfs. Profile sync daemon writes your browser cache to ram and thus mitigating the artificial IO bottle neck.

This affects AMD and Intel

They talk about it on Linux Unplugged EP.352 at the very end.


Aha!

So I found if you hold the "Fn" you toggle the function of the F shortcut keys. So somehow I have managed to switch around the two sets of shortcuts such that I can only now use the default ones (which refer hardware shortcuts specific to the PC) if I hold "Fn".

to actually fix the problem and swap around the active F key shortcuts do Fn + Esc


failed install NTP server because ibopts25 not available

Ubuntu 15.04 is not supported since 2 years. That is why there is no data available to it.

It is in fact not a LTS relese. Update to a supported release e.g. 16.04 (LTS) or 17.10.


battery discharges in a strange way on Lenovo Ideapad Z500

Have you calibrated the battery recently?  After a while they need recalibrated by doing a full 100% charge, discharge to < 5%, recharge to 100% cycle.


Select multiple non-consecutive files in Nautilus using only the keyboard

When you keep holding down the ctrl key and press space you can move around with the arrow keys and select no consectuive files. Only downside of that, at least for me is, i dont have a file selection when moving and have to count the files, but that can be the case that im using an pretty old Laptop.


Screwed up lightdm file and am now in login loop

Login using the TTYs: Press CtrlAltF2 (or F1toF6) to get to a login prompt, login, then use sudo nano to edit the configuration files.


file extensions to determine file usage are an abomination.  they don't exist on linux.

most "installers" on ubuntu will have the deb extension, but if it's a script that installs something it could be language dependent.  examples: bash, sh, py, etc.

.run is also common or binary installers.


Connected to WiFi but can’t access internet

If you can ping your gateway by running:

sudo ping $(route -n | grep 'UG[ \t]' | awk '{print $2}')

then this is nothing but a DNS issue, and accordingly you can just attempt a quick temporary fix by running

sudo echo 'nameserver 8.8.8.8' > /etc/resolv.conf

This will likely not survive reboot if your resolv.conf is managed by NetworkManager for example but at least you will know right away that it is related to the way the DNS is getting resolved.


How to find path of program launched from dock (not visible in software manager)

It will be in a .desktop file.

Run this command:

gsettings get com.canonical.Unity.Launcher favorites

it will give an output like this:

['application://ubiquity.desktop', 'application://nautilus.desktop', 'application://firefox.desktop', 'application://libreoffice-writer.desktop']

If you have locked it to the sidebar, it will show in that list.

There are two places it could be, /usr/share/applications/ or ~/.local/share/applications.

We will look in both of them will the ls command, and grep for the name we found above, e.g. cisco.

ls /usr/share/applications/ | grep cisco

You may find a file. If not, use the command again in the other folder:

ls ~/.local/share/applications | grep cisco

-->

Now, when you find the file (if you do), use the cat command:

cat /usr/share/applications/cisco.desktop

It will give output like this (this is the file for idle3):

[Desktop Entry]
Name=IDLE 3
Comment=Integrated DeveLopment Environment for Python3
Exec=/usr/bin/idle3
Icon=/usr/share/icons/Ultra-Flat/apps/scalable/idle3.svg
Terminal=false
Type=Application
Categories=Application;Development;
StartupNotify=true

Notice the exec line:

Exec=/usr/bin/idle3

That shows us where the executable file is. Run it in the same way it is written there.


Does installing from source stop apt-get updates?

APT only see what is in the APT database.

If you install from source APT will not be aware of that and it will NOT be upgraded via APT!


How to install Ubuntu on the Raspberry Pi 3?

Only Light weight Linux/Ubuntu distro will work for the Raspberry Pi. Ubuntu it self is too heavy and will cause you Pi to lag real bad. Ubuntu Mate is a Officle flavor of Ubuntu. That means when Ubuntu gets updates Ubuntu Mate gets updates. Ubuntu Mate is the only Ubuntu that works best for the Raspberry Pi. F.Y.I, If you plan to use Ubuntu Mate, please use a class 10 or better SD card, otherwise you might get horrible lag. Hope this helps!


By default, xwiimote puts it's library files in /usr/local/lib instead of /usr/lib. On most systems, that path is not searched for libraries, so your application fails to load.

You can choose to reconfigure with ./configure --prefix=/usr and rebuild or add the libraries to your load path with export LD_LIBRARY_PATH=/usr/local/lib


Setting up sendmail on a server without webserver

When you typed in sudo sendmailconfig, you should have been
  prompted to configure sendmail.

  For reference, the files that are updated during configuration are
  located at the following (in case you want to update them manually):

/etc/mail/sendmail.conf
/etc/cron.d/sendmail
/etc/mail/sendmail.mc

  You can test sendmail to see if it is properly configured and setup by
  typing the following into the command line:

$ echo "My test email being sent from sendmail" | /usr/sbin/sendmail myemail@domain.com

  The following will allow you to add smtp relay to sendmail:

#Change to your mail config directory:
cd /etc/mail

#Make a auth subdirectory
mkdir auth
chmod 700 auth

#Create a file with your auth information to the smtp server
cd auth
touch client-info

#In the file, put the following, matching up to your Internet Service Provider's smtp server:
AuthInfo:your.isp.net "U:root" "I:user" "P:password"

#Generate the Authentication database, make both files readable only by root
makemap hash client-info < client-info
chmod 600 client-info
cd ..

#Add the following lines to sendmail.mc. Make sure you update your smtp server
define(`SMART_HOST',`your.isp.net')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnl

#Invoke creation sendmail.cf
m4 sendmail.mc > sendmail.cf

#Restart the sendmail daemon
service sendmail restart

Copied from sendmail: how to configure sendmail on ubuntu? on Stack Overflow, answer by Venice, but modified to change opening ' quotes to `. (That question was too old to migrate here.)


Update Manager doesn't work "ImportError: No module named 'codecs'"

This can happen if your filesystem has been damaged. Check the logs for hints, and also look inside /lost+found.
The solution is to reinstall the package containing the missing module.

Find the Ubuntu package providing this file:

dpkg -S /usr/lib/python3.4/codecs.py

Reinstall the package:

sudo apt-get install --reinstall libpython3.4-minimal

Also, reinstall the packages that provide any other files found in lost+found


Adjust Terminal - (Arch-like Info-Screen)

You say you've already got the MOTD part set up, so now it's just:
echo 'cat /etc/motd' >> ~/.bashrc

A brief aside, you get this:

If you install Ubuntu 11.10 server.  If you're migrating from arch, I suspect you may be more comfortable with adding to a server install instead of installing ubuntu-desktop.


I can't uninstall tuxcut 5.0 (tried everything from purge , autoremove , remove )

I had the same error, I restarted my PC then I used your command:

sudo apt-get purge tuxcut

and it works fine.


Ubuntu 15.04 - Google Chrome official package always fails to install

This should be fixed by running the following command

sudo apt-get install -f


You can set your original mount folder attributes to make it immutable:
chattr +i /mnt/external

The folder is now locked and any operation on it is forbidden (you can unlock it using -i).
However mount or fstab still work properly.

Make sure the drive is not mounted before running chattr. If you get the error "Inappropriate ioctl for device While reading flags", maybe your are working on a filesystem that doesn't support attributes on folders. In fact some Linux distributions mount the main partition using overlayfs filesystem instead of ext. So you have to mount it manually elsewhere in order to get chattr working on folders (i.e. mount /dev/mmcblk0p3 /mnt/temp then chattr +i /mnt/temp/root/mnt/external).


Limiting curlftpfs/sshfs overhead in Nautilus, or any other file manager

Regarding Nautilus:
To stop wasting time on unwanted preview and file counting actions  go to preferences and the preview tab and adjust your settings to match this:

Regarding alternatives:

I've found PCManFM to be very lightweight and fast (even on underpowered systems). PCManFM is the default for the LXDE desktop which is popular for systems that aren't quite as robust and might be a good choice for your situation. You might want to give it a try. There are several lightweight file managers available for Linux. PCManFM is just one among many.

Some other good choices are:

Gentoo File Manager, ROX-Filer, and Xfe

This is by no means an exhaustive list, but just a small sample of what I found.

Source: https://www.google.com/search?client=ubuntu&channel=fs&q=lightweight+file+managers+linux&ie=utf-8&oe=utf-8


What is the patch Level of Ubuntu 12.04.4

You can find the current revision number or patch level in /etc/lsb-release and /etc/issue. As far as I can tell, that's what the application prerequisites refer to, because that's the only sub-release versioning scheme of Ubuntu.


Maybe try another app like this for Windows, or this for Ubuntu


The definition of sigset_t should give you a clue, its not a plain int, it's more complex:

Note the array of words within __val.

# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))
typedef struct
{
    unsigned long int __val[_SIGSET_NWORDS];
} __sigset_t;

You could try:

signal.__val[0];

Note that you should expect garbage in the initial print from the stack.

Of course you shouldn't be looking within this structure in the first place since it is supposed to be opaque. But it is useful for debugging sometimes.


Ubuntu 20.04: Youtube playback not working

In my case, I have also open Citrix Workspace app. 20.3. If I close Citrix, local videos are playing again. I reverted from Citrix Workspace 20.03 to 20.01. After reboot, I opended Citrix Workspase and I connected bact to remote, local video is playing again as it should. Let's see, how long it stays good..


How to have more than one wine version on same machine without corrupt anything?

You can use PlayOnLinux to provide multiple WINE versions. There is also something called WINE Bottle Manager, but I don't have a link to that (and I'm not sure if it is in the repos). If I find anymore info I'll update my answer.


Moving from one monitor to another on a Dual monitor system

Sounds like it could be the "Sticky Edges" feature. You can disable it in System Settings>Display, at the bottom of the options list.


How to paste a path in "ubuntu explorer" to rapidly access a folder?

Press CtrlL. The breadcrumb trail on the File browser will change to an address bar like the one you see in browsers. Paste the location and press Enter. Press CtrlL again to revert to the trail.


League of Legends in Xubuntu 16.04.1 keeps crashing while updating

What work for me in Ubuntu 16.04 LTS as of patch 6.22 was changing settings of LoL launcher through PlayonLinux.

1.Install the most recent version of PlayonLinux and install the League of Legends. (Do not start game after installation)

Using PlayonLinux access the LoL game settings.
In PlayonLinux change the default wine version using the "General" tab.From 1.9.2 LeagueofLegends5 to the latest stagging version. When i wrote this answer it was "1.9.22stagging" i install both x86 and x64 wine versions. (again this all done through the playonlinux settings)
Through playonLinux settings now access the "wine" tab and click on "configure wine" icon. There you will change the default windows version from Windows XP to Windows Vista. (all other don't seem to work at least not on my PC)
Now using PlayonLinux start the LoL launcher (the screen will look weird, however, you should be able to see the League of legends logo on the top left, the percentage and download speed bar on the middle and the settings and minimize icons on the right.
This installation takes longer than when using windows.For me using Windows LoL installs in about 2.5 hrs. However, using Ubuntu it took 5 to 6 hours to install. During the installation it might seem like if the installation freezes or your installation stops and your download speed might even reduce to cero for a while but "PLEASE BE PATIENT"
Today is November 15, 2016 and i install LoL 6.22 and play.

8.if there is any new patch i would try waiting for the new playonlinux stagging version of wine before removing or changing anything else.


Judging by this GitHub bug report it looks like Garry's Mod has been broken on Linux for more than a week now. There doesn't seem to be any proper workaround available. You will probably have to wait for a patch to address this issue.


Go to Language support, and make sure that both the Language tab, and Regional Format tab are both set to English.  I would also recommend that you go into the Keyboard layout, just to make sure English is there.


I just installed kmag v1.-00 on Ubuntu 19.04 and it's default setting is view, stay on top, which is does do.
try right click on its mag area, settings, stays on top


Its not related to year transition.Try the below command on terminal to install date and time indicator,

sudo apt-get install indicator-datetime

After that logout and login back to take effect.


Is it possible to connect (wireless) a usb printer to WLAN?

It sounds like you're suggesting plugging a wifi dongle into the USB port of a printer. This won't work as you'll need a USB host port to accept the dongle (and the printer will need to know how to use it). No. No go.

However you can buy little wireless print-servers that are intended to do what you're suggesting. They're actually little Linux boxes that connect to the printer and the network.

Here's one: Edimax PS-1206U for a snitch over £22

Connecting it to a computer and sharing it is an option but, as you've already worked out, that requires you leave your computer on all the time. That's going to use a lot more power than a little RISC 0.5A box.


WUBI uses Windows bootloader that needs to be reverted back to its previous state using Windows tools.

When Ubuntu is installed using Live USB, it uses its own bootloader called GRUB.

Use How do I remove wubi? to fix Windows bootloader first.

Then you may have to fix GRUB using Boot Repair.

Look at Installing Ubuntu Alongside a Pre-Installed Windows with UEFI for detailed instructions on Ubuntu installation on UEFI computers with Windows 8. Some of it won't apply since you have Windows 7, but the rest may be useful.


run this command to baukup ur sourses.list ..

sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak

then go to this page Ubuntu Sources List Generator

then pickup ur country  and ur release of ubuntu then Generate listafter that
copy and past it after run this command sudo nano /etc/apt/sources.list

last command sudo apt-get update

Have fun !


Installed Ubuntu, overwrote GPT boot record, how best to restore?

BIOS/CSM/legacy-mode and EFI/UEFI-mode booting work quite differently. In particular, you have almost certainly not overwritten any Windows boot records or files. Rather, you've simply set GRUB to be the default boot loader; but as GRUB relies on files stored on the USB flash drive, the result is that GRUB won't work correctly unless the USB flash drive is plugged in. There are several ways to solve this problem, including (but not necessarily limited to):

Install another boot manager -- Some non-GRUB boot managers don't rely on files stored off the EFI System Partition (ESP). For instance, my rEFInd boot manager should work well for you. If you install rEFInd and make it the default boot program, you'll see rEFInd every time you boot, but you'll still be able to boot Windows even when the USB flash drive is unplugged. One possible complication is Secure Boot; if it's enabled, you'll need to enroll one or two Secure Boot keys using the non-user-friendly MokManager user interface the first time you boot. See the rEFInd Secure Boot documentation for details. In theory, you could use the Windows boot manager as the default boot program; but I don't know offhand how to configure it to chainload to GRUB. If you want to pursue this option, I suggest you ask about it on a Windows forum.
Use the built-in boot manager -- Your computer likely comes with a built-in boot manager, which you can use to bypass GRUB and boot Windows. Details of how to use this vary from one computer to another, though. Typically, you must hit Esc, Enter, or a function key when you power on the computer; but which key to hit varies from one system to another. You could do this just to boot Windows, or you could change the default (via efibootmgr in Ubuntu or EasyUEFI in Windows) to boot Windows and then use the built-in boot manager only when you want to boot Windows.
Move /boot -- The GRUB configuration files are in the /boot/grub directory, so one way to handle this is to create a small (~500-1000MB) /boot partition on your computer's internal hard disk. This will keep GRUB working even when the USB drive is unplugged. This is most easily done during Ubuntu installation, so if you're willing to re-install, you might try it. You can also do it after installing Ubuntu, but this will require moving files around and then re-installing GRUB. See this question for a bit more on this possibility.
Reconfigure GRUB -- It's possible to reconfigure GRUB to not rely on files in the Linux /boot directory. This is an advanced topic, though. This wiki page describes this sort of advanced GRUB configuration. (Note that the page describes itself as outdated and refers to another one; but the new page lacks the details needed for this approach.) Note that if you do this, the default GRUB configuration scripts will no longer keep grub.cfg updated, so you'll need to handle that yourself, which means more ongoing maintenance effort on your part. Overall, I don't recommend you try this approach; I mention it only for the sake of completeness.

Note that no reconfiguration within Windows should be necessary, with some possible exceptions:

You might use EasyUEFI to adjust the default boot order, as noted earlier.
If you want to use the Windows boot manager to control the boot process, as noted earlier, you'll need to reconfigure it within Windows.
If you haven't disabled Fast Startup and disabled Hibernate, though, you should do that. These features make dual-booting dangerous because they can lead to filesystem damage. This has nothing to do with your USB-based Ubuntu installation, though.


With photorec before you start [Search] under [File Opt] you can choose the file extensions you wanna recover.

photorec is a part of testdisk project but photorec is for recoverying  files while testdisk is for recovering and repairing partitions.


Is this the pdf involved ?

I tried a few things, like changing encoding, convert and re-encode, but i think you are in the situation described here :

  your best bet is to save the PDF as a images (TIFF or PNG) and then
  combine them back together and OCR.


Chromium build (out of tree), Plugins location, and Flash?

Well, didn't expect this, but I found an answer:

List of Chromium Command Line Switches « Peter Beverloo

--ppapi-flash-path      Use the PPAPI (Pepper) Flash found at the given path.

So, since I unpacked flash_player_ppapi_linux.i386.tar.gz in a directory called flash_player_ppapi_linux.i386 inside the chrome-linux-382086 (that is, the plagin is at chrome-linux-382086/flash_player_ppapi_linux.i386/libpepflashplayer.so), I used this command line:

chrome-linux-382086$ CHROME_DEVEL_SANDBOX=$PWD/chrome_sandbox ./chrome-wrapper --incognito --ppapi-flash-path=$PWD/flash_player_ppapi_linux.i386

... and now Flash is visible in chrome://plugins, and it even starts up and loads swf's ... However, from what I've seen, the flash plugin loaded like this doesn't seem to be able to make some network connections? However, for the most part it seems to work...


How to properly configure a dconf schema from a gschema.xml file?

If your extension have gschema.xml file.. and after successful installation of the extension, if you dont find the gsetting keys mentioned in the gschema.xml file.. It indicates that the gschema.xml file is not compiled while the installation process..

In such case.. you need to manually compile the gschema.xml which is provided with the extension.

to compile the schemas.. first copy the gschema.xml provided by the extension, to any of the folder mentioned below..

$HOME/.local/share/glib-2.0/schemas/
/usr/share/glib-2.0/schemas/

Where to copy in above two choices is self explanatory.. first one for local or per user based.. second one is global or admin based..

to compile the schemas.. run the below command from the any directory mentioned above.

glib-compile-schemas .

Example:

As a local user

cd $HOME/.local/share/glib-2.0/schemas
glib-compile-schemas .

for global or as a Admin

cd /usr/share/glib-2.0/schemas
sudo glib-compile-schemas .

Note that, In a default installation $HOME/.local/share/glib-2.0/schemas will not be available so you need to create the directories first with below command

mkdir -p $HOME/.local/share/glib-2.0/schemas

Similarly when you delete the extension or you want to remove the gsetting keys..

Delete the file gschema.xml and then run the glib-compile-schemas command.


KTorrent takes up about as much disk space as any other application does, but you're likely seeing a combination of all the packages that would have to be installed as a result. If you're not running KDE already this effectively means the amount of disk space needed for the core libraries (Qt) used.


When i download something and click 'show in folder' nothing happens

Easy solution without using show in folder. In the top left corner of your Ubuntu sidebar, click Search. Then type in  "Files" and open it. Navigate to Downloads and there the file will be. The same way Windows files or Mac would be stored in their respective file managers, Ubuntu's will too. I would recommend (If you do not already) having Files on your sidebar for quick access to all files.


Why is nvm not packaged in the ubuntu repositories?

As per https://github.com/creationix/nvm/issues/761, it seems that the author(s) of nvm (the Node.JS Version Manager) strongly opposes to packaging nvm using distribution's standard package management tools, and prefer to roll their own solution.

This most likely didn't motivate people to package the tool.


What is the difference between giving input by typing from keyboard and by redirecting?

write(STDIN_FILENO, ...) will return -1 when STDIN_FILENO is not
connected to a terminal, for example when it comes from a pipe as in
./main < input.  You can use isatty(3) to check if stdin is
connected to a terminal. As a sidenote, it's a good practice to check write() return code in the program and let user know that things were wrong by printing a corresponding errno message and write only as many characters as read by read(). Your program could look like this:

#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
#include <fcntl.h>

int main(void){
    char buff[0x10];
    size_t count = read(STDIN_FILENO, buff, 0x10);

    printf("isatty(STDIN_FILENO): %d\n", isatty(STDIN_FILENO));

    int result = write(STDIN_FILENO, buff, count);
    if (result == -1)
      {
         perror("write");
         return EXIT_FAILURE;
      }

    printf("\nresult: %d\n", result);
    return 0;
}

Result:

$ ./main
abcdefgh12345678
isatty(STDIN_FILENO): 1
abcdefgh12345678
result: 16
$ ./main  < input
isatty(STDIN_FILENO): 0
write: Bad file descriptor


Can't open Rails console after upgrading to Ubuntu 20.04, libreadline.so.7 not found

Check your Gemfile.lock. It'll list what version of everything the rails app is looking for. It's probably got the 0.7 version in there. From the Gemfile.lock, you can look up which gem is using libreadline and look for a version where the newer version is implemented. In your Gemfile, specify the appropriate version and you should be good to go.


Please recommend a tool of terminal cast

Found tmate. And since one could host his own tmate server, I think this is the tool I was seeking.


How to re-create the x-terminal-emulator alternative?

I think, reconfiguring may help easily here:

$ sudo  dpkg-reconfigure your_terminal_program


Rails application directory has different $PATH value than other directories on the system

First, this isn't really an answer as to why it has that, but rather a solution/workaround.

First, lets make a rails application:

  jrg@discovery:~/code$ rails new sample

Then, we need to make a .rvmrc file for our application. More on why thats important over here, but the basic idea is that its isolated. Save this inside the rails application sample (so if its in ~/code, we need to save the .rvmrc in ~/code/sample/.rvmrc)

All the .rvmrc file needs to contain is something like this:

  rvm --create 1.9.3@$project

Change $project to whatever you want, it doesn't matter.

Then, cd into ~/code/sample, and you'll be greeted with a scary warning:

Because you know whats in this one, you can safely type y for yes, although I highly recommend that you type v (for view) with any strange .rvmrc's - they can be a security risk, although I haven't seen any.

Now, run bundle install to install all your gems. Enjoy!


Ask me before switching to a different WiFi network?

Go to the Network Settings and find out unintended wifi networks and go for edit-->general-->uncheck the option-- automatically connect to this network when available.

I think this should solve it. You can always select the optional wifi from the main menu bar.


I want to read my *.bok and *.mdb in Ubuntu 12.04?

Try Maktaba El-Kirtasse or Maktabah Al-Miftah 3.1 (Ubuntu 12.10). Both can import .bok file automatically.

If you use Maktabah Al-Miftah 3.0 (Ubuntu 12.04), you need to import .bok manually. Download AccessDump.py here. Run this command in terminal after you entered the AccessDump.py folder:

MDB_JET3_CHARSET="cp1256" python ./AccessDump.py filename.bok | sqlite3 filename.mfth

Then you may open the .mfth file with Maktabah Al-Miftah 3.0.


Go to Ubuntu Software Centre ,then choose the game you want to install, click install button.


Ubuntu 18.04 login loop after upgrading from 16.04

sudo dpkg -P $(dpkg -l | egrep '^ic' | awk '{print $2}')

This is an atempt to remove packages in unclean state
Then identify other nvidia-packages on your system with
dpkg -l | grep nvidia

and remove then.
Make a reboot.
ubuntu-drivers devices

Show you which driver for your nvidiacard is the right one. Install it with apt or ubntu-drivers.


How can I unpack a tar file into a blank disk image?

If you've already mounted the disk image, open a terminal and do:

cd /path/to/diskimage/mountpoint
tar -xvf /path/to/file.tar


check what process was causing the problem of high cpu load

While the web access may be coincidental, it's certainly possible that
the Korean web crawler Naver created an unintentional Denial Of Service (DOS)
against your site by aggressively crawling it.  This can potentially crash
nginx or your OS, or it can just make them too slow to respond effectively
to new requests.

Using a website load-tester can help to determine just how much load your site
can handle, and perhaps reproduce whether a heavy load could indeed cause a
problem to your webserver.  Depending on the detail provided by the load-tester,
you may be able to determine whether there are any improvements you can make
to your site code or configuration to improve response.

You can also choose just to block the offending web client, or create/modify your
local robots.txt file
to block a specific crawler (e.g. Yeti) or specify what part of your site they
should not crawl.  Sorry to hear in your comments, but apparently Yeti isn't
honoring your robots.txt file, so blocking their IP range seems reasonable.


Setting the scaleHeight attribute of an xterm while within the xterm

I don't think xterm can modify this value runtime.

You can place your setting in ~/XTerm in which case it's read every time xterm starts up. After modifying this file, all you need is quit and restart xterm.

If you place it in ~/.Xresources, you need to execute xrdb merge ~/.Xresources and then restart xterm for the changes to take effect.

This is because xterm itself looks at the contents of ~/XTerm; and queries the X server for the server-side resources which are loaded to the X server at startup or manually using xrdb.

No need to reboot the system. (Worst case you could just log out of the graphical environment and log back again, but that's not needed either.)


Buying new pc but don't want to reinstall everything

Ubuntu: not a problem. If you remove the proprietary drivers (and even that is not always needed) from Ubuntu you can take out the hard disk and put it into the other system. Or create a dump from the whole disk (with dd) and copy it over to the other system. Not saying it will be quick or that this method is user-friendly but it is possible.

And as in comments: 2 hours tops for installing Ubuntu. Maybe an extra hour for all the extras you need. With 1 comment: during the install you can still use your machine and use the internet. All you need to do is set up your internet before the install. Oh and a 15, 20 minutes install time if you start using SDDs.

Windows ... off topic  ... but no such luck. You even need to buy a new license (it will come with the new system) and will need to re-install everything.


What you've got is a broken USB key.  Most of the time on brand names, the memory cells go first whereas with cheap brands it's the control circuit that goes first.

You've got a prime example of memory cell fatigue.  Just throw the key away and buy a new one. I would advise you to buy an SLC USB key.  I've got an 8GB Kingston Data Traveller that is still working after 8-9 years now...

Granted, I only use it as a lubuntu boot disk to disinfect Windows computers, but it's still fast and works flawlessly.

SLC ones are about 2* more expensive then MLC ones, but they're 4-8 times as fast and last 4-8 times as long.  They're really SSDs on a stick!

Sorry to be the harbinger of bad news!


How to log in into Windows Ubuntu One Client as an restricted Windows User (Windows 7)?

Firstly have you got the latest version of the Ubuntu One Windows client? (2.01)
Secondly I'm not clear what you mean by "I have generated an account as Windows admin, but now I want to use the client as a restricted user".
Does that mean you created an Admin account and then changed it to a Standard account (that's the Windows term - not "restricted") or did you create an Admin account and then create another Standard Account?


Create an installer/package for a script

Github - fpm - Effing Package Management
I think this is what you need.
For another tool for easy packaging:
Debreate
For a guide involving a few tools:
create a .deb Package from scripts or binaries
All the answers here are relevant for both Python and Bash:
How do I create a deb package for a single python script?
Especially the first answer in the above link is very useful.
If you wish to learn all of it without missing anything consider this:
Ubuntu Packaging


How to edit the MBR in multi Boot scenraio?

You have 3 options available, all of them work but I just don’t like the Windows bootloader as I prefer my custom boot via grub.

Install EasyBCD in Windows and use the Windows boot-loader

Or
You can boot from a  Live CD/USB and install the Grub Boot-Repair Tool

In the terminal type in the following command:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

The Grub Boot Repair Tool is Graphical Interface tool which is very easy to use.

Or
The third option is to use the Terminal to repair the Grub boot. Visit this link to get the full overview


In Gnome 16.04 Window minimize shortcut is not working

There should be these shortcuts to minimize a Window:

Ctrl+Alt+NUMpad 0 to minimize/restore the current window
Ctrl+Super+↓ to minimize/restore the current window
(needs to be pressed twice if the current window is maximized)
or Ctrl+Super+KeyPad 0 to minimize the current window (called Hide Window) in the shortcut configuration panel — notice that from there you can't differentiate keypad-numbers and normal numbers, but they are different shortcut-wise.
and Ctrl+Super+D to minimize all windows.

I never heard of Super+H to minimize windows though.


Can't play NightSkyHD because file-type is unknown

The file that you downloaded is not the easiest to use option, there are two better ways to download and install it:

If you have a Ubuntu account, you can click on the big orange "Download for Ubuntu" button, you will be asked for your username and password. After a while you should be able to download and install the games from the Software Centre.

If you want to download it the "old-way", download the deb files, not the tar.gz. Double click on then to install.

With both methods you should be able to start the game from the dash.


USB and Microcontroller communication problem

Check USB Vendor ID, Product ID and Serial Number.

$ dmesg | grep usb
[...]
[11427.635362] usb 2-1.2: new high-speed USB device number 8 using ehci-pci
[11427.730823] usb 2-1.2: New USB device found, idVendor=04e8, idProduct=685e
[11427.730830] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[11427.730834] usb 2-1.2: Product: SAMSUNG
[11427.730838] usb 2-1.2: Manufacturer: Android
[11427.730842] usb 2-1.2: SerialNumber: S610275b03f86
[11427.742314] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[11427.742436] scsi8 : usb-storage 2-1.2:1.0
[11427.786013] usbcore: registered new interface driver cdc_acm

Or udevadm info -a /dev/ttyUSB1 may be more complete.
Create new udev rules file. Example with rules for Android phone, Arduino, Bus pirate and an ARM kit.

$ sudo nano /etc/udev/rules.d/99-my-usb-serial.rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="685e", ATTRS{serial}=="S610275b03f86", SYMLINK+="android"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A6008isP", SYMLINK+="arduino"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A7004IXj", SYMLINK+="buspirate"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="FTDIF46B", SYMLINK+="ttyUSB.ARM"

References:

Persistent names for usb-serial devices
Getting Started with BeagleBone & BeagleBone Black or exactly mkudevrule.sh


This looks like a problem with how you are downloading (may be downloading the thumbnail instead of the full image?) or from which source (overly resized picture).

If the backgrounds page in system settings tells you that the image resolution is 300x300, then chances are very high that this is true and you should check and look for a source that provides the image in better quality (e.g. How to search by image).

As you can see below given the right image, everything is fine. Here you go.


What does "whiteout" mean in a copy-on-write filesystem?

It is how the union file system supports deleting from a union where the underlying file to be deleted resides on a read-only file system.

Say you have

/bin (read-only)
/usr/bin (read-only)
/home/USERNAME/bin (read-write)

all union mounted together in /bin (read-write).

And you do rm /bin/ls.

It would place a whiteout for ls in /home/USERNAME/bin, which makes it look like /bin/ls has been deleted.

See State of the unionfs for a good read and a full explanation.


Wifi disabled by hardware switch on hp pavilion G6 2231-tx

This is not an Ubuntu issue. This is not any driver issue. This is caused by me (and possibly you).
While watching some video... I tried to increase volume with: Fn + F10 key combination ... But I mistakenly pressed Fn + F12 which was Wifi button with 'Radio' symbol on it, which disabled my wifi connection.
Running below command in Terminal, you can see the issue:
> rfkill list all

    0: Toshiba Bluetooth: Bluetooth           #or whatever it is
        Soft blocked: no
        Hard blocked: no
    1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: yes    `<------ that's because I press Wifi button (above) `mistakenly`

Solution: Press again the Fn + F12 (or, some other key where you have Radio symbol)
Now run again the same command:
> rfkill list all

    0: Toshiba Bluetooth: Bluetooth           #or whatever it is
        Soft blocked: no
        Hard blocked: no
    1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no

    <------ no means solved.

Now, go to:

(Windows button, if you have on the keyboard) > Settings > Wifi > move
to On > select your Wiki connection to enter credentials

Done, your internet is back on.
Reference = here
I hope this works ...


This link takes you to a simple tutorial on how to install Ubuntu:

http://www.youtube.com/watch?v=i_4Kh5kE3xA

If you prefer instructions on screen, try here:

http://www.ubuntu.com/download/desktop/install-ubuntu-desktop

If you have any further questions, feel free to log into the IRC Chat or follow up here! We, the community, are here for you


network icon problem in lxpanel in lubuntu

Simple fix (Without downloading anything, use 16px icon)

Remove old links

sudo rm /usr/share/icons/elementary/panel/22/nm-device-wired.svg
sudo rm /usr/share/icons/elementary/panel/22/nm-device-wired-autoip.svg

Make new links to 16px icon

sudo ln -s /usr/share/icons/elementary/panel/16/nm-device-wired.svg /usr/share/icons/elementary/panel/22/nm-device-wired-autoip.svg
sudo ln -s /usr/share/icons/elementary/panel/16/nm-device-wired.svg /usr/share/icons/elementary/panel/22/nm-device-wired.svg

Nice look fix (Download same theme icon set)

Remove old links

sudo rm /usr/share/icons/elementary/panel/22/nm-device-wired.svg
sudo rm /usr/share/icons/elementary/panel/22/nm-device-wired-autoip.svg

Download lubuntu-icon-theme binary (Ubuntu 14.04, from https://launchpad.net/) & extract it

wget http://launchpadlibrarian.net/156931592/lubuntu-icon-theme_0.42_all.deb
dpkg-deb -x lubuntu-icon-theme_0.42_all.deb lubuntu-icon-theme/

Copy only wired icon  to elementary theme folder

sudo cp lubuntu-icon-theme/usr/share/icons/lubuntu/panel/22/nm-device-wired.svg /usr/share/icons/elementary/panel/22/nm-device-wired.svg
sudo ln -s /usr/share/icons/elementary/panel/22/nm-device-wired.svg /usr/share/icons/elementary/panel/22/nm-device-wired-autoip.svg

How did I get this?

Trace file opening of nm-applet while I change status. (... ie lines I removed)

$ pkill nm-applet
$ strace -e trace=open nm-applet
...
open("/usr/share/icons/elementary/panel/22/nm-no-connection.svg", O_RDONLY|O_LARGEFILE) = 13
open("/usr/lib/i386-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so", O_RDONLY|O_CLOEXEC) = 14
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 14
open("/usr/lib/i386-linux-gnu/librsvg-2.so.2", O_RDONLY|O_CLOEXEC) = 14
open("/usr/lib/i386-linux-gnu/libcroco-0.6.so.3", O_RDONLY|O_CLOEXEC) = 14
open("/usr/lib/i386-linux-gnu/libxml2.so.2", O_RDONLY|O_CLOEXEC) = 14
** Message: using fallback from indicator to GtkStatusIcon
open("/usr/share/icons/elementary/panel/22/nm-no-connection.svg", O_RDONLY|O_LARGEFILE) = 13
** Message: applet now embedded in the notification area
open("/usr/share/icons/elementary/panel/22/nm-no-connection.svg", O_RDONLY|O_LARGEFILE) = 13
open("/usr/share/icons/elementary/animations/22/nm-stage01-connecting01.svg", O_RDONLY|O_LARGEFILE) = 13
open("/usr/share/icons/elementary/animations/22/nm-stage01-connecting02.svg", O_RDONLY|O_LARGEFILE) = 13
...
open("/usr/share/icons/elementary/animations/22/nm-stage03-connecting10.svg", O_RDONLY|O_LARGEFILE) = 13
open("/usr/share/icons/elementary/animations/22/nm-stage03-connecting11.svg", O_RDONLY|O_LARGEFILE) = 13
open("/usr/share/icons/elementary/panel/22/nm-device-wired.svg", O_RDONLY|O_LARGEFILE) = 13
...

Notice last one, when I connected wired network. Then I check it if it is a file.

$ ls -l /usr/share/icons/elementary/panel/22/nm-device-wired.svg
lrwxrwxrwx 1 root root 20 Sep 25  2011 /usr/share/icons/elementary/panel/22/nm-device-wired.svg -> nm-no-connection.svg

$ ls -l /usr/share/icons/elementary/panel/22/*wired*
lrwxrwxrwx 1 root root 20 Sep 25  2011 /usr/share/icons/elementary/panel/22/nm-device-wired-autoip.svg -> nm-no-connection.svg
lrwxrwxrwx 1 root root 20 Sep 25  2011 /usr/share/icons/elementary/panel/22/nm-device-wired.svg -> nm-no-connection.svg

It was a link to nm-no-connection.svg same as /usr/share/icons/elementary/panel/22/nm-device-wired-autoip.svg. That was the problem.


Doesn't my bios support booting from USB?

If this is the ONLY screen that is related to the boot order in your BIOS setup, it doesn't seem to support USB boot.

HOWEVER, in some BIOS settings I saw before, the HDD: 4M-SAMSUNG HD1 item in the boot list is actually alternable.

Sometimes there is a seperate setup sub-menu in the BIOS setup where you can setup the priorities of all HDDs on the computer and only the HDD with the highest priority in that list appears in the boot menus as an HDD: ... item.

Try if you can find such a menu in your BIOS setup and if yes, try if you can find your USB drive in that menu and make it first. After that, the HDD: 4M-SAMSUNG HD1 item will become something like HDD: USB... and then you can boot from it as you boot from an internal HDD.

By the way, USB booting should be supported if your PC/BIOS is NOT too old. Even my 8-year-old HP laptop (bought in 2006) supports USB booting without a BIOS upgrade.


It is possible to change the icon theme on a remastered live cd?

I have done this before for Demi Lovato Linux

look here are some files labeled root, It contains the configs and everything for reference.

for this you edit this file /var/lib/gconf/debian.defaults

look for this line

<entry name="icon_theme" mtime="1323406457" type="string">
                <stringvalue>Demi_Lovato</stringvalue>
            </entry>


I had to run lvcreate in order to get it to display lvdisplay


Power-cut during upgrade from Ubuntu 18.10 to 19.04. What's corrupted?

You're probably fine.

The apt process is able to withstand a bit of interruption. Most of the time it can resume an upgrade at the point it left off. If not, it will tell you by warning that a package is in an unstable state. I have not seen that happen as a result of a power cut though.

How to resume a version update: do sudo apt update && sudo apt upgrade. This will tell you if anything is wrong, and if so, what you can do to repair things. Very possibly the process will simply carry on; if not, apt will tell you to do a command like sudo dpkg --configure -a (configure the packages that have not been configured yet) or even sudo apt install -f (install packages that have not been installed yet and fix any broken dependencies).

You may need a combination of these to perform the complete upgrade. As soon as the command sudo apt update reports that there are zero packages to install or configure, your system is fine.


Resizing ARM Ubuntu Desktop to fit Screen

Please try to ask only one question per thread.

To know what RAM your hardware has, you can launch :

sudo lshw

and look at the *-memory line. This will tell you haw much RAM your motherboard has, and also exactly how they are placed.

  In my case, for example, it says I have 8 GB installed, and the detail
  tells me I have 4x 2 GB at 1066Mhz

Another way to do this, but that is the RAM your Ubuntu uses, it's to launch :

free -h

Mem table tells you how many RAM your system has, and -/+ buffers/cache how much is used currently.


iOS device contents e.g. "Pictures", "Documents" no longer accessible under Ubuntu

Support for Apple devices under Linux is a long standing problem, which you can follow here: What is the current state of apple device (iPhone, iPod, etc.) support?

The specific question about accessing (and transferring) user files (pictures, videos, documents, etc.) which was possible until recently, but which is no longer after latest iOS updates, seems to require a new update to the libimobiledevice package which can be followed here: https://bugs.launchpad.net/ubuntu/+source/libimobiledevice/+bug/1623666  And clicking https://bugs.launchpad.net/ubuntu/+source/libimobiledevice/+bug/1623666/+affectsmetoo will allow the user to keep informed about developments in this regard.

Meanwhile, there are a number of workarounds (e.g. see the above-mentioned bug report discussions) enabling users to implement a temporary solution, which might be a little less user-friendly...


Grub accidentally installed on my main OS instead of USB

Grub puts its first stage on the MBR of the drive you specified. The MBR is the first sector (first 512 bytes of device).

The command

sudo grub-install /dev/sdX

will install grub's first stage to the device you specify (ie. work out the device name for the thumb-drive you want it on, and use that instead of sdX).

The command in windows varies on your release (& setup), bootrec /fixmbr may work, but windows 10 often needs extra commands (off-topic here though)


Is it possible to delete a minus sign from a specific column (the last column) in a text file?


Ubuntu characters missing with Nvidia GeForce 840M and Nouveau driver

While there is no way of not having graphics card problems, you can choose the newest, stable driver that can help.  NVIDIA is listing version 349.16 as the newest driver, so that is the one that I would choose.

After choosing that driver, use the nvidia-settings as a elevated user to configure higher settings.  From a terminal window type in sudo nvidia-settings.  Apply your new settings and save them to /etc/X11/xorg.conf so the settings are permanent.


How can I measure the execution time of a terminal process?

Add time before the command you want to measure. For example: time ls.

The output will look like:

real    0m0.606s
user    0m0.000s
sys     0m0.002s

Explanation on real, user and sys (from man time):

real: Elapsed real (wall clock) time used by the process, in seconds.
user: Total number of CPU-seconds that the process used directly (in user mode), in seconds.
sys: Total number of CPU-seconds used by the system on behalf of the process (in kernel mode), in seconds.


What's the Equivalent of ALT+F4 in Ubuntu?

CTRL + Q it seems,
Though still don't know how to map it to be ALT + F4


Disallow compromising aliases & functions; alias cd='rm -rf ~'

Introduction

Bash configuration files

Bash has a bunch of configuration (aka startup) files, it uses these files to setup a specific environment for each user.

Some of these files are located at /etc, one of them that I'm aware of is /etc/profile, it's a global configuration file and its settings will be applied into all sessions, another is /etc/bash.bashrc; We don't need to work around these files because of their location they already are protected and only root has the rights to edit them.

A very important directory which can help us a lot is: /etc/skel; Whenever you create a new user with home directory, the files within this directory will be used as a skeleton for your new user's home directory.

ls -a /etc/skel

.bash_logout  .bashrc  .profile

We can also use dpkg to find about these files:

$ dpkg -L bash | grep etc

/etc/skel/.bashrc
/etc/skel/.bash_logout
/etc/skel/.profile
/etc/bash.bashrc

we can see that these all are installed by bash.

How thing works in bash

An alias or function can be set in any of these files, so let see how these files will be used by bash.

From bash man page:

  When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the  file /etc/profile,  if  that  file exists.  After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and exe‐cutes commands from the first one that exists and is readable.

so the order is: ~/.bash_profile > ~/.bash_login > ~/.profile

  When a login shell exits, bash reads and executes commands from the file ~/.bash_logout, if it exists.

this one will be run every time we exit from a login shell, I can't see how this one can has any effects on our situation.

  When an interactive shell that is not a login shell is started, bash reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if  these  files  exist.

so the most important fiel is ~/.bashrc, because almost 90% of bash shells which we run are in interactive and no-login mode. and if we have a look at this file we can see that it will look for another file named ~/.bash_aliases, if it was able to locate it, then it will source that file too.

Start taking care of these files

First of all we should move ~/.profile to ~/.bash_profile otherwise it does not matters if we protect ~/.profile file, someone can create a ~/.bash_profile and it will overrides our configs, so:

mv ~/.profile ~/.bash_profile

After that if you are not using a ~/.bash_aliases file then create it, again like above, someone can simply create this file and there is a chance that (s)he can alter or aliases within it.

touch ~/.bash_aliases

Finally use chattr to protect these files against edit and removal.

From chattr man page:

  A file with the 'i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to the file. Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.

sudo chattr +i ~/.bash_profile ~/.bashrc ~/.bash_aliases

We are done, Don't forget that whenever you want to edit these files you should first remove the -i attribute.

Reset everything without close/reopening terminal

Another workaround is, creating a file:

sudo touch /usr/local/bin/reload_aliases

Put your aliases there:

unalias -a
alias x='...'
alias b='...'

Make sure nobody can write into that file:

sudo chmod a=r,x /usr/local/bin/reload_aliases

Now every time you want to reload everything run:

/usr/local/bin/reload_aliases

Rollback

And if you ever changed your mind:

sudo chattr -i ~/.bash_profile ~/.bashrc ~/.bash_aliases
mv ~/.bash_profile ~/.profile
rm ~/.bash_aliases # if you don't use it


Open current directory as project in sublime?

For some reason I had to unalias subl multiple times, refreshing gnome after each before the alias dropped from bash. After the alias was gone, I was able to troubleshoot with sublime's terminal help. In the end, I was able to get it working with the following command: subl --add --new-window . & I hope my public failure and learning session helps someone else!


E: Unable to locate package mysql-workbench-community

snap install mysql-workbench-community

the problem that all snap packages are sanboxed and need to get permission to access local files & connect to DB.
Cannot connect MySQL Workbench to MySQL server
access files
or install dbeaver which is more stable.


Error while installing lightdm-webkit-greeter

Update the package lists first

sudo apt-get update
sudo apt-get install lightdm-webkit-greeter


How to translate software description in software-center

Package descriptions are translated in the ddtp-ubuntu pseudo-package, see

https://launchpad.net/ddtp-ubuntu


Enable virtualization (Vt/x) from VirtualBox - Install 64-bits virtual machine

Try this link https://forum.parallels.com/threads/how-to-enable-vt-aka-vtx-or-vt-x-with-refit-and-vmx-var-set-efi.3273/ It should work.


With the terminal open, right-click anywhere in the blank space where you may type (not the Title Bar where the close, minimize & maximize buttons are) and click Profiles > Profile Preferences. From here you should navigate to the Colors tab and mess around with the settings to satisfy your taste; personally, I like the Linux console scheme with a slightly transparent Black background and Light Purple text, #swag


Problem with the screen resolution on 12.04

Refer to choosing correct driver package here:
Linux Graphics Drivers from Intel

Possible solution is:

sudo dpkg-reconfigure -phigh xserver-xorg
sudo reboot

Other way:

Step 1. Create mode line by using gtf

Thus if your output have 61.0Hz frequency:

gtf 1280 800 61.0 - this command will calculate your Modeline for 1280x800

Step 2. Create new mode for xrandr

xrandr --newmode <value of your modeline without word "Modeline">

Step 3. Add new mode to output

xrandr --addmode VGA 1280x800_61.00

And if commands above DON'T bring any errors:

Step 4. Choose your new mode

xrandr --output VGA --mode 1280x800_61.00


How to move GNOME's Application Launcher from bottom to top in Ubuntu 17.10?

Open Terminal and run

gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true

To move it back to the bottom run

gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top false


PlayOnLinux: change install location from virtual drive

PlayOnLinux creates a "virtual drive" for every program you install through it. By default they're in your home folder in a folder called .PlayOnLinux
You can move the location of all the current virtual drives and any more drives you're going to install.
let's say you want to put them here: /mnt/NewPlayOnLinuxFolder/
so firstly copy the folder .PlayOnLinux to the new directory:
cp -av ~/.PlayOnLinux /mnt/NewPlayOnLinuxFolder/

after that's done, remove the old folder:
rm -rf ~/.PlayOnLinux

then make what's called a "symbolic link" (as I understand, this would make anything "referring to" the old directory go to the new directory instead.)
ln -s /mnt/NewPlayOnLinuxFolder/.PlayOnLinux ~/.PlayOnLinux

That's it
source


To delete and purge all PPAs:

The ppa-purge removes the PPA and tries to replace the installed packages with the version of the Officially Ubuntu Repositories

Install ppa-purge

sudo apt-get install ppa-purge

List the commands to be used with the command below. This command does nothing than print the commands to be used in the next step

find /etc/apt/sources.list.d -type f -name "*.list" -print0 | \
    while read -d $'\0' file; do awk -F/ '/deb / && /ppa\.launchpad\.net/ {print "sudo ppa-purge ppa:"$4"/"$5}' "$file"; done

Check the previous output and if all is ok, fire the purge-commands by the command below

find /etc/apt/sources.list.d -type f -name "*.list" -print0 | \
    while read -d $'\0' file; do awk -F/ '/deb / && /ppa\.launchpad\.net/ {system("sudo ppa-purge ppa:"$4"/"$5)}' "$file"; done

Sample output

% find /etc/apt/sources.list.d -type f -name "*.list" -print0 | while read -d $'\0' file; do awk -F/ '/deb / && /launchpad/ {print "sudo ppa-purge ppa:"$4"/"$5}' "$file"; done
sudo ppa-purge ppa:yannubuntu/boot-repair
sudo ppa-purge ppa:bugs-launchpad-net-falkensweb/cool-retro-term
sudo ppa-purge ppa:andreas-boettger/gmusicbrowser-art
sudo ppa-purge ppa:yorba/ppa
sudo ppa-purge ppa:libreoffice/libreoffice-prereleases
sudo ppa-purge ppa:ricotz/testing
sudo ppa-purge ppa:nilarimogard/webupd8
sudo ppa-purge ppa:andreas-boettger/private
sudo ppa-purge ppa:snappy-dev/beta
sudo ppa-purge ppa:diesch/testing
sudo ppa-purge ppa:webupd8team/tor-browser
sudo ppa-purge ppa:musicbrainz-developers/stable
sudo ppa-purge ppa:latexila/ppa
sudo ppa-purge ppa:gencfsm/ppa
sudo ppa-purge ppa:webupd8team/java
sudo ppa-purge ppa:minecraft-installer-peeps/minecraft-installer
sudo ppa-purge ppa:gnome3-team/gnome3-staging
sudo ppa-purge ppa:git-core/ppa
sudo ppa-purge ppa:stackapplet-dev/stackapplet
sudo ppa-purge ppa:linuxgndu/sqlitebrowser
sudo ppa-purge ppa:webupd8team/atom
sudo ppa-purge ppa:webupd8team/unstable
sudo ppa-purge ppa:gnome3-team/gnome3
sudo ppa-purge ppa:webupd8team/y-ppa-manager
sudo ppa-purge ppa:team-xbmc/ppa
sudo ppa-purge ppa:peterlevi/ppa
sudo ppa-purge ppa:stebbins/handbrake-snapshots
sudo ppa-purge ppa:noobslab/apps
sudo ppa-purge ppa:numix/ppa
sudo ppa-purge ppa:dreibh/ppa
sudo ppa-purge ppa:saiarcot895/flightgear
sudo ppa-purge ppa:andreas-boettger/gmusicbrowser-daily
sudo ppa-purge ppa:xorg-edgers/ppa


UEFI dual boot on Windows 10 Pro + installing NVDIA graphics driver (HP Envy 15t)

To boot grub first:

(Usually F1 to enter BIOS)
Locate UEFI / Legacy boot order in your BIOS. Set to legacy first.
(It seems you have installed Legacy)

If that does not help locate boot order and move your ubuntu disk to the top (Or under USBkey).

If this fails you might consider:
https://help.ubuntu.com/community/Boot-Repair

Please read the whole article.


ModuleNotFoundError: No module named 'apt_pkg' after installing python 3.7

As it turns out, my solution was not exactly to fix why the apt-pkg module could not be found, but rather to understand the dos and don'ts of installing another version of python to Ubuntu than the distro one.

I ended up removing the alternative I had added to point python3 to python3.7

sudo update-alternatives --remove-all python3

and instead fixing the symlink to point at the original 3.6 again, as distributed with Ubuntu 18.04

sudo ln -sf /usr/bin/python3.6 /usr/bin/python3

Furthermore, now I will use the command python3.7 for everything I need Python 3.7 for, which is basically just creating my virtualenv so it's not that much of a hazzle.

Lesson learned!


What is a file system seen as by the OS?

A filesystem/partition like /dev/sda1 can be seen (or at least represented as an interface in the root filesystem) as a "block device" which is one of the categories of files. Files are representations of data stored somehow, and a filesystem is a bunch of data with some kind of coherent structure. The block device file is a "raw" representation of the structured data. To make it accessible as files and directories that you can read and interact with, it can be mounted...

If you ls -l /dev - you see some entries starting with the letter b indicating a block device, and this will include any filesystem such as internal partitions, peripheral devices, etc... here's some from my system (#comments added by me)

brw-rw---- 1 root disk 179,  1 Dec  3 07:14 /dev/mmcblk1p1  #ESP
brw-rw---- 1 root disk 179,  2 Dec  3 07:14 /dev/mmcblk1p2  #root partition
brw-rw---- 1 root disk 179,  3 Dec  3 07:14 /dev/mmcblk1p3  #swap

This wikipedia article explains the concept of a device file in some detail.


How can I configure nano to save every 10 seconds?

There is no way to make nano to autosave the file that you are editing at a specific time period. You can save a file everytime when you want without exiting from nano with Ctrl+O("O" from "Omega", not zero) or F3.

But, don't worry, automatically saves backups. See https://manual.cs50.net/nano/#__save_files:

  If you have been using nano, you may see files with the ".save"
  extension appearing in directories in which you are working. If you
  are editing a file (let's call it "hello.c") on a server and somehow
  your connection to the server is lost, whether because you closed the
  terminal window or you lost your connection to the internet or some
  other unknown reason, nano will automatically save a backup of
  the state of the file in a new file with a ".save" extension (e.g.
  "hello.c.save"). So, when you log back onto server, don't worry that
  you've lost everything you've been working on because you hadn't saved
  for an extended period of time, you can simply open up the ".save"
  file and then continue from where you left off, and when you go to
  save the file, you can save it with the name of the original file
  (without the ".save" extension). Don't rely entirely on this though,
  such as thinking you can just close your terminal window without
  saving because nano has got you covered, because in a very few cases
  the file is not correctly created.

  If a ".save" file already exists and you open up the file without
  the ".save" extension, and your connection is lost again, nano
  will save the file with a ".save.1" extension, incrementing the
  number at the end of the extension for each time. If you have open a
  file without a name and lose your connection, the file will
  automatically be saved with the name "nano.save".

That being said, I do not see any reason of concern for autosaving files in nano.


if I upgrade my kernel, do I need to do anything with grub?

When you running sudo apt-get dist-upgrade, grub-install runs automatically. But if you not sure, you can run sudo grub-install manually


Add a separator to the left and check the expand option.


How are kernel modules in /etc/modules determined (because one of mine fails to load)?

The tool that loads modules in kernel is 'modprobe'.

From its manpage,

  'modprobe' looks in the module directory /lib/modules/$(uname -r) for
  all modules and other files, and also the optional configuration files
  in the '/etc/modprobe.d'. 'modprobe' also find modules kernel from command
  line, in the form of module.option and blacklists in the form of
  modprobe.blacklist=module.

For a detailed description of what 'rtc' does, the link is this one. This is not strictly needed to the system, but only to some app. Perhaps your system does not have such app and it is safe to remove.


Resolved. The problem (or, rather, the reason) was that I had enabled Windows 7-like window maximize feature (maximize window by dragging it to the top of the screen), as explained here. Having switched it off, I can now use the Gnome menu with the mouse all the way up and left.


As you have just started hopefully there is no important file in /var/www/html.
You can simply make this directory by following command.

sudo mkdir /var/www/html

Additionaly you reconfigure apache2 by following command

sudo dpkg-reconfigure apache2

If you need to recover the deleted files follow this thread on How to recover deleted files?


Clicking Pidgin message in Ubuntu 13.10 indicator menu doesn't focus on message

Try Guifications Plugin for Pidgin. Install it via terminal with sudo apt-get install pidgin-guifications, provide your user password and allow the plugin to be installed after which you can go to the Tools menu and choose Plugins, in the list of the installed Plugins you'll find "Guifications" as shown in the next screenshot:

After activating the Plugin you'll be able to configure it and certain things like: what to do when clicking, right clicking, etc.

The defaul themes look somehow ugly, but you can get other themes from this site in order to improve your experience when using Guifications.

Oh! Yes... I almost forget to tell: You may wish to disable the Libnotify Popups plugin in order to not to receive double notifications.

Good luck!


Power 8 IBM i 8286-41A 6 core, install Ubuntu server

According to the documentation provided by IBM, Ubuntu is not supported on that specific model.

However, Red Hat Enterprise and SUSE are.

Source Information: http://www.ibm.com/support/knowledgecenter/linuxonibm/liaam/liaamdistros.htm


Wi-Fi drops after some time on Ubuntu 18.04 with Intel Wireless 7260 [8086:08b1]

If you use GNOME or MATE, try sudo service network-manager restart in a terminal. That worked for me.


First try running this command to configure the libraries:

sudo ldconfig

If that doesn't solve it, you'll need to add these lines to ~/.profile file:

export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/dist-packages
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

This assumes that you actually have python2.7 installed and that /usr/local/lib/python2.7/dist-packages is not empty. See here for more details.


How do I pin a manually installed executable to the Gnome3 panel

Take a look at this article. You need to create a desktop shortcut and mark it as an application. And then, search for it and add it to the favourites. :)


Lost wifi after 16.04 LTS upgrade (from Ubuntu 15.10)

Disable Secure Boot in UEFI settings, and the Wi-Fi should work.


I just found a solution for this problem on my PC, and all works fine now. My Laptop is quite new, and some of the necessary drivers are apparently not handled by the 16.04 LTS version I had. I just upgraded to the 18.04 LTS, and so far so good !


You can create a new xorg.conf by switching into a virtual virtual console (Ctrl + Alt + (F1-F6)) and running sudo service gdm stop.

Then run Xorg -configure (yes, it should be Xorg, not xorg).
If you had an old xorg.conf file in /etc/X11/ you'd first back that up by doing sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup.

Then move your newly created xorg.conf to /etc/X11/ by running sudo mv xorg.conf.new /etc/X11/xorg.conf and restart gdm by running sudo service gdm start.

Then you can change the color depth in there by finding the appropriate section and changing/adding whatever's in there to DefaultDepth    16


Can you change to natural touchpad scrolling with command line?

To turn on "natural scrolling" for the touchpad run the following:

gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll true

To do the same for the mouse run:

gsettings set org.gnome.desktop.peripherals.mouse natural-scroll true

If you wish to deactivate it again just run the same but change the true to false.


This may be possible by pairing in Ubuntu and then copying the key value in the /var/lib/bluetooth/{controllerMAC}/{DeviceMAC}/info file and put the key value in the file in Arch
The {controllerMAC} and {DeviceMAC} info can be found using bluetoothctl

An example info file
[General]
Name=MDR-ZX770BT
Class=0x240404
SupportedTechnologies=BR/EDR;
Trusted=true
Blocked=false
Services=00001108-0000-1000-8000-00805f9b34fb;0000110b-0000-1000-8000-00805f9b34fb;0000110c-0000-1000-8000-00805f9b34fb;0000110e-0000-1000-8000-00805f9b34fb;0000111e-0000-1000-8000-00805f9b34fb;

[LinkKey]
Key={omitted}
Type=4
PINLength=0

I have tested this on a dual boot Ubuntu 16.04/LM18 machine and it does work

Just use the same bluetooth setting on the keyboard, don't switch to #2 for the other OS as usually all the keyboard will see is the MAC address of the PC's bluetooth and the key


How do I use the DUALSHOCK 4 with Ubuntu 14.10?

Okay, all one needs to do is "pair" the controller just like any other bluetooth device - these instructions relate to the "regular" variant of Ubuntu, so adjust them accordingly if you use a different variant of Ubuntu or a different Linux-based operating system...

Hold the  and Share buttons to put the controller into "pairing" mode (the Light Bar/LED should start to rapidly blink/flash), then pair the controller with the computer using the bluetooth settings (Settings → Bluetooth → Wireless Controller).

Once the controller is "paired", you can turn it on by pressing (not holding!) the  button - do this before starting Steam or a game, because sometimes they may not recognize the controller if you do this after opening Steam or a game.

Ubuntu 20.04 LTS ("Focal Fossa") and newer has pseudo-official support for the DUALSHOCK 4 (it correctly recognizes the DUALSHOCK 4 as a gaming controller) and Valve Software's Steam has native/official support... Ubuntu doesn't offer anything in the way of configuration for controllers at the time of writing, but Steam has a default setup available or you can configure the controller to your individual liking - to do this, go into "Big Picture Mode" and adjust the "Controller" settings.

A few points about what I have noticed however...

Steam has surprisingly good support for the DUALSHOCK 4, and even many older games seem to work well enough... Numerous games available outside of Steam also seem to work well (such as those from GOG.com) - but it varies from game-to-game, so you'll need to experiment yourself.
If you're using "Big Picture Mode" and you have connected your
controller in Steam, it will show a "controller" icon for games
which support the DUALSHOCK 4 (refer to "Tomb Raider" in the picture below).

Steam will "work its magic" to get the DUALSHOCK 4 working as
expected in most games (e.g.  for
"select"/"accept"/"enter" and  for
"cancel"/"decline"/"back"), however some games will still show
Microsoft Xbox series icons, which may lead to some minor confusion.
Some games (including numerous older games) support force-feedback
(vibration), though this varies and you may need to enable this
functionality within the game itself.
Support for the "fancy" functionality of the DUALSHOCK 4 - such as
accelerometer control and the touchpad - may not work in part or at
all... I found a couple of games in Steam that supported the
accelerometer (older games, too!), but support seems to be pretty
mixed from game-to-game.
You can check the battery status in Ubuntu's settings (under "Power"); if you look in the "Devices" section, you should see "Wireless Controller" with the current battery status listed.

You will need to manually turn the controller off when you're
finished with it, by holding the  button until it
switches off (you should see the Light Bar/LED turn off).

Updated content of answer to reflect experience using Ubuntu LTS 18.04 ("Bionic Beaver") and the most recent version of Steam as at September 8th, 2018.


No, you cannot use TeamViewer VPN on Ubuntu, as it is not supported.
Quoting a specific answer on a thread from Super User:

No, the VPN functionality is not currently supported on Linux. They may have plans for it in the future, however.

That was in 2011.  There has been no movement by TeamViewer to support the TeamViewer VPN functionality on Linux since then, which suggests that they do not plan to make TeamViewer VPN work on Linux environments.


ubuntu 12.04lts mobile broadband loose connecton after every few minutes

Follow these tips

keep all the setup on stable ground.
restart mobile, even computer if possible.
Check if your configuration looks like this.

MTU: automatic
Method(ipv4): AUTOMATIC(DHCP)
method(ipv6): AUTOMATIC
Available to all users is selected

These settings are available under the Edit connections menu from the top bar.

  You can see that my phone is samsung GT B5330, so the settings should work hopefully!


Unable to sync my bluetooth earphones with my laptop

The solution from this article worked for me:

Make sure this package is installed

sudo apt-get install pulseaudio-module-bluetooth

Run the command

pactl load-module module-bluetooth-discover

Then delete the device from bluetooth devices and pair it again.

If it works, you can consider adding the second command to your startup settings, so that you don't have to run it again after every reboot.


I have a Razer Kiyo and I'm using it on Linux since a couple of weeks.
So far I've used the Razer Kiyo with Google Hangouts in Chromium, with Zoom, and with OBS.

The camera itself works just fine in Linux.
I could not (yet?) get the microphone of the camera to work. But I cannot tell whether this is because of Razer Kiyo or something else.
The Razer Kiyo responds to settings changes with v4l2-ctl. Be careful to read the min, max and step precisely, or your setting changes will be ignored.

Linux distribution: Kubuntu 17.10.
Output of lsusb:
christian.hujer@Nelkinda-Blade-Pro-1:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 008: ID 1bcf:2c98 Sunplus Innovation Technology Inc.
Bus 001 Device 007: ID 1532:0225 Razer USA, Ltd
Bus 001 Device 006: ID 0cf3:e300 Atheros Communications, Inc.
Bus 001 Device 005: ID 1532:0a02 Razer USA, Ltd
Bus 001 Device 004: ID 04f3:2355 Elan Microelectronics Corp.
Bus 001 Device 009: ID 1532:0e03 Razer USA, Ltd
Bus 001 Device 002: ID 1532:005a Razer USA, Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

(This one is the Razer Kiyo: 1532:0e03)
Output of v4l2-ctl:
christian.hujer@Nelkinda-Blade-Pro-1:~$ v4l2-ctl --list-devices
Razer Kiyo (usb-0000:00:14.0-3):
        /dev/video0

USB Camera: USB Camera (usb-0000:00:14.0-9):
        /dev/video1

christian.hujer@Nelkinda-Blade-Pro-1:~$ v4l2-ctl --device=/dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
    Index       : 0
    Type        : Video Capture
    Pixel Format: 'YUYV'
    Name        : YUYV 4:2:2
        Size: Discrete 864x480
            Interval: Discrete 0.033s (30.000 fps)
        Size: Discrete 640x360
            Interval: Discrete 0.033s (30.000 fps)

    Index       : 1
    Type        : Video Capture
    Pixel Format: 'MJPG' (compressed)
    Name        : Motion-JPEG
        Size: Discrete 1280x720
            Interval: Discrete 0.017s (60.000 fps)
            Interval: Discrete 0.033s (30.000 fps)
        Size: Discrete 640x360
            Interval: Discrete 0.033s (30.000 fps)
        Size: Discrete 864x480
            Interval: Discrete 0.033s (30.000 fps)
        Size: Discrete 1920x1080
            Interval: Discrete 0.033s (30.000 fps)

    Index       : 2
    Type        : Video Capture
    Pixel Format: 'H264' (compressed)
    Name        : H.264
        Size: Discrete 1280x720
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
        Size: Discrete 640x360
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
        Size: Discrete 864x480
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)
        Size: Discrete 1920x1080
            Interval: Discrete 0.033s (30.000 fps)
            Interval: Discrete 0.042s (24.000 fps)
            Interval: Discrete 0.050s (20.000 fps)


how to enable systray pidgin icon in notification area in 12.04 and nouveau?

You can't find desktop -> unity -> panel in ubuntu 12.10 in dconf-editor,
To add pidgin chat menu:

  Open dconf-editor from terminal.
  Goto com -> canonical -> indicator -> messages
  In applications append the value 'pidgin.desktop', please don't replace the older values.

By doing above actions, pidgin will be added to chat menu, but it won't started automatically, to start automatically

  Open 'startup applications' from dash.
  Press add
  In command type 'pidgin' (remove quotes and type in small letters) and in name and comment type anything as you like.
  Click save.
  Close all apps and restart your computer (log out and log on again its enough).

You can find Pidgin now in chat menu and its automatically opened.
By doing this, it won't affect empathy and gwibber processes, if you don't need these apps uninstall in ubuntu software center.

Stay connected and happy chatting...


How to pause with specific time between two command in script?

You can use this in a terminal:

command1; sleep 30; command2

In your script:

#!/bin/bash
command1
sleep 30
command2
exit

Suffix for the sleep time:

s for seconds (the default)
m for minutes
h for hours
d for days


All packages installed, but network manager does not allow adding of vpn

If you go to 'Edit Connections' and select 'Add' in the popup window then you should be able to add VPN connections.


How to copy files from folders and subfolders and paste to a single folder?

What I understood is that you want to copy all files from a folder which has sub-folders to a destination folder.

You can use:

find source_directory -type f -exec cp -t destination_folder "{}" \+

Or you can just use the copy command as suggested in the comments like:

cp -p source_directory/* destination_directory


GNU GRUB version 1.99-21ubuntu3, DOES NOT WORK!

Try re-installing your grub.

Boot using a live cd of ubuntu.
Open a terminal and run the command

sudo fdisk -l

It lists the complete partition table of the hard disk. In there, identify which partition you have got your linux installed on. You can identify it using the drive size you had allocated for it and looking at the last column of the output which will be ‘extended’ for all of your linux partitions. The partition will most probably be something like /dev/sda5 or something. Remember this partition.
Create a temporary folder in your home directory (Note: You can make the temporary folder anywhere you want. I’m using the home folder just for the sake of explanation). I’m calling it temp for now. So that temp folder’s path will be /home/ubuntu/temp.
Mount your linux partition there. That is, assuming that you found your linux partition to be /dev/sda5, you mount that at the ‘temp’ folder by doing the following command

sudo mount /dev/sda5 /home/ubuntu/temp

If you want to check whether you have mounted the correct partition, go to your home folder and open temp. You will be in the ‘/’ directory. In there you will find ‘home’, in which your home folder’s name will be there. Once you’ve confirmed you have mounted the correct partition, do step 6.
You have to install grub by showing the system where to read the data from the hard disk at the beginning. Don’t worry, just run the following command

sudo grub-install --root-directory=/home/ubuntu/temp /dev/sda

The /dev/sda corresponds to your hard disk name. Replace it by whatever the command sudo fdisk -l command showed you.
You’re done. You may restart your system.


Ok I found it, it is hidden under Software & Updates.

Another way to install drivers is:

sudo ubuntu-drivers autoinstall

EDIT:

Additional Drivers program is now available in Ubuntu 19.10


Streaming music from Ubuntu Server 14 over VPN

This is the solution I found that achieved exactly what I was trying:

Ampache's Git Repo (GitHub)

Ampache is a streaming service written in PHP.  It's a work in progress and they've just recently came out with version 3.0.  Using this service, you can store your music in a directory (and multilevel directory) and direct Ampache to catalog that directory with your music.  Ampache takes it from there, store the paths and information in a MySQL database, and streams directly to your web interface.

Here's a bit of a dated guide to it, but was the only one I could find:

Step-by-step guide

To get Ampache running you need to have a LAMP stack running (which is step on in the guide, if you don't know how to setup the stack.  It references a web-interface called SWAT, which is no longer supported by Ubuntu.  It also references Samba, which is (obviously) supported, but only needed to move your music from your desktop to your server.

Also, the repo on Ubuntu's apt-get is outdated, to get the current (mainly) bug free version, you'll have to unpack the files from their Git Hub.


12.04: How to end all chrome related process after closing browser?

I had the same problem plus chrome was putting an Icon on the menu bar.

Come to find out their is a setting in Chrome that appears to keep chrome in memory all the time.

Make chrome completely shut down.

Within chrome:

Settings:

Show advanced settings...

Unchecked "Continue running background apps when Google Chrome is closed"

I noticed the icon in the menu bar a couple of days ago must have happen during an update.

Mark


How do i find everything that i have installed myself?

This must be a duplicate, but a suggested answer to the proposed dup does not quite answer the question.  The list of initially installed packages is kept, and may be used to compare to the apt-mark showmanual output.  This keeps things that get updates out of the list, but still may let through some "dist-upgrade" additions.
I put the below into a script, myinstp in my bin area to run.  The -u on sort seems optional, but doesn't hurt.
comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)


About the use of dotted hostname with avahi


Is there anything that needs to be done to import system commands like chdir

The command is cd, not chdir.

You don't need to do anything to make this available in the usual shell.

If you really want a chdir command, you could create an alias:

alias chdir=cd

If you add this to your .bashrc file, you'll get it aliased for all future shell sessions.


I have removed those files for about a month now. I had to do this on three different computers, and they are all working fine now. So, I suppose removing .ICEauthority file doesn't affect anything noticeably.


How to install Chromium Web Browser on Ubuntu 15.04

You can install Chromium Browser by running:

sudo apt-get install chromium-browser


How can two large directories be compared visually?

I just had the same happen to me when moving from local storage to NAS: there was a difference in size and I did the following:

stat -c "%s %n" /media/Data/ > /tmp/DSK
stat -c "%s %n" /media/NAS/ > /tmp/NAS

which lists size (%s) and name (%n) of all files respectively and then loaded DSK and NAS in my favourite editor and visually compared both files.

In my case only one file was different and it's copying as I'm writing this, but in your case you might want to remove the directory names of the files:

sed 's/\/media\/Data//g' /tmp/DSK > /tmp/DSK_Files
sed 's/\/media\/NAS//g'  /tmp/NAS > /tmp/NAS_Files

and let the shell figure out the differences:

diff --context=0 /tmp/DSK_Files /tmp/NAS_Files


Run sudo rm /var/lib/dpkg/lock in terminal which will remove the lock file created by any of the dpkg applications(like synaptic, ubuntu-software-center etc.). Then do sudo apt-get update.


You don't need 3rd party utilities to clear space in your root directory.

Run this command in a terminal to see how much space is available in your root directory:

df -h

Your root directory is the one designated as "/" in the column "Mounted on".

The easiest way to clear up some space is to remove the cached .deb files of applications you installed. This can be done in a terminal, as follows:

sudo apt clean

Now run df -h again in a terminal and see if it made significant changes to your space availability.


Every grep command returns "grep: invalid option -- '='"

In case this isn't yet fixed, see if there is any file in the directory that starts with a '-'.

Reference

Helped me.


ThrottleStop writes data to the multiplier request register.  This is MSR 0x199.  You should be able to write a simple batch file that writes the same data to this register when you are using Linux.

You can use the MSR Tool to see what values ThrottleStop is writing to this register.

http://www.mediafire.com/download/myjkxzkzzmd/MSR.zip

It lets you read and write data to various CPU registers in Windows.  Doing the same thing should be doable in Linux.  Setting a multiplier in MSR 0x199 that is less than the default maximum should allow you to slow your CPU down which will reduce how much heat it puts out.  That's all the ThrottleStop - Set Multiplier feature does.  Clock modulation is hiding in MSR 0x19A.  Using that register is useful on the 2nd and 3rd Gen Core i CPUs when your goal is to limit heat output.


How do I reinstall PostgreSQL 9.5 on Ubuntu Xenial (16.04.1)?

I've finally managed to resolve the problem. The installer failed to create a config, because the previous data directory was present (it's not deleted by the uninstall command).

So, in order to completely reinstall the PostgreSQL do the following:

sudo apt-get --purge remove postgresql-*
sudo rm -Rf /etc/postgresql /var/lib/postgresql
sudo apt-get install postgresql

It should install the shiny new cluster for you with clean data and config files.


How to login to remote server using ssh with script in ubuntu terminal

Use ~/.ssh/config:

Add a host:

Host y
  HostName domain.com
  Port 666
  User username
  IdentityFile ~/.ssh/id_rsa-domain

And then access your host from a terminal:

ssh y

Also, you can create a shortcut to your terminal that opens a ssh session right away. Save this to a y.desktop file and place it in your ~/Desktop folder:

[Desktop Entry]
Version=1.0
Name=domain.com
Exec=gnome-terminal -e "bash -c 'ssh y'"
Icon=utilities-terminal
Terminal=false
Type=Application
Categories=Application;

Sure, there are number of ways on how you can bind a shortcut to some actions. The simplest in Unity is to use it's own settings: System Settings -> Keyboard -> Shortcuts -> Custom Shortcuts. You can bind one to execute ssh y.


How to change forecolor of Software Center descriptions?

I went to Appearance -> Theme -> Customize -> Colors and changed the forecolor of Windows and it solved the problem.


Poor quality video with graphics card GeForce 9500

Given that you have tried the nvidia-current driver and your graphics have improved slightly, probably means that you are correctly using the NVIDIA drivers rather than the opensource nouveau drivers.

If your graphics issues are restricted to Youtube and other internet videos, probably yours is a Adobe Flash issue rather than a graphics driver issue.

Can I suggest you use the Flash-Aid add-on as described in my answer below to reinstall Flash.

Linked Question:

How do I fix Flash issues?


A step by step Openstack installation on Ubuntu tutorial

Try this. I have used the "next" PPA of conjure-up because it has a lot of fixes, but it also uses Juju 2.0 beta which is a beta :) Your call on whether you do that or use stock conjure-up from the stable archives. Note that the main archive will be updated to get the new conjure-up anyway, once Juju 2.0 is released.

If you are going to build your cloud on a single host with LXD containers, then you probably want to setup LXD to use ZFS:

sudo apt install zfs
sudo lxd init

Choose 'zfs' and either feed it a dedicated fast disk (like a spare SSD on /dev/sdc) or ask it to create a local loopback mount. I would give it at least 60G or 120G disk for a local container filesystem in ZFS.

You can test your LXD with:

lxc launch ubuntu:
lxc list

If that all works you will see an Ubuntu container firing up. The first one has to download an Ubuntu container image, after that it is very fast.

To get the conjure-up tool and juju 2.0:

sudo add-apt-repository ppa:conjure/next
sudo add-apt-repository ppa:juju/devel
sudo apt update
sudo apt install juju-2.0 conjure-up

Now you can just go ahead:

conjure-up openstack

Once Juju 2.0 is released in Xenial you could drop the add-apt-repository lines.


I'm trying to run Steam but 32-bit libraries are missing

I think you have 64-bit Ubuntu, if so, try this:

Open up a terminal (Ctrl + Alt + F1).

sudo apt-get update
sudo apt-get install ia32-libs
sudo apt-get upgrade

A reboot may be required


specify non-printing keys as input to shell command

Well, you can use the code of unicode characters. Some examples:

For space: echo -e  "\u0020"
For newline (enter): echo -e  "\u000A"
For up-arrow: echo -e  "\u2191"

See List of Unicode characters for all of them.


Unable to set a shortcut to grab screenshot area

I made up a series of commands to show us the passive grabs on a keystroke. While the Take a screenshot of the area setting is set to Shift+Print please run this command and post its output.

xdotool keydown "shift+Print"; xdotool key "XF86LogGrabInfo"; xdotool keyup "Print"; sleep 1; xdotool keyup "shift"; tail /var/log/Xorg.0.log

This will trigger Shift+PrtSc keyevent and should show gnome-settings-daemon grabbing the keyboard.

Please also check if maybe some modifier key is activated on your keyboard and maybe somehow it is interfering with this keycombo. (e.g NumLock, ScrollLock, or some similar keyboard specific thing) Try out the combo with turning those modifiers on/off.


How do I set default view to 'list' in Nautilus file manager?

First, reset all previous folder view preferences by deleting ~/.local/share/gvfs-metadata (source)

Next, open Nautilus and select Edit -> Preferences -> Views (tab) -> View new folders using , and change to List View:


Disabled Sound Through HDMI When i Had Windows

Simply re-enable the HDMI sound in your BIOS, then boot into Ubuntu again. The drivers for your card are already installed, and if better (proprietary) drivers are available, you will be offered to install those.

Once you enable it in the BIOS, you will again have the option to use the HDMI audio. It shows up under sound settings as S/PDIF. Simply select this (see below screen-shot) to use it.


How do I format just part of an external HDD?

To avoid any possible problem caused by Windows hibernation, it's best to use Windows Disk Management, if you can, to shrink your existing Windows C: partition, before using gparted in Ubuntu to add an ext4 partition to your existing NTFS partition.

After making room in Windows with Disk Management, please click on the Windows icon and choose Shut Down while holding down the Shift key to make sure Windows shuts down completely.

Power back up with a Ubuntu LiveUSB in your PC and choose it to boot from.

Once the GRUB menu appears, start Ubuntu, then open a terminal window and run swapon off.  This make sure, if there's a swap file in your system, it's closed and out of the way. Close or minimize the terminal window.

Now, you can open gparted from the Ubuntu Desktop. At upper right, there's a spin box which shows all drive devices; make sure to set that to the external drive. Once you have, you can make formatting changes to that external drive.

With gparted, you work in steps; specify the change, then commit it by clicking on the green checkmark below its Menu Bar. It's best to make only one change, then commit that change, before specifying another.


I suggest you genisoimage or mkisofs command with -b and -no-emul-boot options.

I tried it with -b option as like following command.

genisoimage -no-emul-boot -b bootcode.bin -o test.iso testdir

I referenced that from the man page of genisoimage. Also you can see it with the command that man genisoimage.