Wednesday, January 18, 2017

Restore grub boot-list after deleting last installed Linux system partition

By default, the last installed Linux takes over the boot list. If you then delete that system's partition from within a different (that is: a previous) Linux system, you will not have any boot list when you reboot.

To restore the grub boot list (including any changes made with Grub Customizer) of this older system, the one from within which you have deleted the last installed Linux, just stay within this system and do not reboot before doing:

sudo grub-install /dev/sda
sudo update-grub

Wednesday, January 11, 2017

Fix "open containing folder" not opening with the file manager

  • open as root /usr/share/applications/mimeinfo.cache
  • edit the line that starts with inode/directory= and add the name of the file manager that you use if it is not there already;

    if that is already there but another program is listed there first, try by putting the file manager first (if you need the other program(s) to open folders);

    if the above doesn't work, remove the program that the browser/downloader opens instead of the file manager

     if the above doesn't work, keep only the file manager

Tuesday, January 10, 2017

Commands (for shortcuts) to shutdown, reboot, suspend

Shutdown directly:

    dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.PowerOff" boolean:true

Reboot directly:

    dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.Reboot" boolean:true

Sleep directly:

    dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.Suspend" boolean:true

Fix wifi problem in ubuntu 16.04

This is when wifi is randomly lost, sometimes after suspend. Source HERE.

To see your wifi card model do:

sudo lshw -class network

I get:

       description: Wireless interface
       product: RT5390 Wireless 802.11n 1T/1R PCIe

In this case open or create /etc/pm/config.d/config and add SUSPEND_MODULES="rt5390"

Then, in terminal:

echo "options rt5390 fwlps=N" | sudo tee /etc/modprobe.d/rt5390.conf