LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Most used shortcuts in Gnome and Nautilus (http://www.linuxquestions.org/questions/linux-newbie-8/most-used-shortcuts-in-gnome-and-nautilus-640504/)

sica07 05-07-2008 06:46 AM

Most used shortcuts in Gnome and Nautilus
 
Howdy! I thought that it would be useful to post a practical selection of shortcut keys for GNOME (the Desktop Environment) and Nautilus (the File Manager) and some information about customizing shortcut keys in Ubuntu. I wrote it especially for Ubuntu beginners, but I hope it will prove useful for all.

1.GNOME/Nautilus shortcut keys:

Ctrl-H: show hidden files
Ctrl-N: new window
Ctrl-Shift-N: create new folder
Alt-Home : jump to home folder
Alt-Enter : file / folder properties
F9 : toggle side-pane
Alt-F1 : launch applications menu
Alt-F2 : launch "run application" dialogue
Ctrl-Alt - Right/Left arrow : move to the next virtual desktop
Ctrl-Alt-Shift - Right/Left arrow : take current window to the next virtual desktop
Ctrl-Alt-D: minimize all windows, and gives focus to the desktop.
Alt-Tab: switch between windows. When you use these shortcut keys, a list of windows that you can select is displayed. Release the keys to select a window.
Ctrl-Alt-Tab: switch the focus between the panels and the desktop. When you use these shortcut keys, a list of items that you can select is displayed. Release the keys to select an item.
Ctrl-Alt-L: lock the screen (tested only in Ubuntu)
Ctrl-L: shortcut for opening locations-by default the path is the home folder*
/ : same as Ctrl-L but has the root (/) as default path* (shortcut found on here)
* both shortcuts can be used while you are on the desktop (no window active)

Ctrl-T : move to trash (in Nautilus)
Quite dangerous key combination because many of us are used to press these keys in order to open a new tab. Because we all delete items using the Delete key, I recommend to deactivate this shortcut key. To do that, go to System Preferences Appearance Interface. Select Editable menu shortcut keys and close the dialog box. Click on the Edit menu in the File Browser. Click the Empty Trash item (it has Ctrl-T as the keyboard shortcut) Press the Delete key to get rid of the shortcut.
You can find all GNOME shortcut keys here

2.How to create a custom hotkey to launch whatever application you want in GNOME:
As an example, we will set a lock-screen shortcut.
Open "gconf-editor" as the user as you're logged in in GNOME (typing gconf-editor in the terminal or "Run Application").
Go to apps > metacity > keybinding_commands
Here we have a list of twelve slots for commands. Double click on e.g. "run_command_1"
In Key Value Type in the name of the application or command you want to launch (e.g. gnome-screensaver-command --lock).
Go to apps > metacity > global_keybindings
Double click on e.g. "run_command_1"
Change the key value to whatever key combination you like (e.g. <Ctrl><Alt>L).Press "Ok".


3.How to create/change GNOME shortcuts:

Click on System > Preferences > Keyboard Shortcuts
Click the action in the list and press Enter.
Press the new key or key combination you want to assign to the action. (To clear a shortcut, press the Backspace key)

Hope it helps.;)

If you like it, please digg it. Thank you.

paragkalra 05-07-2008 03:32 PM

First and Foremost thanks for taking the efforts and posting it for us.

Quote:

Ctrl-Alt-L: lock the screen
This has never worked for me in GNOME. Have you been able to?

I think we need to enable it using "gconf-editor" but I don't know the exact setting. Does any one of you know how to enable locking the screen in GNOME the way it can be done in KDE.

jay73 05-07-2008 06:50 PM

System > Preferences > Keyboard shortcuts. You can set whatever you want.

dina3e 05-07-2008 08:56 PM

it's very intersting shortcut keys

sica07 05-08-2008 05:42 AM

Quote:

Originally Posted by paragkalra (Post 3146041)
First and Foremost thanks for taking the efforts and posting it for us.



This has never worked for me in GNOME. Have you been able to?

I think we need to enable it using "gconf-editor" but I don't know the exact setting. Does any one of you know how to enable locking the screen in GNOME the way it can be done in KDE.

Well, is working in Ubuntu, I don't know about the other distros. I will mention it in the post. Thank you for pointing that out.

paragkalra 05-10-2008 12:51 AM

Quote:

System > Preferences > Keyboard shortcuts. You can set whatever you want.
Every thing works there except "locking screen". Does anyone know how to lock the screen in GNome and that too on a Redhat box?

sica07 05-11-2008 11:22 AM

Quote:

Every thing works there except "locking screen". Does anyone know how to lock the screen in GNome and that too on a Redhat box?
I included the answer to your question at the second point of my post: "2.How to create a custom hotkey to launch whatever application you want in GNOME"
Detailed info you can find in this tutorial. If for some reason it wont work, post the problem.

paragkalra 05-12-2008 04:08 AM

Thanks for the detailed tutorial. I placed following in the appropriate section:
gnome-screensaver-command --lock

Check if you can find anything wrong in the syntax. It looks good to me.

I am getting following error:
http://img410.imageshack.us/my.php?i...ckerrorvj6.png

I thought we need "gnome-screensaver-debuginfo" RPM to get it work. I installted rhel5 rpm "gnome-screensaver-debuginfo-2.16.1-8.el5.i386.rpm" which got successfully installed on RHEL4 but still I am not being able to lock the screen in gnome :scratch:

I am using Redhat (RHEL4 AS U4). Again thanks for taking the efforts

sica07 05-12-2008 04:33 AM

maybe this redhat version is still using xscreensaver. If that is the case you should use this command: xscreensaver-command -lock. try it in the terminal. It's faster.

paragkalra 05-13-2008 06:57 AM

Hey sica07, thanks for the efforts. I have made some progress in this issue. I am being able to lock the screen for normal user but not being able to do so with superuser. For normal user initially "xscreensaver" was not running so I had to start it and then onwards I am being able to lock the screen.

But when I try to start the "xscreensaver" as a superuser I get following error message:

Quote:

[root@station2 ~]# xscreensaver&
[1] 6979
[root@station2 ~]# Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xscreensaver: Can't open display: :0.0
xscreensaver: initial effective uid/gid was root/root (0/0)
xscreensaver: running as nobody/nobody (99/99)

xscreensaver: This is probably because you're logging in as root. You
shouldn't log in as root: you should log in as a normal user,
and then `su' as needed. If you insist on logging in as
root, you will have to turn off X's security features before
xscreensaver will work.

Please read the manual and FAQ for more information:

http://www.jwz.org/xscreensaver/faq.html
http://www.jwz.org/xscreensaver/man.html
I went through the FAQ and MAN page as well but couldn't make a break through in it.

Additionaly info:
Quote:

[root@station2 ~]# xscreensaver-command -lock
xscreensaver-command: no screensaver is running on display :0.0
[root@station2 ~]#
I know its not recommended to run xscreensaver as root user but can I still start it as superuser and then lock the screen.

sica07 05-13-2008 07:29 AM

I don't have any idea. I won't strat with the "Don't log in as root" preach, beacuse I see you know it quite good. Anyway, it could be helpful making a .Xscreensaver file in the root folder. Also, see the man pages for Xauth and xdm (I will try to find the solution, too).


All times are GMT -5. The time now is 07:24 PM.