Ubuntu 16.04 install fails upgrade, fails install from bootable usb

It sounds like something incompatible with 16.04 in your home directory.  You can check this by working with the console and creating a clean home directory.

You can test this by creating a new userID.  You can do this from the console with Alt+Cntrl+F2.  Then login.

Use this command to create a new user:

$ sudo adduser [newuser]

The [newuser] will be the name of the new user without the brackets.

You may have to reload the login manager with sudo service lightdm restart so that it will see the added user.

Now login as the new user.

If this works, while from the newuser's account you can work to fix the problems that you have with your regular account.

Fixing the flawed account:

First add the new user account to the sudoer access.  Then from a console perform these steps:

Change directories to the failed login (I'll refer to it as youraccount).

$ cd ~youraccount
$ cd ..
$ sudo mv youraccount youraccount.store
$ mkdir youraccount
$ sudo chown youraccount youraccount

If logging in as the newuser worked, you should be able to now login as your account.  Now you can systematically move or copy your configurations from your failed login account to the new directory.  Or you can study which components are causing the problem and deal directly with those.

By the way, the problem configuration is almost always something very simple.  It might just be a permission bit of your home folder.  It also might be a problem with the ownership of the.Xauthority file.


As a workaround, adding those signals handlers into ~/.config/awesome/rc.lua:

awesome.connect_signal(
    'exit',
    function(args)
        awful.util.spawn('touch ~/.awesome-restart')
    end
)

awesome.connect_signal(
    'startup',
    function(args)
        awful.util.spawn('bash -c "rm ~/.awesome-restart || ~/script-to-run-on-startup.sh"')
    end
)

Explaining:
- on the exit signal, that performs only on awesome restart we're creating a flag file, that tells to the startup signal that this startup is going immediately after the awesome restart
- on the startup signal fired we're removing this flag and if it doesn't remove successfully (doesn't exist) - we're running our startup-only script.

PS: Checked - the exit signal doesn't fire on sudo reboot, so it won't be inappropriately fired on full system restart.


Does sudo partprobe in a terminal do anything? I believe fdisk is supposed to do it for you when you exit but maybe it didn't.

Anything in dmesg about the new partition or a reason why it hasn't added the device node?

MAKEDEV is not the answer. Even if it works temporarily, it'll be gone after a reboot if there's a deeper problem.


Problem with view the open port of openssh-server

Before answering the question: Ubuntu 12.10 is outdated and not supported anymore. You should update.

sudo complains that is can not resolve your hostname (ubuntuSv28). In order to fix the warning quickly, add the hostname to youe /etc/hosts file with a line like:

127.0.1.1   ubuntuSv28

A good command line for seeing the listening ports would be:

sudo netstat -nlpt

And BTW: The port for OpenSSH is 22.


I see the problem. You use ls -lrta ssh* in the /etc/ directory. That matches the ssh directory in that folder and then lists the contents of that directory. Those files what you see are actually in /etc/ssh/.

An ls -lrtad ssh* will not go down into the directory.

Access your files from the /etc/ssh/ directory.

The tricky thing here is that ls normally would put a header in such cases that those files are from which directory when you try an ls with a * on the command line. The problem is that the * is expanded by the shell to make the command line. E.g when you write ls py* and the directory have a python and python3 entry too, the shell will actually run this command: ls python python3 and the output will be something like:

python:
debian_config

python3:
debian_config

Because ls sees the multiple arguments it prints a header for each directory. So you can easily see that those files are from a different directories. But when there is only one match in the directory, like in your case, ls ssh* expands to ls ssh, then ls sees that you only put in one argument, so there is no need for the header, as you know what you are doing, and the output will be similar to yours.


Currently the only way to add collaborators for your snap package is indeed by adding the emails of the people with whom you want to collaborate (so that the store can verify that they have an account, or ensure they create one).

But note that although this will allow those people to install the private snap, a collaborator is intended to be someone who collaborates with the development of your snap - they will also have access to upload and change the snap (ie. it's not read but write access).


Just click on the "Name" column to order them ascending or descending.

See this picture for a clarification (my system is localized in Italian, but you can get an idea)


How do you call Unity to distinguish it from Unity 2D?

Unity3D is not wrong, its commonly used to distinguish Unity from Unity2D.

But Unity is the official name of the desktop session and Unity2D is the official name for the non composed desktop session, that should be enough to distinguish them.


This is due to the use of Nvidia drivers from the Nvidia website. If you installed manual drivers then you cannot change it from the pacakge manager.


Is it possible to see a remote ubuntu server throught a gui?

If you need to manage files and folders, you can use sftp:

1. Open File Manager and press Ctrl+L
2. Type: sftp://remoteip/

If you want to view the remote ubuntu desktop (like teamviewer), you can use remmina:

sudo apt-get remmina

to install remmina remote desktop client


version 16.10 can identify printer but unable to print

I just ran into a similar situation, on my Ubuntu 16.04 machine, where I tried to print something and it didn't print. And when I opened the Printer settings, it showed an error message "unable to locate printer", or something to that effect.

Under Printer->Settings, it looked my "Device URI" was set to some bizarre value. I clicked on the Change button, selected "Network Printer" and after a couple seconds my printer showed up in the list of Network Printers, so I selected it and then clicked on the 'Apply' button.

Within seconds, the print request I had previously issued then printed automatically.

BTW, after the above steps, my correct (working) "Device URI" looked like: socket://192.168.0.211:9100

Before, instead of a numerical IP, it had some kind of weird string there.

One possibility as to what might be happening is that sometimes, when Ubuntu checks for the printer via WiFi, the wifi connection may not always go through, in which case Ubuntu inadvertently changes the printer's "Device URI" to something that makes it unusable.

Just a theory based on what I just observed 10 minutes ago.


How should I fix libraries that can't be found because of multiarch naming?

My guess is that the problem is you are installing packages outside of apt (apt-get). Either use Ubuntu packages (ppa if possible) or if you are compiling packages, as you compile, use ./configure --help and specify a library path as a part of your configuration.

See also:

http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html

http://www.linuxquestions.org/questions/linux-general-1/using-a-non-standard-library-path-when-compiling-software-781185/

From the second link:

CFLAGS="-I/path/to/your/headers" LDFLAGS="-L/path/to/your/lib" ./configure --blah

If you need further assistance you will have to be more specific regarding "some program that is looking for a library and can't find it" - What program? How did you install it ? etc.

To set your java environment, edit ~/.pam_environment, add:

export JAVA_HOME=/usr/java/<your version of java>
export PATH=${PATH}:${JAVA_HOME}/bin

For all users (system) edit /etc/environment

See also: https://help.ubuntu.com/community/EnvironmentVariables#Persistent_environment_variables


screen DPI - is there and equivalent command/action to Windows 150% Display

Install "Advanced settings" from the Software Center.  This will at least allow you to change the font size.  There is no dpi setting in Ubuntu AFAIK.


how can i uninstall windows os without affecting ubuntu?

First of all run this in terminal:

sudo apt-get update && sudo apt-get install gparted

Then search and launch gparted from dash. Select /dev/sda (local HDD) as the disk on upper left. You should see your Windows partition formatted NTFS. right click and select "delete".

Then right click your main Ubuntu partition (likely ext3 or ext4) and select "resize/move" and resize it to cover the space of the new free space created by deleted partition. Finally select "apply all operations".


How to change the value of an argument in a script?

You can use the builtin set:

#!/bin/bash
set -- "bar"
echo $1

Source and more about: Change a command line argument - bash.


Not sure if fstab or driver messed up my pc

Sorry guys, I just couldn't take it anymore;  I'm reinstalling.
Sad, after a full week working on this install, but I was on the verge. This graphics card goes to the trash where it belongs. I can see that upgrading hardware in linux is Hell, so blender will have to wait until I can build a better PC and fresh install a distro on it.


My taskbar doesn't show up after startup

At login screen, there's a drop-down combo box at the bottom. In that box, select Ubuntu Classic Desktop and then login. It appears that your GPU isn't supported by the new Unity interface.

Once you've logged into Classic Desktop, then install unity-2d  to get a proper Unity experience regardless of whether your GPU supports hardware acceleration or not.


how to configure terminal in a text boot?

I figured out that the linux console which opens after booting in CLI mode gets its parameters and characteristics directly from the .bashrc file, so, I did a little tweak to my bash file to get the above layout. Here is what I did:

test -z "$TMUX" && (tmux new-session -d && tmux split-window -h && tmux split-window -v && tmux -2 attach-session -d)

The above command tests whether there is already a tmux session running or not (this test is necessary to avoid infinite splitting of window panes ), if not then create a new session and split windows in the above fashion.


How to get bigger photos' thumbnails in Nautilus?

In Nautilus you can right click on a empty area in the folder and select Zoom In or use Ctrl + Mouse scroll wheel to zoom the pictures.

Alternate is to use Thunar


Copy the binary file into /usr/local/bin with the following command:

sudo cp /home/username/kile-install/kile /usr/local/bin

/usr/local/bin is a folder where we usually put custom application binaries.
after copying, just re-open the terminal and you should be good to go.


Create Ubuntu OS with Installed software

Backing Up

To get started, please open up a terminal, in Ubuntu this can be done by

Ctrl + Alt + T

Some directories require root or superuser permissions to read and write (needed for backup). For that just execute the following

sudo su

Then Type in your password. You need to have an Administrator privileged account.

For this example, we will change directories to root. This is where the backup will be made. This is an arbitrary decision, you should create the backup elsewhere. For instance to a mounted external hard drive, another partition or disk connected internally, even a folder in your home directory could be used. In all cases, ensure the location your saving the archive to has enough space. Simply use the cd command to navigate there.

cd /

The following is an exemplary command of how to archive your system.

tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --one-file-system /

To understand what is going on, we will dissect each part of the command.

tar - is the command that creates the archive. It is modified by each letter immediately following, each is explained bellow.

c - create a new backup archive.

v - verbose mode, tar will print what it's doing to the screen.

p - preserves the permissions of the files put in the archive for restoration later.

z - compress the backup file with 'gzip' to make it smaller.

f  - specifies where to store the backup, backup.tar.gz is the filename used in this example. It will be stored in the current working directory, the one you set when you used the cd command.

--exclude=/example/path - The options following this model instruct tar what directories NOT to backup. We don't want to backup everything since some directories aren't very useful to include. The first exclusion rule directs tar not to back itself up, this is important to avoid errors during the operation.

--one-file-system - Do not include files on a different filesystem. If you want other filesystems, such as a /home partition, or external media mounted in /media backed up, you either need to back them up separately, or omit this flag. If you do omit this flag, you will need to add several more --exclude= arguments to avoid filesystems you do not want. These would be /proc, /sys, /mnt, /media, /run and /dev directories in root. /proc and /sys are virtual filesystems that provide windows into variables of the running kernel, so you do not want to try and backup or restore them. /dev is a tmpfs whose contents are created and deleted dynamically by udev, so you also do not want to backup or restore it. Likewise, /run is a tmpfs that holds variables about the running system that do not need backed up.

It is important to note that these exclusions are recursive. This means that all folders located within the one excluded will be ignored as well.

  Restoring

You will want to restore from a Live CD. If needed, first partition and format the drive. You can do this with gparted. Then simply mount the partition you are going to restore somewhere. If you open the drive in nautilus, it will be auto mounted somewhere under /media

That is, In the Backup step You should have copied the Archive to an external media (eg. Flash Drive, External Hard disk)

Take a look to find out where with:

ls /media

Restore Your Backup

sudo tar -xvpzf /path/to/backup.tar.gz -C /media/whatever --numeric-owner

A brief explanation:

x - Tells tar to extract the file designated by the f option immediately after. In this case, the archive is /home/test/backup.tar.gz

-C  - This option tells tar to change to a specific directory before extracting. In this example, we are restoring to the root (/) directory.

--numeric-owner - This option tells tar to restore the numeric owners of the files in the archive, rather than matching to any user names in the environment you are restoring from. This is due to that the user id:s in the system you want to restore don't necessarily match the system you use to restore (eg a live CD).

This pretty much sums up what you are asking for in the question. For any more information visit https://help.ubuntu.com/community/BackupYourSystem/TAR from where I have modified my answer from.


Make backspace behave like backspace in emacs

Solution found here:
http://introrse.com/jasonc/docs/emacs-ch.html

Basically always bind the backspace to a set command.


I recently have had a lot of grief with exactly the same problem (although not dual-booting, so I don't think that's related at all.  Here was the fix for me after doing a lot of reading and about four frustrating re-installs of Ubuntu 16.04:

Disable Secure Boot in BIOS.  This is required for 3rd party driver support.
Install NVIDIA 381 drivers following instructions here: http://www.linuxandubuntu.com/home/how-to-install-latest-nvidia-drivers-in-linux.  Make sure you install 381 as it will also work with suspend.
Reboot a few times to make sure it's fixed the issue (the first time you may have to force it).

Now the problem was fixed for me, but was using the Nvidia GPU which chews battery.  There are a few more steps if you want to use the Intel GPU and save battery.

Edit grub file following instructions here (answer by bt1111): Ubuntu gnome 17.04 freezes on shutdown
Go into NVIDIA X-server settings and change to use Intel GPU - will require a log out to confirm - for me it crashed on log out but after one more foreced shut down works perfectly


How to install software to another partition?

1 ) go here
https://developer.android.com/studio/index.html
and download the Android Studio in a tar.gz

2) go to terminal and type

cd ~/Downloads

3) move it to the other partition destination. Suposse your partition with freespace is /home

sudo mv android-studio.tar.gz /home

4) extract the file with the command

