Install Ubuntu 20.04 Focal Fossa with RAID 1 on two devices

As I stumbled on the same issue and found out that the actual docs haven't yet been updated for the new storage configurator (still true as of March 2021 and now possibly with a bug on the bios_grub configurator of the installer), here's what I did to get a working softRAID 1 setup with 2 disks on the Ubuntu Server edition (for version 20.04 or newer):

Select "Custom storage layout" when you reach the storage configuration step of the installer.
If the disks have existing partitions, click on each disk under AVAILABLE DEVICES and then select REFORMAT. This will (temporarily) wipe out the partitions.
Now select the 1st disk to add as "boot" disk (same menu that had REFORMAT in).
Do the same with the 2nd disk. [Note on March 2021: If this does not work for you in the newest installer of 20.04.2, just skip that part. In the end the 1st disk will have 4 partitions (bios, /boot, swap and /) and the 2nd just 3 (/boot, swap and /), which doesn't really matter. If you want to have the same number of partitions on each disk, go ahead and create a 1 MB partition on the 2nd disk, before doing the 3 others. This way, blocks will be sync'ed between the 2 disks. It's possible that there's a bug in how the bios_grub partitions are created in the installer when using multiple disks as this behaviour is not consistent with version 20.04.1 or the current Ubuntu Server docs as referenced here.]
You should now see two 1.000M bios_grub partitions created under USED DEVICES. These small partitions will be used by GRUB for booting the server. [Note on March 2021: the setup works with one bios_grub partition as well].
The trick to setup a softRAID array is to create partitions for /boot, swap and / on each disk, but WITHOUT formatting them (and as such, there won't be a mount point for now).
So go ahead and "Add GPT Partition" on the 1st disk, give it a 1G size and choose to leave it unformatted. Do the same for the 2nd disk. These will be the /boot partitions for the softRAID array. Under each disk on AVAILABLE DEVICES you will now see "partition 2".
Now we'll prepare the swap partitions. "Add GPT Partition" on the 1st disk, give it the same or half the size of your RAM (e.g. let's say 16G cause we have 16G of actual RAM - but it's really up to you to decide that) and choose to leave it unformatted. Do the same for the 2nd disk. Under each disk on AVAILABLE DEVICES you will now see "partition 3".
Now we'll prepare the / partitions. "Add GPT Partition" on the 1st disk, do not set a size (so it uses all available) and choose to leave it unformatted as with all the other partitions you created so far. Do the same for the 2nd disk. Under each disk on AVAILABLE DEVICES you will now see "partition 4".
Now click on "Create software RAID (md)" under AVAILABLE DEVICES. We'll create the first softRAID partition (md0) by selecting the two "partition 2" entries (one from each disk). Click "Save".
Repeat the process for md1 and select the two "partition 3" entries. Hit "Save".
Repeat the process for md2 and select the two "partition 4" entries. Hit "Save".
We now have 3 pairs of AVAILABLE DEVICES which will now format as the actual softRAID partitions. So select md0 and then "Add GPT Partition", format as EXT4 and mount on /boot.
Select md1 and then "Add GPT Partition", format as SWAP.
Select md2 and then "Add GPT Partition", format as EXT4 and mount on /.
All these mdX softRAID partitions will now appear under USED DEVICES and you are ready to proceed with Ubuntu's installation.
At the very bottom, you should now see "Done" enabled so hit it and proceed.

Enjoy :)
(Also referenced on: https://gist.io/@fevangelou/2f7aa0d9b5cb42d783302727665bf80a)


If your purpose in backing up /etc is just to protect against accidental error, consider using etckeeper to store it in version control. Install the etckeeper package, which will automatically set it up, and will automatically commit configuration changes. If you need to revert an erroneous configuration change, use sudo bzr on the /etc/ repository.


Apt-get 403 Forbidden, but accessible in the browser

So it turns out this is an issue with squid-deb-proxy.  Unfortunately it doesn't add PPAs and other repositories and just fails with an rather unexpected 403 error.

You can fix this by adding the repositories to the config file:

/etc/squid-deb-proxy/mirror-dstdomain.acl

# launchpad personal package archives (disabled by default)
ppa.launchpad.net
private-ppa.launchpad.net

Of course, uninstalling squid-deb-proxy also works around the issue:

apt-get remove squid-deb-proxy


Not sure if I am meant to post this under my question but I managed to get the sound through HDMI working :) :)

The fix: Type "alsamixer" in the terminal and use the right arrow to go to S/PDIF and S/PDIF 1. Mine was set to "MM"(mute) push the letter "M" to unmute, it will change to "00"
now press "Esc" and enter "sudo alsactl store" close the terminal and reboot

I found this on http://karuppuswamy.com/wordpress/2012/04/28/how-to-fix-nvidia-hdmi-audio-in-ubuntu-12-04/ (pics and full set of instructions)

PS I am now running 13.04. (still had the issue until doing this fix above)


Gnome-session from ssh X returns "X11 connection rejected because of wrong authentication", but xterm works

OK, I have found that I can use remote-desktop but not with Gnome-session due to some bug in xrdb or gnome in Ubuntu 18.04.
I can use xfce instead and it all works fine. I would hope that whatever bug is stopping gnome-session working is fixed eventually as I prefer it.
I was not able to use remote X because GNOME has an issue where some parts want to use one scheme and some another in that case. Xrdb uses Xorg and that just works fine. I thought I could use Vino and VNC for this, but I do not know how to tell vino to launch the desktop - the instructions I was given segfault. There may be some other VNC which can work but all the instructions I see is from a few years ago, and all complaints about it not working applies to 18.04.
Obviously it would be nice if this were possible since Remote desktop is limiting as a client model.


protect battery on thinkpad T490 - Ubuntu 18.04

After a discussion with the package author and maintainer (many thanks to him for his patience with my n00bness), the solution was to update to the PPA version 1.2.2 (I guess newer may work as well):

sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install tp-smapi-dkms acpi-call-dkms tlp

After that things start to work:

~$ sudo tlp-stat
--- TLP 1.2.2 --------------------------------------------
...

+++ Battery Features: Charge Thresholds and Recalibrate
natacpi    = active (data, thresholds)
tpacpi-bat = inactive (kernel module 'acpi_call' load error)
tp-smapi   = inactive (ThinkPad not supported)
...

and the battery levels can be updated:

~$ sudo tlp setcharge 70 80
Setting temporary charge thresholds for BAT0:
  start =  70 (no change)
  stop  =  80 (no change)

leading to:

~$ sudo tlp-stat
...
/sys/class/power_supply/BAT0/charge_start_threshold         =     70 [%]
/sys/class/power_supply/BAT0/charge_stop_threshold          =     80 [%]
...

Note that if you want the update to survive reboot, you need to update the configuration file at /etc/default/tlp by uncommenting / modifying the lines 355-356 (you will need to open as root and overwrite readonly protection, for example in vim you need :w! ):

350 # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
351 # required). Charging starts when the remaining capacity falls below the
352 # START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
353 # Main / Internal battery (values in %)
354 # Default: <none>
355 START_CHARGE_THRESH_BAT0=70
356 STOP_CHARGE_THRESH_BAT0=80
357 # Ultrabay / Slice / Replaceable battery (values in %)
358 # Default: <none>
359 #START_CHARGE_THRESH_BAT1=75
360 #STOP_CHARGE_THRESH_BAT1=80

For more details:

https://linrunner.de/en/tlp/docs/tlp-configuration.html#chargethresholds


Startup application not working after login

if you want to run the script at startup, do the following :

Run sudo chmod +x /home/pi/myscript.sh to make your script executable.
Open .bashrc file using sudo gedit ~/.bashrc or sudo nano ~/.bashrc
Place the command that runs the script (./home/pi/myscript.sh) in the end of the file.
Save and exit.

It should run on the next startup.


Give domain users administrator account or access to software center

I suppose my answer here Software Center prompts password of another user may help you?

You will need assign your domain users a group to which you want to grant these admin rights and then add that group to /etc/polkit-1/localauthority.conf.d/51-ubuntu-admin.conf.


25 Gb is enough for the base files but if you put /home in there and use /home also as some sort of file server (so to keep video files) it will run out fairly quickly. Easily solved by regurarly removing large files as to keep only what is needed.

Ubuntu/Linux is very flexible when it comes to space. If at anytime 25Gb is not enough it is fairly simple to add space with gParted.

So your method can be correct for now and the future.


gnome-terminal does not differentiate between C-d and C-S-d

If you don't need C-d at all (you can close a terminal with exit, after all), you could try to remove its association with EOF, and associate EOF with another unuseful sequence, C-j for example:

stty eof ^J

I cannot say if it also will free the use of C-S-d.

If it works, that command should be set in ~/.bashrc, for example.


sudo is a commad that might be best read as "SetUser Do" command:

The command can also be executed as

sudo -u username docommand.foo

see man sudo


Multiple file ordering in Nautilus file manager in general e per folder

After opening Nautilus, notice against Activities on the top bar an item called Files with a down arrow. Click on that and select Preferences.

From this point, you can select the options you require from the Views, Behavior, List Columns, and Search & Preview tabs.


Open terminal Ctrl+ Alt + T

uninstall software center

sudo apt-get remove software-center

sudo apt-get autoremove

Now install software center:-

sudo apt-get install software-center


Dual boot windows 8 and ubuntu more official way

I guess win tries to attach ext fs with no success at boot time hence you have the delay. Nothing you can do about that.


I don't know how to use Backspace, but there are a few Keyboard shortcuts:

Alt+Left - Move 'Back' through history of navigated folders

Alt+Right - Move 'Forward' through history of navigated folders

Alt+Up - Move 'Up' - navigate to parent directory

There are more listed here

You can change it to be the shortcut to navigate back, though it might be simpler to use Alt+Left.

First kill nautilus with:

nautilus -q

Note this will close any file manager windows, and probably anything it is doing

Open the text editor with the file by running this in terminal or command prompt:

gedit ~/.config/nautilus/accels

search for this line (Ctrl+F and then type actions/Up):

; (gtk_accel_path "<Actions>/ShellActions/Up" "<Alt>Up")

and replace it with:
     (gtk_accel_path "/ShellActions/Up" "BackSpace")

Save and exit, then close terminal, and open Files again, and it might work


If you try to open it from Nautilus file manager, root is labeled as a Computer in Places sidebar. Or, in Terminal you can use a cd command to change directory:

cd /

"/" is a root directory on Linux.


Raise a window in 20.04 by clicking without clicking any of the buttons inside it (disable "click-through")

