Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Saturday, 8 September 2012

Broadcom wireless on Ubuntu 12.04

I just upgraded to Ubuntu 12.04 and my broadcom wireless card was not being picked up. It took me some time to figure out how to do this, and the forums give a lot of tips which didn't work for me, so I thought I'd give it a quick mention.




Then disconnect your wired connection and reboot. I found it is crucial that you disconnect any wired connections.

 Upon reboot, go to System Settings - Hardware - Additional Drivers

 It should then pick up the broadcom proprietary driver. Install it, then reboot, and you should be back up and running!

Wednesday, 15 February 2012

SmartGit on Ubuntu 10.04

SmartGit is a graphical user interface for managing and creating git repositories for software version control

First, uninstall any git you already have (or thought you had)
 sudo apt-get remove git  
Then, get the latest git
 sudo aptitude build-dep git-core  
 wget http://git-core.googlecode.com/files/git-1.7.9.1.tar.gz  
 tar xvzf git-1.7.9.1.tar.gz  
 cd git-1.7.9.1  
 ./configure  
 make  
 sudo make install  
 cd ..  
 rm -r git-1.7.9.1 git-1.7.9.1.tar.gz  
Next, you need Java Runtime Environment 7 which you can download from here

and then follow the installation instructions here

Download SmartGit from here, then
 tar xvzf smartgit-generic-2_1_7.tar.gz  
 cd smartgit-2_1_7  
 cd bin  
Then edit the smartgit shell script
 gedit smartgit.sh  
updating SMARTGIT_JAVA_HOME to where JRE is installed (e.g. /usr/lib/jvm/jrel1.7.0_03). Now you're ready to run
 ./smartgit.sh  
As part of the installation you will be prompted for the location of git, which you can find out by issuing in another terminal:
 whereis git  

Sunday, 12 June 2011

Restoring Nvidia graphics on Ubuntu

If you're an idiot like me and do this:

sudo apt-get --purge remove nvidia-*

You'll soon realise your display looks a little crappy, because you've turned off your graphics card drivers. Not to worry! You restore like this:

sudp apt-get install nvidia-*

then go into /etc/modprobe.d/blacklist.conf and remove any 'blacklists' to nvidia drivers, then restart the x-server using

sudo /etc/init.d/gdm restart

Normal service resumed, and you are free to make a new balls-up!

Sunday, 20 March 2011

Using cron to backup Thunderbird emails