tar -zxvf android-studio.tar.gz (use the correct name)

5) In order to have this available from other locations create a launcher for the Android Studio, look here
https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles

I hope this can help you!
Comment if you have any trouble :)


How to save matched pattern into variable using 'sed' command?

Here is a single invocation of sed that writes the revised line to stdout while at the same time saving the removed text in shell variable var:

$ var=$(echo "This X is test Y. But X is not test Y." | sed -nr 'h;s/[^X]*X([^Y]*)Y.*/\1/;p;x;s/X[^Y]*Y/REPLACE/;w /dev/stderr') 2>&1
This REPLACE. But X is not test Y.

The value of var is:

$ echo "==$var=="
== is test ==

Explanation:

h

This command copies the current pattern to the hold space.
s/[^X]*X([^Y]*)Y.*/\1/;p

This removes everything from the pattern space except the text between the first X and Y including any spaces.  This is then printed to stdout.  This is the output that is captured by the shell and assigned to var.
x

This copies the hold space back to the pattern space.  When this is done, the pattern space contains a copy of the original input line.
s/X[^Y]*Y/REPLACE/; w /dev/stderr

The substitution is made and the result is written to stderr.
2>&1

After the shell has captured stdout into var, this instructs the shell to copy stderr (which has the line with REPLACE) to stdout.

Aside on handling of variable var

The variable var includes the leading and trailing spaces.  If the shell were to subsequently subject var to word-splitting, these spaces would be removed.  To prevent that, when var is referenced, do so inside double-quotes, as in the example above.


Install gnome tweaks "sudo apt-get install gnome-tweaks".
Open gnome-tweaks.
Go to "Keyboard and Mouse" and then click on "Additional Layout Options (Image)
Click on "Switching to another layout" and deselect "Left Ctrl". (Image)


I'll speculate that this was caused by a window manager strut reserving space at the top edge of the screen:

  The purpose of struts is to reserve space at the borders of the
  desktop. This is very useful for a docking area, a taskbar or a panel,
  for instance. The Window Manager should take this reserved area into
  account when constraining window positions - maximized windows, for
  example, should not cover that area.

tint2, which you mentioned having installed, will do precisely this in accordance with its panel geometry and strut_policy configuration options.


Dummy Output in Audio; nothing is working (ALSA broken?)

Thanks to GLauro for the pointer in the right direction.  I experienced the same problem on upgrade to kernel 5.8.0.36.  I attempted to modprobe the snd-intel-dspcfg module, and found by searching that it had been moved to the linux-modules-extra- package.  So I had to install that package, since it hasn't been installed by default since 5.4.0-60.67
sudo apt install linux-modules-extra-5.8.0-36-generic
Then reboot


The install is very straightforward. You don't need docker at all. If the system you are using is dedicated to pi-hole, then I would recommend another clean install of Ubuntu 20.04 LTS for cleanness-sake. If you don't want to, that's fine. I don't think it will be an issue.
All you have to do is run the command curl -sSL https://install.pi-hole.net | sudo bash. This is their one-step install process. Please notice the sudo part. Administrative privileges are needed in order for the installation to work. After all the software has been installed, the install will prompt you a few questions for configuring pi-hole and then you should be done.


No sound after installing Ubuntu 18.10 on a Hp Chromebook 14 (KIP)

Does not work on Lenovo Thinkpad neither!

ls -l /dev/snd

totalt 0

crw-rw----+ 1 root audio 116,  1 okt 25 13:42 seq

crw-rw----+ 1 root audio 116, 33 okt 25 13:42 timer

lspci -v gives:

0:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)

Subsystem: Lenovo Sunrise Point-LP HD Audio

Flags: bus master, fast devsel, latency 64, IRQ 133

Memory at f1340000 (64-bit, non-prefetchable) [size=16K]

Memory at f1330000 (64-bit, non-prefetchable) [size=64K]

Capabilities: [50] Power Management version 3

Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+

Kernel driver in use: snd_hda_intel

Kernel modules: snd_hda_intel, snd_soc_skl

aplay -L:

default

Playback/recording through the PulseAudio sound server

null

Discard all samples (playback) or generate zero samples (capture)

pulse

PulseAudio Sound Server


Did backup to root accidentally, need to revert

Go find where all of the extra files got restored to and delete them.  The fact that you have no space points to you simply restoring the files in the wrong location and so you have duplicates everywhere.  For instance, if you backed up the whole system, but restored it to your home directory, then you have a copy of /bin, /usr, etc in ~/.


RAPTOR (Rapid Algorithmic Prototyping Tool for Ordered Reasoning) flowchart tool has a bronze rating in the WineHQ Applications Database. It is stripped of some features in Ubuntu. The same link also has the URL of the RAPTOR home page which has a link to download RAPTOR.

If you want to try an alternative to RAPTOR that runs natively in Ubuntu, take a look at draw.io desktop application for creating diagrams. The drawio snap package can be installed in Ubuntu 18.04 and later with this command:

sudo snap install drawio


How do I install Clang Version 3 in 10.10?

I haven't found a PPA for maverick - you will need a later version of ubuntu to get v3.

However, to compile is very straightforward.  Clang themselves have the instructions well written.  A few pointers:

You will need the following packages to be installed before you compile

sudo apt-get install build-essential subversion

Start at the second instruction "2. Checkout LLVM"

At step 4 there is a mistake - it should read cd ../projects

I didnt need to specify my C/C++ headers - configure worked this out by itself.

Word of warning - it takes hours to compile - best to leave this as an overnight job!


How did it stop working? Did you change any bios conf? Added removed or changed the order of any disks?
what the command lsmod gives? and insmod normal?
ls comes from a grub module usually at /boot/grub/x86_64-efi/ls.mod (x86_64-efi depends on your arch).

When booting grub try to load the "normal" module and if it fails it will go to rescue (that is what happened to you).
Did it print any errors on boot?


Why no libxvid

That site is just a ripoff of FFmpeg Wiki: Ubuntu. The wiki does not install libxvid for two reasons:

