Exporting an active linux desktop with vnc, or vnc remote desktop under linux

There are lots of ways to get a remote desktop under linux, remote X, nxserver, vnc. One of the problems though is the most common configuration doesn’t let you connect to a running desktop session. There is a vnc component that let’s you do this and I’m using it right now. On the home network, sometimes I don’t want to be sitting at the desktop machine and would rather use the laptop while checking in on programs running on the desktop itself. But, being too lazy to go to the desktop it would be nice if there was a way I could run something remotely that would let me view that desktop… ahhh there is a way.

Once upon a time I wrote a little script to deal with this.

export DISPLAY=:0
x0rfbserver &

Very simple and straightforward… we use bash, set the environment variable for which display to use and run x0rfbserver. x0rfbserver is a remote framebuffer server. In other words it will allow you to use vnc to see what’s currently on the desktop. Here is how I would use this script. I’m sitting typing on the laptop and think, I wonder if that program stopped compiling on the desktop? Well, I could log in via ssh and do a top, or ps ax to look for it, but.. not today I also want to see a few other apps, so… ssh username@desktop /home/userdir/scripts/startvnc

Then, I go to the KDE menu, run and type vncviewer desktop:0 am prompted for a password and then up pops my desktop. The fact that I run it from a remote login is what makes it important to export DISPLAY=:0 so we don’t try to forward X over the ssh connection. (Otherwise x0rfbserver would run on the laptop…. not what I’m looking for.)

An earlier version of this script used export DISPLAY=localhost:0 so, depending on your distribution/X setup I guess you may need to adjust that for your situation. Anyway it gives a neat and tidy way to remotely view a running linux desktop (even when you forget to launch the server before you left the desktop.)

Related Posts

Blog Traffic Exchange Related Posts
  • The security of remote tech support (ultravnc sc or x11vnc with wrapper script) Well, I've got a nice way of doing "easy" one click (or one cut and paste) light desktop support for windows or linux, one uses ultravnc sc, the other uses x11vnc with a special wrapper script. So, what security flaws are there in this process? Well, for starters, I see......
  • Remote Tech Support with x11vnc and wrapper script So, the idea is that I wanted something "like" the Ultranvnc Single Click download, only for linux. The main idea being is that if someone is looking for a bit of desktop tech support on linux, we don't need to be giving instructions for 5 different package managers, or source......
  • Remote tech support with anything - would I do it? I've tried to ask myself if I'd trust someone enough to let them run a remote session on my own desktop to solve a problem. I think the answer is "it depends". If you think about it, I do tech support for home users quite a bit and they let......
Blog Traffic Exchange Related Websites
  • Good Advice on Running for Beginners Running is a sport which is easy to get in to. You do not need a lot of specialized equipment to get started. Running for beginners only requires a good pair of shoes and some good advice. This way you can get started off the right way. The most important......
  • Techinline: Remote Desktop Assistance Software - Review & Giveaway With Techinline, a Remote Assistance tool, now hassle free connections between remote computers over the web and to any point on the globe can be established. The connections so established among the remote computers are enabled instantaneously, securely and without a hitch. With the use of this fanatic remote desktop......
  • Mid-week update The first two days' runs this week were tedious, easy runs, in which I was recovering from the crash-and-burn 16 miler on Saturday, plus the nickel-sized blister which I acquired during that run.9/29/2008 Easy 7.21 Miles in 1:05:00 (9'01" pace) - had blister band-aid, blister formed around it.  Nice. 9/30/2008......
www.pdf24.org    Send article as PDF   

Similar Posts

See what happened this day in history from either BBC Wikipedia
Amazon Logo

Comments are closed.

Switch to our mobile site