I think, short of a code change, you can't. I'm basing that on the following.
Judging by https://github.com/GNOME/gnome-tweaks/blob/35e3a5bebebb94a631e5ccbb7c29b2e482595a9a/gtweak/tweaks/tweak_group_windows.py#L20-L21 the setting is org.gnome.desktop.wm.preference, and the key is focus-mode. That lead to https://github.com/GNOME/gsettings-desktop-schemas/blob/2bb055b3c1b87e6db80d891bd788f1d4b9a62af3/schemas/org.gnome.desktop.wm.preferences.gschema.xml.in#L41-L50, which indicates there are only three possible values

“click” means windows must  be clicked in order to focus them,
“sloppy” means windows are focused when the mouse enters the window, and
“mouse” means windows are focused when the mouse enters the window and  unfocused when the mouse leaves the window.


How to get information on specific .snap

We're working on improving documentation for 16.04 especially for people wanting to play with the kernel and follow the project ,  in the mean time feel free to post questions on mailing list for fast response...


Make sure your network is set to NAT in VMware and is Also connected at power on. Also that is an old version can you upgrade your workstation?


You can add a new mode (I did this with l502x and it works for me)

https://wiki.ubuntu.com/X/Config/Resolution#Adding_undetected_resolutions

What I did to get 1600x1050:

cvt 1600 1050
xrandr --newmode "1600x1050_60.00"  140.00  1600 1704 1872 2144  1050
1053 1063 1089 -hsync +vsync
xrandr --addmode DP1 1600x1050
then Go to screen config and choose 1600x1050


chromebook 14 touchpad not working with newly installed ubuntu 14.10

Upgrade to kernel 3.18. Should fix your touchpad.

Instructions here: http://ubuntuhandbook.org/index.php/2014/12/install-linux-kernel-3-18-ubuntu/

Ctrl+Alt+T will open a terminal window so that you can run all the commands in that article.


Does saving my progress on a U1-synced file/folder put unneccesary strain on the servers?

i would not worry about this. Given the observed speed of syncing, I would not consider Canonical's Amazon storage system to be even nearly overwhelmed.

If you are concerned about ensuring the service remains viable, you may wish to consider upgrading your storage plan to get more benefit and help support the infrastructure.


Minecraft program frame rate is very slow

Minecraft Wiki: Hardware Performance
    Any computer with the following hardware should suffice, however, for an enjoyable experience, we suggest looking at the recommended requirements.

Minimum requirements:

    CPU : Intel P4/NetBurst architecture or its AMD equivalent (AMD K7)
    RAM : 800MB
    GPU : GeForce3 or ATI Radeon 7xxx and up.
    HDD : At least 10MB for game data
    Java Runtime Environment (JRE) 5 or up is required to be able to run the game.

Recommended requirements:

    CPU : Intel Pentium D or AMD Athlon 64 (K8) 2.6 GHz
    RAM : 2GB
    GPU : GeForce 6xxx or ATI Radeon 9xxx and up with OpenGL 2.0 support (excluding integrated chipsets)
    HDD : 150MB

Your Diamond Stealth s60 with Radeon 7000 is at the absolute bottom end of the minimum requirements for Minecraft. Compare your system with the other requirements and see if you may be falling short there as well.
My recommendation to you would be to launch Minecraft and click "Options" and then "Video Settings". Reduce all settings to the minimums and then run the game to check for improvement. If you still experience low FPS you may need to upgrade your hardware.


From man chmod:

SETUID AND SETGID BITS
       chmod clears the set-group-ID bit of a regular file if the file's group
       ID  does  not  match the user's effective group ID or one of the user's
       supplementary group IDs, unless the user  has  appropriate  privileges.
       Additional restrictions may cause the set-user-ID and set-group-ID bits
       of MODE or RFILE to be ignored.

In my interpretation, that means that media_users is not the effective group for the root user that issues the command. To execute the command with media_users as the effective group, try: sudo -g media_users chmod 2770 tvshows/.


Team Viewer on Ubuntu! Is it running through wine?

Does it run through wine?

yes

  why is this a .deb file ?

To easily install in debian based systems

  Is it possible to make .deb files but running with wine

YES , deb is the extension of the Debian software package format and the most often used name for such binary packages.?
To learn about debian packaging use this link

TeamViewer for Linux is based upon the Windows version using wine. Additionally, /opt/teamviewer/teamviewer/$tv_ver/bin/teamviewer contains links to a wrapper of a Windows executable:

export TV_BINDIR=/opt/teamviewer/teamviewer/$tv_ver/bin
exec "$TV_BINDIR"/wrapper "c:\Program Files\TeamViewer\Version$tv_ver\TeamViewer.exe" "$@"


This is what I found after a quick google search, a PDF explaining how to correctly extract the contents of the file.

Looks like there are several files:

OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.0
OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.1
OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.2
OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.3
OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.4
OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.5
OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.6
OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.7

You need to copy all those files to a specific directory, for example /OVS/seed_pool/. Then run the following commands:

# cd /OVS/seed_pool
# cat OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.0 \
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.1 \
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.2 \
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.3 \
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.4 \
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.5 \
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.6 \
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.7 | tar -xz

Note that those are only 2 commands, denoted with the starting #.

Those commands shall create the following directory structure, with these files inside:

/OVS/seed_pool/OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM
|
|- System.img (OS image file)
|- ebs1211db.img.img (Oracle E-Biz 12.1.1 DB Tier image file)
|- vm.cfg (VM configuration file)
|- README.txt

For more help, please look into the PDF mentioned above.


Which file system to use? Is EXT4 ok? F2FS - not production ready? No good support on Ubuntu yet?

You can not choose F2FS yet (during installation or in gParted) so it will be ext4.

  On which partitions to use? The root on SSD and home on HDD?

I have my root on a ssd and my home on a hdd.

This How to enable TRIM? is a must read.

  but i am concerned about its lifetime and data integrity.

Don't worry. The discs are cheap(ish) and will be cheaper in a year. Just set up your system with that in mind: if the ssd suddenly decides to quit on me I can get a new ssd and re-install Ubuntu from scratch since all my data is on the other disc. The only thing on the ssd are system files.

Besides that I have NOT has a single issue with the SSD I am using for over 1 year now. (I am using a OCZ 120 Gb SSD).


Hibernate to swapfile on encrypted volume

I did a lot of testing regarding this, and I found out the issue isn't actually related to encryption. The real reason that it isn't working is solely because you're using a swap file instead of a swap partition. Note the following at the end of /usr/share/initramfs-tools/scripts/local-premount/resume:

SWAPTYPE=$(wait-for-root "${resume}" ${RESUMEDELAY:-5})

case "${SWAPTYPE}" in
    swsuspend|s1suspend|s2suspend|ulsuspend|tuxonice)
        if [ -x /bin/plymouth ] && plymouth --ping; then
                plymouth message --text="Resuming from $resume"
        fi

        # hardcode path, uswsusp ships an resume binary too
        if [ -n "${resume_offset}" ]; then
                /bin/resume ${resume} ${resume_offset}
        else
                /bin/resume ${resume}
        fi
        ;;
esac

Here, ${resume} and ${resume_offset} have the values that you put in /etc/initramfs-tools/conf.d/resume. When it calls wait-for-root, it's looking at the partition type of ${resume}, which isn't swap (it's ext4 or whatever type your root partition is). It then compares this to its list of suspended swap types, and (unsurprisingly) doesn't find a match, so it doesn't resume. It looks like they intend for swap files to work since they use ${resume_offset} at all, so this appears to be a bug in Ubuntu's initramfs-tools system. (Edit: This is apparently a known issue, as mentioned on their SwapFaq wiki page.)

As a workaround, you can avoid the need to have a swap file by using LVM on top of your encrypted partition and then putting a swap partition inside of it along with your root partition, which will work fine with no special steps required.


White line on left of ubuntu Launcher when desktop icons enabled

This is an issue with the Paper theme, the question is answered here:

https://github.com/snwh/paper-gtk-theme/issues/318

I changed the line:

border-left-width: 1px;

to:

border-left-width: 0px;

Reloaded the Paper theme and sorted :)


Why does Ubuntu install incompatible versions of Seamonkey?

What version of Ubuntu are you using ? My guess is natty.

You can install other version of Seamonkey from a ppa

https://launchpad.net/~joe-nationnet/+ppa-packages

sudo add-apt-repository ppa:joe-nationnet/ppa
sudo apt-get update
sudo apt-get install seamonkey

If you have a problem with the older version in the repos you should probably file a bug report.

How do I report a bug?


Why does pasting sometimes not work in gnome-terminal?

This is a bug in gnome-terminal, the bug report is here with a patch:

https://bugzilla.gnome.org/show_bug.cgi?id=600876

Gnome has not fixed the problem though.

Ubuntu has fixed it independently of Gnome. The detailed bug report is here:

https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/630383

According to the bug report, the fixed Ubuntu package is gnome-terminal version 2.32.1-0ubuntu3. It is currently in the upload queue of maverick-proposed repository (with unapproved status). The upload queue is here:

http://launchpad.net/ubuntu/maverick/+queue

You could download the source package and build it yourself with debuild.

Hopefully it will be soon pushed to normal update repositories.


Wine opening game on wrong monitor - Ubuntu 16.04

Click inside wine window and use Shift+Super+Arrow. Works on Gnome Desktop to send window to another display. Arrow can be left/right/up/down according to your layout.


This is, very simply, a mis-use of sudo on your part.  The redirection in the command

sudo gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache

is enacted by the shell and happens before the sudo command is executed with superuser permissions.  So the shell tells you that permission is denied when attempting to overwrite the contents of /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache because it is to you, the unprivileged user doing redirection in xyr unprivileged shell.

The correct ways to enact the fix that the message is giving are:

To do this in a superuser shell.
To quote the redirection and pass it to a secondary, privileged process, shell:

sudo sh -c 'gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache'

For what it's worth, the underlying cause of this problem is reportedly an error in the "maintainer scripts" for the gdk-pixbuf package that causes it to delete the cache file partway through the upgrade process.  This error has persisted through several Ubuntu versions.

Further reading

When using sudo with redirection, I get 'permission denied'
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625203#40
https://bugs.launchpad.net/ubuntu/+source/gdk-pixbuf/+bug/1282294/comments/7


Actually while looking at launchpad some where I've seen that we can merge or attach two launchedpad accounts as a single one .

to login ubuntu one you also need to use launched login . so what I'm thinking is if you merge there in lunchpad then with single login you can access both ubuntuone accounts .

give a try .


Use hardwired network connection while trying to TS the wireless.  I had to do that while resolving my wifi card issues in Linux.


Where to report bugs involving opencl in ubuntu?

I guess this is the place to report a bug for OpenCL:
https://github.com/KhronosGroup/libclcxx


18.04 Turned off display in Settings-Devices-Screen Display ON/OFF, how to turn on again?

You can turn it back on by clicking on your monitor number in the Display menu and selecting the monitor that is turned back off. Screengrab below:
display monitor selection