libxvid outputs the old, legacy format MPEG-4 video. This format has been superceeded by more modern, more common, and more efficient formats such as H.264, H.265/HEVC, VP9. So libxvid was removed from the compile instructions long ago.
ffmpeg already has a built-in MPEG-4 video encoder. It is comparable in quality to libxvid. Usage example: ffmpeg -i input.avi -c:v mpeg4 output.mp4

What you can do

Options, easiest to hardest:

Use -c:v mpeg4 instead of -c:v libxvid if you need MPEG-4 video.
Use a more modern format such as H.264 with -c:v libx264.
Uninstall your compiled ffmpeg and install the ffmpeg package from the Ubuntu repository. It has support for libxvid.
Re-compile ffmpeg. You'll need to install the libxvidcore-dev package from the Ubuntu repository, then configure ffmpeg with --enable-libxvid.


How to install native2ascii on Ubuntu Xenial

native2ascii is part of several packages:

andrew@athens:~$ native2ascii
The program 'native2ascii' can be found in the following packages:
 * gcj-4.9-jdk
 * openjdk-8-jdk-headless
 * gcj-4.8-jdk
 * gcj-5-jdk
Try: sudo apt install <selected package>

And on my own Xenial system I used:

andrew@athens:~$ sudo apt-get install gcj-5-jdk

And on Xenial this installs:

andrew@athens:~$ native2ascii -version | head -n 1
native2ascii (GNU Classpath) 0.99

Searching for this particular application name in Ubuntu is made a little difficult as Xenial actually uses gnative2ascii-5 with some update-alternatives manipulation:

andrew@athens:~$ update-alternatives --display native2ascii
native2ascii - auto mode
  link best version is /usr/bin/gnative2ascii-5
  link currently points to /usr/bin/gnative2ascii-5
  link native2ascii is /usr/bin/native2ascii
  slave native2ascii.1.gz is /usr/share/man/man1/native2ascii.1.gz
/usr/bin/gnative2ascii-5 - priority 1050
  slave native2ascii.1.gz: /usr/share/man/man1/gnative2ascii-5.1.gz
andrew@athens:~$


This is just a guess, but in /etc/pulse/daemon.conf set enable-lfe-remixing: no to yes and make sure it is not commented (has no semicolon in front of it). If you made changes, save them and restart your system (or just pulseaudio).


How to install GNU Parallel in Ubuntu 12.04 with my firewall?

If you have physical access you could download the package parallel_20130922-1_all.deb from  https://packages.debian.org/sid/parallel and install like any other debian package. You may also need to locate and obtain the packages it depends on and install them first. Always Insure that you have recent backups and a recovery plan before making changes to a production system. Of course you probably already know that.

Full disclosure.  I have neither tried nor tested this. The answer is based on experience with installing other debian packages under ubuntu, nothing more

You can install with dpkg -i pkgname, if you have unresolved dependencies you may wish to check this thread

How to automatically fetch missing dependencies when installing software from .deb?


This one is pure awesome :D I believe it is the best one there is


Starting Ubuntu without Admin Account password

You can't log in to the root account (well, normally), nor should you. Please don't override this security precaution.

If you just want to log in without having any sort of password authentication, that is very easily available to you. If you go to System Settings and click on User Accounts, you'll have this screen displayed to you:

Simply make sure Automatic Login is turned on, and your system will always automatically log you in.

If you're talking about bypassing the need for a sudo password, that is still doable but less of a good idea. In a single-user environment, sudo is primarily a "sanity check" to add some resistance to any action that could be potentially dangerous or make your system not work as well. Or, in other words, it's the "Yeah, I'm sure about what I'm doing" command. That, and if you disable sudo password enforcement, you open a rather broad attack vector to malware and the like.

If you still want to do this, simply open a terminal and type sudo visudo. From there, add this line to the User privilege specification section:

<your user> ALL=(ALL) NOPASSWD:ALL

Be sure to replace <your user> with your username on the computer.


Where does youtube-dl download the videos to?

There are really two questions here:

1. Why does youtube-dl not feature in Dash?

This is because youtube-dl is run from a Terminal window only and does not come with icons, desktop files and the like. It is simply run from any Terminal window as follows:

youtube-dl [options] url [url...]

Details of the command line options can be easily seen by running the following command:

youtube-dl -h

Experiment a little to make youtube-dl work as you wish.

2. Where does Youtube-dl download YouTube files?

By default youtube-dl will download the files in the current working directory of the Terminal that you have opened. Usually this is your $HOME environment, but not always. This behavior can be modified in either of two ways:

Use the -o option with youtube-dl to manually give a location for the downloaded files:

youtube-dl -o "~/Desktop/%(title)s.%(ext)s" 'youtube file url'

and of course substitute your actual url for 'youtube file url'. This example sends the completed download to your Desktop.
Create a configuration file for youtube-dl as follows:

touch ~/.config/youtube-dl.conf

Then set a default download location in this file:

--output "~/Desktop/%(title)s.%(ext)s"

With this in place all downloaded files will automatically go to your Desktop.

References:

youtube-dl Readme


Normally when you type your password for sudo it won't appear,don't consider it a keyboard problem. If all your keys on the keyboard were working it means that there was no problem with your keyboard.

If some keys which was essential for typing the password weren't working then your best option is onboard. Search for the onboard application in Dash. It will allow you to type in the password without using the keyboard.


how to swap the time and cpu usage in shell script

The ^ character anchors to the start of a pattern; to anchor to the end, use $. A little care is necessary because you are using "soft" double quotes to allow shell expansion of the date command and $# is special to the shell (so must be escaped):
ps -eo %cpu --sort=-%cpu |head|tail -n+2 | sed "s#\$#;$(date +%T)#"

Alternatively, use the more usual / separator for sed:
ps -eo %cpu --sort=-%cpu |head|tail -n+2 | sed "s/$/;$(date +%T)/"

(since $/ isn't a special parameter).
Note that you can avoid the need for tail -n+2 by appending = to the ps -o specification, and you can avoid the head by instructing sed to quit after processing 10 lines:
ps -eo %cpu= --sort=-%cpu | sed "s/$/;$(date +%T)/;10q"

You might also want to take a look at the ts command for adding timestamps.


There are two common message queue implementations in UNIX. One is part of the SYS V API, the other one is part of POSIX.

See the documentation about POSIX Message Queue:
https://users.pja.edu.pl/~jms/qnx/help/watcom/clibref/mq_overview.html
http://manpages.ubuntu.com/manpages/trusty/man7/mq_overview.7.html


How to make chrome truly full screen in lubuntu

ianorlin's answer is on-point, but I had a lot of trouble understanding what they were saying. Not feeling comfortable with Edit-by-Rewrite, I am posting my own answer.

The problem is that Openbox, the Lubuntu window manager, sees you press F11 before Chrome does. Openbox then performs its own fullscreen process and never informs Chrome about it.

The fix, then, is to either change Openbox's fullscreen key or to change Chrome's (to something Openbox isn't using).

The file ~/.config/openbox/lubuntu-rc.xml contains Openbox's keyboard configuration information. You may wish to make a back-up of it prior to changing things since you don't want to mess it up.

Look for the stanza that says:

<keybind key="F11">
  <action name="ToggleFullscreen"/>
</keybind>

It may be inline with the rest of the file, like so:

</keybind><keybind key="C-Escape"><action name="Execute"><command>lxpanelctl menu</command></action></keybind><keybind key="F11"><action name="ToggleFullscreen"/></keybind><!-- Launch Task Manager with Ctrl+Alt+Del --><keybind key="A-C-Delete">

But you can break it out onto its own lines to make it more visible.

Once you've made the changes described below use

openbox --reconfigure

to activate/test them.

Now, change the stanza mentioned above to read:

<keybind key="W-F11">
  <action name="ToggleFullscreen"/>
</keybind>

This will make the Windows/Super key into a modifier, so you press Windows+F11. I like this one because (probably) nothing is going to be using that key combo, whereas Shift+F11 and F11 are both used at the application level.

If you did want Shift+F11 to be your fullscreen key, you'd use:

<keybind key="S-F11">
  <action name="ToggleFullscreen"/>
</keybind>

More information about what actions you can perform using this config file is available here.


I used to have the same problem, I just removed the created link with:

unlink /usr/local/bin/code/Code

Then re created the link directly under "/usr/local/bin" like below

sudo ln -s /path/to/vscode/Code /usr/local/bin

Works for me, let us know if it worked ...


How to hide/remove "exit, minimize, maximize" bar on top of the application when not maximized, showing only the application/program on the desktop

It is possible to remove the complete window border:

Install CompizConfig Settings Manager:

sudo apt-get install compizconfig-settings-manager

Open it via ccsm or out of the dash.

Disable the plugin "Window Decoration" (under "Effects") by unchecking it:


Brother HL-2270DW Printer uninstalling after software update

I suspect the fault you are experiencing is not solvable via Ubuntu tweaks but the fault of the Brother Driver programmers themselves.

I'm still new to this site, and I understand this site offers the ability to post personal views and advice.  Someday I hope to take advantage of these features to help new users to avoid these issues such as those you are having.

Certain printer manufacturers are much more supportive of linux, or of PC users in general.  Brother has an unfortunate history of drivers which uninstall even in Windows, and printers which seem to break themselves requiring frequent maintenance.

In recent years Canon, a once great printer manufacturer has taken to refusing to so much as provide drivers for Linux.

Meanwhile HP, Epson and even Brother at least provide Linux drivers, perfect or not.  I would really like to see a "recommended printers/brands list" on this site, perhaps with votes from other site members to assist people such as yourself to make wise decisions when buying.

At present I have an Epson wifi/ethernet network inkjet printer with fax ability and sheet feeder which cost only $80 new, model WF-2540.  Setting it up with Linux was a bit of a hassle at first but once it was configured it has been a dream.  Guests with macbooks were able to print to it with nothing more than the wifi password.  We are the envy of our friends.


You're downloading a .deb file, which probably isn't going to open automatically or self-install.

Open up the Terminal (look for it in Applications), navigate to where you downloaded the file (most likely, ~/Downloads) and enter:

sudo dpkg -i google*.deb

Then

sudo apt-get update

Sometimes it will give an error, saying you're missing a library. You can enter:

sudo apt fix-broken install

Then look in Applications, Chrome should be there.


With TAB button you can change focus, when it comes to dpi section press one time TAB and press Enter.

Alternatively, you can change resolution of wine desktop from user.reg, it is usually located in /home/<username>/.wine/user.reg. There, find the line "Default"="1024x768" and change 1024x768 to other resolution like 1366x768.


MAAS supports managing virtual machines in an ESXi, but the moment it does not allow deploying a machine with ESXi.


How to append text in the beginning of each line using sed

You can do this with

sed -e "s/^\(.*\)/N \1/" filename

This inserts the string N at the beginning of the line (^).


Ubuntu touch isn't available for this device

Ubuntu touch Devices


How can I set different sensitivities for two mice at the same time?

You can use xinput to set the sensitivities/accels for the mice.

$ xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech USB-PS/2 Optical Mouse           id=8    [slave  pointer  (2)]
⎜   ↳ Microsoft Microsoft® Nano Transceiver v2.0    id=10   [slave  pointer  (2)]
⎜   ↳ Microsoft Microsoft® Nano Transceiver v2.0    id=11   [slave  pointer  (2)]
⎜   ↳ Macintosh mouse button emulation          id=13   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳ Microsoft Microsoft® Nano Transceiver v2.0    id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]

From that output take the numeric id of the mice. I'll provide an example for my Logitech mouse. For multiple mice rinse and repeat.

So for my logitech I will use xinput get-feedbacks <device name> and xinput set-ptr-feedback <device name> <threshold> <num> <denom>

$ xinput get-feedbacks 8
1 feedback class
PtrFeedbackClass id=0
    accelNum is 3
    accelDenom is 10
    threshold is 4

The accel is set as a fraction so you need to set the nom and denom for it:

$ xinput set-ptr-feedback 8 4 3 1
$ xinput get-feedbacks 8
1 feedback class
PtrFeedbackClass id=0
    accelNum is 3
    accelDenom is 1
    threshold is 4


GParted - Increase ext4 partition using unallocated space

You can't resize the partition Ubuntu is currently running from.

You need to boot the install media, LiveCD or USB drive, choose the option Try Ubuntu without installing. Then when it loads the desktop, you can run GParted and resize the partition as you want.


FGLRX is very generic. It is not specified to fit one specific graphics card, but to support as many features as possible with as many different chips as possible. Also, the chip detection isn't as exact as it could be. As an example, my AMD A8500M series APU is detected as AMD A4500, but I don't have any problems with that, as all promised features are available.

So it is no problem at all if something else is being displayed. If you're installing the FGLRX driver, it is easier to do so via the Additional drivers tab in the Software & Updates utility.

If you want to install a later version from AMD's website (if there is a more recent one than in the Ubuntu repo's), you should run the following command after installation and reboot afterwards:

