Thursday, December 24, 2009

Customizing Ubuntu Lucid (alpha)

With the latest releases of Ubuntu has come a loss in being able to customize certain things via a gui.  For instance, Ubuntu used to give you all sorts of options to customize the login screen, but if you look now at System >> Administration >> Login Screen, virtually all of those options are gone.  Also, Grub2 has come to Ubuntu.  For the old grub, Startup-Manager (SUM) was a great gui tool that let you tweak a number of things from the login timer to the splash image.  SUM has limited functionality with Grub2.  See https://help.ubuntu.com/community/StartUpManager for details.

Customizing the login screen

Changing the login theme
Source: https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/449198

Press Alt+F2, and run "gksudo -u gdm dbus-launch gnome-appearance-properties".  Use the "Theme" tab to customize the login theme, and the "Background" tab to customize the background image of the login screen.  After doing this, you might notice some new blue icons in your notification area.  Go to System >> Preferences >> Keyboard, click the "Accessiblity" tab, and uncheck "Accessibility features can be toggled with keyboard shortcuts" to get rid of one of them, and then reboot to get rid of the other.

Changing the "System Ready" sound
Source: https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/437429

This is the drums sound that plays when you get to the login screen.  The file is located at "/usr/share/sounds/ubuntu/stereo/system-ready.ogg".  Run nautilus with root permissions via Alt+F2 "gksudo nautilus", and browse to the folder " /usr/share/sounds/ubuntu/stereo".  Rename "system-ready.ogg" to something else (e.g. "system-ready.ogg.bak") to disable the sound.  If you want to replace it with your own custom sound, back up the original file by renaming it, then make a new file called system-ready.ogg in that folder and it will play your new sound.  The program Audacity is good for trimming a sound file and saving it in the .ogg format.

Customizing Grub2
Be careful editing your grub2.  If you screw something up, you might have trouble booting, so have a LiveCD handy to help you undo whatever you did.

You can try StartUp-Manager for some limited customization options.

You can find plenty of detailed info in the Ubuntu documentation https://help.ubuntu.com/community/Grub2#Configuring_GRUB_2 .  The only spot it lacks is in configuring a spash image, for which there is an easier method if you're running Lucid (which is in alpha right now, so I'm not suggesting you should run it).  Perhaps this method works in earlier Ubuntu versions too, but I don't know.

Configuring splash image in Lucid
1) Install grub2-splashimages.   This will give you a set of background images to choose from.

GUI Instructions:
Run Synaptic via System >> Administration >> Synaptic Package Manager.
Search for grub2-splashimages, right click on it and select "Mark for Installation"
Click "Apply" in the toolbar.

Terminal Instructions:
sudo apt-get install grub2-splashimages

If you want to create your own image, see the Ubuntu documentation for saving your image correctly, and then put it in the folder /usr/share/images/grub (use alt+f2, then type "gksudo nautilus" to do this, or you'll get a permissions error).

2) Use alt+f2, then type "gksudo nautilus".  Create the folder "desktop-base" in /usr/share (unless it already exists).  Create the document "grub_background.sh" in this folder, and open this file for editing (right click, and select "Open with gedit")

Terminal Instructions:
sudo su
mkdir /usr/share/desktop-base
gedit /usr/share/desktop-base/grub_background.sh

This is what my "grub_background.sh" file looks like:
WALLPAPER="/usr/share/images/grub/Lake_mapourika_NZ.tga"
COLOR_NORMAL="white/black"
COLOR_HIGHLIGHT="light-blue/black"

The first line specifies the image, the second the color of text, and the third the color of higlighted text.  Text color is specified as "text color/background color", where black as a background color is just transparent.

3) Run "sudo update-grub2" in the terminal.  Be patient, it might take a few seconds before you see it do anything.  You should see a line like "Found background image: Lake_mapourika_NZ.tga" in the output.

4) Reboot and see if it worked.  Go back and change the text color if it's hard to read.

Tuesday, December 22, 2009

