Command Line Linux Ubuntu

Ubuntu 11.10 Proxy Settings

Temporary proxy:

Where proxy.addr is the proxy address, 4040 is the port number. Some proxies may require “http://” before the address.

export http_proxy="proxy.addr:4040"
export ftp_proxy="proxy.addr:4040"
export https_proxy="proxy.addr:4040"

If you run this in a terminal, any programs opened from that terminal will adhere to the proxy you set but any other applications will not. This makes it useful if you just want to launch a browser for a quick browsing session but don’t need the whole system to access the internet.

If you do need your entire system to access the network, you can add these to the bottom of “~/.bashrc” this will enable any new programs running and the whole system (after a restart) to use the settings. Essentially ~/.bashrc are commands run when a terminal is opened.

NOTE: If you do this, when you remove them your machine will likely need a restart to undo the changes.

Proxy with login

If your proxy server requires a login, this is an addition of the above however the syntax is as follows:


APT Proxy:

APT (used for system updates) has its own proxy settings, which seem to ignore the above settings.

Where nano is the editor, if you prefer use a graphical one such as gedit, kedit etc.

sudo nano /etc/apt/apt.conf.d/02proxy


Acquire::http::Proxy "http://proxy.addr:4040";

Source :

Blog Posts Robotics

Inverted Pendulum

As part of my Robotics university course we used an Inverted Pendulum rig to learn some control applications/algorithms. For extra marks we had the challenge to swing the pendulum from hanging down to an upright balancing position. Below is my first attempt which still needs a little tweaking to the values to reduce swings needed, increase reliability and reduce travel distance of the balancing algorithm but the general idea is there and it manages to get the pendulum up and balancing in a reasonable amount of time.

Due to the project being part of the course I’m unable to release more information about it.

Final Year Project Posts

FYP | mbed + C328 First Image

After spending some time to write mbed drivers for the C328 camera for mbed and then taking a break, it looks like someone swooped in and did a cracking job – The test program takes uncompressed snapshot (80x60px), uncompressed preview (80x60px), JPEG snapshot and JPEG preview images and stores them on the mbed filesystem which allows you to grab them via USB.

A huge issue it looks like I’m going to face is that it takes on average about 6.9 seconds (or a incredible 0.145fps) to take a 80x60px uncompressed image and around 11.6 seconds (0.08621fps) for a 640x480px JPEG image, which I think may be more down to the camera than the mbed or software. If that is the case, there may be a pretty high chance I’m going to have to switch my camera.

I’ll have to explore the code a little more tomorrow to see how this work (in the hours when it’s not so late/early) but this should be perfect since it should give me more time for vision processing..

jpeg preview
mbed + C328 - JPEG Preview (640x480px)