Each monitor has a number. If you go to Settings > Devices > Screen Display and find the monitor number that is your primary monitor. Click on the number and it will show you a dropdown menu of all available monitors. Select the one you turned off and turn it back on.


Trouble installing WiFi driver on HP Spectre x360 on Ubuntu 16.04

Assuming you downloaded the file iwlwifi-8265-ucode-22.361476.0.tgz to your Downloads folder, open a terminal window and execute the following...

cd ~/Downloads
sudo tar --directory=/lib/firmware/ -xvf iwlwifi-8265-ucode-22.361476.0.tgz iwlwifi-8265-ucode-22.361476.0/iwlwifi-8265-22.ucode --strip=1

This will extract iwlwifi-8265-22.ucode and place it in your /lib/firmware/ folder.

Then restart your computer and see if your wireless works.


You have to install single deb-package by
sudo apt-get install libhdf5-dev

and then retry compilation.


Trying to run hp-toolbox from HPLIP but gives python errors

I have found out what was wrong, /usr/lib/python2.7/lib-dynload/pyexpat.x86_64-linux-gnu.so was using the shared library /usr/local/lib/libexpat.so.1 when it should have been using /lib/x86_64-linux-gnu/libexpat.so.1 and simply renaming or removing /usr/local/lib/libexpat.so.1 solved the issues with python.

A source can be found here


Is there a single line command to do `su`?

If you want to write a script that runs as a different user something like this works, though it dows output the word "password" without a newline to standard out

su - username <<!
enterpasswordhere
enter commands to run as the new user
!

if you have a user named fred with a password of 1234 and want to get an ls of fred's home directory as fred, without the password string displayed, it would look like

su - fred <<! >/dev/null 2>&1
1234
whoami > /dev/tty
ls > /dev/tty
!


Why is VNC broken in 14.04 Desktop and how do I fix it?

With help from steeldriver the solution is mind-blowingly simple. Forget about vncserver and instead search for "Desktop Sharing". Answer the questions and then use VNC to connect to port 5900 or :0.
It might be necessary, depending on your client to disable encryption. This can be done from a terminal using:

    gsettings set org.gnome.Vino require-encryption 'false'


OK, the answer was at this post. What should be done is to execute the following command:

  gksudo gedit /usr/share/applications/sublime.desktop

find the exec line:

  Exec=sublime

and add an "%f" next to it

  Exec=sublime %f

In any case sublime can be replaced by the program you want to add to the applications list.


Is it possible to login to desktop session from SSH?

If you have root access, then (of course) everything is possible. One way of solving your the problem is to force login of the local graphical session, by typing the password into the login screen remotely via ssh. I know a way to do that in Xorg: https://askubuntu.com/a/1020172/55241. The Wayland will be another story.


Getting Sound BlasterX G6 Mic To Work Under Ubuntu 20.04.1 LTS

I now have my Sound BlasterX G6 mic input working with my headset. I followed the steps here: Soundblaster G6 Microphone input doesn't work. Note that I did try this previously, but it was not working for me. Now it is working successfully. After you execute the setmic script, note that the input device must be "Line In- Sound BlasterX G6". Even though this shows as the input, the actual input will be the external mic jack. This is tricky, but I got this working. I am not sure if later updates helped improve this, but it is working for me as of today.


Do you have software-properties installed?

Try:

apt-get install -y python-software-properties software-properties-common software-properties-gtk python3-software-properties software-properties-kde


Failed to bootstrap model: cannot start bootstrap instance

The issue you have is with the constraints imposed by the juju-controller.
Juju will connect to MAAS and try and locate a Machine that matches the minimum specifications provided.
In this case, you can see that it is looking for a machine with at least 3584MB of RAM.
Using the to=ulab-juju-controller constrains the query to just that node, which has 1.9GB or RAM (and is not suitable).
Without the to= constraint, juju bootstrap, juju will search, and, on failure, attempt to create a node via KVM. That explains the additional nodes.


Issue after upgraded from ubuntu 18.04 LTS to latest ubuntu 20.04 LTS where extra monitor blanking out for few seconds randomly

No one faced this issue it seems?.. It has definitely something to do with graphics card bug coping up with refresh rate. Or perhaps heating hardware as sometimes it works for day without this issue. Sometimes frequently blanking out and refresh rate drops too..