A comparison of Gmail notifiers for Ubuntu

If you're looking for a program to check your Gmail in Ubuntu, you'll find there's a lot of them.  Variety's good, but it's difficult to wade through all these options to find the one you want.  Perhaps one day these developers will combine their efforts to create one awesome Gmail notifier, but in the mean time here's a comparison of the options to help you out.

Here I'm specifically looking at email notifiers that work in Gnome with Gmail.  If you use an email reader like Thunderbird, that already has this functionality built-in.  Also, if you use KDE, there's some other gmail notifiers you'll want to check out, although some of the ones below also work in KDE.

cGmail
Uses Gnome keyring: Yes
Notification system: use Ubuntu's notification system
Shows number of unread messages in system tray icon: Yes
Hide icon when no new emails: Yes, configurable

The notification only tells you when there's a new email and how many unread messages you have, not who it's from or what it's about.  There's also no way to launch the browser or email client from this.  This was a decent program when Ubuntu's notification had actions, and what I have been using up until this point, but that is no longer the case.




gnome-gmail-notifier
This one isn't working for me at all.

gmail-notify
Uses Gnome keyring: don't think so
Notification system: some custom system
Shows number of unread messages in system tray icon: No
Hide icon when no new emails: No

When a new email arrives, a notification appears in the lower left corner with the sender, subject, and message preview.  Ugly, but effective.  There's a link to open your web browser in the right click menu, but it wasn't working for me.  Overall, I don't care for this one.






checkgmail
Uses Gnome keyring: don't think so
Notification system: some custom system
Shows number of unread messages in system tray icon: No
Hide icon when no new emails: No

Notifications show some useful information, but lack things like message previews.  It does let you mark as read, archive, delete or report as spam directly from the popup that appears on hover without opening your browser or email client.  Overall, a decent set of features, but not as nice looking as some of the others.






mail-notification
Uses Gnome keyring: Yes
Notification system: Uses Ubuntu's old notification system, which means it doesn't work properly with newer Ubuntu releases.  There's a workaround for this: here, but hopefully a proper fix will be released soon.
Shows number of unread messages in system tray icon: Yes
Hide icon when no new emails: Yes

With the workaround, you get an Ubuntu style notification with which email inbox it's in, the sender, subject, and message preview.  Plus, you can left click on the status icon to open the message and this behavior is configurable.  You can also launch the mail reader or email in browser from the right click menu.
A few minor gripes:

  • the "Properties" menu item would be better labeled "Preferences"
  • doesn't seem to add itself to startup applications, nor does it have an option in Properties to do so.  You can add it yourself in System >> Preferences >> Startup Applications, but it's just a minor inconvenience.
  • it would be nice to have the option to show the icon even when there's no unread email, although I wouldn't use that option










(Note: the notification screenshot is from the blog I linked to, but I tested it on my system too.  Other screenshots on here are by me, or from the official sites of these programs, and I verified that they are consistent with what the current version looks like.)

After trying all these out, I think mail-notification is by far the best (with the workaround to get notifications working correctly).  It has almost everything I want in an email notifier.  It even works with other email services besides Gmail.  There are a few minor features it lacks that some of the others have, but they're things I don't use anyway (examples: customize the tray icon, check labels in Gmail besides Inbox for new messages).  But don't take my word for it, try them out yourself and see which you like best.

Also of note is gm-notify, available at https://launchpad.net/gm-notify/, but not yet in the repos.  It boasts support of the new indicator-applet.  I don't use indicator-applet and haven't tried this one out yet, but if you do it may be worth a look.

Incorrect information?  Left out your favorite notifier?  Let me know in the comments.

Friday, April 24, 2009

Jaunty is here!

The new version of Ubuntu, Jaunty Jackalope, has arrived. It brings with it a few interesting new features such as:
*Support for the ext4 file system (which is supposed to be faster than ext3)
*the latest version of X.org
*the latest version of Gnome
*a new slick looking notification system
*a Janitor tool to help get rid of stuff you don't need anymore
*faster boot times
*Other stuff I don't know about

