Ubuntu Setup Guide Part IX.Shortcut keys

Posted in Guides, Linux, Ubuntu by aliencam | No Comments »

This is a really short section, and should be put in the “customizing Gnome’s Look & Feel” area.

The Gnome “Keyboard Shortcuts” editor does not always work, for example, you cannot set any Super+___ shortcut keys using that, so unfortunately, we must once again use the Compiz Commands Plugin.

Open “compiz control settings manager” (if you don’t already have it installed do: sudo apt-get install compizconfig-settings-manager)

click the “Commands” plugin (it should be at the very top) and enable it if it is not already enabled.

Now in the “Commands” tab, enter whatever command you want to launch (pick any unused number, it does not matter which)

Now, switch to the “Key Bindings” tab. Here is where you will record what key combination you want to launch the command. Click the word “Disabled” then check the “Enabled” checkbox on the window that comes up. Once you click “Grab Key Combination,” the next key combination you press will be recorded.

The combinations that I have set both launch an open terminal window, but since I have two different terminal profiles (one with a transparent background, and another with green text on black background for high-contrast), I want one shortcut to launch each profile.

In the “Key Bindings” I have “XF86Launch1” (ThinkVantage button) as “Command 0” and “Super_L+Tab” (windows key+ tab) as “Command 2”.

In “Command” I have Command 0 set to:
gnome-terminal --window-with-profile=Terminal
(the word “Terminal” being the name of my high-contrast terminal profile)
and Command 1 is set to:
gnome-terminal --window-with-profile=Transparent
(“Transparent” is the name of my transparent profile)

That’s all, as soon as you close out of CompizConfig the settings should take place.

Setting the Windows (Super) Key to open the Main Menu:

If you want the Windows (or Super) key to open the main menu, you can set it up, but the problem with this is once the shortcut key is set, you can’t use any other shortcuts with the Super key (I use it for lots of things already, so when I realized this, I had to disable it).

For this one, you actually have to use the gnome “Keyboard Shortcuts” editor (correct me if I’m wrong please). So, first (and only!) step is to open that up (System> Preferences> (Input>) Keyboard Shortcuts)
Under the “Desktop” header, find “Show the Panel’s Main Menu” click on the “Alt+F1” on the right, then hit the Super key.

Unfortunately, this removes the alt-f1 shortcut that many people are used to… I don’t know how to have both set at the same time.


UPDATE: 08.29.2009 I have moved this into the “customizing Gnome’s Look and feel” post in the full setup guide.

Installing Firefox 3.5 In Ubuntu (completely)

Posted in Guides, Linux, Ubuntu by aliencam | 3 Comments »

Firefox 3.5 came out a few days ago, and I always want to have the most updated version of everything. It won’t be in the Ubuntu repositories until 9.10 is released.

First step is from Lifehacker, it downloads and unpacks the file from the firefox website.

Open a terminal window and enter:
wget -O - http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.5/linux-i686/en-US/firefox-3.5.tar.bz2 | tar xj -C ~

Now, this shouldn’t overwrite firefox 3.0, but we need to move it to the mozilla folder, so use the following command:

mv ~/firefox/ ~/.mozilla/firefox3.5/

Now, make a symbolic link to firefox 3.5 in the equivalent of a “programs” folder (/usr/bin in Ubuntu):
sudo ln -s ~/.mozilla/firefox3.5/firefox /usr/bin/firefox-3.5

NOTE: you may only have one version of firefox open at one time. To open Firefox 3.5, you must completely close all other versions of firefox.

Now to set the firefox icon to the new firefox program (when opening in gnome-do and if you make a panel shortcut) open your home folder, hit ctrl-h (to show hidden files), go to .mozilla/firefox-3.5, right-click on the “firefox” in there, go to “properties” then left-click on the icon (top left corner). Now go to Pixmaps on the left (or /usr/share/pixmaps) and select firefox-3.0.png.

Now, there are a few ways to set up a shortcut to open firefox. One of the easiest is to add it to the program menu. Open the menu and go to System > Preferences > (Display >) Main Menu. Now open the “Internet” section (in the left column), and create a “New Item” with name: Firefox 3.5, command: firefox-3.5, and once again, the icon should be /usr/share/pixmaps/firefox-3.0.png.

Another method is, if you use gnome-do, just open it (alt-space) and when you start typing “firefox,” hit the down arrow and select “Firefox 3.5” (I think this only shows up after a restart, or if you add the firefox 3.5 menu item above).

Firefox 3.5 has some interesting quirks though. Flash will not work for it unless you copy your plugins into it.

In Ubuntu though, you need to copy plugins for multiple locations. Use this set of commands to copy all the plugins:
cp /usr/lib/flashplugin-installer/libflashplayer.so ~/.mozilla/firefox3.5/plugins/ && cp /usr/lib/mozilla/plugins/* ~/.mozilla/firefox3.5/plugins/

you also need to disable the strange middle-mouse behavior in 3.5. go to about:config in firefox, click the “I’ll be careful I promise!”, and go to: middlemouse.contentLoadURL and if it is true, double-click on it to make it false.

the only thing I have yet to figure out is why all the fonts in firefox 3.5 seem to be blurry, while 3.0 was perfect… To me it is like the difference between subpixel smoothing and high contrast font rendering modes… see the screenshots below. (left is non-blurry firefox 3.0, right is blurry firefox 3.5)

UPDATE: There were a few forum topics about this issue, but nobody had a definitive solution. Many possible solutions, but many of them were kind of strange, and many did not work.

Here is what worked for me:

open a terminal, and this first step is a backup just in case the next step messes up your system’s fonts.

sudo cp /etc/fonts/conf.d/10-hinting-slight.conf /home/$USERNAME/Desktop/
sudo cp /etc/fonts/conf.d/10-no-sub-pixel.conf /home/$USERNAME/Desktop/

Now, the files were just copied to your desktop, here are the next two commands:
sudo ln -s /etc/fonts/conf.available/10-hinting-medium.conf /etc/fonts/conf.d/.
sudo ln -s /etc/fonts/conf.available/10-sub-pixel-rgb.conf /etc/fonts/conf.d/.

And finally, you need to reset fontconfig:
sudo dpkg-reconfigure fontconfig

Once this finishes, restart Firefox to see the new fixed font rendering engine! You should also restart your computer to ensure that removing those files did not do any harm. If you restart and you can still see text, then you are okay to:
sudo rm /home/$USERNAME/Desktop/10-hinting-slight.conf /home/$USERNAME/Desktop/10-no-sub-pixel.conf

Now you are finished!

Easy Batch Image Conversion in Ubuntu

Posted in Guides, Linux, Ubuntu by aliencam | No Comments »

I just had a stack of 25 .bmp files that I needed to convert to .jpg for a review I’m writing over at maximumcpu.net (Big C Digital Microscopes) so here is an easy way to to that. You can probably do this between just about any two standard image formats. Unfortunately, this does not preserve filenames when bulk converting.

In a terminal:

sudo apt-get install imagemagick

cd ./Desktop/pictures (change this to whatever you need to)

convert ./*.bmp .jpg

there, simple. it pumps out all the files with the filenames just being numbers in order.


Creative Commons License