Apr 18, 2008
I would expect that the Ctrl+Backspace key combination would behave in Firefox as it does in other GTK applications, and indeed Firefox under Win32. The expected behavior is that Ctrl+Backspace will delete one word backwards from the cursor (more specifically it will delete backwards until a punctuation character). However, when I use this combination in the Firefox address bar under Gutsy, the whole URL is deleted. After some digging I came up with a solution: add the following to the bottom of /etc/firefox/pref/firefox.js:
// Make Ctrl+Backspace behave as expected.
pref("layout.word_select.stop_at_punctuation", true);
Hope this helps.
Feb 12, 2008
If you don’t want the trouble of configuring NFS or Samba, then sshfs is a good option. sshfs (ssh File System) makes use of Fuse (File System in Userspace) to allow you to locally mount a directory that you have remote access to using ssh. To install sshfs in Ubuntu use:
sudo apt-get install sshfs
Once this is done, you will need to add yourself to the new group (fuse) that has been created:
sudo adduser <user> fuse
Create a local directory in which to mount your remote directory and make sure it is owned by you:
mkdir [-p] /path/to/directory
chown <user>.<group> /path/to/directory
Now you can mount your remote directory as follows:
sshfs <user>@<remote_host>:/path/to/directory/ /path/to/directory
Jan 18, 2008
Another aide memoire, but again may be useful to some. I’d like the ability to work from home on some web development projects I’m doing at work. Getting the code locally is not a problem thanks to Subversion over ssh However viewing the results can be tricky when you consider that the development server is behind the work network. The answer is SSH tunneling.
Let’s say you can access SERVER_A directly over ssh The service you want to access is on SERVER_B which you can’t access directly via SSH from your local machine. However, you can access SERVER_B from SERVER_A. I’ll assume that you want to access the service locally on port 12345, and that the remove port is port 80. The following command will allow you to access a service on SERVER_B from your local machine.
ssh -Nf -L 12345:SERVER_B:80 username@SERVER_A
The ‘-Nf’ switch says don’t execute a command with this ssh session, and run this ssh process in the background. The first port is the port you want to use locally; the first server is the usually inaccessible remote server you want access to; and the third port is the remote port you want to use. The final argument gives the login to the remotely accessible server you have ssh access to directly.
One caveat to this is if you are trying to access a web site that is defined using Apache virtual hosts. With this command alone, requesting localhost:12345 in Firefox would only direct you to the site that is listening remotely for requests that match ‘localhost’. If you would ordinarily access this site using mysite.server_b, then you need to use that as the address in Firefox on your local machine. Therefore, this needs to be added in /etc/hosts. With that done, you should be able to request mysite.server_b:12345 in Firefox and be directed to the remote “virtual host” site.
Jan 12, 2008
This post is really an aide-memoire for me should I need to rebuild my laptop in the future, but it may prove useful to others. My Toshiba U300 laptop seems to have problems with Realtek HD Audio. After some searching and trial-and-error, I found that the following gets things working.
sudo apt-get install linux-backports-modules-generic
Dec 30, 2007
As I continue my journey toward migrating to Linux for full time desktop use there are a few applications that I miss, and I can’t always find suitable open source alternatives. One of those applications is iTunes. From reading forum posts and other articles on the web the consensus tends toward either Rhythmbox or Banshee. [Read more]
Dec 7, 2007
There seem to be a number of bugs related to video playback while compiz desktop effects are enabled, specifically on systems using the Intel 965GM chipset. If desktop effects are enabled, any attempts to play video files result in the player closing.
This problem can be resolved by setting the output module for your player of choice to X11. In VLC, goto Settings->Preferences->Video->Output Modules. Check the “Advanced Options” box. Select “X11 video output” from the drop down box and save the changes.
Dec 7, 2007
I recently tried to get compiz working on my laptop; a Toshiba u300 running Ubuntu 7.10 “Gutsy Gibbon”. The Toshiba U300 uses the Intel 965GM chipset which doesn’t seem to be compatible with compiz. After some digging I discovered a repository that contains a modified xorg-xserver-video-intel package. This combined with the 915resolution package allowed me ues the native 1280 * 800 resolution, and enable compiz desktop effects.
# as root / sudo
echo "deb http://ppa.launchpad.net/kyle/ubuntu gutsy main" >> /etc/apt/sources.list"
apt-get update
apt-get upgrade
apt-get install xserver-xorg-video-intel
dpkg-reconfigure xserver-xorg
One reboot later and all was well.
Nov 20, 2007
A simple shell script that can be used to run a diff between local and remote files using scp.
# A simple script that runs diff remotely using scp.
# Parameters should use scp syntax, i.e.
# [[user@][host:]]/path/to/file
#
#!/bin/sh
if [ "$1" = "" -o "$2" = "" ]; then
echo "Usage: `basename $0` file1 file2"
exit 1
fi
scp $1 rdiff.1 >& /dev/null
scp $2 rdiff.2 >& /dev/null
diff -b rdiff.1 rdiff.2
rm -f rdiff.1 rdiff.2
Sep 23, 2007
As some of you might be aware, I have rencetly been having some problems with my web/development server. It’s a Fedora 7 machine with a LAMP install, Java 5 and a few other odds and ends, and although I appreciate that Fedora tends to be an experiment vehicle on which Redhat tests new bits-and-bobs I was a little put off when I discovered problems with my network after updating the kernel to 2.6.22.4.
Essentially, everything seemed to be working okay, but for some reason I couldn’t ping any other computer on the network from the web server; nor could I ping the web server from any other machine on the network. The eth0 interface was up; I could ping localhost, and the static IP address I’d assigned the NIC; the Ethernet cable was good (I tried two cables, both of which I was certain were good). However, the LED on the hub was constantly on for the web server connection, and ‘ethtool etho’ indicated that there was no link.
After several days of trying to fix the problem, I tried building an older kernel to use. It was the first time I had tried this, and it all went well – however, this did not fix the problem. It would seem that my initial assessment that the kernel update was causing the problems was incorrect.
Then I came up with the solution. Prior to the problems, I had been using the onboard NIC, a SiS900 based interface. I disabled the onboard, and put in a PCI SiS900 based NIC. This solved the problem and all was well. I still can’t think what the problem was – and don’t have the expertise to go through the logs and reverse the updates. For some reason – beyond my ken – updating the system interfered with the onboard NIC, but a PCI NIC with the same chipset worked fine. It wasn’t the kernel because I reverted that to the version prior to the update.
All’s well that ends well as they say… I now have my web server up and running. Well, almost. I used to do a lot of coding and administration using FreeNX over SSH to get a desktop. FreeNX has now stopped working! I’ve won the battle, but still the war goes on!