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.

#!/bin/bash
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
  • Making sense of the different versions of Vista Microsoft Vista is now out, the next version of Windows, successor to XP. While Windows XP will continue to receive updates into 2014 there are many that might be eager to upgrade and move to the latest greatest. (Note to those: Service Pack one may be en route THIS calendar......
  • Free Linspire download through September 6 It looks as though Linspire 5 is available for free download through September 6. A review of the release is available here. According to desktop linux, this is in part related to freespire, which has been requested to change it's name. Currently the codename is "squiggle". Details on the free......
  • 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......
Blog Traffic Exchange Related Websites
  • Gateway Netbook Review - LT2802U Netbook LT2802U is one of the latest model Netbook from Gateway. Gateway releases various products into the market like Netbook, Desktops and Flat monitors. Last time, i took you through the Gateway Mini Netbook Review and this time about LT2802U. Netbooks are second choice, if you are not willing to......
  • 5 Ways to Maintain Your Running Routine [/caption] Exercising isn’t easy for everyone, but that doesn’t mean it’s any less important. Having a daily routine not only keeps you fit, but it also is soothing for the mind. So what do you do if you find it hard to maintain your daily running routine? This article will......
  • Ten Steps To Become a Linux/Unix Geek Until recently, Linux/Unix was considered OS of the geeks. However, with GUI and more desktop Linux distributions, things have simplified on both Linux and Unix. Still you can geek out with Unix/Linux using its terminal. Just follow the steps below to master the terminal. 1. Never used Linux! Get Ubuntu......
www.pdf24.org    Send article as PDF   

Similar Posts


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

Comments are closed.


Switch to our mobile site