From 18.04 up, Ubuntu has only 64-bit version. And 18.04 is the lowest release still supported. So if you need a 32-bit version, you need to use some old unsupported release (like 16.04 from the other answer - that's probably the best you can get).
Some other Ubuntu flavors, like Lubuntu or Xubuntu, still offer 32-bit version for 18.04 release. However, from 20.04 up, I don't know of 32-bit version of any flavor of Ubuntu.


You can try Lubuntu, as is the Ubuntu distro with the lowest requirements. LXDE is very similar to classic Windows (95-7), adding some interesting features (such multiple areas), so it's perfect for development.

Lubuntu comes with the following things that you want:

Chrom(ium)
Python
PDF reader
Vim (without help)
Synaptic

Just install GCC with sudo apt-get install gcc (or the version that you want), and you're ready to work! ;)


I've fixed the problem.

According to answer #1 at Ubuntu 12.04 - default Radeon driver does not work at all there were some missing drivers.

  To get hardware acceleration (tested on 12.04 Precise Pangolin), you
  need to add four more packages:

sudo apt-get install xvba-va-driver libva-glx1 libva-egl1 vainfo

After installing them, the desktop successfully completed initialization on my nVidia display (which has been plugged in all along).  I suppose that was the "Magic" mentioned above.  Both devices show up in lspci but I have not yet tried out two monitors.  Moreover CTRL-ALT-F1 no longer opens a terminal so I can't say everything is perfect yet.

03:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK106
[GeForce GTX 650 Ti] [10de:11c6] (rev a1)       Subsystem: eVga.com. Corp.
Device [3842:3650]      Kernel driver in use: nvidia    Kernel modules:
nvidia_319_updates, nvidia_304, nvidia_304_updates, nouveau, nvidiafb

03:00.1 Audio device [0403]: NVIDIA Corporation GK106 HDMI Audio
Controller [10de:0e0b] (rev a1)         Subsystem: eVga.com. Corp. Device
[3842:3650]

-- 06:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cedar [Radeon HD 5000/6000/7350/8350 Series]
[1002:68f9]     Subsystem: Hightech Information System Ltd. Device
[1787:2291]     Kernel driver in use: radeon    Kernel modules: fglrx,
radeon 06:00.1 Audio device [0403]: Advanced Micro Devices, Inc.
[AMD/ATI] Cedar HDMI Audio [Radeon HD 5400/6300 Series] [1002:aa68]
        Subsystem: Hightech Information System Ltd. Device [1787:aa68]


A bug was submitted on this and fixed in the package cups-filters - 1.8.3-2ubuntu3.1 My 16.04 systems have this version of the package, and don't experience the problem.  You can check the version of the package on your system with apt-cache policy cups-filters

If you have this version, and are still experiencing the problem, you should submit a bug report.

Anyway, unless you need your system to search for remote printers, there is no harm in stopping and disabling the cups-browsed service.


The kind of security options (X)Ubuntu makes available for setting up an ad-hoc network depend on your wireless card. Some support WEP-only, others WPA and others none.

Ubuntu relies on the requirements relayed by the wireless card driver, and there's no way to force an "unsupported" method without modifying the network-manager source code.

If you are having problems connecting with WEP, please try no security.


I can think of 2 possible reasons why this can happen:

The source directory may not exist
(OR)
The source directory might be empty

Ignore if neither!


Gimp 2.10 will not start due to undefined symbol: gegl_operation_get_source_space

It was a problem with a local version of libgegl. Uninstalled Gimp and removed libgegl by 'sudo apt-get remove libgegl-0.4-0:amd64'. Reinstalled Gimp via Software Center, got a new libgegl from that and now it's working.


Cant get connected to wired/wireless network

This is probably a driver issue. Please, check your wireless and wired adapter type and see whether you have the correct drivers.

One other solution would be to upgrade to Ubuntu 13.04, which will probably contain newer drivers.

If you insist on 12.04, then try the compat-drivers (http://wireless.kernel.org/en/users/Download/stable).

When I was using 12.04, compat-drivers did it for me. In 13.04, I had no issues with network adapter drivers.

Best of luck!


Will there be a new lock screen for 12.04?

It was suggested and I do remember seeing this on my system somewhere down the road in one of the alphas but later updates removed it.

As you can see from comments 22 and 23 this probably wont land on 12.04 since it introduced major regressions that could not easy be fixed on time to test, after all 12.04 is a LTS, we want things to work as good as they can get.

A far as I can tell, it was really awesome but I do remember having some issues that already described on the bug report. Think you will have to wait for 12.10 to see this implemented properly.


Try this following commands:

sudo apt-get clean
sudo apt-get autoclean
sudo apt-get -f install
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get -u dist-upgrade
sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade

Hopefully this work for you


BQ Ubuntu phone: Did you have to calibrate your battery?

The BQ Aquaris phone manual states that you should use the phone and completely drain the (pre-charged) battery.  Afterwards you should completely charge and drain the battery the first few times to allow for automatic battery calibration.

If you didn't follow that procedure, I'm not surprised you need to calibrate your battery afterwards.  (This is best practice on any Li+ battery)


Ubuntu doesn't boot and boot-repair-disk doesn't solve the problem

sda1: __________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  Unknown
    Boot sector info:

sda5: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:
    Operating System:
    Boot files:

sda6: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:

sda7: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:
    Operating System:
    Boot files:

It seems like all your datas in the Ubuntu partition(ext4) is accidentally deleted. So try to reinstall it on any one of the ext4 partition.


Upgrade to 13.10 from 13:04 fails with 403 Forbidden

It's just a link to a welcome page (you can open the link on a browser). It was probably inaccesible at the moment you upgraded


How to move VirtualBox VirtualMachines from root to specified user and where to move it?

Given that your username is john (replace with what you have), log in as root (doing that wasn't good anyway) and move the directory containing your VMs to /home/john. Then, assuming that your VirtualBox VMs directory is now located in /home/john/VirtualBox (again, change as required), execute this as root:

chown -R john:john /home/john/VirtualBox

Then, log in as your normal user (in this case john), start up VirtualBox and from the menu choose Machine => Add... for each machine.

You may need to adjust the VM settings afterwards, though. But this should do the trick.


I just ran into the same problem. Looks like libbfd got updated but perf is still trying to link against the old version. I worked around the issue by symlinking to the library:

$ sudo updatedb
$ locate libbfd
/usr/lib/x86_64-linux-gnu/libbfd-2.26.1-system.so
$ sudo ln -s /usr/lib/x86_64-linux-gnu/libbfd-2.26.1-system.so /usr/lib/x86_64-linux-gnu/libbfd-2.26-system.so
$ perf
  usage: perf [--version] [--help] [OPTIONS] COMMAND [ARGS]
..

Hope this helps.


Where do packages installed/upgraded with APT get stored?

The downloaded packages are stored in /var/cache/apt/archives

If you want to remove them, use sudo apt-get clean.

From man apt-get:

  clean

  clean clears out the local repository of retrieved package
  files. It removes everything but the lock file from
  /var/cache/apt/archives/ and /var/cache/apt/archives/partial/. When
  APT is used as a dselect(1) method, clean is run automatically. Those
  who do not use dselect will likely want to run apt-get clean from time
  to time to free up disk space.

  autoclean

  Like clean, autoclean clears out the local repository of
  retrieved package files. The difference is that it only removes
  package files that can no longer be downloaded, and are largely
  useless. This allows a cache to be maintained over a long period
  without it growing out of control. The configuration option
  APT::Clean-Installed will prevent installed packages from being erased
  if it is set to off.


I managed to fix this ..
steps taken

Opened Synaptic
Marked Ruby for complete removal
Marked apt for re-installation
apt commands work now.

Its likely a broken Ruby setup when I added the Backbox PPA.


Wrong external screen detection after Bionic update

It works again after Ubuntu upgrade … 4.15.0-45-generic #48 :-)
and works bad after Ubuntu upgrade … 4.15.0-46-generic #49 :-(


Power Management governor changes alone from powersave to performance

Force to powersave speed governor

You are using sudo tlp stat -p to find out when the speed governor is set at performance mode. When this happens reset it to powersave with this command:

$ echo "powersave" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
powersave

Run tlp statistics again and ensure minimum frequency is normalized and no longer set at maximum frequency.

Keep running tlp to find out how often the governor is being reset to performance mode.

Keep searching for the program that is reseting the speed governor.

As a last resort you could:

Setup a sleeping procedure to reset to powersave every x seconds.
Setup a procedure that monitors the speed governor every second and reset it when it changes.


Ubuntu Software does not load applications

I have just answered a similar question.
This is a common thing.
For me , I run bleachbit and reboot. That is the short answer.
You can also look at installing your .deb files with gdebi and the rest with synaptic package manager. Its a LOT faster.


Why does Update-Manager download more than one kernel image

You have both linux-image-generic and linux-image-generic-pae installed.

Thus, whenever a new kernel is released, you're getting both the PAE and non-PAE version.

PAE stands for physical address extension, and is a way for 32-bit computers to access all 4GB (in some cases more) of RAM.  If you have 2GB RAM or less, there is no benefit to using PAE.  If you have 4GB RAM or more, then you would get more benefit by using a 64-bit operating system (due to updated instruction set) given that pretty much all CPUs released in the last 10 years will support it.

That said, switching to a different architecture generally requires a re-install, whereas switching to a different kernel is easy, so in the meantime you can just use the PAE kernel.

Uninstall the package you're not using; linux-image-generic or linux-image-generic-pae.

Then you can uninstall individual kernel packages as needed, which have names like linux-image-VERSION-generic.  When removing installed kernels, however, remember:

Don't remove all kernels or you won't be able to boot.  Always leave one known working kernel (eg the currently running kernel, you can check what that is by uname -r) and the kernel you want to switch to.
Your system will try to update the initramfs and grub menu automatically when you change the installed kernels.  You can manually do this with update-initramfs -k VERSION and update-grub but you shouldn't need to, as long as there are no errors during the install/remove process when installing or removing a kernel package.

Further information:

The packages linux-image-generic and linux-image-generic-pae are just shell packages that do not actually contain the kernels, but they cause the new kernels to be fetched when there is an update, because of their dependencies.  The former will cause you to get all new generic kernels, and the latter will cause you to get all new generic-pae kernels.  I don't know if there are any potential conflicts/downsites to having both sets fetched each time, or how grub chooses which one to use as default.


How to check whether NTP is enabled in Ubuntu 18.04

To see current status of chrony's efforts to synchronise the clock, start with chronyc -n tracking and chronyc -n sources.


Unmet dependencies for gcc-5-multilib and libc6-dev-x32 when trying to install Steam in 16.10

Steam has two i386 architecture unmet dependency packages depending on GNU C Library: 32-bit development libraries for AMD64 (libc6-dev-i386). To correct the unmet dependencies, open the terminal and type:

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get -f install
sudo apt-get install steam


How can I install Windows XP after Ubuntu?

Download a program called etcher at "etcher.io". Then,choose the iso you want to burn, insert your flashdrive or disk, and hit flash. Once this is done, figure out how to enter setup mode on your computer, and change the boot order to external drive first, optical drive second, and hard disk last. This will make the computer check for an OS in the flash drive first. then it will run it. Download the software and then setup the partitions (half and half) and go on your way.


VMHGFS not compiling with VMware Workstation 10.0.6 under Ubuntu 14.04

This appears to be the issue - generic_file_aio_(read|write) was deprecated after kernel 3.16.2. VMware has known about it since last October but they're still shipping unpatched VMware Guest Tools ISOs with many of their products. I don't know why, or when they'll finally propagate fixes for this issue.

https://github.com/vmware/open-vm-tools/issues/2


Nut shuts down server immediately on switch to battery power without notification

This question is more than three years old, but for anybody who experiences the same problem: have you checked whether your UPS maybe has one or more outputs that are not backed up by the battery? In my case, I managed to choose the single outlet that has surge protection only for the NUT server and when simulating a power outage, it of course shut off immediately, and the slaves stayed on. After finding out and changing around the plugs, everything worked well.


How can I keep recent files from appearing in Unity?

Method 1: Using Activity Log Manager

Ubuntu Precise 12.04

In Ubuntu Precise Activity Log Manager 0.9 is included by default. It can be accessed from System Settings or just by looking for Privacy.

Or you can simply type Privacy in Dash

Now you can start blacklisting applications. Screenshots

Activity Log Manager in Oneiric and first release

You can install Activity Log Manager from the Stable PPA.

For more details about Activity Log Manager you should check out the article on OMG! Ubuntu! and article on Webupd8

A new version of Activity Log Manager is in development which looks better and is simpler to use. A screenshot of the unreleased Activity Log Manager

Method 2: Using Gnome Activity Journal

You can do it, provided that there is some pattern in the files. For example you have kept all your explicit content in folder /home/mrpig/erotica/ folder.

Then open Activity Journal which is a GUI frontend to Zeitgeist which acts as a Dashboard showing your recent activities. On top right Zeitgeist Icon, click it and Preferences. Check "Blacklist Manager" plugin

Then goto "BlackList Manager" tab.
Click on New button, and then edit the new entry which comes as file:///home/mrpig/erotica/*

Linked Question:

Hidden files are shown in Dash


How can I get tab-completion in the interactive Python interpreter?

First, create a new file called .pythonstartup.py in your home directory. Put the following script in it:

try:
    import readline
except ImportError:
    print("Module readline not available.")
else:
    import rlcompleter
    readline.parse_and_bind("tab: complete")

The parentheses around the string ensure that it works with both Python 2 and Python 3.

Every time the interactive interpreter is started, it executes a script defined in $PYTHONSTARTUP, if there is one. To set it to execute the above script, type

export PYTHONSTARTUP="~/.pythonstartup.py"

You should write this line to your .bashrc or .bash_profile file, so that it's automatically executed when a new shell is started.


Ubuntu Software Centre - Confusion with Installing Software - Adobe Flash Problems - 12.04

Why you have to click "Use this source"?

There are four type of software in ubuntu world

Main - Officially supported software.
Restricted - Supported software that is not available under a completely free license.
Universe  - Community maintained software, i.e. not officially supported software.
Multiverse -Software that is not free.

When you install a system , only main is activated. For any other software listed in other three category , you have to click on use this source. Once done it won't ask for  other software that are listed in the source. In Restricted they have drivers, flash plugins ,mp3 etc. So once restricted is enabled say for mp3, you don't have to click "Use this source" button for other software like drivers,flash.

read more

For Other issues : Possibly you are facing this

Can't install/remove/upgrade any package

Can"t install anything from Ubuntu Software Center after trying to install Ubuntu restricted extras


How to speed down two-fingers trackpad scrolling?

I have a MacBook Pro 11.1 running Kubuntu 14.04. Synaptic is installed, but the X11 and Synaptic config files aren't in quite the same location as listed in mdoran3844's answer.

However, based on this KDE forum post post here, I ran the following command, which worked on my hardware/software environment:

synclient VertScrollDelta=20 HorizScrollDelta=20

If that change works but isn't permanent, you may need to place it in something like your .xinitrc or another start-up script (or hunt down the config files listed by mdoran3844's answer).


How to have  colored manual pages in  gnome-terminal

I didn't know it, but I found something here:
http://www.tuxarena.com/2012/04/tutorial-colored-man-pages-how-it-works/

Instructions from the above link:

Edit your .bashrc file and add the following lines:

export LESS_TERMCAP_mb=$(printf '\e[01;31m') # enter blinking mode - red
export LESS_TERMCAP_md=$(printf '\e[01;35m') # enter double-bright mode - bold, magenta
export LESS_TERMCAP_me=$(printf '\e[0m') # turn off all appearance modes (mb, md, so, us)
export LESS_TERMCAP_se=$(printf '\e[0m') # leave standout mode
export LESS_TERMCAP_so=$(printf '\e[01;33m') # enter standout mode - yellow
export LESS_TERMCAP_ue=$(printf '\e[0m') # leave underline mode
export LESS_TERMCAP_us=$(printf '\e[04;36m') # enter underline mode - cyan

Next, start a new terminal session or enter the command source ~./bashrc in your current terminal.


System Freezes When Installing Package/Updating Ubuntu OS

If it was a standard x86 install I would say  have a look at Apt logs.

tail -n 100 /var/log/apt/*

but the Surface platform doesn't seem to play nice with the standard kernel and seems to require work arounds.

Installing Ubuntu on Surface pro 4


It looks like the login manager (GDM) profile image but since you do not explain what version of Ubuntu or GNOME one can only assume.

The ~/.face file is an image file used by GNOME by some functions in the system as, for example, the display picture for GDM, the users profile in the System Settings, etc.


will xrdp logout of the currently logged in account?

if you are running xrdp you will be basically connecting through a new session to your remote system.  If you logout from the xrdp session, you will be killing the xrdp session and not the one you might have open on the ubuntu locally.

You can perform a basic test and check indeed that you are connecting to two different  and separate sessions.

Hope this help
See ya


Cant boot from windows 8 after installing Ubuntu 13.04

If you can get into your linux then you can install boot-repair in your linux machine.

Open your terminal and type:

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

Press Enter and then the following command:

  sudo apt-get install -y boot-repair && boot-repair

Most Probably this can solve your issue

No warranty: boot-repair modifies also uefi entries and so on if it works you will be happy, if not, you may be left with bigger problems than before.


User named "Guest" in user list of LightDM greeter

grep -o '^guest-[^:]*' /etc/passwd

gave me the user ids of the accounts.
Then I could remove the users by
sudo deluser userid


How to install the new version of the RTL8187 driver on Ubuntu 13.04?

This last answer works like a charm for me in LUbuntu. I'm noticing every time I reboot I have to repeat these last steps. Is there anyway to like "cement" this as a permanent thing. I'm using a HP All in on 1 deal and I'm not liking how the bios won't let me shut off the onboard wifi for it and theres no external "turn off" switch for it. I've tried to accept the bad with the good and using the onboard for wifi internet while the Realtek runs airmon-ng. You're getting good traffic to this website from me tho, been to this page like 20 times now cuz it actually fixes my problem. But would like to actually "fix" fix it instead of bandaiding it like I am here.

In reply to:

sudo modprobe rtl8187
sudo iwconfig wlan1 rate 5.5M fixed
sudo iwconfig wlan1 frag 2346
sudo iwconfig wlan1 rts 2347
sudo iwconfig wlan1 txpower 30
set in rc.local ^^

ALSO My version of this particular card WON'T let me set it to power 30 without the classic error:

Error for wireless request "Set Tx Power" (8B26) :
    SET failed on device wlan1 ; Invalid argument.

For this, I switched the numbers first 20, it didn't error anymore...Thought hmmm, its the number...so tried 21, 22, etc, it went as high as 27 for my version of this particular card before it errored. So there....I contributed with my question, those having the error with txpower part, try a smaller number.


Disabled expo plugin and my Deskstop disappeared

Open up ccsm again & enable the unity plugin which was disabled when you removed expo


Why does my external hard drive not boot

You are doing a USB to USB install, so check out bug:
https://bugs.launchpad.net/ubuntu/+source/grub-installer/+bug/384633
The initial grub.cfg generated by install is wrong after the install media is removed, as all the disks get renamed one letter higher, and your new target system is left as a non-existent sdc instead of sdb.  At the grub menu screen, look at the instructions at the bottom, and type e to edit, then fix the device on the search line for root= and on the linux ... line.  At the first successful boot, run

  sudo update-grub

to fix the config file.
Feel free to add yourself to the "does this affect you" list on the bug, and maybe it will be fixed someday.


Your API doesn't seem to properly resolve the "localhost" part of the database connection string. If you replace "localhost" with the IP address, it can connect to the server over the network, thereby skipping the resolve part.

However, your MySQL server needs to allow access over the network. That is a non-default setting, for which ample help is available elsewhere on this site.

Keep in mind that you have now hard-coded the IP address into the API software. Make sure that the software keeps functioning even after a network change, e.g. by replacing the IP address by a proper host name.


No, the Alt+F2 window is a dialog within gnome-panel, so you can't really launch it standalone.

I highly suggest using gnome-do instead though.

sudo apt-get install gnome-do


How to download multiple torrent links using transmission-daemon?

This will do the job.

For .torrent files:

First, you need to upload the .torrent files to a directory on your server. Then, please follow the steps below:

Open a terminal and make sure you cd to the directory containing the .torrent files.
To add a single .torrent file to transmission-daemon, please run the following command in the terminal:

transmission-remote -n 'transmission:transmission' -a torrent_file_name.torrent

To add all .torrent files in the directory to transmission-daemon, please run the following command in the terminal:

find . -maxdepth 1 -type f -name '*.torrent' -exec transmission-remote -n 'transmission:transmission' -a {} \;

For magnet URLs:

Create a file and name it magnet.links and add the magnet URLs one per line to the file. Please avoid crating any blank lines. Add the first link in the first line and then press Enter then add the second link in the second line and so on. Do not press Enter after the last line, just save the file and exit.
Open a terminal and cd to the directory that contains the magnet.links file.
Copy and paste the following code in the terminal and press Enter:

file="magnet.links"
while IFS= read -r line
do
transmission-remote -n 'transmission:transmission' -a $line
done <"$file"


How do I modify the options for the power button?

Lid Close Action

To set up the Laptop Lid Close Action you have to install Advanced Setting (or the Gnome Tweak Tool).  It is in the USC (Ubuntu Software Center) under either tweak or Advanced Settings. If installed press the super button and type in tweak or advanced and choose the Advanced Settings.  When it opens choose the shell tab;

Press the arrows and choose you desired on both on AC and on battery;

Default buttons behavior

Install dconf-tools:

sudo apt-get install dconf-tools

Press alt+f2 and open dconf-editor (or in a terminal type dconf-editor)

Navigate to org.gnome.settings-daemon.plugins.power and set your default button-power action there:

On some systems you will also need to mark the item suppress-logout-restart-shutdown.


How do I remove old kernel versions to clean up the boot menu?

16.04 and newer versions of Ubuntu

sudo apt autoremove

This command removes packages that were automatically installed to resolve a dependency, but are now no longer depended on. This includes old versions of linux-headers-* and linux-image-*. (It’s also smart about this process, leaving one spare version of the kernel around as a fallback!)

11.10 and newer versions of Ubuntu

GRUB2 and its display of all kernels

The latest versions of Grub2 installed in Ubuntu automatically display the latest kernel and hides the older kernels that you may have installed.

If you do not see your grub - then remember to press Shift whilst booting.

As you can see, only the latest kernel is displayed.

If you select the option shown (press Enter) then all the old kernels become visible and available to boot from.

How to permanently delete older kernels

First boot with the latest available kernel.

There are a number of ways to delete old kernels.  Personally, I wouldn't touch Computer Janitor since this is acknowledged to break your computer with its suggestions.

synaptic

An alternative is Synaptic (sudo apt install synaptic)

search for linux-image, right-click a kernel and choose complete removal and finally click the Apply button to delete the kernel.

Repeat the search but this time for linux-header - you can delete the associated headers for the kernel image chosen previously.

Synaptic though will not attempt to verify what you are trying to remove... you could inadvertently delete your newest kernel - or even delete all of your kernels via this tool leaving you with an unbootable Ubuntu!.

Remember to check which kernel you are using type:

uname -r

The result would be similar to:

Remember the result and the number - make sure you don't delete the corresponding image or header.

Recommendation

My recommendation is to keep at least two or preferably three kernels including the latest.  The reason for the recommendation is that you will have at least one/two other kernels to boot with, if for what-ever reason the latest kernel you are unable to boot with or introducing a regressed capability such as broken wireless.


How to customize Unity Launcher's background

I have not tried this out, but from the explanation given in this post, it seems you can use MyUnity tweak tool to change the Launcher Background colour and transparency.

By setting the Background to a dark colour and transparency to nil, you should be able to get the desired effect.

As given in the post

Launcher

color - Launcher background color
size - Launcher icon size
Transparency - Background transparency of the launcher
Show devices - Show removable USB drives as an icon
Behavior - How the launcher interacts with windows

Fixed - The launcher will never hide.
Hidden - The launcher will hide when a window would overlay it.

Display - What effect the launcher should use when hiding i.e. to fade away or to slide (or both)
Backlights - Style of icon background


Unable to update my ubuntu server 14.04 using apt-get update

I just had this same issue. My company has a firewall that stopped apt-get from getting to the http sources. They still allow ftp traffic, so I was able to work around the firewall by changing all the "http" sites in sources.list to "ftp". For example, in file /etc/apt/sources.list, I changed line:

deb http://us.archive.ubuntu.com/ubuntu/ trusty-security main

to

deb ftp://us.archive.ubuntu.com/ubuntu/ trusty-security main

Now apt-get is able to fetch the files from the repositories.


VLC is still running even I closed it already. How to I close it?

Open "Run a command" window by pressing Alt+F2 or run the following from a terminal:
Try killall vlc to send SIGTERM to all instances of vlc (Tell em to terminate themselves).
If this does not work, try killall -s 9 vlc to send a SIGKILL (Tell the system to kill the processes).


How to recover from grub rescue after replacing boot disk

Finally I was able to get the issue fixed. Thought of posting here in case any one gets into similar issue.

I booted the system with the Redhat install CD and got into rescue mode.Once I booted with the rescue mode, everything was easy. Here are the commands that I issues to get the boot loader fixed for my Redhat.

Boot the system on Redhat installation disk in rescue mode.
Mounted the boot filesystem into /mnt/boot
Ensured the device map looks good.

 cat /mnt/boot/grub/device.map]
 (hd0)    /dev/sda

grub --device-map /mnt/boot/grub/device.map
root (hd0,0)
setup (hd0)

Rebooted the system and life back to normal :)


Occasionally, some applications and games (eg. some from the Humble Indie Bundle) have .run installers. Before installing using these, check to see if:

it is available from the Software Centre
it is available as a .deb file, which will open in the Software Center

You can install .run files from the graphical interface, but using a terminal is more likely to give you useful feedback. To install a .run file you need to:

make it executable.
execute it

This is because .run files are just executable programs that do some unknown magic to install the program. This is similar to what .exe installers do on Windows and is different to the normal methods (at best, using the Software Centre, at worst using .deb files) in which applications are installed in a standard way and can be easily removed.
Graphical Method

Right click on the file in the file manager and click 'Properties'. Click the 'Permissions' tab and tick the box that says 'Allow executing file as program'.
Double click the file to execute it.

If this method doesn't work, try using the terminal method.
Terminal Method
Assume the file is called some-app.run and is in the folder /home/user/Downloads. You will need to modify these instructions to fit your situation.

Open a terminal (Applications->Accessories->Terminal).

enter cd /home/user/Downloads

enter chmod +x some-app.run

enter ./some-app.run

if step 4 fails with a message including 'permission denied', try entering sudo ./some-app.run (you will need to enter your password for this).

Notes

Sometimes you will come across .bin files. These are similar to .run files from the user's point of view.
The method to install .run files can be used to execute any file (as long as it has some sort of executable code in it.
Be careful using sudo and only use it when absolutely required. Translated into English, it means 'Run this command but allow it to do anything it wants to my computer'. This is why you are prompted for your password.


Installation of newest AMD drivers fails

Enable support for 32bit packages if you have a 64bit OS -

sudo dpkg --add-architecture i386

Install the following packages -

sudo apt-get install lib32gcc1 libc6-i386

Install all the dependencies listed on this page.

Download all the .deb files related to Ubuntu 14.04 (fglrx,fglrx-core,fglrx-dev and fglrx-amdcccle) from this page.

Copy the downloaded .deb files to a folder.

Now, open a Terminal and cd to the created folder -

cd /path/to/folder

Install the .deb files using dpkg -

sudo dpkg -i *.deb


Cant unload NVidia kernel modules on 17.10

I am having similar issues, where my Nvidia card is keeping my Arch/Ubuntu (tried both) from giving me a video signal after reactivating from suspend. SSH etc works. This did it for me

  sudo rmmod nvidia-drm
  sudo rmmod nvidia-modeset
  sudo rmmod nvidia_uvm
  sudo rmmod nvidia
  sudo systemctl start lightdm


Ok,
I have learned that default applications is more complicated than what I knew. For context, it turned out I am using an AppImage in i3wm, and that the app uses xdg-open to launch apps.
For people facing the same problem as I did, some interesting readings are
this blog on AppImages and the Archlinux documentation on xdg-utils
Cheers


ubuntu 12.04 Boot stuck at splash screen

I fixed It the problem was that I removed gdm without configuring it to lightdm so in recovery mode I reinstalled gdm and was able to startup and change it back to lightdm


Why Wunderlist isn't available in the software center?

Wunderlist does not support Ubuntu 11.10 just yet. The developers have been notified and we hope to see it updated for Ubuntu 11.10 soon!


14.04 ubuntu complete install resolution problem

Use ALT+LEFT MOUSE BUTTON, on windows, to grab them and move them around, you will be able to see more content to do more diagnostic things and operations

And try this: http://blog.bigsmoke.us/2011/01/18/ubuntu-sis-671-driver

P.S For gain a root permissions type:

sudo passwd and type new root password twice (root it's like a Admin account in Windows, superuser so you must remember this password)

Then just type in console su before all operations, your root password and perform all operations now with full permission


run a script if error prevents running any other script

Use a wrapper script that checks the exit code and runs yad if needed.


Some EFIs' user interfaces provide an option to launch an EFI shell, either built into the firmware or stored on the ESP, typically in the root directory as shellx64.efi. This is far from universal, though, and the details of what the option is called vary from one EFI to another.

The way to do this that works most universally is to prepare a USB flash drive with the shell binary stored as EFI/BOOT/bootx64.efi. The flash drive must use FAT, and you might need to set the partition type code as for an ESP (to EF00 in gdisk or set the "boot flag" in a libparted-based program). When you use the EFI's built-in boot manager to boot from the USB flash drive, the shell will launch.

Most boot managers provide some means to do the job, too. In GRUB, you'd create an entry for the shell just as you would for other boot loaders. (The GRUB configuration scripts should auto-detect the shell binary if it's in certain locations; or you can create an entry in /etc/grub.d/40_custom to do the job.) rEFIt, rEFInd, and gummiboot will all auto-detect the shell and create an entry for it if it's stored in certain locations. IIRC, shellx64.efi in the root directory of the ESP works for all three of these boot managers.


How to increase the horizontal resolution of second smaller screen attached with a laptop screen?

You can do this, but the second screen will appear a little fuzzy as the pixels will be interpolated.  You will be telling xrandr to create a scaling factor for the second screen, so that the desired resolution is squished onto the display.

In a terminal, enter the following command

xrandr --output VGA1 --mode 1024x768 --scale 1.334x1 --panning 1366x768


This is what I found on my end. I had commented out in my /etc/host file the localhost mapping for some scenario I needed to test with GAE and subdomains.

Adding back the mapping (127.0.0.1    localhost) Pydev auto-complete feature started to work again. Weird that I didn't have this issue with Pydev v2. It seems like Pydev v3 does it different.

So, just make sure localhost is mapped in your /etc/hosts file.


An alternative to giving everyone write access to the /root directory is to use acls to give the jenkins user access to the /root directory.

~# setfacl -m "u:jenkins:rwx" /root

Most Ubuntu installs already have Access Control Lists enabled, but you might have to first install the acl package. Additionally, you can and the R flag to make the action recursive.


Boot into live mode using ubuntu disk.
Install testdisk - a data recovery tool.
Run testdisk. It will show option to create log file . Just select create and press enter .
After that You will screen like this.Select proceed.
Now it will ask for partition table type.
Select  analyse.
After analysing it will show you the partition with error which you
were not able to access. Sometime it will ask for deeper search if normal search failed.
Now select the partition and copy your data wherever you want.

It should help you.


Installing Kubuntu 15.10 as a guest on Hyper-V

If you created a Generation 2 virtual machine in Hyper-V, you need to disable Secure Boot under Settings > Security > uncheck "Enable Secure Boot".

After that, it should be okay. Or, just use a Generation 1 virtual machine.


How to launch an Xulrunner app with a desktop shortcut?

You have a couple of options.

You could either run from the graphical "Run Command" - the equivalent of Windows + R. You can also find this in the start menu on Windows.

On Ubuntu, you use Alt + F2 to open this:

And on lubuntu it is "Menu" -> "Run".

And then run the command

xulrunner /home/clain/myapp/application.ini

graphically, without a terminal being needed.

Your second option is to run in a terminal, but unlink it from the terminal with the & character, like so:

xulrunner /home/clain/myapp/application.ini &

this will start it as a separate process. Here is an example with Gedit:

As you can see, I can run another command without affecting Gedit. It will keep running. If I was to not use the & the terminal would be attached. Closing the terminal gives this message:

And of course if I do close it Gedit will stop. If I use the &, there is
no active process so the terminal can just be closed.

Finally, if you do really need a desktop shortcut, you could use this .desktop file.

[Desktop Entry]
  Version=1.0
  Encoding=UTF-8
  Name=MyApp
  Exec=xulrunner /home/tim/xulrunner/application.ini
  Terminal=false
  Type=Application

I've cut out the unnececary parts which, so this may work. Add in the line Icon = /path/to/iconname.svg to give it an icon.

Also note that you can simply put an icon is ~/.icons or /usr/share/icons. Then if your icon name is "MyApp.svg" just use the line Icon = MyApp.

If you still want the "TryExec" line, which isn't needed, A.B.'s answer explains why you do.


Application for resizing an image by reducing dimensions precisely?

No need of external applications; just install nautilus-image-converter image resize plugin to nautilus. It is a really great tool


Launch Terminal from Sublime Text2 Not working

If you're using Unity/Gnome, just change the line

"terminal": "",

in the User settings to

"terminal": "/usr/bin/gnome-terminal",

and you should be all set. If you're using KDE, the command should be konsole.

Good luck!


How to delete top directory that contain all files inside modified at least n days before today?

If file modification times are critical for you then you need to look at file modification times and not the modification time of their parent directories. The latter only change when the structure of the directory changes (i. e. a file was created, moved/renamed or unlinked). Changes to file content are not reflected in the time stamp of the parent directory.

Therefore we can find all the recently modified (less than 20×24 h ago) files in a directory tree with:

find /some/path -type f -mtime -20

We can restrict the output to show only unique directory names:

find /some/path -type f -mtime -20 -printf '%h\n' | uniq

Find all directories without recently modified files

If we need to find all the directories without recently modified deep entries it gets trickier since we need to compute the inverted set, that is the set difference of the set of all directories inside the tree and the previously computed set. We can easily use the -printf action to partition the output of find to at least list all the data we need:

find /some/path -mindepth 1 \( -type d -printf '+%p\n' \) -o \( -type f -mtime -20 -printf '-%h\n' \) | uniq

Unfortunately, set operations aren't something that can be easily done in a shell script, so I wrote a Python program that operates on the output of the previous find command:

#!/usr/bin/env python3
import sys, os.path
from itertools import filterfalse

def parent_dir_generator( path ):
    while path:
        yield path
        path = os.path.dirname(path)

all_dirs = list()
keep_dirs = set()
keep_dir_parents = set()

for line in filter(bool, map(lambda s: s.rstrip('\n'), sys.stdin)):
    path = line[1:]
    if path.startswith('./'):
        path = path[2:]

    if line.startswith('+'):
        all_dirs.append(path)
    elif line.startswith('-'):
        keep_dirs.add(path)
        keep_dir_parents.update(parent_dir_generator(path))

diff_dirs = filterfalse(
    lambda path: any(map(keep_dirs.__contains__, parent_dir_generator(path))),
    filterfalse(keep_dir_parents.__contains__, all_dirs))

print(*diff_dirs, sep='\n')

Assuming the previous program is at ~/tree-difference.py we can use it like this:

find /some/path -mindepth 1 -depth \( -type d -printf '+%p\n' \) -o \( -type f -mtime -20 -printf '-%h\n' \) | python3 ~/tree-difference.py

Verify the result

You probably want to verify that you (or I) didn't make a mistake that accidentally deletes recently modified files. Fortunately we can use a variation of the original find command to inspect all the directories returned by tree-difference.py. It lists all recently modified files in them, so an empty output means everything went according to plan. This can take quite a while if we have many files.

The following command takes its input from the output of tree-difference.py (with a pipe or intermediate file):

xargs -rd '\n' -I{} -- find {} -mindepth 1 -type f -mtime -20

Delete the found directories

This one is simple. The input is the output of tree-difference.py.

xargs -rd '\n' -- rm -rf --

If rm complains about non-existing directories that's because you forgot the -depth option in the find command serving as the input of tree-difference.py.


Problem installing Nvidia driver on Lenovo z570

Your laptop came with nvidia-optimus technology. This should work in the following way: Most of the time, the system runs using the Intel graphics, which improves the battery life, and when you need to use more graphic power, it switches automatically to the nvidia card. The problem is that there is no official support of the optimus technology on linux. There are, however, some projects trying to solve the problem, see for example the hybrid graphics at launchpad https://launchpad.net/~hybrid-graphics-linux .

So don't worry, your laptop does have the nvidia card. It's just that it is either disabled in bios (and you can enable it), or your computer cannot see it. Anyway, if you want to use the card, you will have to install software enabling you to switch between the graphics cards.


Measure bandwidth used by a single program execution

nethogs does this: http://nethogs.sourceforge.net/, install it using the software center.

I believe that sysdig could be used, too but I don't have the syntax at hand.


How to configure an OpenVPN Client Router

I'm not sure this is ideal, but it's at least working.  In a perfect world, the traffic on the Ubuntu computer would not route through the VPN - only those devices connected to the Ubuntu computer.  Anyways, here's the solution..

In the openvpn.conf file

script-security 2
up "/path/to/external/script.sh"

In the /path/to/external/script.sh file

iptables -A FORWARD -o tun0 -i br0 -s 192.168.10.0/24 -m conntrack --ctstate NEW -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -F POSTROUTING
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE

In the above, tun0 is the tunnel created by OpenVPN, br0 is the bridge between my local wireless and local lan, and 192.168.10.0/24 is the subnet/DHCP pool for my local lan.

I have no idea what that script does but I cobbled it together from a few sites on Internet Connection Sharing.

I'll leave this answer un-checked in case anyone wants to provide a better one or explain how to prevent traffic on the Ubuntu computer from going through the VPN.


Solved the problem. Linux was booting in legacy to my device's second hard drive, which was in RAID configuration and wasn't properly partitioned. I opened linux in trial mode, opened the installer, and partitioned off the second drive. I then restarted my computer and re-installed Ubuntu with the recommended settings (alongside Windows 10) from a flash drive. I set the BIOS to boot in UEFI mode instead of legacy, and it started up as normal. Computer works great; all files are intact; Ubuntu and Windows 10 both run fine.


laptop WIn 8.1 partition not displayed on grub

You are only seeing Ubuntu because that is the only OS currently on that particular drive /dev/sda.

Your image is showing the default drive configuration that you would get when installing Linux, using the option to Erase disk and install Ubuntu.  The system would have warned you more than once that it's about to erase everything from the disk, and for you to cancel if you need to back up your files.

If you had chose a different option during the install process, such as Install Alongside or Something else, then the partition layout would have been different.

The AlongSide option have given you the option to split your previous OS (Windows 8) and Ubuntu would have installed in the space that you allocated for it in the split.

The Something Else option would have asked you to specify the partition where you want Ubuntu installed.  Ubuntu would have then been installed into that partition and that partition only.

The last two options I explained would have shown your Windows 8 in the grub menu.  Also the installer would have included all detected Operating Systems in the boot menu as a choice when you boot.

The Ubuntu Install Process is located here:
http://www.ubuntu.com/download/desktop/install-ubuntu-desktop

How can I get Windows 8 back?

Recovering data from a formatted drive isn't an easy task.  Take a look at this link to get started:
How to recover NTFS drive formatted in ext4?

The user is recommending tools from lifehacker.com:
http://lifehacker.com/5237503/five-best-free-data-recovery-tools


Why do I have to change into my private bin folder to execute an .sh script?

When you type sh somescript.sh, the system looks for sh in the path not somescript.sh.

Then the system finds sh and passes the argument somescript.sh to it. Then sh looks for somescript.sh in the current folder or in the specified folder ~/bin/ if you typed

sh ~/bin/somescirpt.sh.

To make the system look for somescript.sh in the path use it directly as a command, without the sh prefix. In other words, type in the terminal:

somescript.sh

For that to work, somescript.sh needs located in a folder in the path, in this case ~/bin/ and it needs to be executable, as others have pointed out. I include the command below for completeness.

chmod +x ~/bin/somescript.sh

Also see How do I run .sh files? and

How to run scripts without typing the full path?

Hope this helps


Cannot install LibreOffice 3.6 from binary

No worries, I solved my own problem. The path of the conflicting files indicates "menu", where I assume the commands or shortcuts are placed in the menu bar. I then realized that the application itself might be causing problems, so I just remove the app "Introduce PPA" from the software center (which only shows when you click "Show * items").

It works beautifully now!


Use guvcview, which is a GTK+ interface for Linux USB Video Class (UVC) devices. It will allow you to make adjustments to the web camera.

To install this in Ubuntu via the terminal, type sudo apt-get install guvcview. Or you can install it via the Ubuntu Software Center or other dpkg-frontends.


I resolve the problem. Catalyst 12.8 dosent support Ubuntu 12.10. You have to download and install Beta Version Catalyst.


How to change ubuntu one windows location

Try moving your ubuntu one folder to the D drive then run this command in cmd

mklink /D C:\path\to\where\ubuntuone\expects\folder D:\path\to\where\folder\really\is

That should make a symbolic link to the ubuntu one folder. As I side note, this is also how I move my steam games to separate partitions.


Looks like you have done everything right. I think you should just need to logoff and log back on again.
I have replicated your scenario here, and everything worked fine after I logged of and on again.


help partition mount and scheme for multiple boot

I’m not sure if that is your actual problem but I guess your shared partition is not automatically mounted, is it? That may be because your /etc/fstab line for the /media/sharing mount point looks incomplete:

UUID=20e3ac2f-6fb5-4e91-9585-dd1ba552beb1 /media/sharing        defaults       0       2

It seems that the field with the filesystem type is missing (before the mount options field with the current value defaults), see also man 5 fstab. Instead, try a line like the following:

UUID=20e3ac2f-6fb5-4e91-9585-dd1ba552beb1 /media/sharing        auto    defaults       0       2


Why does my ethernet connection fail AFTER installation is complete?

Assuming you can get to the desktop, right-click on the NetworkManager icon in the upper right and uncheck "Enable Wireless". This should let your wired ethernet act as it did before, and then you might have another questions to ask.


Just 200 GB of my 1TB Disk can be found on Ubuntu Server 20.04

By default, for whatever reason, when setting up a new Ubuntu Server install, it only allocates around 200GB of storage to the ubuntu--vg-ubuntu--lv logical volume by default, unless noticed and altered during install.
Here's how you can resize it to full capacity of the disk:

See the current size of the logical volume before df -hT /dev/mapper/ubuntu--vg-ubuntu--lv

Run a test first sudo lvresize -tvl +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

Resize the logical volume sudo lvresize -vl +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

Resize the filesystem sudo resize2fs -p /dev/mapper/ubuntu--vg-ubuntu--lv

Check the size of the logical volume to see if everything went smooth df -hT /dev/mapper/ubuntu--vg-ubuntu--lv


truecrypt permission denied mounting network drive

Its a permission issue.

try to run "sshfs" command from root's account and try again and it should work.

The problem you are experiencing comes from a simple fact that the remote file you are trying to access appears locally as owned by the user who run "sshfs" command while truecrypt will attempt to open the file from root's account and this results in the permission error you are getting.


Well, the first thing I was going to suggest was to set:

security = domain

But then I saw this in the Samba doc's chapter on Domain Membership:

  Currently, domain security in Samba does not free you from having to
  create local UNIX users to represent the users attaching to your
  server. This means that if domain user DOM\fred attaches to your
  domain security Samba server, there needs to be a local UNIX user fred
  to represent that user in the UNIX file system.

Is it feasible for you to set up an account for each user that will be connecting?

I've never set up a Samba share inside a Windows domain, but here's a link to the Samba doc on Domain Menbership that I quoted above: Samba Domain Membership

Give the doc a look, and maybe it'll help you with what you need to do.


Accidentally deleted home directory on Linux, how to recover?

Data recovery, and in particular on the ext file system linux uses, is complex. You did the best you could with tools like testdisk. Any more comprehensive recovery would probably require professional services.
This is why maintaining a good backup of your own user data is of paramount importance. An operating system is downloaded easily, and installed in less than an hour. Your user data, however, are unique and cannot be recovered once lost. Hence, make sure to have a good backup, because that is the only realistic option to fully recover accidentally deleted data.


How to rollback 'xorg1.13' to 'xorg1.12' in 12.10?

Aptitude can easily handle rollbacks.  Note that you may have to rollback some dependencies as well, but the command you are looking for is roughly apt-get install xserver-xorg=1:7.6+12ubuntu1 (downgrading to the version used in precise).


Windows 10 VM (Virtualbox) hang on Ubuntu 18.04 Hostsytem

One solution was (only tested on Ubuntu 18.04.2 with VBox 5.2.18):

Force "KVM" as paravirtualisation:

Settings -> System -> Performance -> paravirtualisation = KVM

In my case windows 10 hang at booting.

This fixed my problem:


Does programs installed through software-center get updated?

I believe the general policy is that once Ubuntu is released, the software version is locked down.  The software is patched for various reasons, over time, but not necessarily improved upon, until the next release of Ubuntu.

There are exceptions.

A notable exception is if you add the developer's software repository to your software manager's list of software sources.  In that scenario, you can grab updates the second the developer makes them available... for better or worse.

Edit:

No, there will not be automatic updates of software installed from the Ubuntu Software Center.  If updates are available, you can choose to install the updates if you want.


Thunderbird 60.2.1 doesn't notify with new email?

Open Thunderbird preferences. Then in the General tab check the 'Show an alert' option under 'When new messages arrive'.

Additionally, you can also check the 'Play a sound' option for an audible alert.


Many times changes made to window decoration and theming etc. don't immediately apply to a window of a running instance of an application.

Simply closing and restarting the application (or re-login/rebooting if needed) usually fixes this issue.


'Failed to find session configuration default' (lightdm.log)

You probably did not set the user-session in LightDM's config file, e.g.

# /etc/lightdm/lightdm.conf
[SeatDefaults]
user-session=plasma-kde
...

therefore LightDM looks into the user's ~/.dmrc file and finds

Session=default

and hence looks for /usr/share/xsessions/default.desktop which is missing.


How to print the first three digits after the decimal point of a floating number?

After read exp, you can use echo as follow:

$ echo "scale=3; $exp/1" | bc
9.456

But note that this command does not require echo:

$ bc <<< "scale=3; $exp/1"
9.456

EDIT: in order to get a rounded result you have to use the printf bash builtin as bc can't round values.

The following command works as expected:

 echo "scale=4; $exp" | bc | xargs printf "%.3f\n"


heimdall-frontend fails with undefines symbol error

To solve this particular problem you can follow the instructions here.

If you cannot even install heimdall on 10.04 then the following may help. All of the  Heimdall binaries hosted on Benjamin's github (including 1.1.1) require a newer version of libusb-1.0-0 (2:1.0.8) than is installed on ubuntu 10.04. I have searched on google and found a ppa on launchpad for heimdall on 10.04. This will upgrade your libusb-1.0 also. So these are the commands you need to run.

sudo add-apt-repository ppa:modycz/heimdall
sudo apt-get update
wget https://github.com/downloads/Benjamin-Dobell/Heimdall/heimdall-frontend_1.1.1-1_i386.deb
sudo apt-get install heimdall
sudo dpkg -i heimdall-frontend_1.1.1-1_i386.deb
heimdall-frontend


Can I copy a complete drive using Ubuntu?

There are multiple ways to clone an disk.

You can use software like clonezilla, or copy an entire disk to a file / drive with dd.

Please note that dd is commonly referred to as disk destroyer because people make typos and delete their data with it.

Personally I would use a tool like clonezilla to backup a drive, and dd to copy 1 drive to another.


Bookmarks in nautilus only in menu, not in the shortcut tab

Try resetting the nautilus configuration settings, Open a terminal and do this

nautilus -q
rm -r ~/.config/nautilus/ -v
rm -r ~/.gconf/apps/nautilus/
gconftool-2 --recursive-unset /apps/nautilus

Then start nautilus again.
This should fix the problem.


Ubuntu restarts instead of shutting down

After trying so much ....I am happy that finally I got the solution...
Only we have to do is to remove grub file from  /etc/default (in any linux distros).It can be directly done by this method =>go to computer=>go to etc folder=>enter in default=>remove the grub file from there=>goto terminal and write "sudo update-grub"


I changed my monitor refresh rate(Hz) from 60Hz to 59.94Hz. Now it seems more fluid under Ubuntu 18.04 with Gnome3.


How to properly update / install / compile ibus on 14.04, dconf problems?

For proper IntelliJ integration I had to compile iBus 1.5.11 from source.

To succeed on this I had to install libdconf-dev and libnotify-dev, which libs where not properly mentioned by to original ibus maintainer so I suggested him to add this information for a successful build process description on Debian based systems.

sudo apt-get install libdconf-dev libnotify-dev


Save as MIDI when playing from VMPK & QSynth

arecordmidi
First I got vmpk working with fluidsynth on the CLI or qsynth through ALSA as shown at: Virtual MIDI Piano Keyboard setup
Now, after doing that setup to hear the keyboard presses, I also run the following on another terminal:
arecordmidi --port 129:0 out.mid

where 129:0 is the vmpk output port found with aconnect -l just as was used for the fluidsynth setup on the other linked answer.
Once arecordmidi starts running, it immediately starts recording vmpk MIDI input to out.mid, until I do Ctrl+C to kill it. I can still hear the sounds at the same time from fluidsynth as before to know what I'm playing.
LMMS
LMMS was so incredibly easy to use for this purpose! After one hour of playing with I was able to record VMPK input through any of the synthesizer plugins it has (including e.g. ZynAddSubFX), and it can also record live while looping the other instruments!
All you have to to is launch vmpk, then on an instrument track (ZynAddSubFX in my case) I go:

gear symbol
MIDI
input
VMPK

This is also shown at: https://www.youtube.com/watch?v=NpeP2th08ak
Now I can already hear the Zyn sound coming from VMPK.
Then to record, there are two cryptic looking record buttons next to play on the corresponding Piano-Roll view:

The right one allows you to hear other instruments at the same time as you record your track.
Then there is a File > Export MIDI menu if you really want the MIDI.
But then I made the incredible discovery that LMMS also has its own virtual MIDI keyboard, with the default traditional ZSXDC bindings, so there isn't much point in using VMPK with it I think. When you click on the instrument, a keyboard for that instrument opens up, and then ZSXDC now play that instrument:

The only thing I could not find was how to change octaves with a keyboard shortcut as I can in VMPK, I could only move it by changing that small white square on top of the keyboard (the "base note"?) with my mouse: https://www.lmms.io/forum/viewtopic.php?p=63072
Ardour 5
This is another method I almost got working. And it is likely to be a much more realistic use case, as it allows you to play back the backing track while recording, and see live where your MIDI notes are landing.
First you have to get VMPK to feed into Ardour 5. As mentioned at: https://discourse.ardour.org/t/vmpk-not-showing-in-midi-routing-grid/103387 Ardour 6 will have its own built-in keyboard so that won't be needed anymore. But on 5 you need to do the following.
Set MIDI System to "ALSA sequencer" instead of the default "ALSA Raw devices". This can be done on a running project under:

Window
Audio/MIDI setup

or when starting to run a new session.
"Audio System" should also be set to ALSA of course as that is what we are using.

Once that is done:

create a new MIDI track in ardour
start running vmpk

and then go under:

Window
MIDI Connection

you will see something like:

The key thing is that there is a "Hardware" tab. This is vmpk!
So now, you just have to click on the area where there is a green dot on the screenshot to create that connection (the dot is not present when you first open the window).
Once that is done, I can now hear and see soundwaves moving on Ardour when I touch vmpk keys!
So then just start recording in Ardour as you would for any other audio:

hit record symbol on the MIDI track we created and where we will record to
hit round red recording symbol on top (shift + r)
start playing (space)

and as it plays, it will record vmpk keys and show them live in ardour, something like this:

so you se that my random notes were registered!
Now the only thing I haven't managed is to export the MIDI track! Not that it matters much I guess, since once inside Ardour, we generally have more desirable output options like .ogg, but still.
Tested on Ubuntu 20.04, I can't believe I'm wasting my life doing this stuff! :-)


I am not able to install eclipse after uninstalling it

The program 'eclipse' is currently not installed.  You can install it by typing:
sudo apt-get install eclipse-platform

And one more thing, to uninstall a package use:

sudo apt-get remove package_name

or

sudo apt-get purge package_name

See man apt-get for more info:

autoremove is used to remove packages that were automatically
installed to satisfy dependencies for other packages and are now no
longer needed.


Can I set a disc name when burning a DVD via terminal?

If you mean by "without creating a ISO" that no intermediate image file
shall be stored on hard disk:

xorriso -outdev /dev/sr0 -volid "MY_DISC_NAME" -map /hard/disk/file_path /iso/file_path -map /another/hd/path /another/iso_path

If the DVD shall not get an ISO 9660 filesystem, then you need a producer
of your desired filesystem which puts out its result on standard output.
This output stream can then be piped into a burn program like growisofs
or xorriso. Like

producer_program options ... | xorriso -as cdrecord -v dev=/dev/sr0 -

The disk name has to be encoded by the producer program into the output
stream.


Broken Packages after installing AWN Lucido from official PPA

To fix broken packages type the following in terminal,

sudo apt-get install -f

sudo dpkg --configure -a

sudo apt-get update

To install AWN Lucido type the following in terminal,

sudo add-apt-repository ppa:awn-testing/ppa && sudo apt-get update

sudo apt-get install avant-window-navigator-trunk avant-window-navigator-data-trunk python-awn-trunk awn-settings-trunk awn-applets-python-core-trunk python-awn-extras-trunk awn-applets-python-extras-trunk awn-applets-c-core-trunk awn-applets-c-extras-trunk


I use and recommend rdiff-backup for that.

sudo apt-get install rdiff-backup

assuming you have ssh access to the remote server:

sudo rdiff-backup /etc user@example.com::/remote-dir

Then I would set up signing in with a ssh key.

Then you just need to run a cronjob as root. Put command in cron config file:

sudo echo "rdiff-backup /etc user@example.com::/remote-dir" > /etc/cron.daily/etc_backup

and make it executable:

sudo chmod u+x /etc/cron.daily/etc_backup

not sure if it is necessary to make it owned by root:

sudo chown root: /etc/cron.daily/etc_backup

Alternatively you can back it up to your dropbox directory.

rdiff-backup /etc ~/Dropbox


Can the latest version of Ubuntu run on a Powermac G5?

Yes, you can.

However, from here,

  Since 7.04 Ubuntu, PowerPC downloads of Ubuntu are not available on all Ubuntu mirrors. Below you'll find links to the ISOs on the main Ubuntu server, as well as, help on finding mirrors.

A full mirror should include it and have this in the list:

  Mac (PowerPC) and IBM-PPC (POWER5) desktop image

  For Apple Macintosh G3, G4, and G5 computers, including iBooks and PowerBooks as well as IBM OpenPower machines.

nl.releases.ubuntu.com doesn't, while cdimage.ubuntu.com does.


A rookie mistake. I forgot to whitelist the MAC address associated with the new WiFi adapter. Once the MAC address was whitelisted the adapter worked fine.


How to install MySQL GUI Tools in 12.04+ versions?

I tried to compile without success because many bugs to fix :(
I tried to convert .rpm package with alien, its convert and install well but doesn't work :(
go to this page and download this packed : see UPDATE

32 bits

Generic x86 Linux TAR (bundled dependencies)         5.0r12

mysql-gui-tools-5.0r12-linux-i386.tar.gz

64 bits

Generic x86/64 Linux TAR (bundled dependencies)      5.0r12

mysql-gui-tools-5.0r12-linux-x86_64.tar.gz

extract the tar.gz with nautilus doble-click :

Open mysql-gui-tools-5.0 with nautilus an you will see :

The first time open a terminal an execute ./mysql-administrator

if you see one error like that just execute ./mysql-administrator --update-paths

for second time an more just execute via nautilus

and voala! happy rocking...

UPDATE 23/02/2013

MYSQL Announcement the EOL for the MySQL GUI Tools Bundle (Administrator, Query Browser, Migration Toolkit), please use MySQL Workbench has replaced the GUI Tools Bundle instead, and you can't download from the MYSQL web page but I found another page where you can find it:

MySQLGUITools


How do I find Ubuntu users in my country / state

The Ubuntu Community supports Local Community Teams. You can find a list of these teams here:

http://loco.ubuntu.com/teams/

This site also shows all the events that the local teams organize.


Epson XP-760 colour printer only prints in black with Ubuntu 17.04 (it worked fine on Debian 8)

Download the driver from Epson drivers site

Enter your printer model and press Search.

Accept the license and download a deb file according to your architecture (amd64 or i386). Copy this file to your Home folder and run in a terminal:

sudo dpkg -i epson*.deb
sudo apt install -f

Then go to System Settings -> Printers and install a new printer there.


My laptop suddenly failed to boot. Can someone help me diagnose the problem?

From your screenshots and terminal outputs, it looks like the SSD is the problem (showing only 21 MB and IO / superblock errors).
Further investigation shows that the SSD controller (Phison PS3111) has caused trouble for a number of people since its introduction. This controller is mostly used in budget SSD's.
Judging from this, it seems most likely your SSD has simply failed.


Upgrade from 16.04 to 18.04.01 : August 6 - still "No new release found."

I tried to do it with sudo do-release upgrade -d in two different computers, and got bad problems with Gnome.  In one computer, I was forced to reinstall everything.  So, the answer is: they are still solving problems with Unity to Gnome migration.


The easiest way to fix this is to install aptitude, which will try to resolve the conflict. See that answer to this question answering the held broken packages issue.


Touchpad works on a Dell Inspiron M5030 but external mouse moves slow

Does it stutter, or is it just the sensitivity that appears very low?

You can try this solution if it's just insensitive.
Run xinput --list --short and see if you can locate your mouse.
For example, my mouse listed looks like this:

SteelSeries World of Warcraft MMO Gaming Mouse  id=8    [slave  pointer  (2)]

If your mouse is listed, you can try this:

xinput --set-prop "Your mouse name" "Device Accel Constant Deceleration" X

and replace X with an integer somewhere between 1 and 10, where 1 is very insensitive.

For example, like you can see, I have the the MMO mouse from Steelseries. My command would look like this (my problem is, unlike yours, that the mouse is too sensitive)

xinput --set-prop "SteelSeries World of Warcraft MMO Gaming Mouse" "Device Accel Constant Deceleration" 3

If this doesn't work, you can try replace the name with the id. If you notice changes, but it's slower or way too fast, you can experiment with different numbers. Like I mentioned above, the higher the number, the more sensitive your mouse becomes.

Hope this helps!


I'm using an Acer chromebook running an xfce desktop using the same method that you probably used.  I was able to get audio working with the panel audio mixer plugin by installing pulseaudio and then starting it from terminal with pulseaudio --start.
After a reboot, everything worked as expected.