sudo aticonfig --initial

This will create a default graphics configuration, which shouldn't crash the X Server, if the driver was properly installed.

I've experienced the following method to work the best, although it can appear quite complicated for unexperienced users:

In the driver selection on AMD's website, select Linux (not Ubuntu) as operating system. Select the correct architecture (x86_64 for 64bit, x86 for 32bit) and download the provided archive.

Extract the archive after the download has finished. You won't find a Debian package, but a shell script or a .run file instead. Open a terminal in the directory you extracted it to and make it executable:

chmod +x <filename>

From here on, I'll assume its name to be installer.run, although this will never be the case unless you rename it.

This script can either directly install the driver or generate packages for the installation, for more information run

./installer.run --help

With the argument --listpkg, it will list the supported platforms for package generation, such as:

Package Maintainer(s): Alberto Milone <alberto.milone@canonical.com>
Status: *UNVERIFIED*
Ubuntu Packages:
    Ubuntu/gutsy
    Ubuntu/hardy
    Ubuntu/intrepid
    Ubuntu/jaunty
    Ubuntu/karmic
    Ubuntu/lucid
    Ubuntu/maverick
    Ubuntu/natty
    Ubuntu/oneiric
    Ubuntu/precise
    Ubuntu/quantal
    Ubuntu/raring
    Ubuntu/saucy
    Ubuntu/source
    Ubuntu/trusty
    Ubuntu/utopic

So as long as you don't use Vivid Vervet yet, you can create a package for your systems. I use 14.04.2, so I'll create a package for Ubuntu/trusty (this requires root):

sudo installer.run --buildpkg Ubuntu/trusty

It may happen that you have to satisfy some dependencies before, in this case it will either attempt to do so automatically or tell you which packages are required. You can install them with

sudo apt-get install <package1> <package2>

Afterwards retry the creation. Repeat this until the generation succeeds (the program tells you so). The actual package generation can take quite a while. Below, you can see an example output I received on my system after a successful package generation:

Created directory fglrx-install.FJxoRh
Verifying archive integrity... All good.
Uncompressing AMD Catalyst(TM) Proprietary Driver-15.101.1001.............
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
.........
=====================================================================
 AMD Catalyst(TM) Proprietary Driver Installer/Packager
=====================================================================
Generating package: Ubuntu/trusty
Package ./fglrx-core_15.101-0ubuntu1_amd64.deb has been successfully generated
Package ./fglrx_15.101-0ubuntu1_amd64.deb has been successfully generated
Package ./fglrx-dev_15.101-0ubuntu1_amd64.deb has been successfully generated
Package ./fglrx-amdcccle_15.101-0ubuntu1_amd64.deb has been successfully generated
Removing temporary directory: fglrx-install.FJxoRh

When the packages have been generated successfully, you will find them in your current directory. Just type the ls command to see them. There will be three or four packages. You can install them with the following command:

sudo dpkg -i <package1> <package2> <package3>

Or, faster written:

sudo dpkg -i *.deb

Again, dependency problems can occur. In this case run the following commands after dpkg has terminated:

sudo apt-get install -f
sudo dpkg --configure -a

Now, the driver will be installed. Run the command I already mentioned above and reboot:

sudo aticonfig --initial
sudo reboot

Strangely, this always worked for me, whereas the prepackaged Ubuntu packages always crash my X Server. Another major advantage of this method is that the packages aren't bound to your computer and you can take the generated packages to any computer with the same OS and a Radeon or FireGL graphics system.

Edit: I just learned that the latest version on AMD's website conflicts with Wine 1.6, a (to me) unreasonable dependency on PlayOnLinux. Have a look at this workaround, if you are affected. Alternatively, choose an older version of the driver or simply install it via the Software & Updates utility, as described above.

Edit2: The package version and driver version of FGLRX doesn't always seem to match. So your update manager may think it can provide you with a more recent version, even if it isn't true. Thus, you may want to put the fglrx packages on hold:

sudo apt-mark hold fglrx fglrx-core fglrx-dev fglrx-amdcccle


Performance is crucially slow and very lagging

Check your graphics card. nVidia cards have been choking on this update, but the recent driver alleviates most of the issues with slow performance. Upgrade the driver, restart, and everything should be working up to speed.

If this doesn't work post additional details and switch to Ubuntu Classic in the mean time so you can still get work done.


Get version of software which will be installed through snap

You can query more information about a given snap package using the snap info command:

$ snap info pycharm-community
name:      pycharm-community
summary:   Python IDE for Professional Developers
publisher: jetbrains
contact:   https://www.jetbrains.com/pycharm/documentation/
description: |
  PyCharm Community Edition is a free and open-source IDE which is perfect for
  pure Python coding. For professional Web and Scientific development see
  PyCharm Professional Edition.
snap-id:     Qo9GiW9eyzgN1tXmWpQ9gdstdFsj4K7E
channels:
  stable:    2017.3   (39) 268MB classic
  candidate: 2017.3.1 (40) 268MB classic
  beta:      ↑
  edge:      2017.3.1 (40) 268MB classic

There you also see that two different versions (2017.3 and 2017.3.1) are available from three different channels (stable, candidate and edge).

By default, snap install pycharm-community will install the current version from the stable channel. If you want another one, add the respective option, e.g. --stable, --candidate, --beta or --edge - like this:

snap install --edge pycharm-community

For more information, type man snap or read it online.


