VNC and DNS Hacks for Ubuntu

I am a hardcore user of VNC. In my work place I need to connect to a lot of remote machines. But two things are really nasty for a comfortable setup in ubuntu (10.04 LTS). Now, my specific problems were,

  • My domain was different from the domains of the VNC machines so for every connection I need to specify the machine name and the domain name.
  • There was no way to save vnc server with authentication tokens manually so that next time I just double click that file and that will do my work.
  • Worst of all was the clipboard handler for VNC. Every time I open a new VNC session, it would switch the clipboard connection from the already opened VNC to new VNCs.

Now I have searched a lot for the first problem and they all said that modify the /etc/resolv.conf and add the line search blah.bb.com

But the problem in this case is every time you reboot your machine you loose your search domain. I found a sustainable solution to this problem. Instead of modifying /etc/resolv.conf we should modify the dhcp client config like this,

$ sudo vi /etc/dhcp3/dhclient.conf

and uncomment (remove the #) the line with your domains

supersede domain-name "blah.bb.com fun.toe.joe.schm"

You can add more than one domain separated by space. Now, reboot your machine and you will have all the domains in your lookup while doing ssh or telnet or VNC or whatever.  This will take care of the domain issues.

Now, for the rest of the problem I would recommend to install Remmnia . This tool is very powerful and save a lot of time as it has several features that makes my life very easy. For example,

  • It can store the VNC targets with their password.
  • It can group your VNCs for different purpose.
  • It allows tabed VNC viewing which let’s the clipboard stick to any VNC even if you started new ones later. (This takes care of the third problem)
  • Remmnia Rocks 🙂 🙂

Hope this article helped you to understand the things in a better sense, and to get rid of some tedious time consuming efforts to do your work.

Advertisements