Intrepid Brings Me Back
It’s been a while since I’ve posted. Mainly because I haven’t been making any changes worth documenting since I installed Ubuntu 8.04 Hardy Heron on my MacBook. Unfortunately, my experience with that setup was rather disappointing. After spending lots of time getting everything working and customizing everything, the computer was frustratingly unstable. Often the laptop would suspend and never wake up, and too many times something would become unusable, forcing a reboot. So I basically stopped using the MacBook and turned to my ThinkPad with a reliable Vista installation.
Now I’m back with high hopes for the latest version of Ubuntu, 8.10 Intrepid Ibex. The reports from alpha and beta testers have been encouraging, so I’m going to give it a try on the MacBook. Everything is backed up and ready to go, so I’m starting the install now, and I’ll be back with details.
MotoRokr S9 Bluetooth Headphones
Using the MotoRokr S9 Bluetooth Headphones in Ubuntu 8.04 Hardy Heron
I am able to use my Motorola S9 bluetooth headphones in Hardy after following the same setup steps that I used in Gutsy. I have had them installed for a few days and they are working flawlessly with VLC, Amarok, and Totem. Here’s how I did it:
Install Blueman bluetooth manager from http://blueman.tuxfamily.org/
Get the hardware address of the headphones. With the headphones turned on, they should show up with an address in Blueman, or it should come up via a scan run from the terminal:
$ hcitool scan
Open a text editor and create a file in the home folder with the filename .asoundrc. In the .asoundrc file, paste the lines:
pcm.bluetooth {
type bluetooth
device XX:XX:XX:XX:XX:XX
}
Where XX:XX:XX:XX:XX:XX is the hardware address of the headphones. Open Blueman and click the Inquiry button. Motorola S9 should appear. Click the List Seen button and then highlight Motorola S9 and click the Bond button. If asked for a passkey, enter 0000.
To setup the device for audio, go into the Edit menu and choose Services. Turn on the Audio service and set it to Autostart. Click the Configure button. Add Motorola S9 as the device and connect the Sink option.
After all that, the headphones connect automatically whenever I turn them on in range. However, they still won’t really do anything until I set up my media players to use the bluetooth audio sink.
Amarok
Open Amarok and choose Configure Amarok from the Settings menu. On the Engine tab, set the Engine to xine, set Audio to alsa, and set Stereo to bluetooth. There will be no need to change this setting later, as Amarok will automatically kick back to the normal speakers when bluetooth is not connected.
VLC
For VLC use a text editor to open the configuration file hidden in the home folder, ~/.vlc/vlcrc and enable the alsadev line by deleting the comment symbol # and change the line to:
alsadev=bluetooth
After that VLC will use the device when it is connected and automatically revert to the normal speakers when its not connected.
Totem & Other Gstreamer Apps
A Gstreamer setting will have to be turned on and off through the terminal to switch back and forth between bluetooth and the normal speakers.
Turn it on with:
$ gconftool -t string -s /system/gstreamer/0.10/default/musicaudiosink "alsasink device=bluetooth"
Turn switch back to speakers by running:
$ gconftool -t string -s /system/gstreamer/0.10/default/musicaudiosink "autoaudiosink"
Tip: Create panel launchers for quick click access to these commands.
References
As is typical in working with Linux, I spent a great deal of time reading through a variety of resources to get this complete set of instructions. Thanks to all those posters who shared their ideas and results!
- The settings for Amarok and most other programs can be found at the official Bluez wiki
- I found the VLC configuration way down in the comments of a blog
- I also read through forums here, here, and here
Power Up Firefox
I’ll probably back up my Firefox extensions and profile if I ever have to reinstall, but in case I forget, here’s a snapshot of the add-ons I use:
Update: I also installed the FEBE and CLEO extensions to make backing up these add-ons easy.
Utilities
Other Useful Software in Ubuntu 8.04 Hardy Heron
There arrrrr a few other programs that will assist in the quest for booty while sailing the seas of technology.
Deluge
My new favorite open-source cross-platform BitTorrent client, Deluge, is available in the universe repository so I’ll open Synaptic through Administration in the System menu to find and install it.
Gparted and Gmount-iso
Since I already have Synaptic open, I’ll find and install some handy tools on my list of programs to install: Gparted for viewing and adjusting my hard drive partitions, and Gmount-iso for mounting iso disk images.
K9Copy, GRip, and LAME
While I’m at it, I’ll install some software for backing up DVDs and CDs, K9Copy and GRip. Both are available through Synaptic. These two programs have been able to rip copies of any DVD or CD I’ve ever thrown at them (all legit backups of my legally acquired materials, naturally). To enable MP3 ripping in GRip, I have to find and install LAME, too.
Compiz Settings
One of the coolest features of Ubuntu Hardy Heron is that the built in Compiz desktop effects are working out of the box. But, by default, the effects settings are severely limited to the generic options of None, Normal, and Extra. I find the interface for the real configuration by searching Synaptic for compizconfig-settings-manager. After it is installed, it shows up as Advanced Desktop Effects Settings under Preferences in the System menu.
Privacy
Privacy and Anonymity in Ubuntu 8.04 Hardy Heron
In today’s world with targeted advertising and gps tracking, where cell phone providers help govenments spy on citizens, it’s hard to imagine that privacy is even possible. Well, there’s probably little that can defend against the full force of government surveillance or well armed super spy ninja hackers, but using Linux with open-source protection measures can probably stop less sophisticated attempts to see whats on a computer or eavesdrop on internet traffic.
TrueCrypt
TrueCrypt is an incredible program that can be used to password protect files and drives from prying eyes using on-the-fly encryption. TrueCrypt is free, open-source, and it now runs on Linux, Windows, and OS X, so I’ll probably never need another encryption program to protect my files.
For the hardcore paranoid, this program can be compiled from source code and the installation files can be verified with a PGP signature to ensure there are no hidden back doors in the code and that no one is setting you up with a fake installer file. But for someone like me, who just wants to protect personal data in case my computer is ever stolen or a guest user decides to go snooping through the system, the installation is quick and easy with a .deb installer package from the TrueCrypt website. I’ll also download the PGP signature for verification (might as well, it’s easy enough).
Just download the tar.gz file for Ubuntu and the PGP sig file to the home folder. Then use the terminal to verify your download by importing the TrueCrypt Foundation’s public key (also available here):
$ gpg --keyserver subkeys.pgp.net --recv F0D6B1E0
and perform the verification with:
$ gpg --verify /home/ez/truecrypt-6.0a-ubuntu-x86.tar.gz.sig /home/ez/truecrypt-6.0a-ubuntu-x86.tar.gz
Next extract the contents and run:
$ tar xvfz truecrypt-6.0a-ubuntu-x86.tar.gz
Then run the resulting installation file, and follow the on-screen directions:
$ ./truecrypt-6.0a-setup-ubuntu-x86
After it’s installed, I run the program from a terminal with the obvious command:
$ truecrypt
Online Privacy Via Tor, Privoxy & Torbutton
Tor reroutes a computer’s internet traffic to prevent any observers from determining what the destination is, and it prevents the end destination from determining the location of the source computer. When used in combination with the Privoxy proxy server and the Torbutton Firefox extension, Tor can effectively provide the ability to surf the internet anonymously using Firefox. Although the technology is advanced, it’s easy to install and use all three of these components. Start by running our usual install command at the terminal, then edit the Privoxy settings file:
$ sudo apt-get install tor privoxy
$ sudo gedit /etc/privoxy/config
Delete the # to uncomment the line (note there is a dot at the end, leave it there):
forward-socks4a / 127.0.0.1:9050 .
Then, if not already disabled, you can turn off the logging and debugging files by inserting # to comment out the lines:
#logfile logfile
#jarfile jarfile
#debug 1
Use the terminal to start both programs (Tip: create a panel launcher to run these commands on demand):
$ sudo /etc/init.d/tor start ; sudo /etc/init.d/privoxy start
The Torbutton Firefox extension can quickly change your browser’s proxy settings to enable and disable Tor browsing as needed. To install it, open Firefox, choose Add-ons from the Tools menu, search for Torbutton, click add to firefox, then click restart Firefox. When it comes back up, just click Tor Disabled in the status bar and it will switch to Tor Enabled. JavaScript, Flash, and other Add-ons may compromise your privacy and should be disabled.
To make sure Tor is working, visit:
https://check.torproject.org/
or
https://torcheck.xenobite.eu/
See the following official sites for help or more information:
Multimedia Software
Turning Ubuntu 8.04 Hardy Heron Into a Multimedia Powerhouse
The MacBook is an well equipped to handle high resolution video and all types of audio. A few programs will help take advantage of these capabilities.
VLC and Amarok
Previously, I installed my favorite all-purpose media player VideoLan VLC using the terminal command:
$ sudo apt-get install vlc
I also added the powerful music player and library database Amarok by running:
$ sudo apt-get install amarok
In Amarok, I prefer to use the MySQL database as the backend. Here’s what it takes after MySQL is already installed:
$ sudo gedit /etc/mysql/my.cnf
In the my.cnf file, add the following line to both the [client] and [mysqld] sections:
default-character-set = utf8
Then restart MySQL to load the new configuration, then run it and create the database with appropriate priveleges (enter your own password in place of PASSWORD_CHANGE_ME):
$ sudo /etc/init.d/mysql restart
$ mysql -p -u root
CREATE DATABASE amarok;
USE amarok;
GRANT ALL ON amarok.* TO amarok@localhost IDENTIFIED BY 'PASSWORD_CHANGE_ME';
FLUSH PRIVILEGES;
QUIT;
Now startup Amarok with the settings wizard and follow the prompts to complete the setup:
$ amarok --wizard
Most of the Amarok setup information comes from the official Amarok documentation page.
Other Media Players
I like having a variety of media players available, just in case a video I want to play won’t start in my trusty favorite, VLC. Since I already have VLC installed, I just need to hook up my standby apps Mplayer, gxine, & xine-ui. All of the above are available through Synaptic so I just open it up under Administration in the System menu and search for mplayer, then xine.
Codecs and DVD support
To get the most out of my media players, I’ll return to the terminal to enable support for a variety of multimedia codecs and then dvd support.
$ sudo apt-get install ubuntu-restricted-extras
$ sudo apt-get install totem-xine libxine1-ffmpeg libdvdread3
$ sudo /usr/share/doc/libdvdread3/install-css.sh
I got the codec command from the Ubuntu Guide, and the dvd commands came from one of my favorite sites: LifeHacker.
GQView
Another acquisition I’ll grab through Synaptic is a simple photo browser, GQView. For my uses, the slideshow capabilities and available settings are more appropriate than the photo viewers that come with Ubuntu by default.
Last.fm
To install Last.fm internet radio, I’ll go back to the terminal to setup the repository source:
$ wget -q http://apt.last.fm/last.fm.repo.gpg -O- | sudo apt-key add -
$ sudo gedit /etc/apt/sources.list
add this line at the end of the sources.list file:
deb http://apt.last.fm/ debian stable
then update and install:
$ sudo apt-get update
$ sudo apt-get install lastfm
Apple Remote via LIRC
The Apple Remote is easy to setup by following the directions on the MacBook Pro Page on the Community Wiki. The sample file there works well in Amarok and Totem, but isn’t working with VLC. I mostly use the keyboard shortcuts in VLC and really just wanted to control Amarok, so maybe someday I’ll try to fix VLC, but for now I’m happy enough.
Development Software
Web Programming in Ubuntu 8.04 Hardy Heron
I’ll mostly be working with Python, but that is already installed, so I’ll hook up some other fun tools: Ruby on Rails with the MySQL database and the NetBeans IDE.
Ruby on Rails and MySQL
I found a superbly concise guide to installing Ruby on Rails and MySQL in Ubuntu 8.04 Hardy Heron, so I’ll link to that rather than bother reposting the steps: RubyHead.com. The only thing sorely missing from that guide is a link to the rubygem download.
Phpmyadmin
The Phpmyadmin GUI is a handy tool for managing MySQL databases, and its easy to install with the terminal command:
$ sudo apt-get install phpmyadmin
Then open it in a web browser at:
NetBeans IDE 6.1
NetBeans is an impressive integrated development environment (IDE) that I use for web programming in Ruby on Rails. NetBeans is built on Java, and as such requires the Java Development Kit so I get that by running the terminal command:
$ sudo apt-get install sun-java6-jdk
Then I browse to the NetBeans site and download the installer file to my home folder. The file must be made executable, then I can run it:
$ sudo chmod +x ./netbeans-6.1-ml-linux.sh
$ ./netbeans-6.1-ml-linux.sh
From there I just follow the onscreen instructions.
Make it Do Something
Installing Software in Ubuntu Hardy Heron
A computer wouldn’t be much use without programs to run, so I’m going to install some of my favorite software. To keep things organized, I’ll be installing in groups:
External Display
The MacBook has a mini-dvi port, which I use to connect to external monitors both at work and at home.
At work, I use a mini-DVI to VGA adapter to connect to a 21″ Dell LCD. This works out of the box by automatically “cloning” the display to the resolution of the external monitor. This makes the laptop screen unusable, as only the upper left corner of the desktop shows and the rest runs off the bottom and right of the display, while the entire desktop shows on the external display at the full resolution (1600×1200). This is actually the behavior that I want, because my ThinkPad T61 is hooked up to a 21″ Samsung monitor and I want the Windows and Ubuntu desktops side by side on these 2 monitors (normally the ThinkPad uses both for a dual-screen Vista desktop).
In my home office, there is a different story. I want to use both the laptop screen and my external 19″ widescreen LCD for an extended desktop dual screen experience. Fortunately, this is easily accomplished with my mini-DVI to DVI adapter. I set this up with a little help from Ubuntu-Tutorials.com, where the author is using the same computer and the same size monitor that I have. He has a couple extra steps, though. All I have to do is:
Edit the X configuration file /etc/X11/xorg.conf:
$ sudo gedit /etc/X11/xorg.conf
and find the Section “Screen”:
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection
then insert the SubSection “Display” so it looks like:
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
SubSection "Display"
Virtual 2720 1700
EndSubSection
EndSection
where 2720×1700 is my virtual desktop size (1440×900+1280×800 = 2720×1700). Save the file, exit, log out, and log back in. With the mini-DVI to DVI adapter connected to the laptop and the monitor, I run the command:
$ xrandr --output TMDS-1 --mode 1440x900 --pos 1280x0
The screen will flicker a bit and then, like magic, the desktop will grow to fill both screens. I have created a launcher on my panel that will run the xrandr command so that I don’t have to type it in every time I want to use the extra screen.
More information about the xrandr command can be found at ThinkWiki.org where the author is configuring a different laptop with the same video card.
The only problem with this is that the Compiz desktop effects are automatically disabled and cannot be turned on while the ‘Virtual’ setting is present in xorg.conf. That line must be commented out in order to get the effects back, which of course means that I cannot use the external monitor and the effects at the same time. In Gutsy, I was constantly editing the xorg file and then logging off to switch back and forth, but eventually got tired of that and left the effects off all the time.
UPDATE: I have come up with a way to make switching the Virtual setting off and on a little bit faster. Rather than editing the xorg. conf file every time, I just maintain separate files, one with the Virtual line, and one without the Virtual line. The files are called xorg.conf.v.on and xorg.conf.v.off, respectively. Then I can use a shell script to copy the one I want over the active xorg.conf file as needed (I make a backup of the active file just in case). I still have to log off after running the command, but at least I don’t have to edit the xorg file. I created panel launchers to run the following shell scripts:
Turn on the Virtual setting when I need to hook up my display:
#!/bin/bash
# Backup xorg.conf configuration file
# then overwrite with file containing desired settings
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.latest
cp /etc/X11/xorg.conf.v.on /etc/X11/xorg.conf
Turn off the Virtual setting when the display is disconnected and I want to enable desktop effects:
#!/bin/bash
# Backup xorg.conf configuration file
# then overwrite with file containing desired settings
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.latest
cp /etc/X11/xorg.conf.v.off /etc/X11/xorg.conf
My Own Menu
Unlike the Windows and OS X counterparts, the Ubuntu menus are completely customizable. I like to go in and add some things that are hidden by default and maybe take out a few things that I’ll never use. Like it’s predecessors, Hardy Heron makes this painfully easy. I just right click on the Applications menu and choose edit menus. This brings up all of the menu possibilities in a kind of tree view where I can check or uncheck items as I see fit.
