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.

Setting up a trusted ssh connection

This procedure will configure ssh to allow logging into a host without needing a password.

You only have to do this once.

  1. Ensure that ssh is installed on both hosts.
  2. On both hosts, create a directory named .ssh
  3. On both hosts, run
  4. ssh-keygen -t dsa

  5. When it asks for a passphrase, just hit the return.
  6. Go into the .ssh directory of your home machine. Among other things, you will see a file named id_dsa.pub. This is the ssh key you will give to the remote host.
  7. Log into the remote host, go into the .ssh directory and create a text file named
  8. authorized_keys

  9. containing the text from the id_dsa.pub file in the .ssh on your home machine.
  10. Now, leave the remote host and type
  11. ssh remote_hostname

  12. and answer Y to the question of whether this remote host is acceptable.
  13. After that, you should be able to log into the remote host anytime you want, just by typing
  14. ssh remote_hostname

without any further user interaction (i.e. without entering a password). In addition, such connections will automatically forward X-window sessions, so you can run X-windows applications on the remote host and have all of the GUI appear on your home machine. All communication will be encrypted via high-quality encryption algorithms.

” Blessings “

A young man was getting ready to graduate from college. For many months he had admired a beautiful sports car in a dealer’s showroom, and knowing his father could well afford it, he told him that was all he wanted.

As Graduation Day approached, the young man awaited signs that his father had purchased the car.  Finally, on the morning of his graduation, his father called  him into his private study. His father told him how proud he was to have such a fine son, and told him how much he loved him. He handed his son a beautifully wrapped gift box.  Curious, but somewhat disappointed, the young man opened the box and found a lovely, leather-bound Bible, with the young man’s name embossed in gold. Angry, he raised his voice to his father and said “With all your money, you give me a Bible?” and stormed out of the house, leaving the Bible.

Many years passed and the young man was very successful in business. He had a beautiful home and  wonderful family, but realized his father was very old, and thought perhaps he should go  to  him.  He had not seen him since that graduation day.  Before he could make arrangements, he received a telegram telling him his father had passed away, and willed all of his possessions to his son. He needed to come home immediately and take care of things.

When he arrived at his father’s house, sudden sadness and regret filled his heart.  He began to search through his father’s important papers and saw the still new Bible, just as he had left it  years ago.  With tears, he opened the Bible and began to turn the pages.  And as he did, a car key dropped from the back of the Bible.  It had a tag with the dealer’s name, the same dealer who had the sports car he had desired. On the tag was the date of his graduation, and the words PAID IN FULL.

How many times do we miss Spirit’s blessings and answers to our prayers  because they do not arrive exactly as we have expected?

A young man was getting ready to graduate from college. For many months he had admired a beautiful sports car in a dealer’s showroom, and knowing his father could well afford it, he told him that was all he wanted.

As Graduation Day approached, the young man awaited signs that his father had purchased the car.  Finally, on the morning of his graduation, his father called  him into his private study. His father told him how proud he was to have such a fine son, and told him how much he loved him. He handed his son a beautifully wrapped gift box.  Curious, but somewhat disappointed, the young man opened the box and found a lovely, leather-bound Bible, with the young man’s name embossed in gold. Angry, he raised his voice to his father and said “With all your money, you give me a Bible?” and stormed out of the house, leaving the Bible.

Many years passed and the young man was very successful in business. He had a beautiful home and  wonderful family, but realized his father was very old, and thought perhaps he should go  to  him.  He had not seen him since that graduation day.  Before he could make arrangements, he received a telegram telling him his father had passed away, and willed all of his possessions to his son. He needed to come home immediately and take care of things.

When he arrived at his father’s house, sudden sadness and regret filled his heart.  He began to search through his father’s important papers and saw the still new Bible, just as he had left it  years ago.  With tears, he opened the Bible and began to turn the pages.  And as he did, a car key dropped from the back of the Bible.  It had a tag with the dealer’s name, the same dealer who had the sports car he had desired. On the tag was the date of his graduation, and the words PAID IN FULL.

How many times do we miss Spirit’s blessings and answers to our prayers  because they do not arrive exactly as we have expected?