Linux/Ubuntu
Greasemonkey scripts won’t update on Ubuntu
by Craig Mayhew on Feb.07, 2010, under Guides/Fixes, Linux/Ubuntu
The usual reason for not being able to update the scripts is that your permissions are wrong in your Firefox folder. Your Grease Monkey scripts will be in your firefox folder. The default place for this is (please substitute {username} for your actual Ubuntu user name):
cd /home/{username}/.mozilla/firefox/gm_scripts/
You need to make sure you are the owner of this folder. This command will make sure you are. Again please substitute whats inside the {} brackets.
chown -R {username}:{usergroup} /home/{username}/.mozilla/firefox/gm_scripts
If that still fails to fix the problem, then you also need to make sure you have write permissions on your firefox settings folder.
chmod -R 755 /home/{username}/.mozilla/firefox/gm_scripts
Finding Files in Linux
by Craig Mayhew on Dec.08, 2009, under Linux/Ubuntu
Find “text to find” in files within the current directory
grep -lir "text to find" *
Find “example” in filenames within the current directory
find -name '*example*'
Find a file called “example.txt” within the current directory
find -name 'example.txt'
Find all files larger than 1000k within the current directory
find -name '*' -size +1000k
Slow DNS Lookups in Firefox on Ubuntu 9.10 Karmic Koala
by Craig Mayhew on Nov.07, 2009, under Guides/Fixes, Linux/Ubuntu
Unfortunately the IPv6 issue is still at large in Karmic Koala and will effect just about every internet application.
The problem is caused by Ubuntu requesting everything by IPv6 first even if there are no IPv6 Interfaces configured and timing out each time when it doesn’t get a response.
The workaround in firefox is to go to “about:config”, just type it into the address bar and hit enter. Then change the value network.dns.disableIPv6 to TRUE.
The bug can be tracked here:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/417757
Setting Up PPTP VPN in Ubuntu 9.10 Karmic Koala
by Craig Mayhew on Nov.05, 2009, under Guides/Fixes, Linux/Ubuntu
Ubuntu 9.10 doesn’t come with VPN connectivity out of the box. So you need to install 3 packages to get it to work. Symptoms of these packages not being installed are grayed out “Add” buttons and grayed out “Apply” buttons in the VPN connection manager.
Here’s the command to install the 3 packages:
sudo apt-get install network-manager-pptp network-manager-vpnc network-manager-openvpn
I have no idea why Ubuntu doesn’t include these packages by default. Looks like a great many people are having this issue: https://bugs.launchpad.net/ubuntu/+source/network-manager-pptp/+bug/107738
Installing VMware server 2.0.2 on Ubuntu 9.10 Karmic Koala 64bit
by Craig Mayhew on Nov.03, 2009, under Guides/Fixes, Linux/Ubuntu
I recently upgraded to Ubuntu Karmic Koala and fully expected this to break my VMWare server install. Sure enough I got plenty of errors when trying to compile VMWare Server with the latest kernel. Here’s the solution:
Download VMware Server (2.0.1 or 2.0.2) – in gz format. You will also need a license key.
If you have tried to install vmware server already and something went wrong during the install, then do these two steps first:
first, delete the vmware modules
rm -rf /usr/lib/vmware/modules/
if needed (you’ll know if you need to do this one):
rm -rf /lib/modules/2.6.31-13-server/misc/vm*
Install:
Run vmware-install.pl. Somewhere in the installation process you should be asked:
Do you want this program to invoke the command for you now? [yes]
you should answer: no
Then run the patch vmware-server.2.0.1_x64-modules-2.6.30.4-fix.sh.
sudo ./vmware-server.2.0.1_x64-modules-2.6.30.4-fix.sh
After this, run
/usr/bin/vmware-config.pl
If the vmware-config.pl aborts, because it couldn’t shut down all vmware services then kill them manually and then rerun vmware-config.pl:
kill -9 $( grep -i vm | awk '{ print $2 }' )
And hopefully that should work!
Tell Ubuntu to avoid using SWAP partition with swappiness setting
by Craig Mayhew on Oct.14, 2009, under Guides/Fixes, Linux/Ubuntu
By Default Ubuntu will move data in RAM onto the swap file/partition on the hard disk long before it runs out of memory. It will pick data that isn’t accessed often but this can still be an annoying slow down on the system. To prevent the over use of SWAP space and speed things up all we need to do is change one setting… swappiness.
Swappiness can be set from 0 to 100. The default is 60 and the lower it is the more the computer will try to keep everything in RAM.
If you want to temporarily change the swappiness then run this command with desired swappiness level:
sudo sysctl vm.swappiness=10
Alternatively if you want the change to be permanent then edit this file:
sudo gedit /etc/sysctl.conf
Set swappiness to the desired level (in this case 1) by either modifying this line in the file “/etc/sysctl.conf” or if it doesn’t exist, add it at the end.
vm.swappiness=1
Reboot the computer for the change to take effect.
Ubuntu: VMWare Runs Slow on NTFS Partition
by Craig Mayhew on Oct.03, 2009, under Guides/Fixes, Linux/Ubuntu
I found the ntfs-3g process was using 100% cpu. Apparently VMWARE can thrash the hard drive so the workaround is to set “mainMem.useNamedFile=FALSE” in the virtual machines .vmx file and VMware will perform faster.
Ubuntu Error: The application “gnome-panel” attempted to change an aspect of your configuration that your system administrator or operating system vendor does not allow you to change
by Craig Mayhew on Oct.01, 2009, under Linux/Ubuntu
Shortly after logging into Gnome I was getting the following error:
“The application “gnome-panel” attempted to change an aspect of your configuration that your system administrator or operating system vendor does not allow you to change. Some of the settings you have selected may not take effect, or may not be restored next time you use the application.”
Clicking the “details” button brings up the following message: “No database available to save your configuration: unable to store a value at key ‘/apps/panel/toplevels/top_panel_screen0/expand’, as the configuration server has no writable databases.”
I had messed up my permissions in the .gconf directory that stores many of Gnome’s settings. In my case the execute permission was missing from the folder and all files within it so Gnome gave that error.
To fix this run the following commnd on your gconf directory. It will give your user read, write and execute permissions to the gconf folder and all files/folders within it which should solve the problem.
sudo chmod -R u+rwx ~/.gconf
Ubuntu Slow Boot: “ata8: SRST failed (error:-16)”
by Craig Mayhew on Sep.29, 2009, under Guides/Fixes, Linux/Ubuntu
Ubuntu has started being a little slow to boot, as it turns out one of the drives was the cause of this. During the boot up processes ubuntu would hang for a while and then spit out the following: “ata8: SRST failed (error:-16)”. It seems one of my drives wasn’t responding properly during boot up.
To fix this I tried:
- Disabling floppy drive in bios (This didn’t help, but I’m sure it will speed things up slightly as I don’t have a floppy drive)
- Set the “IDE detect time out (sec)” to 0. It was originally 35. (This didn’t help. Be careful when changing this option if you are using IDE drives)
- Unplugged the SATA cable from my DVD drive and plugged it back in again. (PROBLEM SOLVED!)
I imagine either my sata cable is slightly loose or dodgy and reseating it has sorted the problem. If the problem occurs again then I will replace the cable.
“Cannot find or run the base session script. Running Gnome in failsafe session instead.”
by Craig Mayhew on Sep.28, 2009, under Guides/Fixes, Linux/Ubuntu
After logging into my Ubuntu 9.04 machine I’m greeted with the following message “Cannot find or run the base session script. Running Gnome in failsafe session instead”. The reason for this was I had messed up my permissions and the following fixed it:
After logging in and recieving the errors message press Ctrl-Alt-F1 to drop back into command line. Then run the following:
Sudo chmod 755 /etc/gdm/Xsession