21 Sep 2010

Things to do after installing Ubuntu Maverick Meerkat (10.10)

The new release of Ubuntu is not long off so today I decided to try out the beta on my laptop. Seeing as I am going to have to do a similar installation on a number of desktops that I use, I thought that I would write a quick bash script to automate things I want executing once I have installed the new Ubuntu Maverick Meerkat release next month. So here it is:

#!/bin/bash

# To Begin
sudo apt-get -y install ttf-droid ttf-inconsolata
sudo add-apt-repository ppa:chromium-daily/beta
sudo apt-get -y update && sudo apt-get -y upgrade

# Gnome tweaks
gconftool-2 -s -t bool /desktop/gnome/interface/menus_have_icons true
gconftool-2 -s -t bool /desktop/gnome/interface/buttons_have_icons true

# Desktop fonts
gconftool-2 -s -t string /desktop/gnome/interface/document_font_name "Droid Sans 9"
gconftool-2 -s -t string /desktop/gnome/interface/font_name "Droid Sans 9"
gconftool-2 -s -t string /desktop/gnome/interface/monospace_font_name "Droid Sans Mono 9"
gconftool-2 -s -t string /apps/metacity/general/titlebar_font "Droid Sans Bold 9"
gconftool-2 -s -t string /apps/nautilus/preferences/desktop_font "Droid Sans 9"

# Remove the fail
sudo apt-get -y autoremove mono-runtime
sudo apt-get -y autoremove openoffice-*
sudo apt-get -y autoremove gnome-games-common
sudo apt-get -y autoremove evolution-common evolution-data-server evolution-plugins evolution-webcal evolution-indicator
sudo apt-get -y autoremove gwibber-service
sudo apt-get -y autoremove simple-scan
sudo apt-get -y autoremove pitivi

# Install the win
sudo apt-get -y install chromium-browser
sudo apt-get -y install hamster-applet imageshack-uploader shutter xchat gm-notify
sudo apt-get -y install git-core bzr sqlite3
sudo apt-get -y install build-essential python-dev libjpeg62 libjpeg62-dev zlib1g zlib1g-dev

# Plugins for mp3 playback and other media
sudo apt-get -y install gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-ugl
sudo apt-get -y install flashplugin-nonfree

# Python stuff
sudo apt-get -y install python-setuptools
sudo easy_install pip
sudo pip install virtualenv virtualenvwrapper
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc
mkdir $HOME/.virtualenvs

# Cleanup
sudo apt-get autoremove && sudo apt-get clean all && sudo apt-get autoclean all

# Reminders
echo "***********************************************************************"
echo "Go and download Dropbox from https://www.dropbox.com/downloading "
echo "Go and install Wing IDE from http://wingware.com/downloads/wingide/4.0 "
echo "***********************************************************************"

As you can see, I am not in opposition to using a little bit of beta software. Hope you find this useful.

14 Jun 2010

An Alternative to Dropbox using Bazaar

Ubuntu One is great in theory, but I have not been able to get it working in a way that I can rely on. I am constantly experiencing connection issues and finding it randomly crashes, so until that becomes more stable it remains shelved as I need something reliable and don't have the time to keep an eye on it. I recently read about SparkleShare which looks like a very easy to use take on version control (it's built aroung Git). But its not actually officially released yet, so I'll be keeping an eye on that one. I've been using Dropbox in the mean time, which is really great, for a lot of reasons. Problem is that it's not free and the version control side things seems to be very limited and I can't host my own files, I use it and enjoy it's ease of use but I never really wanted to use it. When I saw this post on the sync box (a non-dropbox solution to syncing files across different computers using Mercurial) I was inspired to do something similar and re-usable with Bazaar. The company I work for has a dedicated server with loads of space and bandwidth so I started by initializing a project in my home directory there. I then branched that project on my desktop and added a sync directory inside it with the following scripts: server
#!/bin/bash
bzr update
client
#!/bin/bash
bzr add
bzr remove
bzr commit -m "Update"
bzr push
bzr pull
sync
#!/bin/bash
cd $HOME/notdropbox
sync/client
I also added a README file to remind myself because I could be forgetful. I copied the file named sync to my home directory then pushed the project back to the server. Now the project has a stored push and pull location and should push and pull quietly. I set up a cron job to run the sync script every so often. I then went back to the server and set up a cron job to run the server script at regular intervals to update the project with pushed revisions. After that its just a case of branching the project on other computers I use and setting up a cron job, if I want a cron job. Another advantage to using Bazaar is that if I want to quickly get my files on a colleagues computer there is no configuration or sharing folders, I can simply just branch the project get what I need then discard it, if you know what I mean? So thanks to Paul Bissex at e-scribe.com for inspiring this one.

Rick Vause's Space

Hi, I’m Rick Vause. I am a web developer that loves Python.

I have always been interested in technology and software. I am a keen supporter of a number of open source projects.

I am obsessed with my ideas and attempts to continuously better myself in both my work and leisure time. I am always learning and trying to improve as long as there is space left in my head. I often find interesting, new things (interesting and new to me, at least) that I share on my blog.

I also like music and art.

I once spent 2 months working on a self-portrait that turned out terrible so for the avatar portrait I turned to my better half, Klaudia.

If you have any questions, comments or wish to talk to me about a project you are working on, please contact me.

I also try to be social so you can find me on Twitter, Facebook and Last.fm.

Contributors

Rick Vause