Archive

Posts Tagged ‘ubuntu’

PSP Management in Ubuntu

October 20th, 2008 No comments

QPSPManager is a nifty little application for managing your save files, videos, etc on your PSP. Most of the installation instructions can be found at the Ubuntu Community wiki. They are, however, a little out-dated. These instructions should have QPSPManager up and running in no time.

First, visit the QPSPManager site and download the source.

Next,

sudo apt-get update

and

sudo apt-get install build-essential libqt4-dev zlib1g zlib1g-dev qt4-dev-tools

to install the dependencies.

When that is done, open up a terminal and navigate to wherever you downloaded the source tar.gz to, unpack it and navigate into the directory.

cd ~/Desktop
tar -xzf qpspmanager-2.0.2.tar.gz
cd qpspmanager-2.0.2

The last few steps to type are

qmake

and when that is done

make
sudo make install

It has been advised that “make install” probably won’t work. If that is the case then you can move the binary to an appropriate place yourself. I recommend

sudo mkdir /opt/QPSPManager
sudo mv bin/QPSPManager /opt/QPSPManager/QPSPManager
sudo ln -s /opt/QPSPManager/QPSPManager /usr/bin/QPSPManager

Which should allow you to run QPSPManager from the terminal by typing…

QPSPManager

Ubuntu, Firefox 3, and Adobe Flash

September 9th, 2008 No comments

*Instructions not necessarily restricted to Ubuntu.

This article is brought about because a new Ubuntu user was asking in the #ubuntu irc channel on irc.freenode.net about installing Adobe’s Flash player.

The easiest method would be to just run

sudo apt-get install flashplugin-nonfree

or alternatively if you want to install a whole whack of non-free apps

sudo apt-get install ubuntu-restricted-extras

or kubuntu-restricted-extras (depending on your distro).

My experience with the apt-get method has been a bumpy road, to say the least. That tiny flash installer has *always* been an installation that takes hours. I don’t know why, maybe it’s that I’m in Canada. So I install Flash manually. Here’s how.

Visit http://adobe.com/ then find the “Get Flash” button and click it. Here is a link to the English US version.

Now select the “tar.gz” and download. By default it will download to your ~/Desktop.

When the download is complete, open a terminal (like bash ~ the command line). Type

cd ~/Desktop

to navigate within the command line to your desktop. Now untar (unpack, like unzipping) with the command

tar -xzf install_flash_player_9_linux.tar.gz

or you could start with “tar -xzf inst” and then press the Tab key on your keyboard. When inside a bash terminal, this will auto-complete the filename for you.

So now that the tar.gz has been unpacked, navigate into the unpacked directory.

cd install_flash_player_9_linux

Now you are in the directory with the flash installer. To install you will need to run the install script with root privileges. To do this you begin the install script with the word ‘sudo’ like the following

sudo ./flashplayer-installer

which will begin the Flash player installation. Follow the prompts through the warnings (by pressing ENTER) and close any browsers you have open. You should be at the prompt

Please enter the installation path of the Mozilla, Netscape,
or Opera browser (i.e., /usr/lib/mozilla):

By default, in Ubuntu 8.04, the Firefox3 path is /usr/lib/firefox-3* where the * represents the current version of Firefox3. In my case it is “/usr/lib/firefox-3.0.1″ so that is the path I would type when asked.

The installer will ask you to confirm that the browser installation directory is correct, and to confirm just type

y

and you are done. Open up your browser and you should find that Flash is installed for Firefox 3.

Of course you can install to other browsers such as Flock or Opera just by pointing the install path to that of the browser you intend to install Flash to.

VirtualBox Sharing

August 7th, 2008 No comments

In my spare (and not so spare) time lately I’ve been playing around with Sun‘s VirtualBox. I’ve been using it for a long time now, but only recently did I decide I wanted to turn on “shared folders”. The thing is, there is no intuitive way of doing so.

More for myself, than anyone else, this is how I managed to share a folder in my Windows host “x:\shared\” and access it from within my virtual (guest) Ubuntu.

Though it is a bit dated, these instructions pretty much sum it up.

From within the VirtualBox launcher, select the Virtual OS that you want to share with. Click the settings button and select “Shared Folders” from the list. Click the little ‘+’ folder on the right side of the “Shared Folders” screen and create a directory that you want to share. Odds are you’ve already done that, which is why you’re here looking for the next step.

