Showing posts with label screen. Show all posts
Showing posts with label screen. Show all posts

Saturday, July 18, 2009

Set super+l shortcut key for locking screen in gnome

The default shortcut keys to lock screen in gnome is <ctrl><alt>l (it is small caps 'L'). I do not like that shortcut and prefer to use the combination of "super key" and "l", which actually defined as <Mod4>l. The keybinding GUI setting somehow does not accept any combination of super key with other keys. So, to be able to do that, you need to use gconf-editor.
Perform the following:

run gconf-editor,
option 1, from CLI:
$ gconf-editor


option 2, from GUI:
press <Alt>F2 to get the 'run application' dialog and type in gconf-editor and click 'run'

In gconf-editor window, go to the following key location, by expanding the keys tree:
/apps/gnome_settings_daemon/keybindings


then, double click 'screensaver' key and change the value to: <Mod4>l

and you are done. Test it by pressing super key and l.

There is also feature to search the key name and value, by pressing <Ctrl>f in gconf-editor. Actually, I found the correct location of the 'screensaver' key by searching it.

Thursday, February 19, 2009

screen

I work remotely a lot, and mostly using ssh, since it's more secure than telnet. There's a time when the process takes very long time, and I don't want to always be connected the whole time.
The problem is, when I put the process in the background (using ctrl-z and bg, or using "&" when executing), when I exited the remote shell, all processes belong to that remote shell will be terminated.

One way to resolve this issue is using "nohup". This is very useful when the process does not require any interaction. Still I'm not satisfied with "nohup."

Then I came across this very neat tool, "screen." Very elegant way to do things remotely.

Do the following:

$ screen

it will give you the session, and start to do any activity. So, when I want to leave the remote shell. Press --> ctrl-a, d. That command will detach the screen session, and it's save to exit the remote shell.

To resume that particular session. Login again to the remote computer, then look at the detached session, by:
$ screen -ls
$ screen -r <session_id>