ZSH, nohup and background process that lasts…

When I switched to  ZSH, and letting BASH behind, I missed some behaviour : one of them was the ability to quit my terminal while some jobs are still alive.

In ZSH, I get a message like this if I exist with running jobs :

zsh you have running jobs

If I exit again, my jobs are killed. But zsh accept some useful option to overide this :

setopt NO_HUP

First one is for not killing process after terminal exit, and second one is for not warning you about it.

usb mount and policykit [EN]

When you’re not on the ‘Desktop Environment‘ side and rather be in light linux config, you have to deal with annoying little problems. I’m using DWM as my tiled window manager and loving it for years. It’s fast, flexible and fun. My linux desktop is up and running after a few seconds… (ok, thanks also to the ssd 🙂 ).

But, after I upgraded to Ubuntu 14.04, I’ve lost the ability to mount my usb disks with the file manager (same problem with Nautilus or Thunar). I’m getting this frustrating “not authorized” message.
My work around was to ‘pmount’ the disk. It works but I need to search for the right device before, with dmesg, then provide the right syntax. Not so fun.

After digging a while, I found out that authorizations are managed with policykit. So after reading man page after man page, posts after posts, I found a way to easily mount my usb disks in my file manager.

Just edit a new policykit config file :

sudo nano /etc/polkit-1/localauthority/50-local.d/55-myconf.pkla

The number and the .pkla extension are mandatory to respect. The name ‘myconf’ is as you will.
Inside this file, insert those lines :

[Dealing with disks]

Now, we have to restart DBUS as it’s the service that launch the polkitd daemon

sudo restart dbus

If you launch, as I do, gnome-settings-daemon manually, you need to relaunch it after dbus

gnome-settings-daemon -r &

That’s it ! Plug a usb drive and use your file manager to browse it. No more ‘not authorized’ message !