All that makes upgrading to Jaunty tempting, but for me it did not come without problems. (Note that I tried out the beta, but these issues should all be relevant to the final release.)
*The proprietary driver for my graphics card does not (and has no plans to) support the new X.org, so I was automatically switched to the open driver. Some people have reported good performance with the open driver (even better than that of the proprietary one), but for me some games ceased to work with the open driver. A big issue for me.
*cGmail (and presumably other packages) was not ready for the new notification system. There is a version of cGmail out there that does support it, but it's not in the repos yet. However, the new notification system does not allow actions on notifications, so I could no longer click "open in browser" if I saw a new email notification that looked interesting. A minor inconvenience.
*My sound buttons stopped working. Note that they did work on the live CD, so this issue was likely caused by doing an upgrade rather than a clean install. Just something to keep in mind when deciding between the two options of how to transistion to Jaunty.
*There's this really annoying system beep whenever I shutdown or restart. You can get rid of it by editing a configuration file, but I'm not sure why it was there in the first place. And the lack of a gui way to get rid of it is annoying. The Sound Preferences check box to not play alerts and sounds did not get rid of it, which makes me think this might be corrected as a bug in the future. So, while it was annoying, it was fixable.
*Ctrl+alt+backspace is disabled by default. The logic is to prevent you accidentally triggering it (and losing all your work). Personally, I think that's a lot of keys to press accidentally at the same time, and I found it's functionality quite useful. However, this can be re-enabled, although once again you have to edit a configuration file.

So, I encourage you to think a little bit before upgrading. Are the new features worth the hassle of the issues you might face? Try out a liveCD to see what problems you encounter. For me, it was only the graphics driver issue that really prompted me to stick with Intrepid for now, but those with other graphics card might not have any problem.

Any other major features or problems I've missed? Feel free to comment.

Friday, March 13, 2009

How to fill out (and save) PDF forms

PDF forms. At first, they look pretty handy. It's a pdf, but it's got boxes you can click on and type in, with the font and text size all taken care of for you. Sometimes, it's just that easy. Many times, though, you'll be greeted with the dreaded "You cannot save a completed copy of this form on your computer. If you would like a clopy for your records, please fill it in and print it." Well, that's not very convenient at all. You can't save it to email it, and if you find a mistake after you have already printed it and closed the program, you have to fill it in all over again. Adobe would like you to shell out $450 for Acrobat Pro to be able to save these forms. Not to fear, Evince (aka "Document Viewer") to the rescue. Maybe. If you're lucky, you can open and fill out the form with Evince, which does not restrict you from saving the file. If you're unlucky, as I have been with these things, Evince won't recognize that the document is a form, so you can't fill it in.

At this point, you might well want to give up on filling out the form, and just use one of those programs that let's you type anywhere you want on the document. I used GIMP for this, but there's a number of alternatives that let you do the same thing, and GIMP would be a bit overkill if you don't already have it installed. Another option is to try and figure out PDFedit. This program looks promising, but the learning curve was too steep for me to try to fill out a form with it.

Here's where a little gem called Cabaret Stage comes to the rescue. It's not a perfect solution, as you can't install it from the repos. Instead, it's a proprietary java software that you can get from the developer's website: http://www.cabaret-solutions.com/en/. The download page isn't entirely in English, but just click the "Ich stimee zu" button to accept the license agreement and start the download. Run the cabaretstage.sh file (right click, properties, permission tab, then check the box next to "allow executing file as program", then double click the file to run it). I put the program in my ~/opt directory, and then added a menu item to launch the program. It gives me a few error messages when it starts up, but I ignore them and it seems to run just fine. Once it's all set up, this program enables you to fill in and save PDF forms, even the ones that Evince didn't recognize and Adobe wouldn't let me save. The PDF's I've saved with Stage open just fine in other PDF readers, and can be opened and edited again with Stage too.

Sunday, January 18, 2009

