Persistent Ubuntu 8.10 on Memory Stick
Thursday, 16 April 2009
There's a limit to the size of memory stick you can use if you're going to boot & run Linux using a FAT16 partition of 2048mb (2gb). But using this tutorial you can get around it.
Mind you looking at things Fedora 10 on a Live USB disk looks very do-able, especially with the Live USB Creator, may try that out first.
Will try this out when my 32GB stick arrives and post back with the results.
sqlite3 on ubuntu
Sunday, 08 March 2009
unlike osx this isn't pre-installed
sudo aptitude install sqlite3 libsqlite3-dev
And the gem for ruby
sudo gem install sqlite3-ruby
Ubuntu 9.04 + Ruby + Gmate + DVD etc.
Sunday, 22 February 2009
Quick run-down of some things I had to do to make Ubuntu 9.04 a better dev environ; stable so far, fingers crossed ;-)
Ruby compiled from Source
Fixed my prob here with help from the FiveRuns crew.
MySQL gem on Ubuntu
Setting up the mysql gem on ruby required some tweaking
sudo aptitude install libmysqlclient15-dev
sudo gem install mysql
Gmate
Plus lexruby's got an awesome repository on github that pretty much turns GEDIT into TextMate here.
Simple to install, basically bolts on 20+ colour themes (vibrant ink, darkmate, etc.) and a load of snippets; a lot of work must have went into this one.
Flash Player 64-bit
Grab here and then extract & install via...
mkdir ~/.mozilla/plugins
mv libflashplayer.so ~/.mozilla/plugins
Java
Simple to install
sudo apt-get install sun-java6-jre sun-java6-jdk sun-java6-plugin
.bashrc
And some neat directives in your .bashrc file
nano ~/.bashrc
Add these to the bottom & save
export PS1='\[\033[0;35m\]\h\[\033[0;33m\] \w\[\033[00m\]: '
alias free="free -m"
alias update="sudo aptitude update"
alias install="sudo aptitude install"
alias upgrade="sudo aptitude safe-upgrade"
alias remove="sudo aptitude remove"
alias clean="sudo aptitude clean"
Then refresh your console,
source ~/.bashrc
DVD, QuickTime, WMV and RealPlayer
Obviously no computer is happy without DVD playback and support for QuickTime, WMV and RealPlayer files, which can be fixed with help from the MediBuntu community.
sudo wget http://www.medibuntu.org/sources.list.d/jaunty.list --output-document=/etc/apt/sources.list.d/medibuntu.list
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
sudo apt-get install libdvdcss2 w64codecs
Dust Theme
This is one of the best IMO, very professional here
You'll need the clearlooks addon,
sudo aptitude install gtk2-engines-clearlooks
Looking at the new things with Ubuntu Jaunty 9.04, better boot screen, nicer installer, ext4 and easy encypted /home dirs I think this new release I certainly gonna be something.
I think the only one I'd like now is a more friendly FTP tool, gFTP just isn't Transmit.
Trying out Ubuntu 9.04
Thursday, 19 February 2009

Wanted to get the HP back in play so put Ubuntu 9.04 on it to try it out.
Replaced the drive with an OCZ SSD drive, certainly is quick, boots in 5 seconds.
Anyway what can I tell you;
- There's now a nice windows-esque full screen installer, with the ubuntu ibex wallpaper in the backgroud
- mousepad double-tap is disabled by default, YES!
- You've got the latest software, obviously
- There's new packages like firmware-utils, usbutils, also noticed some nvidia and ati packages installing there in the background.
- The wifi support looks much more competent
- With VLC, the display speed does seem a lot quicker and there's no annoying DVD stutter from the get-go
The kernel is 2.6.28-8 at time of writing, and thru the installer it gives you better options to encrypt your home drive.
Stability on my Alpha 4 version is more or less rock-solid, I wouldn't run a server on it but it should do just fine for my homework laptop. VLC did just crash with some dvd menu's, but then it's never been too happy with those.
Think i'll be sticking with this one, will update as the experience progresses, but so far thumbs up dev-team and all the supporters; definitely an xp killer.
...just updated with aptitude, 413 new packages ;-)
Passenger Makes It Simple
Tuesday, 27 January 2009

