What Command Shortcut for Opening File Manager (Home)?

What command do I need to use if I want to create a custom keyboard shortcut to open the Gnome file manager to the home directory? (Fedora 36 and Gnome)

I tried gnome-open ~ and also triedgnome-open . and neither of them seem to work when used as a Keyboard Shortcut (although gnome-open ~ works when I run it from the terminal, but I had to first install libgnome )

Is there ALREADY a shortcut for launching the file manager that I just don’t know of?

Thanks in advance.

I think this MIGHT be the right command to use in keyboard shortcuts:

xdg-open ~ will open the home directory when it is assigned to a shortcut key.

At least, it is working for me. Maybe there is a better way to do it though.

Also, if you are using the TERMINAL and have navigated to a particular directory, I guess you use this instead to open it in the GUI File Manager:

xdg-open .

Also, for what it is worth, pop-shell is really cool. It’s in the Fedora repos as well so easy to install.

The “file manager” is called “nautilus” on Gnome. So I usually just go “alt + f2” followed by “nautilus”.

In the keyboard shortcut settings, I see that there is one for “home folder” but it’s disabled. You should just be able to set that to whatever you wish. I just tested it out by setting it to “ctrl shift alt h” and it worked just fine:

1 Like

thats so cool i didn’t know that. I customised a shortcut as super + H

1 Like

Thanks for that. Can’t believe I missed that. (Which is why I went about trying to set it up as a Custom Shortcut).

If you have a moment, I would like to ask you a slightly off topic question (although along the lines of keyboard shorcuts).

I am use to using Windows and the ctrl-alt-del to restart has sometimes been necessary in windows.

Are their somewhat equivalent commands for things like restarting Gnome or logging out or restarting the computer?

It would be nice for me to set up shortcuts like:

ctrl-alt-del = shut down computer

ctrl-alt-end = restart gnome

ctrl-alt-PgDn = log off

If you know what those commands would be so I can assign them to custom shortcuts, that would be great. Thanks.

Looks like ctrl alt delete is logoff:

I didn’t find one for shutdown/restart. One cannot really restart gnome with Wayland, you must logout and log back in. With X, you can run “alt + f2” and then “r” in the command prompt there to restart. You can use that to run any command really:

The terminal command for turning off/restarting is shutdown, take a look at man shutdown for its options—you should be able to add keyboard shortcuts for them. Although, it may require to be run as sudo so maybe not…

I haven’t used keyboard shortcuts for this stuff in ages. It’s simple enough in Gnome to go “super” and then type “logoff” in the search bar—the first icon that turns up is to log off. Same for shutdown:

1 Like

systemctl reboot is the system restart command AFAIK. As in …

System Commands:
  is-system-running                   Check whether system is fully running
  default                             Enter system default mode
  rescue                              Enter system rescue mode
  emergency                           Enter system emergency mode
  halt                                Shut down and halt the system
  poweroff                            Shut down and power-off the system
  reboot                              Shut down and reboot the system
  kexec                               Shut down and reboot the system with kexec
  exit [EXIT_CODE]                    Request user instance or container exit
  switch-root ROOT [INIT]             Change to a different root file system
  suspend                             Suspend the system
  hibernate                           Hibernate the system
  hybrid-sleep                        Hibernate and suspend the system
  suspend-then-hibernate              Suspend the system, wake after a period of
                                      time, and hibernate

from systemctl --help.

Or … you could use gnome-session-quit <option> where option is one of …

Application Options:
  --logout         Log out
  --power-off      Power off
  --reboot         Reboot
  --force          Ignoring any existing inhibitors
  --no-prompt      Don’t prompt for user confirmation



Thank you so much!!!

1 Like

Also, with gnome a couple clicks work from the icon in the upper right corner.
Click on that then select from the menu for lock screen/restart/power off/log off/ and others.