Categories
Web Browsers

I can’t say I’m a fan of this new keyboard shortcut in Firefox

You’re not going to convince me not to use Firefox. I’m allowed to rant about it without people trying to push other browsers on me. I’ve already tried Opera, Konqueror, Epiphany, Galeon, Dillo, Lynx, and Ka… Kaha… whatever that other browser is.

Sigh.

That stupid new Control-Q keyboard shortcut, though. Control-W (close tab) is a regular part of my browsing experience. I open tabs. I close tabs. But then Firefox recently added in Control-Q (quit Firefox) as a keyboard shortcut. It sounds like a good idea. I’m actually a big fan in general of the Cmd-Q (Mac OS X) and Control-Q (KDE) approach. There should be a relatively easy way to quit an application (Alt-F4 is not a comfortable keyboard combination for me).

But, of course, Control-Q (quit Firefox) is now right next to Control-W (close tab), and I often find myself quitting when I want to just close a tab. Yes, I know I can have Firefox confirm when I want to close, but I don’t want it to confirm… I just don’t want it to close. If someone knows of an about:config trick to turn off Control-Q, let me know. In the meantime, I have Firefox set to open with the same tabs from my last session.

Categories
Linux Ubuntu

Making a custom keyboard shortcut in Ubuntu

Ubuntu uses a graphical interface called Gnome (sometimes you may hear it referred to as a desktop environment), which allows you to easily define keyboard shortcuts for some common commands by going to System > Preferences > Keyboard Shortcuts.

Sometimes, though, you may want to define keyboard shortcuts for custom commands that aren’t available through that menu. In this example, you’ll see how to make a keyboard shortcut for a command that will allow you to open a file browser as “root” (or the ultimate administrative user).

First, press Alt-F2. This will open a Run Application dialogue.


In that dialogue, paste the command

gconf-editor


In the Configuration Editor window that appears, click on the menu Apps and then select Metacity. Within Metacity, you’ll see several submenus. The first one you’ll select will be global_keybindings. Once you select that, you’ll see a bunch of disabled commands with numbers attached to them. Find an empty one, most probably run_command_1, click on the Value column next to it, and then type the keyboard shortcut.

You’ll have to actually type out the words describing the shortcut. You can’t, as you would in the normal Keyboard Shortcut menu, just press the key combination you want. In this case, the shortcut

<Mod4><Hyper>n

means Windows+N (or holding down the Windows key and then pressing the n key).

This assumes you’ve already made Windows a modifier key. If you haven’t yet completed that step, you can use other modifier keys like <Shift> or <Alt>


Then, again within the submenu of Metacity, select keybinding_commands, pick the corresponding empty command (since we selected run_command_1 before, we should now select command_1). For the command, we’re putting

gksudo nautilus


Now when you press Windows+N, you’ll get a password authentication dialogue to escalate to root privileges temporarily…


And then you can browse and make changes to the filesystem as root.

Categories
Computers Ubuntu Windows

Using the Windows key as a modifier key in Ubuntu

In my experience, by default Ubuntu seems to make the Windows key on keyboards a single key for the purposes of keyboard shortcuts. In other words, if you want to set a keyboard shortcut for an action to be Windows+D (for example, to have the desktop shown and all windows minimized when you hold down the Windows key and press the D key), Ubuntu will interpret this to mean you want the keyboard shortcut to be the Windows key itself (D doesn’t even enter into the picture).

So if you’re a Ubuntu user like me—you love keyboard shortcuts and don’t want the Windows key as a modifier key to go to waste—this simple tutorial should make you happy.


First, go to System > Preferences > Keyboard


Then, under the Layouts tab, select Layout Options


Under Alt/Win key behavior, select Super is mapped to the Win-keys. And then click Close.

You should now be able to go to System > Preferences > Keyboard Shortcuts and use combinations of keys with the Windows key for keyboard shortcuts.