bcache doesn't do this. Either the disk you purchased wasn't clean and already contained a bcache superblock upon unboxing (so it may be a returned drive that wasn't wiped properly), or the first command you ran was fishy: It has /dev/sdb1 twice on the command line which may have confused the command and it already created the superblock and attached /dev/sdb1.

To get rid of it, detach the backing device:

# echo 1 >/sys/block/sdb/sdb1/bcache/detach

Then unregister the cache:

# echo 1 >/sys/fs/bcache/b9d9517a-a606-4ac2-86dc-3399e9678381/unregister

Now, instantly wipe it before udev reregisters it:

# wipe -a /dev/sda

Do not be confused that /dev/sdb1 still shows up as under control of bcache. It doesn't hurt and you can access it through /dev/bcache0. It's not attached to a cache and thus doesn't benefit from any caching, it works in pass-through mode until you re-attach it to a cache manually:

# echo CACHE_SET_ID >/sys/block/sdb/sdb1/bcache/attach

In that case, you create a cache device only, then attach any disk to it (with the above command following this one):

# make-bcache -C CACHE_DEV


Ubuntu server : no network interface detected

I had a similar problem which turned out to be that the kernel that was used by the server installation had a different version than the one the kernel modules in the initial ramdisk was compiled against. This was my own mistake, since I had updated the netboot initrd.gz to a point release, but picked vmlinuz.efi from the base release. How to determine if this is your problem too:

Boot the desktop live CD first; use lshw -c network to figure out which driver is used for the network, e.g. "e1000e". Then reboot into the server installation. When it complains about missing network, use Alt-F2 to switch to a different console, and run find /lib/modules -name 'e1000e.ko' or similar for your driver, and then insmod /lib/modules/path/to/e1000e.ko. You should now get messages as for why it won't load.


Fingerprint sensor doesn't work on Lenovo yoga 370

Right now the sensor is unsupported on Linux. I would read the following thread, and contact Lenovo to express your interest.


Footprint of installing and uninstalling a program on Ubuntu

Using the purge option will remove all system-wide configuration files. It will NOT remove any configuration or data files stored in your home directory, nor will it remove packages that were installed as dependencies. For more information, please see the top answer here: How can you completely remove a package?


How do I get a warning before my laptop powers off?

You can set the levels for "low", "critically low" and "action" by entering the following commands at the terminal:

gsettings set org.gnome.settings-daemon.plugins.power percentage-low XX
gsettings set org.gnome.settings-daemon.plugins.power percentage-critical YY
gsettings set org.gnome.settings-daemon.plugins.power percentage-action ZZ
gsettings set org.gnome.settings-daemon.plugins.power use-time-for-policy false

where XX, YY and ZZ are the battery charge levels. Set use-time-for-policy to "false" to define the "level" in terms of battery charge level (instead of time to empty).

To see existing levels, use

gsettings get org.gnome.settings-daemon.plugins.power percentage-low
gsettings get org.gnome.settings-daemon.plugins.power percentage-critical
gsettings get org.gnome.settings-daemon.plugins.power percentage-action
gsettings get org.gnome.settings-daemon.plugins.power use-time-for-policy


Have a look at this answer: https://unix.stackexchange.com/a/177640

Basically:

Use xinput list to find the name of your mouse device
Run xinput set-prop 'Name Of Your Mouse' 'Coordinate Transformation Matrix' 3 0 0 0 3 0 0 0 1

You can change the 3s to whatever value you want (larger = increased speed). Leave all the other numbers the same. You'll need to make the command run on startup, since it only lasts for your current session.


How to run a .jnlp file in ubuntu server

Using the Iced Tea

sudo apt-get install icedtea-netx

followed by

javaws ~/Downloads/cgoban.jnlp


Will unmounting a partition erase the info stored there?

No, it will not delete the data.  You can remount the volume on another directory and all of your data will be there.


How to connect USB midi keyboard to qsynth using qjackctl?

According to Ardour's configuration page

  The right approach for using MIDI on Linux when using JACK 2 is to use
  a2jmidid as a bridge between ALSA MIDI and JACK.

So after starting qjackctl I had to run a2jmidid -e, and after that I could start QSynth, and finally go back to qjackctl and connect the MIDI keyboard with a QSynth engine.


apt is stuck when installing new applications

It was hanging on the post-installation script as it stated in one of the error messages above. After some searching I found that you can the post-installation scripts are stored at /var/lib/dpkg/info/

So I could fix it easily using:

sudo rm /var/lib/dpkg/info/icaclient.postinst

After that i had to run sudo dpkg --configure -a and remove some lock files.

Now apt is working as it should!


Format FAT32 partition with set "Allocation Unit Size"

man mkfs.fat:

-s SECTORS-PER-CLUSTER
    Specify the number of disk sectors per cluster.  Must be a power of
    2, i.e. 1, 2, 4, 8, ... 128.

The allocation unit size is also known as the cluster size.


How to use grep output as a path for cd?

Use Bash's command substitution $(), you also need -o with grep to only select the matched portion:

cd "$(pip install django | grep -o '/usr.*')"

Note that although you will get away in this case but you should always enclose the command substitution with double quotes so that the shell does not perform word splitting on whitespaces (by default space, tab and newline, depends on the IFS variable in case of bash).


I'd probably put /home/ on the second drive not in a partition of the first. Specially if you are going to replace it. Just for the extra space.


Is there a Budgie theme configuration GUI or tweak tool?

To change themes on Budgie you can use the desktop settings panel Raven, just click the power button

You can change most desktop related settings here.

If you want a more robust tweak tool application, you can use gnome-tweak-tool

sudo apt-get install gnome-tweak-tool

Budgie is based on Gnome and this will work fine.


Kazam Screenrecorder's Strange Behaviour in Ubuntu 14.04 LTS

Well,From my personal experienced. Raw AVI is very big files.However,You can select other video encoding that is smaller file size such as Webm and MP4. To Do This

Open Your Kazam.On Menu.

Files -> Preferences

Select Screencast Tab

Choose Record With : VP8(Webm) or MP4

I hope this help

Thank you


sudo apt install indicator-bluetooth

You need source universe.


Setting console resolution in Ubuntu Server 13.10 within VMware

An alternative option, in short -

A. Either use bridged network to guest

B. Or, follow directions at [1] to forward port 22 (ssh port) to a host port
SSH to the host port (and thereby to the guest), using Putty or any other ssh client. The ssh client should give you a re-sizable console.

TL;DR

I recently upgraded my VM and ran into the same problem. I tried various combinations of values for GRUB_CMDLINE_LINUX_DEFAULT, GRUB_GFXMODE, GRUB_GFXPAYLOAD, and GRUB_GFXPAYLOAD_LINUX to no avail. I have gone for an alternative that now works better for me.

Essentially, I use Putty to ssh into my VM. This gives me a re-sizable console. Copy-paste also works better now between Windows and the shell. Since I choose the NAT option for my VM, this approach is less straight-forward. I use the directions in [1] to get access to the VMware network configuration editor. I then forward guest port 22 to a host port (say 8122), and then ssh to it (localhost:8122) from Putty running on my Windows host.

[1] http://alexduan.com/2012/10/15/vmware-player-5-0-network-editor/


How to solve Qualcomm Atheros driver problem on ubuntu 16.04?

You need to connect to the internet by wire and update your system by

sudo apt update && sudo apt upgrade

It will install the required firmware.


Kubuntu 12.04: Change login screen background?

Error messages

Try to launch the KDM login manager configuration module from the konsole ( How to launch Configure Kde control module by command line? )

with the command:

kcmshell4 kdm

Can the KDE make a thumbnail from you picture ?

Wrong extension ?

The KDE is looking the image file extension not what is in the file.

Example changing the picture file extension from the jpg to the png.

The Dolphin can't make the thumbnail:

and the  KDM can't use the picture with the wrong extension.

Error message:

  kcmshell(2652) KBackgroundRenderer::doWallpaper: failed to load
  wallpaper  "/home/user26687/Templates/kubuntu-wallpaper-v1c.png"

File permissions

(If this is a file permission problem as the  Dirk Hartzer Waldeck suggests.)

File manager (Dolphin) right click the file > Properties > Permissions tab

If the file is owned by the root you could change the access permissions or the file owner by launching the file manager with the root rights ( https://help.ubuntu.com/community/RootSudo ):

kdesudo dolphin

Another option is to install the kde service menu: http://kde-look.org/content/show.php/Root+Actions+Servicemenu?content=48411 and use it.

Ubuntu community wiki to set/change file permissions: https://help.ubuntu.com/community/FilePermissions .


How do I change how much disk space Ubuntu has?

backup your data - probably the data in your /home/your_username folder
reinstall Ubuntu; partition your harddisk, choose a GUID-partition table

/dev/sda1: a primary partition of 20 G, with boot flag, ext4 filesystem, where you will mount the root (/) of the filesystem;
an extended partition of 300 Gbyte;
in that extended partition 3 logical partitions:
/dev/sda5: SWAP space, as big as your RAM, maximum 4 G, you probably don't need it, but it makes suspend to disk possible;
/dev/sda6: a partition where you will mount your /home directory, 150 G, ext4 filesystem:
/dev/sda7: a partition that you keep for the future, kind of free space, 146 G, ext4 or whatever, you will not use it for now

Make sure that 20G is enough for Ubuntu, Wine and Adobe After Effects - check.

Remember: partitioning is a personal choice.


Rhythmbox does not start after upgrading to Ubuntu 14.04

Trouble-shooting

Trouble-shooting rhythmbox issues can be a bit of a trial and error.

These are the areas you should consider.

Cleaning up plugins settings

Sometimes a rogue plugin (internal or external) could be the cause of rhythmbox crashes.

Cleaning up the gsettings database for the various plugins can work:

gsettings reset-recursively org.gnome.rhythmbox.plugins

Cleaning up locally installed plugins

Occasionally, compilation issues occur if you install external plugins manually - removing these plugins and reinstalling will resolve this.

rm -rf ~/.local/share/rhythmbox/plugins

Cleaning up all rhythmbox settings

Occasionally, a corruption can occur in other rhythmbox settings.   Using Dima's answer here will resolve this.

last resort

If the above does not work then the problem is likely to be due to corruption in the rhythmbox database and related files itself. Using Alvin's answer here will resolve this.

Note though - if you use the last resort method you'll need to reimport/re-do all of your music/playlists/ratings again.


Unity (Ubuntu's default desktop environment) is a relatively demanding DE, and requires a good graphics card and drivers to run well.
Unfortunately, the 3D video drivers for Linux when inside a VM are terrible. Even VMware who makes a commercial virtualization solution doesn't provide 3D drivers.
The best fix here is to install a different desktop environment. For example, XFCE would be a good choice.
In order to do that, just open a terminal and run:
sudo apt-get update
sudo apt-get install xfce4

Also, you did install the Guest Additions kernel modules in the VM, right?
Edit
This post explains the difference between a window manger and a DE.


This should help:

GnomeShell CheatSheet

Taken from that page, is a list of main key bindings:

  Super key: Switch between overview and desktop
  Alt+F1: Switch between overview and desktop
  Alt+F2: Pop up command dialog
  Super+F10: Open Application Menu
  Alt+Tab: Pop up application switcher
  Alt+Shift+Tab:
  Cycle in reverse direction in the
  application switcher
  Alt+` key above Tab: Switch between windows of
  the same application in Alt+Tab
  Ctrl+Alt+Tab: Pop up accessibility switcher
  Ctrl+Shift+Alt+R:
  Start and end screencast recording
  Ctrl+Alt+Up/Down arrow: Switch between workspaces
  Ctrl+Alt+Shift+Up/Down
  arrow: Move the current window
  to a different workspace
  F10: Toggle maximize
  F11: Toggle full screen
  Super + Up arrow: Toggle maximize
  Super + Down arrow: Toggle unmaximize
  Super + Left/Right arrow: Dock left/right
  Super + Shift + Left/Right arrow: Move window to left/right monitor

The rest should be viewable under Settings -> Devices -> Keyboard


Ubuntu: Deleting a partition containing corrupt ubuntu upgrade from other ubuntu partition

So question is, is it okay to format other partition with corrupted Ubuntu installation and merge it in fresh installed ubuntu OS partition.

Yes.

  Can formatting corrupted ubuntu installation cause issue while booting?

Not really. But you can prepare yourself: create a boot-repair usb and use that to repair your boot if there are any problems. Together with a gparted live and a Ubuntu live tools that are invaluable for an admin.


What is the meaning of the default directories in the Linux filesystem hierachy?

The brief answer about directory names: type "man hier" into a terminal :)

That's the man page for the filesystem hierarchy, which explains the general purpose of the directory names and what they hold. You can see a web version here.

There's also more reading on Wikipedia:

http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

Those links will explain everything about what partitions are called what and what they are (or were historically) used to store.

The answer about using seperate partitions rather than just directories in the same partition comes back to maintainability and expandability. If you've got one partition with, say, / and /home on it, Joe User can fill up his /home/joe folder, and the entire machine will run out of disk space and stop working (I'm simplifying here, but that's the general result). If you've got / and /home on different partitions, Joe User can fill up his /home/joe folder, and the /home partition will be full, but the machine will continue to operate because / is not affected.

So expand that principle out to almost all different directories being on different partitions, and you can see how it would be useful, particularly when a machine is running 24/7 in a multi-user and multi-service role.


How to view Real time Internet usage using terminal?

I use iftop.

Install it (290 KB) with sudo apt-get install iftop and start with sudo iftop.

Should you wish to monitor wireless internet traffic, use sudo iftop -i wlp3s0,

where -i referes to interface, and wlp3s0 is my wireless interface (check yours by running lspci.


Fast method (be sure about the UUID):

$ sudo gedit /etc/fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda4 during installation
UUID={} /               ext4     defaults,subvol=@ 0       1
# /boot/efi was on /dev/sda1 during installation
UUID={}  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sda4 during installation
UUID=3dfc046ght43-2e3-40bc-81c8-23e84e820450 /home           ext4   defaults,subvol=@home 0       2

UUID=2ed003df-e139-48a6-b15a-25378925789 none   none uid=0,owner,noauto 0 0

#This last line has been added by you. Just subst it with you Macintosh HD partition UUID.


Can I trigger a mouse double click, by holding down the primary button, after a delay?

It's easy if you're willing to modify one little line in the source ;)

Get the mousetweaks source (apt-get source mousetweaks)
Get its build dependencies (sudo apt-get build-dep mousetweaks and then sudo apt-get install build-essential dpkg-dev fakeroot)
Inside the file mousetweaks-3.4.1/src/mt-main.c, around line 375 (may differ for you) find this bit:

static void
mt_main_do_secondary_click (MtData *mt)
{
mt->ssc_finished = FALSE;
mt_main_generate_button_event (mt, 3, CLICK, CurrentTime);
}

Change part in parentheses in the bolded line to (mt, 1, DOUBLE_CLICK, 40)

This modifies the code so that the "simulated secondary click" becomes a "simulated primary double click" instead ;)

From within the mousetweaks-3.4.1 directory, run dpkg-source --commit, and name your patch anything (it doesn't matter)
Then run dpkg-buildpackage -us -uc and wait for a bit...
You will find the appropriate mousetweaks*.deb file in the parent directory. Install it with sudo dpkg -i, enable the "simulated secondary click option, set the time, and enjoy! (note: the double-click occurs when you release the held button...)
Please add in the comments if you have any problem modifying/building the package.


How to transform an Ubuntu Unity to Ubuntu Mate?

The way you word this question the only way to do this is by re-installing from an Ubuntu Mate ISO are formatting your current installation.

By completly removing Unity you will break your system. By 1st installing Mate and then removing Unity you might break your system. Here is a method for removing Unity where someone wanted Cinnamon installed. That will work for Mate too if change the personal archive to this.

But if those commands are not up to date you will leave traces of Unity on your system. So, to me, a re-install is the only method to meet all your demands.


To anyone having same problem in the future, it started working for me. I don't exactly know how it worked. I ran synclient command on ubuntu, after which I noticed it working. You'll probably get it correct if you mess around that command or change some properties( I didn't need to).


If you installed ndiswrapper using the Software Center or Synaptic do the following to remove completely

You have 4 ways (2 of them will do it Completely):

Go to Synaptic and search fo ndiswrapper. Right click on it and select Remove Completely. then Accept.

Go to Software Center and search for ndiswrapper and click on REMOVE.

The following 2 options will remove it completely. What i mean is, it will remove what Synaptic and Software Center can remove plus all config files and even the downloaded package of ndiswrapper.

In the terminal type (Using apt-get):

sudo apt-get purge ndiswrapper-common ndiswrapper-utils-1.9 ndiswrapper-modules-1.9

In the terminal type (Using aptitude my favorite):

sudo aptitude purge ndiswrapper-common ndiswrapper-utils-1.9 ndiswrapper-modules-1.9

This applies to any other program you want to remove either from system to not use or completely removing the config files and downloaded packages.

NOTE: In the case of Synaptic if you do the Complete Removal option then you are actually removing it completely. There is also another option that says just Remove which leaves the config and packages downloaded there. Just in case you want to use it later on.


How do I uninstall Zentyal or can I revert to a 'clean' installation somehow?

Never use the remove command with packageName ended with *, as it will possibly damage your system or erase other packages' requirements.

Run sudo apt-get purge zentyal to remove the installed zentyal package,
and then run sudo apt-get update and sudo apt-get upgrade.

It should fix the problem.


How do I add an AppImage application to favorites in GNOME shell?

If you are in Ubuntu 18.04: When you run the appimage it asks you if it should integrate it into the system. If you choose yes then you can search it on the shell and right-clicking on it (before running) will give you the option to add to Favorites.

Here is an example:


I suggest you plug in a 3.5mm headset and see if the sound works.

If it doesn't, it might be a software problem.

If it does, then your speakers might be broken.

I hope this helps.


Failed to download repository information on Ubuntu Unity 16.04 LTS

The PPA you've added, ppa:upubuntu-com/icons, doesn't support Ubuntu 16.04. As you can see from their list of supported releases, the last supported release is wily, or Ubuntu 15.10.

You'll need to either remove that PPA or try to set it to use wily instead of xenial. Find out which file has that PPA by running fgrep upubuntu-com /etc/apt/sources.list /etc/apt/sources.list.d/*, and proceed from there.

If the entry shows up in the file /etc/apt/sources.list, you can edit that file by running sudo nano /etc/apt/sources.list, finding the upubuntu-com line and either changing xenial to wily or removing the line.

If the entry shows up in a file under /etc/apt/sources.list.d, you can either delete the file or edit it using sudo nano file-path and changing xenial to wily.

After you've done that, run sudo apt update again.


The steps is misleading for you, use this:

You need to clone the master tree in order to proceed with the installation.

You need git via apt-get install git.

$ mkdir workingcopy/
$ cd workingcopy/
$ git init .
$ git pull https://github.com/tmbdev/ocropy
$ sudo apt-get install $(cat PACKAGES)
$ wget -nd http://www.tmbdev.net/en-default.pyrnn.gz
$ mv en-default.pyrnn.gz models/
$ sudo python setup.py install


Yes, you can. Burn an ISO of GParted : http://http://gparted.sourceforge.net
Then configure your BIOS to run the disc you just burnt and the use of GParted is really straight forward you just have to resize the partition next to the root partition so you gain some space and then resize the root partition to take the new empty space and then apply.

But be careful, save the data on the partitions you are resizing because if the process is stop because of any reason (computer crash or the power shutdown) then you'll probably lose the capability of reading these data. And you should also know that resizing a NTFS partition is fast but resizing a ext3 partition take several hours depending on the size of the partition and the amount of data in these partitions  (should be faster with ext4 partitions but I don't know how much) and you'll not have access to your computer during this long amount of time.

Also if you resize a Windows partition Windows will do a checkdisk when you launch it next time, don't stop it, let it run the whole checkdisk if you don't want to have any problems.


How do I setup DHCP-Server interfaces so they are mapped/bridged to each other?

Edit /etc/network/interfaces to have a section like this:

iface br0 inet static
   bridge_ports eth0 eth1
   address 192.168.0.1
   netmask 255.255.255.0

(This is assuming you are using 192.168.0.x addressses for you dhcp server.)
Then you just use br0 instead of eth0 or eth1 when you are doing your configuration file. With this method, you don't need anything fancy in the configuration file to try to connect the two interfaces to each other. You just need a section that tells the DHCP server to run on br0, just like it was one ethernet port. You could use a section something like this for the DHCP server:

subnet 192.168.0.0 netmask 255.255.255.0 {

        option routers                  192.168.0.1; #You might have to comment this line out.
        option subnet-mask              255.255.255.0;
        option broadcast-address        192.168.0.255;
        default-lease-time 86400;
        max-lease-time 86400;
}

Hopefully that answers your question as you asked it. However, it sounds like maybe you are trying to share internet among multiple computers. You think you need a DHCP server to do that, and so you are trying to set one up. Am I right so far? If so, there should be a simpler solution:
(this solution assumes you get addresses automatically on eth0. If you have to set them manually, this method would still work, but there would be extra steps)
First, shut down all your eth0 and eth1 interfaces. (sudo ifdown ethX if you're using /etc/network/interfaces to manage them, or disconnect in NetworkManager applet if you are using that.) Then edit /etc/network/interfaces and add a section like this (commenting out eth0 or eth1 sections if needed):

iface br0 inet dhcp
   bridge_ports eth0 eth1

then do sudo ifup br0. This should make your ports eth0 and eth1 act just like a networking switch, except that your Ubuntu computer is also plugged into this networking switch. Assuming that you could automatically get addresses on eth0 before, this will be passed on to eth1 computers also.

Let me know how my answer works.


Haven't tested it but this should work:

sudo add-apt-repository 'deb http://archive.offensive-security.com pwnsauce main microverse macroverse restricted universe multiverse'
wget -q http://archive.offensive-security.com/backtrack.gpg -O- | sudo apt-key add -
sudo apt-get update

Edit: I think this would work but it appears to be 32bit-only at this juncture. There may be another repo that caters for 64bit but I can't find it.

Edit 2: This works perfectly on a 32bit version of Ubuntu.


If you deleted Ubuntu and your system was using the partition where Ubuntu was to keep the boot loader you need to fix your MBR and use the Windows7 boot loader if you don't want to install Ubuntu again.

Use the Windows7 CD to fix your MBR and boot loader.

More information on the Microsoft Support site under this page

http://support.microsoft.com/kb/927392


How to select (& copy) only a part (in the middle) of a linked text?

WinKey+Alt+Click works for me most of the times, although I'm not on Ubuntu, but on another Linux distro. WinKey is that key branded with the Redmond company logo.


Xubuntu 20.4 LTS no window decorations, no keyboard, no mouse

I restarted xfwm4 via "alt + F2" according to this thread:
https://forum.xfce.org/viewtopic.php?id=5806
After rebooting everything seems working as before (keyboard, mouse, window decoration). Probably the xsession cache became garbled on the machine.


The Dell XPS 15-9530 works just fine on Ubuntu 14.04 out of the box.
The multitouch screen however does NOT (as of 13.10) and if you're using a Nvidia card with optimus you'll probably want to install bumblebee but that's up to you. but if, as you say, you have no onboard GFX you'll be able to use it without any problems at all.

If you do happen to have the optimus nvidia graphical card you will NOT be able to use the HDMI out of the box and you'll need a workaround (can be found on the bumblebee website)

For more info on you machine (or other machines) check this
I can confirm the mini-display port working on my Dell xps 15 as well as the usb 3. The HDMI however does not (I've got an optimus card) without a workaround.


Installing Ubuntu on a Primary Partition

This Ubuntu tutorial gives you a step by step guide through the installation process.

However, let's make sure we're clear on something first: There are no drive letters in Linux or UNIX.  Instead of using G: to install, you will erase the G: partition and turn that into a Linux-friendly partition, in step 6 Allocate drive space.

Windows uses either the FAT type (FAT, FAT12, FAT16, FAT32, exFAT) of disk partitions, or NTFS (nowadays, almost always NTFS).  Linux uses the ext (ext2, ext3, ext4) as well as less popular disk partitions (XFS, btrfs, and others); here is a primer on the subject.

So, in step 6 Allocate Disk Space, you will choose Something Else. You will choose the NTFS partition G: for deletion, then tell the Ubuntu partitioning program gparted to go ahead and actually delete it. Then, you will tell gparted to take that empty space and use it for the "root' or / directory of Linux, then tell it to go ahead and do it.

/ is the top level directory of Linux, and the files you boot with go underneath it, as well as your Linux data files.

You will also be asked where to put grub, the program which lets you choose which OS to boot with. Tell it /dev/sda .

FYI, there is no 'root' user in Ubuntu for safety's sake; you will learn about that later, if you have not already, how Ubuntu uses sudo to enable you to do things which could be dangerous if done wrong.


How do I change the icon and text color?

Open a terminal (Ctrl+Alt+t) and run following command(s) :

Rebuilt Theme

For Ambiance Theme:

gsettings set org.gnome.desktop.interface gtk-theme 'Ambiance'

For Radiance Theme:

gsettings set org.gnome.desktop.interface gtk-theme 'Radiance'

Rebuilt icon package:

gsettings set org.gnome.desktop.interface icon-theme 'Unity-icon-theme'

Other default icon package:

gsettings set org.gnome.desktop.interface icon-theme 'Ubuntu-mono-dark'

gsettings set org.gnome.desktop.interface icon-theme 'Ubuntu-mono-light'

Or reset Unity to default setting:

unity --reset


Screen brightness problem on asus u82u with radeon HD6320

Hi I think that this is a partial duplicate of this post here

If you scroll down there is a workaround using a brightness panel indicator

Good luck.


Completely remove all the NVIDIA software you have installed and reinstall the NVIDIA drivers.
Because you have the 361 drivers installed - you do not need to add the GPU Drivers PPA again.

Highlight the Ubuntu menu entry and  press the E key.
Add nouveau.modeset=0 to the end of the linux line.
Press the F10 key to boot into the Ubuntu system.

Open a terminal and execute :

sudo apt-get purge nvidia*
sudo reboot

After the restart ...

Highlight the Ubuntu menu entry and  press the E key.
Add nouveau.modeset=0 to the end of the linux line.
Press the F10 key to boot into the Ubuntu system.

Open a terminal and execute :

sudo apt-get update
sudo apt-get install nvidia-361 nvidia-prime
sudo reboot


Unable to launch byobu with custom windows.NAME file

Update your byobu to the latest version.  I didn't find any documentation stating when this config became available, but I've been bitten by it twice.

Each time I have to manually checkout the source code, compile and install the latest version.  All of a sudden, all windows config works.


How do I stop Ubuntu from overriding my setxkbmap settings?

updated

rm -f executed.log
echo ".profile starting" >> executed.log
if [ $(whoami) != "root" ]
then
  echo "$(setxkbmap -v)">> executed.log
  echo "$(setxkbmap -layout "us" -variant "altgr-intl" -option "ctrl:nocaps")"
  echo "setxkbmap executed" >> executed.log
  echo "$(setxkbmap -v)">> executed.log
fi

check for small correction. Check for reverse quote.

When you login in GUI. Its taking setxkbmap as a string. You have to use reverse quote to tell treat those characters as a command.


Using an awk and sed command inside perl

Without context, it's hard to give you exact answers, but Perl also has the s/// command, so that should be easy.

To skip given lines, you can add something like

next if $. == 1 || $. == 4;

To print only the given columns, you usually keep them in an array, and then just

print "@F[0,2,6,12] ", scalar @F;


Open guake-prefs via Dash or terminal or right click in your guake terminal and open Preferences.

Now you can change your settings


Just installed 12.04 and it freezes when I try logging in

I'm dealing with the same thing on an Acer Aspire One 722 -

According to reports in various places, the random and irreversible freezes seem to be an issue with the networking/network card. A possible solution: changing the boot order (F12 on startup) to place Network Boot in the first position. Turning of "auto connect" for wlan in network manager might also help.

I've implemented these on my system, and so far it is helping (only a few hours in though).


How do I fix my .desktop files in /usr/share/applications?

(OP solved issue)

I made the mistake of editing the Home Folder .desktop in the root folder and NOT copying it to ~/.local/share/applications... I was adding some quicklists to my Home Folder icon. But yes, backing up is always the way to go :) A caveat to others. I checked the .local.... folder and there is no Downloads.desktop. And, now I have 3 Home Folders when I search.... =/ I know the one is in .local... and the one should be in /usr/share/applications, but why 3? I'll look more into this... – Ryan McClure Feb 23 at 10:10

I had a few duplicates of Home Folder all over the place... deleted what wasn't needed and now I have one. I think I can live with the double Downloads. Thank you all for your help! You all are awesome here. – Ryan McClure Feb 23 at 10:22


Thx guys for ur tryings. I have installed it through synaptic along with one more package which has been suggested by synaptic.


Xerox WorkCentre 3045 Scanner Driver for Ubuntu 16.04

Unfortunately there is no scanner driver for WC 3045 on Linux at all... It only works as a printer.


How to set wifi driver settings to prefer 5 GHz channel above 2.4 GHz

Run:

$ iwlist wlan0 scanning | grep -C3 <name of your network>

You should find 2 entries for the network, for example:

Cell XX - Address: 11:11:11:11:11:11 // This will be different in your machine
ESSID: "name of your network" // This will be different on your machine
Protocol: IEEE 802.11bgn
Mode: Master
Frequency: 2.437 Ghz

--

Cell XX - Address: 22:22:22:22:22:22 // This will be different on your machine
ESSID: "name of your network // This will be different on your machine
Protocol: IEEE 802.11AC
Mode: Master
Frequency: 5.18 Ghz

BSSID for the 5Ghz Network, in this example: 22:22:22:22:22:22
BSSID for the 2.4 Ghz Network, in this example: 11:11:11:11:11:11

Now what you do is:

click on 'Network Connections'
'Edit Connections...'
[Select your network connection] (there could be 2 entries, any will do)
Click Edit
Go to 'Wi-Fi' or 'Wireless' Tab
Click the BSSID Dropdown
Select the BSSID Matching the 5 Ghz Network (22:22:22:22:22:22 in this example)
Switch to the 'General Tab'
Make sure to check the checkbox that is labeled: 'Automatically connect to this network when it is available'
Rename the Connection Name (not the SSID) to 'your network name'_AC
Click Save
If there were 2 entries for 'your network name' in your Network Connections list, proceed with next step, otherwise go to the last step.
Click on the other 'your network name' entry
Click Edit
Go to 'Wi-Fi' or 'Wireless' Tab
Click the BSSID Dropdown
Select the BSSID Matching the 2.4 Ghz Network (11:11:11:11:11:11 in this example) OR leave the BSSID empty if there are multiple other secondary access points
Switch to the 'General' Tab
Uncheck the checkbox that is labeled: 'Automatically connect to this network when it is available'
Set the 'Connection name' to [your network name]_N
Click Save...
Disconnect from your network and re-connect

You should now be connected to the 5Ghz network, and you would have to explicitly do the opposite process in order to connect to the 2.4 Ghz Network.


Open Eclipse ->  Window  -> Preferences -> Java -> Installed JRE -> Click Add -> Select Standard VM -> Window will open, enter this

JRE home : /usr/lib/jvm/java-7-openjdk-amd64

JRE name : It will automatically fill with one name

Next -> Finish

Restart your Eclipse & you are good to go.


Open terminal and type the following command:

sudo apt-get install ubuntu-restricted-addons ubuntu-restricted-extras


How do I burn Ubuntu to DVD? errors on Mac and PC

I had the same problem on Windows, the cause was a problem in the .iso file downloaded. Verify your .iso file has the correct checksum, the list of correct checksums is in UbuntuHashes page.

If you are on a Windows box, you can use winmd5 utility to get your downloaded .iso checksum. If on Linux, use md5sum command line utility.


Normally, you should be able to use hosthame in order to connect to your remote computer through xRDP as long as you nave a name resolution system in place...(i.e. system that maps hostname to IP address on your network)

If you linux machine has been set with a fixed ip address,  you could modify the host file
(located under c:\windows\system32\drivers\etc) and add a line
IP_ADDRESS      HOSTNAME

Note : you need to open the notepad with admin rights in order to be able to save the changes in the host file

If you are using a DHCP server,  Ip address received by the Linux machine might change over time... and the host file approach might not be practical....A better option would be to use a DNS server where the DHCP can dynamically update the DNS entry

Hope this help
Till next time


is that fine to install ubuntu 20.04 LTS amd in intel?

If you're referring to the "amd64" in the ISO file name (ubuntu-20.04.1-desktop-amd64.iso), this means the CPU architecture of your CPU. Modern AMD and Intel CPUs all support the amd64 architecture. There are other architectures, but they're niche, and you would probably know if you had a CPU with one of those niche architectures because you would have bought the CPU with a particular goal in mind. Most CPUs that people buy for workstations, gaming PCs, etc., use amd64 architecture.


How to restore btrfs snapshot with out reboot?

I doubt that this is possible or even should be possible without a reboot. The root directory holds some pretty important system parts that shouldn't be changed at runtime. You can either

copy the files or directories you want to roll back with cp --reflink,
boot a live system and move the snapshot folder around, or
change the default subvolume (source)

# btrfs subvolume list /
ID 258 gen 9512 top level 5 path root_subvolume
ID 259 gen 9512 top level 258 path home
ID 260 gen 9512 top level 258 path var
ID 261 gen 9512 top level 258 path usr
# btrfs subvolume set-default 258 /

and reboot.


The primary cause of high GPU usage in an idle Ubuntu 11.10 desktop will be compiz, the compositing window manager.  You may be using a compositing window manager even if you are using the GNOME Classic or Unity 2D session instead of the default Unity session  To check if you are running compiz, you can run this command from a terminal:

  ps awx | grep compiz

To switch from compiz to metacity, you can run:

  metacity --replace

Since this happened after upgrade from 11.04 to 11.10, another possible cause for GPU regressions may be the video drivers themselves.  You may want to check in the "Additional Drivers" tool (available from the commandline by running "jockey-gtk") that you are running the optimal driver for your card.  There may be several different drivers available that support your particular card, and you may find that one or the other provides better GPU performance.  For some older cards, it is even possible that the 3D acceleration provided by the open source nouveau driver may be your best bet.


Lubuntu 14.04.1 - load installer components from cd fails, although integrity is ok - why?

I guess, although it was not the exact same situation, I had a simillar problem to this: https://askubuntu.com/q/439661/319747

And suprisingly the same solution - just by chance I've left my boot-cd in the drive and started from the SDCard - and suddenly it went installing.

Still this is very strange and anybody who would rely on having just an USBStick or SDCard would go crazy - because the CheckDiskIntegrity works, even without a CD present, but loading the installer components won't!

Although my answer is a solution, I will accept who ever explains how this can be fixed without using a Boot-CD.


Setting different default applications for different Desktop Environments

I've put together this solution to resolve your issue, and tested it on KDE and XFCE with opening text files and font files. It is a generic solution that should be applicable to any number of desktop environments and mime types. The way it works is there is a simple python script called custom-open that will open a file using different applications for different desktop environments. These are the steps to setup the solution:

save custom-open script on your computer preferably on your path but doesn't have to be.
save .custom-open.ini in your home directory ~/.custom-open.ini
set custom-open as the default application for any file types you want handled by it.

custom-open

#!/usr/bin/env python
import traceback, sys, os, ConfigParser, os.path
from subprocess import Popen, check_output
from gtk import MessageDialog, MESSAGE_ERROR, BUTTONS_CLOSE

try:
    file, desktop = sys.argv[1], os.environ['DESKTOP_SESSION']
    mime = check_output(['file', '--mime-type', file]).strip().split(': ')[1]
    config = ConfigParser.RawConfigParser()
    config.read(os.path.expanduser('~/.custom-open.ini'))
    cmd = config.get(desktop, mime)
    Popen([cmd] + sys.argv[1:])
except:
    msg = "CUSTOM OPEN ERROR\n\n" + traceback.format_exc()
    MessageDialog(None, 0, MESSAGE_ERROR, BUTTONS_CLOSE, msg).run()

.custom-open.ini

[gnome]
text/plain = gedit
application/x-font-ttf = gnome-font-viewer

[xubuntu]
text/plain = leafpad
application/x-font-ttf = gnome-font-viewer

[kde-plasma]
text/plain = kate
application/x-font-ttf = kfontview

so what's great about this solution is that you can add as many new desktop environments as you want and as many mime type you want. to check what name you should provide for the desktop environment run the below command in a terminal.

env | grep -i DESKTOP_SESSION

to check the exact mime type of a file just run:

file --mime-type filename

EDITED: The need for symbolic links has been removed this should make it easier to use. I've also added a graphical error handler that will bring up an alert if an error occurs.


First, you should go in BIOS settings and find the page in which you should set what device is run/boot first.

If still doesn't working, look for something called USB Legacy Support in the BIOS. Enabling that should allow the machine to pretend the USB is a hard drive and boot from it. Ubuntu should take over from there.


No sound on Skype in 18.04. Perfect before update

This happened to me today. After trying the solutions shown nothing was solved.

Install pavucontrol

sudo apt install pavucontrol

After you run the audio test with Skype  Tools > Config Audio and Video (in the section Speakers).

Open "pavucontrol" and you will be able to see that Skype is trying to use a different audio output (in my case was HDMI) I changed that and Skype audio worked again.

Hope it helps.


NordVPN Setup using Settings & Network Manager

Open the terminal and use

nordvpn connect

to connect, and

nordvpn disconnect

to disconnect.


The libfam.so.0 shared library is in the libfam0 package. In the future, you can see which package contains a certain file by running:

apt-file search somefilename

Hope this helps!


Maximum resolution for ThinkPad X60 is 1024x768, so you can't increase it.

You can change size of the text, that could help.

Run "Appearance" (if you have classic desktop, then from menu System → Preferences → Appearance, if you have Unity then run ** Dash** (Ubuntu button in top left corner) and search for "Appearance"). Navigate to Fonts where you can set size of all system fonts (or click on Details... to set DPI for whole system).


How do I pass an argument to the kernel in Ubuntu 20.04?

In Ubuntu you can add kernel parameters in grub.
Edit /etc/default/grub and add e.g. intel_pstate=passive to GRUB_CMDLINE_LINUX_DEFAULT.
Example:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=passive"

To apply this setting run
sudo update-grub

It will be used after a reboot.
You can check the current state by
cat /sys/devices/system/cpu/intel_pstate/status


Java -version still showing 1.6 even after installing 1.7

You may use the following command to change the default java version:  sudo update-alternatives --config java

I think eclipse will use the default java version, but you may take a look at "Window -> Preferences -> Java -> Compiler"


Ubuntu heat up too much my computer when it uses the integrated intel graphics

I'm sure the discrete graphics-card, the nvidia Geforce 710M, must be responsible for your heating problem. By using bumblebee you may have triggered it.
I recommend using the nvidia-prime driver (activate in "system settings -> software & updates -> additional drivers -> nvidia-331") and to choose manually between integrated and discrete graphics, which is possible within "nvidia-settings->PRIME Profiles". By turning the nvidia card off your laptop will stay much cooler.


Mounting disk through terminal read up here - https://help.ubuntu.com/community/Mount - and here - https://help.ubuntu.com/community/AutomaticallyMountPartitions

For a friendlier way - Is there a program to mount all of my drives automatically?

As for Samba, I suggest you consider other options as well like in my comment above. This file/backup server will be up and running 99% of the time? Download Samba package from the repo, run the service. Many times it works for me without configuring anything. Just right click on the folder then find the Sharing options.

Try reading up here - http://www.unixmen.com/howto-install-and-configure-samba-share-in-ubuntu/ - and here - https://help.ubuntu.com/12.04/serverguide/samba-fileserver.html


Try restarting the gnome-shell (which is responsible for the user interface).
You can do it quickly with the Run a Command dialog.
Type Alt+F2 for the dialog to open, type just r in the text-field, then hit Enter


It's a youtube link. https://www.youtube.com/channel/UCYEK6xds6eo-3tr4xRdflmQ

You accidentally dragged the address bar on your desktop while browsing the link or a page that has the link, your internet browser created a shortcut to the address.


I had the same issue after an performing an update to Ubuntu 16.04. The printer was an HP Officejet Pro 8610. Printer stopped, re. no filter.
Using Synaptic package manager, I found only one hplip program installed after the update. I installed two others and everything works again. Needed programs are hplip, hplip data & hplip doc.


Email threads by subject in Thunderbird (just as in Gmail)

Use Thunderbird Conversations. Never look back :-) Threaded view alone was too little for me.