Archive for the ‘Linux’ Category
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:
user:pass@proxy.addr:4040
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
add:
Acquire::http::Proxy "http://proxy.addr:4040";
Source : http://naveenubuntu.blogspot.com/2011/09/updating-packages-behind-prxy-in-ubuntu.html
Wireless (BMC4313) Drivers:
There seems to be some issues with the current range of broadcom drivers, there are several options and some barely work and give very poor wireless signal and flaky connections.
Check you wireless card
lspci | grep Broadcom
Output:
03:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)
Installation:
There are two options here:
Option 1
You should also be able to use the drivers in Additional Drivers, the “Broadcom STA proprietary wireless driver”, however before doing this you need to run these commands to install the required headers and tools as it seems this step was missed out:
sudo apt-get install build-essential linux-headers-generic
sudo apt-get build-dep linux
To check to see if you have this directory do this:
ls /lib/modules/`uname -r`/build
Now go to Settings > Additional Drivers and simply click install on the “Broadcom STA proprietary wireless driver”, reboot and you should experience much better wireless signal and connection stability.
Option 2
If this doesn’t work for you un-install those drivers and download the source drivers and build them from source and this works well, these can be found here: http://www.broadcom.com/support/802.11/linux_sta.php.
Graphics (HD 6320) Drivers:
Installation:
These can be found in Settings > Additional Drivers.
Install and reboot.
NOTE: This driver doesn’t account for sound over HDMI, the sound will continue to come out of the speakers. I’m looking in to a fix for this.
Fixing the “AMD Ubsupported hardware” Watermark:
You’ll probably now notice a watermark at the bottom right hand of the screen, reading “AMD Ubsupported hardware”. While the drivers are working away, they seem to think it’s unsupported. You can either remove the propriotry drivers and use the open source version. Or you can run the following script (found here) to remove it:
[gist][/gist]
To run, either right click and save as on the link to “view raw” or copy and paste in to a file and save the file as “fixwatermark.sh”
Make executable:
chmod +x fixwatermark.sh
Run:
sudo ./fixwatermark.sh
(Thanks to Andy pointing out in his comment, this needs to be run as root (I’ve added the sudo above).
Reboot your system and the driver will still be running but the watermark will be removed.
./blender
connect failed: No such file or directory
ndof: spacenavd not found
AL lib: pulseaudio.c:331: PulseAudio returned minreq > tlength/2; expect break up
Floating point exception
Download and install the associated package to your processor from here : https://launchpad.net/ubuntu/oneiric/+package/python-openal
Restart your computer and the issue should now be resolved.
When you first switch from Windows or OSX to Linux, one of the things you’ll probably first notice (especially if you’re using a laptop) is that it can run considerably hotter than the alternatives. There are a few things you can do to remedy this, however. The following software packages help you keep track of and cool down your laptop/netbook, how much will depend per machine but my HP Pavilion dm1 goes from around 60-70degrees without these tools installed to around 50-60degrees and the same goes for my older Acer Travelmate which dropped from 70-80degrees to 60-70degrees. Hopefully this information will help you shave off 10degrees from your laptop, making it cooler, easier to use and hopefully extending its life a little too!
lm-sensors
First thing that you’re going to want to do is be able to see what the temperature readings of the components (that have temperature sensors) inside your computer/laptop. This can be done by installing lm-sensors:
sudo apt-get install lm-sensors
Now you’ll want to run the script which probes all the possible sensors in your laptop:
sudo sensors-detect
You’ll be asked if you want to scan for sensors and what not, follow the on-screen instructions, mostly just pressing enter, if YES is written in capitals this is the default answer and it will scan. After several times it’ll ask you if you want to save the changes, make sure you do and then you’re done.
Now you can see the temperature the sensors are reading by using the following command:
sensors
cpufreq
cpufreq is a utility which scales the frequency of the CPU, either by monitoring the systems status (if it needs more, it’ll get more) or by user controlled settings. This essentially underclocks the CPU while it isn’t in use, reducing power usage and thus heat.
Installation:
sudo apt-get install cpufreq
The best choice would be to set cpufreq to on-demand (default) or to power-saving. Alternatively, if you’re using a laptop or netbook let jupiter take care of it for you:
jupiter
Jupiter is a light weight power and hardware control applet for Linux. It is designed to improve battery life of a portable Linux computer by integrating with the operating system and changing parameters of the computer based on battery or powered connection.
Additionally, Jupiter provides quick access to some of the commonly needed hardware controls like screen output and resolution, WIFI, and bluetooth.
If you use Linux on a portable computer, let Jupiter take the effort out of going mobile.
By using this to intelligently control the CPU frequency when on battery and AC along with the tuning to the kernel and hardware, it can make a huge difference to the temperature expelled by your laptop.
Ubuntu 11:10 installation instructions: here
Graphics Card Drivers
If you have a dedicated graphics card in your laptop, you’ll also be better off installing the proprietary graphics drivers provided by the hardware vendor. While the open source ones do an awesome job of getting the card to work, more often than not they don’t include any control over the frequency scaling and keep the card running at max, along with all those other little features the card has, they’ll probably all always be running.
Nvidia : Link
ATI/AMD : Link
Download the latest from here:
http://kernel.ubuntu.com/~kernel-ppa/mainline/
The folders correspond to kernel versions and should also include the ubuntu version, for example I chose to update 11.10 (oneiric) from “3.0.0-14-generic” to “3.1.4″, this was in a directory called “v3.1.4-oneiric/“.
You’ll need 3 files (replace * with the kernel version you’ve downloaded):
linux-headers-*_all.deb
For 64 bit systems (replace * with the kernel version you’ve downloaded):
linux-headers-*_amd64.deb
linux-image-*_amd64.deb
For 32 bit systems (replace * with the kernel version you’ve downloaded):
linux-headers-*_i386.deb
linux-image-*_i386.deb
Once you have the files, install them in the following order using these commands (of course, replacing the version number for the ones you’ve downloaded):
sudo dpkg -U linux-headers-3.1.4-030104_3.1.4-030104.201111281851_all.deb
sudo dpkg -U linux-headers-3.1.4-030104-generic_3.1.4-030104.201111281851_amd64.deb
sudo dpkg -U linux-image-3.1.4-030104-generic_3.1.4-030104.201111281851_amd64.deb
Once that’s done, reboot. Once you’re back use the following command to check that the kernel you’re using is the one you’ve just downloaded and installed!
uname -r
If internet memes such as the following are displaying as squares rather than the faces they should be, it’s because Ubuntu/Linux Mint doesn’t come with the correct font packages.
ಠ_ಠ
To install these packages, simply install “unifont”:
sudo apt-get install unifont
If you’re having trouble in other distros, just search for the unifont package and install in that (might be named slightly differently.)
It’s been a while since I bothered, the reason being it’s always seemed like an un-worthwhile struggle to get it working but either things changed or I was doing something to overcomplicate the process but it’s actually pretty simple to get surround sound up and running on your Linux machine. Now, I’m not going to go in to how to install the drivers for your specific sound card, because there are so many and I don’t have them all and most times on most popular distributions (Debian, Ubuntu, Mint, Fedora, OpenSuse etc) you’re going to notice that the sound card is actually already supported. What I will be doing is showing you how easy it was to get my 5.1′s set up (and the same will be said for 7.1′s).
Step 1:
First off you’re going to want to edit the pulseaudio configuration file to add the number of speakers you’re using, it’s default is set to 2.
sudo gedit /etc/pulse/daemon.conf
Near the bottom of the file, there will be a line which looks like this:
;default-sample-channels = 2
The semi-colon is a comment, so this line isn’t actually doing anything unless you remove that. I would suggest leaving that line alone and adding a new line at the bottom:
default-sample-channels = 6
If you’re using 5.1′s the number of channels will be 6, 7.1′s will be 8 and I think you get where I’m going with this? So in this example, I’m using 5.1′s.
Now save and close that file. You’ll need to reboot your system now too, so that these changes will take effect.
Step 2:
So you’re back? Good..
Now you’re going to want to open up the Sound Preferences, usually you can do this by clicking on the little sound icon in your panel, or System > Preference > Sounds from the menu.

From here, you’ll want to click on the Hardware tab. Near the bottom it’ll say Profile: with a drop down box next to it. Here you can select the type of set up you have, as you can see in the screenshot I have an “Analogue Surround 5.1 Output”, yours might be different and that’s cool and if you don’t know feel free to try a few out. Next to that drop down box is a button which says “Test Speakers”, this didn’t work for me so I have to use an online test but give it a try as it might work!

That’s it, you should be done!
During installing the OpenNi kinect drivers, found here: https://github.com/OpenNI/OpenNI, I came across this error:
make[1]: Entering directory `/home/alex/kinect/OpenNI/Platform/Linux-x86/Build/Samples/SimpleViewer.net’
gmcs -out:../../../Bin/Release/SimpleViewer.net.exe -target:winexe -unsafe -o+ -r:OpenNI.net.dll -r:System.Windows.Forms.dll -r:System.Drawing.dll -lib:../../../Bin/Release ../../../../../Samples/SimpleViewer.net/*.cs ../../Res/AssemblyInfo-OpenNI.cs
error CS0006: cannot find metadata file `System.Windows.Forms.dll’
Compilation failed: 1 error(s), 0 warnings
make[1]: *** [../../../Bin/Release/SimpleViewer.net.exe] Error 1
make[1]: Leaving directory `/home/alex/kinect/OpenNI/Platform/Linux-x86/Build/Samples/SimpleViewer.net’
make: *** [Samples/SimpleViewer.net] Error 2
To fix it, simply install the following package:
sudo apt-get install mono-complete
Once finished, re-make and make install and everything should be dandy!
If you’re getting a similar error to this while trying to compile java files (.jar) then you’re probably missing the jdk, in ubuntu it’s called “sun-java6-jdk” so just go ahead and install that and all should be good!
make[1]: Entering directory `/home/alex/kinect/OpenNI/Platform/Linux-x86/Build/Wrappers/OpenNI.java’
javac -d Release ../../../../../Wrappers/OpenNI.java/src/org/OpenNI/*.java
/bin/sh: javac: not found
make[1]: *** [../../../Bin/Release/org.OpenNI.jar] Error 127
make[1]: Leaving directory `/home/alex/kinect/OpenNI/Platform/Linux-x86/Build/Wrappers/OpenNI.java’
make: *** [Wrappers/OpenNI.java] Error 2
FIX:
sudo apt-get install sun-java6-jdk
After installing Ubuntu on a USB stick with the Ubuntu USB Startup Disk Creator (usb-creator-gtk) you might encounter an error such as the following:
stdin: I/O error
stdin: error 0
/init: line 1: can't open /dev/sr0: No medium found
This is actually a bug with the software and isn’t anything you’ve done wrong. It seems to be a bug that’s effecting users running Karmic, Lucid, Maverick and Natty so it’s a pretty wide spread issue.
The best way I have found to get around this issue is to install and run unetbootin to create live USBs. If you’re using linux it should be found in the usual place you can install things.
Installation:
Ubuntu/LinuxMint/Debian:
sudo apt-get install unetbootin
Fedora/OpenSuse:
sudo yum install unetbootin
Create a live USB:
To install a distro it’s pretty simple, either select it from the “Distribution” option and pick a distribution and version, UNetbootin will then actually download it and install it for you. Alternatively you can pick an Diskimage and browse for the ISO file you download (and would usually burn to a CD/DVD) and install from that. Select the USB Drive at the bottom and hit ok and it’ll install a bootloader, the system and you’ll be up and running in no time.

Persistence File:
If you wanted a persistence install which allows you to save files, settings and installed programs you’ll have to do a little manual work as it currently doesn’t support that option.
Go to http://unetbootin.sourceforge.net/diskimg/ and download one of the files (128mb.zip, 256mb.zip, or 512mb.zip) corresponding to the amount of persistent space you want (make sure the size of the persistent disk image is smaller than the free space you have on your USB drive).
You’ll then need to edit the syslinux.cfg file that was created by UNetbootin in the root of the directory (just open it with a text editor) you should see something similar to the following:
label unetbootindefault
menu label Default
kernel /ubnkern
append initrd=/ubninit file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash –
So on the line that starts “appen initrd=” you’ll want to add the option of “persistent”, it should then look like the following:
NOTE: Wordpress changes my double dash at the end of the last line to a single long dash, this won’t work. It’s easiest just to add the final word before the double dash in the file, do not copy and paste this in to your file. If you do, you will get more errors.
label unetbootindefault
menu label Default
kernel /ubnkern
append initrd=/ubninit file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash persistent –
I added this line to all that used the “file=/cdrom/preseed/ubuntu.seed” option, since that’s the image that’s being opened and it should then change all options on the bootloader that will load the ubuntu install.
|
About Hi, my name is Alex. I just got through studying Robotics at UWE and I am continuing to do a MSc by Research also in Robotics.
I enjoy a whole heap of things but on this website I mostly post linux, programming, machine vision and other similar topics.
You're free to redistribute anything you find on here, unless it states otherwise, as long as you are not selling it for profit and you link back to my site. Cheers.
Disclaimer Just to cover my ass.
Any information on this site is for informational purposes only, I take no responsibility for the accuracy, reliability, bla, bla or bla to it. Any information you use, you are using at your own risk. I am in no way liable for any loss, damage of data, hardware or anything else in connection with the use of this website.
|