My bash script (which I've saved as backup_emails.sh in my home folder and made executable) looks a little like this:

 set -x   
x=`date +%y%m%d.%H%M`
tar zcf thunderb-mail-${x}.tgz ~/.mozilla-thunderbird
mv thunderb-mail-${x}.tgz /media/MY_HARDDRIVE/email_backups/


Then invoke in cron using:

 crontab -e   


add something like:

 30 4 * * * ~/./backup_emails.sh  


which does the backup at 04.30 every day

Make Google Earth Faster on Ubuntu

In terminal type:

 export LIBGL_ALWAYS_INDIRECT=true  

Saturday, 5 June 2010

Unlock the power of ImageMagick to HDRI

My primary motivation to do this has been to use ImageMagick for Fast Fourier Transforms, which have a myriad of applicability in image processing and filtering

First, you have to install perlmagick. Using apt,
 sudo apt-get install perlmagick  


Then the perl libraries
 sudo apt-get install libperl-dev  


Install the rather magnificent fftw libraries
 sudo apt-get install libfftw3-dev fftw-dev  


wget the source code, untar, move it, cd home
 wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz   
tar xvfz ImageMagick.tar.gz
mv ImageMagick-6.6.0-8 $HOME
cd $HOME/ImageMagick-6.6.0-8


Install (see here for instructions)
 make distclean   
./configure --enable-hdri LDFLAGS='-L/usr/local/lib -R/usr/local/lib'


see also here for a bug fix, and also see here for instructions

make & sudo make install
make check


To see whether the fft commands are working properly, you could issue the following:
 if [ -s lena.png] #check to see if the file exists  
then
# do fft and ifft roundtrip
convert lena.png -fft -ift lena_mp_roundtrip.png
else
#first download
wget http://optipng.sourceforge.net/pngtech/img/lena.png
#then convert
convert lena.png -fft -ift lena_mp_roundtrip.png
fi


see here for further information on fft transforms with, and watch your world spin faster

Monday, 8 June 2009

Quick tips for Ubuntu 9.04

One of the beauties of starting your OS afresh is, well, you get a new and better OS. Ubuntu 9.4 (or 'jaunty jackalope') is a slick version of my previous Ubuntu 8.04 ('hardy heron'). So far, I've ascertained that it looks better, it has better support for hardware, and it boots really fast.

One of the pains of starting your OS afresh is having to reinstall all your software and set your preferences. I thought I'd put a little 'as I do it' guide which may take some of the pain away. This list has a few of the 'biggies' and maybe a couple of items more suited to my personal taste, but what the hey!

1. configure the firewall
sudo apt-get install gufw

2. install wine (windows emulator, for those windows programs you cant live without - an ever decreasing number horray!)
sudo apt-get install wine

3. This one is crucial if you want to run java - it takes ages, and at the end when it installs java, you need to be able to use the tab and 'pg dwn' keys to get to the end of the license agreement
sudo apt-get install ubuntu-restricted-extras

4. VLC is still the best media player around
sudo apt-get install vlc

5. skype -
sudo wget http://www.medibuntu.org/sources.list.d/jaunty.list -O /etc/apt/sources.list.d/medibuntu.list

wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update

sudo aptitude install skype

6. Google Earth (version 5) - install the binary from here. Right click - Properties - Permissions - make executable. Then double click, and it will install - easy! It will create a desktop icon which, by default, you cannot see because you do not have permission. In the terminal type (here, replace 'daniel' with your username):

cd ./Desktop
sudo chown daniel:daniel Google-googlearth.desktop

7. Expand the capabilities of nautilus file browser

sudo apt-get install nautilus-actions nautilus-gksu nautilus-image-converter nautilus-open-terminal nautilus-script-audio-convert nautilus-script-collection-svn nautilus-script-manager nautilus-sendto nautilus-share nautilus-wallpaper

8. Adobe AIR

wget http://airdownload.adobe.com/air/lin/download/latest/AdobeAIRInstaller.bin
chmod +x ./AdobeAIRInstaller.bin
./AdobeAIRInstaller.bin

9. Adobe acrobat reader

sudo gedit /etc/apt/sources.list

Add the below line in sources.list

deb http://archive.canonical.com/ubuntu jaunty partner

sudo apt-get update
sudo apt-get install acroread

G'night!

Sunday, 7 June 2009

Never do this

 sudo mv filename.file /bin/sh  


Just don't mess with your bin/sh, and secondly don't attempt to restart your computer after you mess with your /bin/sh (which is the symbolic link to /bin/dash - low level crazy stuff which ordinarily you shouldnt ever know or care about, but which ensures your computer can do some vital things, like initialise).

This I discovered to my cost, and now I'm having to spend my weekend recovering all my files

This is a worrying and heartbreaking exercise, as I'm sure you'll understand - my computer is my livelihood and most of my hobbies, and I havent backed stuff up for ages, and recently I've been doing some cool stuff which exists only on the computer which now needs a complete OS overhaul!!

I'm writing this for instruction and warning rather than pity, you understand. You can't reboot, not even in any safe mode. I did a bit of internet forum research, and there was little guidance (mostly, instructions for windows users to use Ubuntu to recover their files, but not Ubuntu users to recover their files)

It turns out it's thankfully simple.

1. download an Ubuntu distro iso, and burn it to CD (instructions here and here)
2. place in optical drive of bummed out computer, and use BIOS to instruct it to boot from disk
3. select option to 'try Ubuntu without installing it on your computer' (or whatever the exact wording is - should be the first option in most versions)
4. then wait for it to boot - the OS running from the CD can recognise your hard-drive, but won't let you automatically access it. Open a terminal and type the following (assuming you want to access drive sda1 - you may want sdb1 or something):

 sudo mkdir /media/ubuntu  
sudo mount -t ext3 /dev/sda1 /media/ubuntu


for ease of copying and later access, change the permissions to all directories so anyone can have read/write privileges:

 sudo su  
chmod 777 -R /media/ubuntu


this will take a while if you have a lot of files and directories, but when it's done you're ready to plug in a large external hard drive, and save your precious files away - exactly what I'm doing now! The next step will be to reinstall ubuntu (I'm going to go for the latest - 9.04) and spend weeks reinstalling all my software and getting it to my specification - weeks I really don't have!