Start the Ubuntu VirtualBox and log in.
Open a terminal and type
sudo apt-get install build-essential module-assistant
followed by
sudo m-a prepare

I don’t understand why, but that’s what the instructions say. Now this is where I ran in to trouble (and maybe you did, too). A Google search will result with instructions telling you to “install Guest Additions” but they don’t tell you how. Here’s how.

You already have the virtual Ubuntu running so press the escape key (right-control by default) and you’ll notice along the top of that window is a “Devices” button.

Press the "Devices" button.

At the bottom of the menu that opens is where you’ll find “Install Guest Additions”.

Press "Install Guest Additions..."

For me, nothing seemed to happen. It appears that in the background VirtualBox downloaded a 10MB .iso to the VirtualBox directory.

Press "Mount CD/DVD-ROM" > "CD/DVD-ROM Image..."
Double-Click "VBoxGuestAdditions.iso"
type
sudo sh /media/cdrom0/VBoxLinuxAdditions.run

Though if that last command doesn’t work then you may have to mount it

sudo mount /dev/cdrom

or do what I did and navigate to the /media/cdrom0/ directory within a filebrowser (I used rox) to have it automatically mount the drive. Then try the command again.

Finally, mount the shared folder to a directory in the virtual OS

sudo mkdir /mnt/host
sudo mount -t vboxsf shared /mnt/host

Notice that you omit “x:\shared\” and reference the shared drive simply as “shared”. Now you can read (and write) files to the host folder through /mnt/host

Wifi at boot

August 7th, 2008 No comments

Some people may have noticed that wifi doesn’t exactly turn itself on until the user has logged in to the desktop. That’s a problem for some users. How is it a problem? It gets in the way of remote administration.

If I’m at work and am remotely logged in to my home PC (via SSH, for example) then there may come a time when I want to reset my PC. If my wireless does not turn itself on when the PC turns on then I end up with a PC turned on at home, not connected to the internet, and no one around to log in for me.

Note: In the following example, your wifi card may not be recognized as “wlan0″. Type “ifconfig” to see what yours may be. Substitute whatever yours is in place of wlan0.

How do you connect to a wireless access point from the command line?

First, you “turn on” your wireless card

sudo ifconfig wlan0 up

Now you should be able to

sudo iwlist wlan0 scan

which will show you all the wifi access points within range. The wifi card needs to know which access point to connect to. This is done by

sudo iwconfig wlan0 essid WhateverAPYouAreConnectingTo

and if it uses a (WEP) key then set the key

sudo iwconfig wlan0 key WhateverTheKeyIs

But you’re not connected yet. You need to establish the PC’s IP address within the network

sudo dhclient

and you’re set. You should see “bound to 192.168.x.x — renewal blah blah blah” as the last line. Test the connection

ping google.com

and you see that packets are being transmitted and received.

So how do you set that automatically? Stick the commands in your /etc/rc3.d/S99rc.local file, at the very bottom.

...blah blah...
esac

# Added on this date to get wifi on bootup
ifconfig wlan0 up
iwconfig wlan0 essid WhateverMyAccessPointIsCalled
iwconfig wlan0 key WhateverMyKeyIs
dhclient

Now every time you restart your computer, your computer will be connected to the network before you even log in.

Take a look at this article for some explanation of what rc.d scripts do.

Winning Numbers

April 22nd, 2008 No comments

The lottery simulation is in a very usable state. I’d just like to make a note before I forget, it was written and implemented in Linux. I use Ubuntu 7.10 (and am very excited at the release of Ubuntu 8.04 in two days). The required programs, should you choose to download and play with the code, are as follows:

  1. Scilab for crunching the data (ie, calculating averages).
  2. Gnuplot for plotting the data and saving them as images (where Scilab falls short).

You may also need to “sudo apt-get install build-essential” if you want to alter and compile the source, particularly if you’re using Ubuntu. For some reason it wasn’t included with the default Ubuntu 7.10 install.

I’m continuing to generate data and eventually (it takes a long time) I’ll have 10000 to 50000 points of data for every combination of n choose k between 2 to 49.

Coming up next…

I’m playing with sorting algorithms. First up, bubble sort. So keep an eye out on the science page.

Switch to our mobile site