Skip to main content


Showing posts from December, 2008

playing with VI editor

This might be helpful to you: How to remove ^M characters (they are end of line DOS's characters) from a file in vi: type this :%s/^V^M//g where ^V is control-v and ^M is control-m. :%s is the basic search and replace command in vi and the command you typed will look like this :%s/^M//g. It will replace what is between the first and second / with what is between the 2nd and 3rd /. Between the first and second slash, we have ^M and between the second and third we have an empty string since we are replacing with an empty string. g: means to replace all occurences.

ssh server

Sometimes, I do a clean install of ubuntu and I forget to reinstall ssh server... I get this error when trying to ssh to the box that doesn't have ssh : ssh: connect to host port 22: Connection refused Need to install ssh server and client: sudo apt-get install openssh-server openssh-client

Add application icons and executables to gnome

This is partly taken from : 1. create an executable sudo touch /usr/bin/eclipse sudo chmod 755 /usr/bin/eclipse sudoedit /usr/bin/eclipse #!/bin/sh #export MOZILLA_FIVE_HOME="/usr/lib/mozilla/" export ECLIPSE_HOME="/opt/eclipse" $ECLIPSE_HOME/eclipse $* 2. create a desktop icon sudoedit /usr/share/applications/eclipse.desktop [Desktop Entry] Encoding=UTF-8 Name=Eclipse Comment=Eclipse IDE Exec=eclipse Icon=/opt/eclipse/icon.xpm Terminal=false Type=Application Categories=GNOME;Application;Development; StartupNotify=true