Posts about ubuntu

Folders before files in ubuntu

Friday, 26 August 2016 at 19:13

I like to view folders before my files with Files/Nautilus, and here is how to enable it :

In dconf-editor navigate to: org.gnome.nautilus.preferences key and set sort-directories-first to true.

Non recursive file searching in Nautilus

Saturday, 27 August 2016 at 13:07

Recursive search is the default in nautilus (search in subfolders), but I prefer type ahead search(only search in current folder).

This is easy to change, but not very obvious. In dconf-editor navigate to org > gnome > nautilus > preferences and set the enable-interactive-search value to what you’d like to use.

http://www.webupd8.org/2014/01/nautilus-type-ahead-find-feature.html

Keep your ubuntu-gnome from waking up at random

Sunday, 18 September 2016 at 14:34

I have tried using /proc/acpi/wakeup and I’ve tried looking in /sys/bus/usb/devices/SOMETHING/power/wakeup for devices that will wake up the computer, however I finally fixed my random wakeup problems with a tool called acpitool.

It is really quite simple. First you need to install it, unless you already have it installed:

$ sudo apt-get install acpitool

Once it’s installed you can list what you can do with it, and to make it works.

$ acpitool --help

Then you can list all your devices (small w)

$ acpitool -w
   Device    S-state      Status   Sysfs node
  ---------------------------------------
  1. SBAZ      S4    *disabled  pci:0000:00:14.2
  2. PS2K      S3    *disabled
  3. PS2M      S3    *disabled
  4. UAR1      S4    *disabled  pnp:00:06
  5. P0PC      S4    *disabled  pci:0000:00:14.4
  6. UHC1      S4    *enabled   pci:0000:00:12.0
  7. UHC2      S4    *enabled   pci:0000:00:12.2
  8. UHC4      S4    *enabled   pci:0000:00:13.2
  23. PE21      S4    *disabled
  24. PE22      S4    *disabled
  25. PE23      S4    *disabled
  26. USB3      S4    *enabled   pci:0000:00:13.0
  27. USB5      S4    *enabled   pci:0000:00:16.0
  28. PWRB      S4    *enabled   platform:PNP0C0C:00

Then it’s just a matter of disable all the devices you don’t want to wake up the computer (large W).

$ sudo acpitool -W 6

Don’t disable everything, then you can’t wake the computer again :)

I keep the power button enabled. And have configured the computer to hibernate when it’s pressed, giving me a nice symmetry.

Restarting Alsa

Sunday, 23 July 2017 at 14:31

Sometimes after I wake up my computer after a hibernate I notice that sound is not playing. A simple fix for this seems to be to restart alsa:

$ pulseaudio -k && sudo alsa force-reload

Found on Stack overflow