Sunday, June 28, 2009

Using ssh to access GUI program on a remote machine

Suppose you have two machines A and B . Let the ip addresses for A and B be a.a.a.a and b.b.b.b respectively. We will try to run gedit on B and get the graphical output on A. I am assuming both machies are ubuntu 9.04 Jaunty. This will work on other flavours of Linux too.

Install openssh server on machine B.
$ sudo apt-get install openssh-server

In Ubuntu ssh server will be started automatically. If not start it

$ sudo /etc/init.d/sshd start

Now you can connect to B from A

$ssh username@b.b.b.b

username will be user of system B.

When you do this for the first time , you may be asked to type yes/no to add the finger print of the remote machine. Now enter the password and you are done.

You can execute normal shell commands on machine B now.


$ssh -X username@b.b.b.b

will also allow you to take GUI control.

Try running gedit on the remote machine. The GUI will come on your local machine.

Friday, June 26, 2009

enter password for default keyring to unlock

Today I was fiddling around my Ubuntu ( jaunty ) desktop . I installed twitux , a twitter client and was happy with it. I switched off the machine and went for lunch. When I came back, twitux started asking this.

"enter password for default keyring to unlock
The application 'Twittux
wants access to the default keyring but it is locked"

I tried out my default login password. But could not start twitux.

I searched on net and finally arrived at a solution.

Here it is.
$ cd ~/.gnome2/keyrings
$ rm deault.keyring
That fixed my problem. The next time I started twitux, it asked me to setup a new password for the key ring.

Setting up static IP in ubuntu 9.04 Jaunty

The network manager shipped with ubuntu 9.04 is not working properly when you try to setup a static ip.
Here is the solution.

$ sudo apt-get remove network-manager-gnome

The edit
/etc/network/interfaces
and set the interfaces manually

Here is my interfaces file.

auto lo
auto eth1
auto eth0

iface lo inet loopback
iface eth1 inet dhcp
iface eth0 inet static

address 192.168.0.1
netmask 255.255.255.0

How to copy a CD ROM in linux in Ubuntu

This how to will help you to make an iso image from your CDROM

1. Insert CD to be copied
2 Open a terminal

3 $ sudo umount /dev/cdrom0
(unmount the cd . Be careful about cdrom0 . It can be some thing else on your system. running mount with out arguments can help you to find out the cdrom device.)

4 $ sudo dd if=/dev/scd0 of=file.iso bs=2048 conv=notrunc

(the /dev/ listing may vary so be sure which is your cd. Also make sure that you have sufficient free space on the hard disk)

4. Once complete use your favourite .iso (k3b, brasaro, etc.) to burn the image back to another disk.