Ok, I don't know how long this thing will cope with my big ole blog but so far it's handling things quite quickly.
So as with all, here's what I did to make my rails blog run under Phusion Passenger
sudo gem install passenger
passenger-install-apache2-module
Follow the on-screen instructions then when it gives you the paths for the Apache modules, place those in a file called passenger.load in your /etc/apache2/mods-available directory
For me this was...
nano /etc/apache2/mods-available/passenger.load
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.6
PassengerRuby /usr/local/bin/ruby
Save & close the file, then load in the Passenger module
sudo a2enmod passenger
Now create your new Rails site's Virtual host file
nano /etc/apache2/sites-available/myblog.com
Use this for an example,
# domain: myblog.com
# public: /apps/myblog.com/
<VirtualHost *:80>
# Admin email, Server Name (domain name) and any aliases
ServerAdmin john@myblog.com
ServerName myblog.com
ServerAlias www.myblog.com
# Document Root (where the public files are located)
DocumentRoot /apps/myblog.com/public
<Directory /apps/myblog.com/public>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# Very Important - forces Apache to realise this is a Rails Site
RailsBaseURI /
# Custom log file locations
LogLevel warn
ErrorLog /apps/myblog.com/log/error.log
CustomLog /apps/myblog.com/log/access.log combined
</VirtualHost>
Save the file and enable your site
sudo a2ensite myblog.com
This will enable the site and copy the virtual host file to /etc/apache2/sites-enabled signifying it's live.
Next up restart Apache
sudo /etc/init.d/apache2 reload
In whatever way you see fit,
sudo apache2ctl graceful
sudo /etc/init.d/apache2 restart
Enjoy,
By the way whenever you change the code on the server and want Passenger to do a refresh either restart Apache or touch this file, Passenger should get the idea,
touch /apps/myblog/tmp/restart.txt
This was done on Ubuntu Intrepid, using Apache 2.2, Rails 2.2 and Ruby 1.8.7 (latest stable).
Bug in RubyGems 1.3
Just got an email from Hongli Lai over at the Passenger team, haven't noticed this one but there's a bug with RubyGems 1.3 in which Passenger will fall over unless the Ruby apps environment.rb is owned by someone with a home directory.
This should do it
chown john /apps/myblog/config/environment.rb
More here
Installing Sphinx
Tuesday, 27 January 2009
On Ubuntu Intrepid, this will get you Sphinx for rapid super-fast full-text searching.
sudo apt-get install libmysqlclient15-dev
wget http://www.sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz
tar -xzvf sphinx*.gz
cd sphinx*
./configure
sudo make
sudo make install
sudo gem install ultrasphinx
Tested and works ok
More here
Note about Ubuntu Installs
Had a bit of a problem with installing this on Ubuntu, RAKE just couldn't find the inspector and searchd binaries.
Found a way to fix this by configuring it like....
./configure --prefix=/usr/local/sphinx
Then doing the usual make and make install, but creating a symlink afterwards with
ln -s /usr/bin /usr/local/sphinx/bin
And then added a path to my .bashrc file, probably overkill after the first bit but got it working.
nano ~/.bashrc
Then adding...
PATH="$PATH:/usr/local/bin"
PATH="$PATH:/usr/local/sphinx/bin"
Missing Programs?
Note, if you're logged in as a normal user some system commands like smartctl will return command not found even though you know you installed them.
Just use sudo at the start and they should be found and run.
Linux Package Commands + Wajig
Saturday, 20 December 2008
Aptitude or Apt-Get
Was asked this recently, as far as I know the only core difference is Aptitude has a better way of handling dependencies when you remove a package; cleans up better. In all you should try to switch to Aptitude where possible, if you've installed a package with Aptitude then when you remove it via Aptitude it'll know about any dependencies it has to check for or orphaned packages.
Update and Upgrade
apt-get update
apt-get -u upgrade
aptitude update
aptitude safe-upgrade
Install Package
apt-get install gedit
aptitude install gedit
Remove Package (keep config files)
apt-get remove gedit
aptitude remove gedit
Remove Package Completely
apt-get --purge remove gedit
aptitude purge gedit
Upgrade Package
apt-get install gedit
List Possible Upgrades
apt-get upgrade gedit
Show Package Info
dpkg --info gedit*.deb | less
List All Packages
dpkg -l
Check if Package install plus Info
dpkg -l | grep -i 'gedit'
List files owned by package
dpkg -L gedit
List files inside Package
dpkg --contents gedit*.deb
Find out who owns this Package
dpkg -S /bin/netstat
Check if Package installed and it's Status
dpkg -s gedit| grep Status
Show Dependencies for a Package
apt-cache depends mysql-server
Wajig
Wajig is a Linux tool that combines a lot of the abilities within apt-*, aptitude and dpkg into one command. Written in Python it handles normal users and super-user privileges & can be installed with...
apt-get install wajig
aptitude install wajig
More info here
64-bit Flash Player for Linux
Thursday, 20 November 2008
A long time coming Adobe have finally released a 64-bit version of their Flash Player and it's for Linux.
It's in Alpha but reports suggest it's actually quite stable, so good news all around for us with 64-bit Ibex machines ;-)
You'll need to uninstall you're current Flash Player via either...
sudo aptitude remove flashplugin-nonfree
Or going into your ~/.mozilla/plugins directory and removing the old version.
To install simply download the tar file relevant to your distro, extract the plugin and drop it into your Firefox Plugins directory ~/.mozilla/plugins
Restart Firefox and you should be good to go,
Linux Video Acceleration
Sunday, 16 November 2008

