Post by /dev/rob0Post by Gonzalo TorresThat's it, i log in through ssh but i don't know how to start krfb to share
my home desktop. I don't want to leave a listening port all the time...
I asked for this. You can't. Look it up on bugs.kde.org.
I assume you're root on this machine, and if so, you could block 5900
with iptables. On mine I didn't care. Sure, I'd *like* to leave it
closed because that's The Right Thing To Do, but I'm behind a firewall
and not worried about inside attacks.
Hi, about a year ago I wrote an x0rfbserver/krfb clone (mainly because
of portability and performance problems). It is the x11vnc program in
the contrib section of the libvncserver project:
http://www.sourceforge.net/projects/libvncserver
http://www.karlrunge.com/x11vnc/index.html (additional x11vnc info)
It will allow you to login to a machine via ssh and then redirect the
X11 desktop back to where you happen to be sitting (I do this all the
time when I am on the road, and I also access desktops at work from home
this way).
To tunnel via ssh I type something like this on the local machine:
# ssh -L 5900:localhost:5900 remote-machine 'x11vnc -display :0'
and then type in another shell on the local machine:
# vncviewer -encodings "copyrect tight hextile zlib corre" localhost:0
The -encodings option is very important: vncviewer will default to
"raw" encoding if it thinks the connection is to the local machine.
vncviewer gets tricked this way by the ssh redir. "raw" encoding will
be extremely slow over a networked link, so you need to force the issue
with -encodings.
If you "know" port 5900 will be free on remote-machine, you can automate
the above two steps in a shell script by using the x11vnc option -bg
(forks into background after connection to display :0 is set up).
The most recent libvncserver source tarball is available at:
http://libvncserver.sourceforge.net/LibVNCServer-0.6pre.tar.gz
please use that one if you can. Feel free to ask me any questions
that come up.
Karl Runge