Tuesday, January 22, 2013

vncserver with copy and paste: vncconfig

Super happy day.  My VNC woes are hopefully over.  I've been using Exceed onDemand from Windows to Linux for a while.  Now that I am running Linux on my laptop, EOD is just not working well.  I've had keyboard issues that I could not solve and copy/paste issues.  I kicked EOD to the curb.

Now what I do is:

  1. ssh into the linux box.
  2. run vncserver.  This will output a screen number for me like this: server.blah.com:1
  3. Then I go to my laptop and run vinagre.
  4. I connect to server.blah.com:1
  5. Vinagre is pretty nice.  I can go in and out of full screen pretty easily.  (You have to move your mouse to the top middle of the window to get the options window to get out of full screen)
  6. OK, so this is all working pretty well, except I could not copy and paste.  Pretty dumb.
  7. So I googled the issue at hand and didn't find much.  Then I googled the vncserver man page and found vncconfig.  Go figure.  You have to run this command to get copy/paste working:
  8. vncconfig -nowin &
  9. Run that in a command line window in Vinagre or in your original ssh.
  10. Now you can copy and paste like a champ!  It's awesome because it is a true shared clipboard.  You don't have to use a mouse middle button.  Seamless baby!
Update:

Even better, put your vncconfig -nowin & in your ~/.vnc/xstartup file.