Creating a VNC Server
Author: stevester (information by amain)
This is very cool stuff, it would be a hassle to even attempt to run a VNC server on OpenWrt or other firmware. The beautiful thing about DebWRT is that all these packages are pre-compiled and are only one apt-get install away. As noted below, there are a few ways to go about running a VNC server which will depend upon your hardware and personal preference.
Installing the VNC Server
On the DebWrt box:
- Become root
- apt-cache search vncserver
- apt-get install vnc4server ( 25MB of basic X11 stuff installed )
- apt-cache search window manager ( search X11 window manager )
- apt-get install fluxbox
- apt-get install xterm
- adduser <user1> ( where <user1> is a username of your choice)
- su - <user1>
- vncpasswd ( generate a passwd for the vnc X11 server, stored in ~/.vnc/passwd )
- vnc4server -depth 24 -geometry 1024x768 :1
Now the VNC server is running on the DebWrt box ( and started /home/<user1>/.vnc/xstartup which starts fluxbox )
Note: multiple vnc servers van be started. Instead of :1 you need to specify :2 or :3, etc... These display number are basically mapped to TCP port numbers: 5901, 5902, 5093, etc...
Installing the VNC Viewer
Now the vncviewer need be started on a Linux PC or on a Windows PC with an XServer installed ( for example cygwin + Xserver ). Asuming Linux:
- vncviewer debwrt-box-ip:1 (note the :1, it is the display number of the vnc server)
- Enter the password
On a box with quite some RAM and CPU(i.e. RouterStation Pro) you could run Gnome with Firefox.
SSH + X11 tunneling
Another option is to use SSH with X11 tunneling, from a Linux box or a Windows box with an X11 server installed:
- ssh -X <user1>@debwrt-box
- xterm ( or firefox, etc )
- The remote started program will pop-up on you screen
In addition to the methods suggested above there are other options for VNC in DebWRT. You could install software such as tightvncserver and vnc4server or even just run X11 native.