Posts Tagged "Ubuntu"
Ubuntu change computer name
If you would like to change your computer name in Ubuntu Linux you would need to modify two files:
First you would need to change hostname file:
sudo vi /etc/hostname
This file contains your existing computer name. You can change it to anything you like.
The next step is to modify the hosts file:
sudo vi /etc/hosts
Inside this file look for the entry starting with:
127.0.1.1
You would need to change the name in this line to whatever you change to in the first file name.
If you don’t do the second step your computer name would still be changed but you would get the error message “unable to resolve host” everything you login to your account.
Ubuntu and Open ports
For security reasons you may want to check the open ports on your machine and validate that applications using them. To scan your open ports you can use the following command:
sudo nmap -sV localhost
Namp will scan the machines open ports using the “-sV” parameter will also display the applications using the open ports and their version. Once you execute the command you should get a list similar to what I have here:
PORT STATE SERVICE VERSION 21/tcp open ftp vsftpd 2.2.0 22/tcp open ssh OpenSSH 5.1p1 Debian 6ubuntu2 (protocol 2.0) 80/tcp open http Apache httpd 2.2.12 ((Ubuntu)) 3306/tcp open mysql MySQL 5.1.37-1ubuntu5.1
You should go through the list and if there are any applications which you don’t recognize you can always Google their name and see if you want them to be using the open ports or not.
You could also use netstat to see your open ports. For instance:
sudo netstat -tap
would return similar results.
Read MoreMounting .iso files in Ubuntu Linux
Sometimes you would like to mount an .iso file without burning the file to a CD/DVD. To mount an iso file in Ubuntu you could use an script to mount the iso file and one script to unmount the iso file.
Once you download these scripts you would need to make them executable. In the following scripts username is your home folder. Assuming that you have downloaded these scripts to your home folder you would need to do:
chmod +x /home/username/mount.sh chmod +x /home/username/unmount.sh
Then you would need to move these scripts into nautilus scripts folder:
mv /home/username/mount.sh ~/.gnome2/nautilus-scripts/ mv /home/username/unmount.sh ~/.gnome2/nautilus-scripts/
Once the files are moved to this folder you could right-click on the iso file and mount the iso file.

You could do the same process to unmount the .iso file.
Rhythmbox corrupting iPod nano database Ubuntu 9.10

Yesterday I realized that when I update my songs on my iPod (4th generation 8 GB black iPod Nano) using Rhythmbox on Ubuntu 9.10 (Karmic) it corrupts its database. I could see the songs transfered to the iPod but it was not able to see them. The funny part was that I never had this problem using my PC which is an upgrade of the previous version of Ubuntu to 9.10. After doing some research it turns out that this problem only occurs in the latest version of Ubuntu and only if you are using a black iPod nano! Based on what I read on Gnome’s Bugzilla the bug is caused because Rhythmbox incorrectly sets the model number of the iPod. The
last 3 digits of the serial number for the 8GB black nano is set to “3RO”
instead of “3R0″ (ie the character O instead of the number zero). To solve this problem there are two solutions:
First solution:
Is to change the link libgpod.so.4 to point to a previous version of the lib file which is libgpod.so.4.0.0 instead of libgpod.so.4.1.0
The scond solution:
sudo -s cd /usr/lib # Convert libgpod.so.4.1.0 to hex and swap out "3RO" for "3R0", then convert back to binary. xxd -g8 libgpod.so.4.1.0 | sed s/33524f/335230/ | xxd -r > libgpod.so.4.1.0-fix # Changeover the link to use the new binary rm libgpod.so.4 ln -s libgpod.so.4.1.0-fix libgpod.so.4
After doing this a new libgpod.so.4.1.0-fix file is created. libgpod.so.4 is pointing to the new file. If you get any errors when starting Rhythmbox then you can always switch the link to point to the old lib file.
Read MoreUbuntu Gedit Syntax highlighting

If you have used GEdit to change a .jsp file you have probably realized that it doesn’t do the syntax highlighting by default. There are different ways to add the syntax highlighting to gedit. One way to do this is to add a new entry in /usr/share/gtksourceview-2.0/language-specs this folder holds multiple files which define the rules of the syntax highlighting being used by gedit. So what you need to do is to add a new file containing the highlighting specifications of your language to it. What I would recommend is to copy an already existing file and then modify it the way you want it. You can use the xml nodes in this file to assign the highlighting to specific file extensions i.e. To assign the highlighting to a file extention for instance “.jsp” you can use