Looks a non-starter but trying to find a way to enable video acceleration in Ubuntu.
You can list the hardware you've got from the prompt via:
lspci -v | less
From that I know my chipset's an Intel GMA 965, Intel one's are better supported so might be possible....
Doing this tells me I have direct writing 3d support enabled,
glxinfo |grep direct
Fusion-Icon may help,
sudo aptitude install fusion-icon
Allows you to switch between different window decorators (compiz & metacity), plus change some of compiz's options.
Sorted
Found a way to improve it, in terminal type
gstreamer-properties
Hit enter, this'll popup a dialog to alter the audio and video properties of your linux distro.
From here click the video tab and change default to X Windows System (No Xv), hit test to be sure, should improve the video.
You can also manage and test your webcam from here ;-)
Ouch my ears!
Tuesday, 04 November 2008
When upgrading to Ubuntu Ibex 8.10 i've begun to notice that on shutdown the pc speaker beeps really loudly. Going into System / Preferences / Sound didn't stop this so i've found another way which is to add it to the modprobe blacklist file (which although in no way perfect does kill it).
sudo gedit /etc/modprobe.d/blacklist
Then add this at the end of the file,
blacklist pcspkr
Save the file, close gedit then for good measure kill it once and for all,
sudo rmmod pcspkr
Harsh but should do the trick
Splash Screen Managers
Monday, 03 November 2008
Wanted to change the default splash screen on Ubuntu, thankfully found a good GUI tool to do this for me,
sudo apt-get install startupmanager
After changing your settings it'll want to rebuild the kernel and play with your menu.lst file (obviously), safest I've found so far but do use sparingly.
Open Terminal Quicker + Improve VLC
Sunday, 02 November 2008
Open Terminal via Keyboard Shortcuts
Open System / Preferences / Keyboard Shortcuts
Now find the one called Run a Terminal
Click on the column opposite saying disabled and hit CTRL+ALT+T, then close the dialog
Now everytime you hit CTRL+ALT+T a terminal window will open.
Improve VLC + Keyboard Shortcuts
CTRL+CURSOR-UP => increase volume
CTRL+CURSOR-DOWN => decrease volume
SPACEBAR => pause movie
Also don't install the XINE packages, GStreamer is much faster for video playback
sudo apt-get remove xine
sudo apt-get autoremove
Also if you've got a slow video card, try changing the de-interlacing mode in VLC to discard via VLC / Video / Deinterlace / Discard.
If that doesn't work, try changing your Appearance settings to Normal via System / Preferences / Appearance, then Visual Effects and select Normal. It's a good balance and you'll still get the cube desktop.
...also found this which suggests using the blend deinterlacing mode to improve DVD playback,
gedit ~/.local/share/applications/vlc-dvd.desktop
Scroll down and find the line reading...
Exec=vlc %U
Replace that with...
Exec=vlc --vout-filter deinterlace --deinterlace-mode blend --volume 512 %f









