Wednesday 22 October 2014

Change screenlock timeout from script - Ubuntu 14.04

My screen is set to blank/timeout after 3 minutes but I find it a real pain to have to go to the menus and then select the 'Brightness & Lock' applet in order to just change the timeout.

Since I love using the shell so much, I thought that I'd investigate seeing if I could achieve the same result via scripting. After a bit of confusion as to which command I should be using (gconf/dconf/gsettings), I discovered the correct way of poking the new values is by using dconf:

dconf write /org/gnome/desktop/session/idle-delay 'uint32 180'
Sets the delay for 3 minutes.

dconf write /org/gnome/desktop/session/idle-delay 'uint32 600'
Sets the delay for 10 minutes.

dconf write /org/gnome/desktop/session/idle-delay 'uint32 3600'
Sets the delay for 1 hour.

Note - you don't need to sudo these commands.

Respect to Jani for pointing me in the right direction.

Friday 29 August 2014

Black box in notification area on Ubuntu 14.04

I've had this annoying problem for a while now, where a black rectangular box appears on my Ubuntu desktop, running Cairo Dock. Most of the links I found on Google didn't pinpoint anything useful so I sat down one day and killed off processes manually, one by one, in an effort to locate the source of my problem.

It would appear that the culprit is update-manager. The process was listed as running with an option/switch of --no-focus-on-map. The full process is shown below:

john     14771     1  0 Aug04 ?        00:00:11 /usr/bin/python3 /usr/bin/update-manager --no-update --no-focus-on-map

lsof -p 14771 shows that /usr/bin/python3.4 is involved, but not sure if that information is of any use.

You can't move the box or do anything with it. The most annoying thing is that it is 'Always on top' so you cannot see anything behind it.

Simply issue the following command at the shell:

killall update-manager