Why Ubuntu?

First of all, why might you choose Linux over Windows?
  • Speed - It starts up a lot faster than Windows XP does on my machine, without any additional tweaking on my part.
  • Security
  • Low maintenance - No more worrying about defragmenting
  • Free - as in it costs nothing, and you have the freedom to customize/modify it as you wish

Of course, if you'd like to use both systems, it's easy to dual boot.

Choosing which Linux distro to use can be difficult. Each has its own unique advantages and disadvantages, and there's plenty of information on the web to help you compare them. I wanted something that would be reliable and easy to use right out of the box. I chose Ubuntu.

Why Ubuntu in particular?
  • Ease of Use - Depending on what you want to do, you could use Ubuntu without ever using the terminal (command line), which makes Ubuntu accessible to everyone, even people who don't have a lot of computer know-how.
  • Support - Ubuntu has great support. The online Ubuntu community is friendly and helpful, and you can usually find whatever question you have has already been asked (and answered) by someone before.
  • Popularity - Ubuntu is a popular Linux distrubtion, which means a lot of people are not only using it, but also contributing to it.
  • Variety - there's a number of different Ubuntu versions. Of note are Edubuntu (preloaded with software useful in schools), Mythbuntu (comes with MythTV already installed, so you can turn your computer into a media center), Kubuntu (comes with KDE instead of Gnome), and Linux Mint (has a few nifty things preinstalled, such as the ability to play commericial DVD's. It also comes with some tools exclusive to Mint).
  • Hardware Support - it works with all the hardware in my computer.

So readers, why did you choose the operating system(s) you use now?

Friday, January 16, 2009

Connecting to RPI Wireless

There's two ways to connect to the wireless at RPI: VPN or 802.1x. As the school is moving away from using VPN, you may just want to set up the 802.1x. However, if you ever use the external connection option to connect to RPI from offcampus, you'll probably want to set up the VPN anyway.

VPN Method

Install vpnc and network-manager-vpnc.
In terminal:
$sudo apt-get install vpnc network-manager-vpnc
or use Synaptic Package Manager.

Left click on the network icon in your system tray, go to the entry "VPN Connections, and select "Configure VPN". Go to the VPN tab and click "Add". In the dropdown menu that appear, select "Cisco Compatible VPN (vpnc)" and click "Create".





Fill out the connection information as follows. You can put whatever you want for the connection name. Fill in your username and password, or leave these blank for extra security (i.e. if other people have access to your computer and you're worried they'll be able to get your password) in which case you'll be prompted to enter them every time you connect to VPN.

Click "OK" and now you're all set. If you'd like to add an entry for RPI External (needed to access things like Matlab from offcampus), add another entry with the same information, but use "vpn.net.rpi.edu" as the gateway instead of "vpn.wl.rpi.edu".




To connect to the VPN wireless network on campus, you'll need to select "Connect to Hidden Wireless Network" under the network manager system tray icon and tell it to connect to rpi.edu.




Once connected to the wireless network on campus (or connected to the internet if you're doing external), you can connect via vpn by once again going to the "VPN Connections" item via the system tray icon and clicking the VPN you'd like to connect to.




When you first connect, you'll be prompted to "Allow application access to keyring". I selected "Always Allow".


802.1x

Select the rpi_802.1x network from network manager. It should prompt you to configure the connection. Select "LEAP" for the security, and then enter your RCS userid and password.

Update: Upon further use, neither LEAP nor MSCHAPv2 have been working, and previous success may have been due to the network not having any encryption running accidentally. At this point, I don't know of a way to connection to the RPI 802.1x from Ubuntu.

Update Mar 30, 2009: You can now connect to the 802.1x with the following settings: Security - Dynamic WEP, Authentication - PEAP, PEAP Version - Version 0, Inner Authentication - MSCHAPv2


Related Links:
VPNC from RPI Help Desk
http://ubuntulinuxtipstricks.blogspot.com/2007/05/my-school-claims-linux-users-cant-get.html