This guide now certified to work with R6!
What is vnc4server/tightvnc and why do you want it?
OK, vnc4server/tightvnc will allow you to run a fluxbox session that is TOTALLY PARALLEL to your 'main' mythtv session on your KM/LinHES box. The 'main' session is what is being outputted to your TV (mythfrontend). Again, this new session will run a
virtual fluxbox session and allow you to use GUI based programs while your 'main' session can be used exclusively for mythtv. Both sessions run in parallel and don't interfere with each other. Additionally, the memory overhead of doing so is minimal. Does that make sense?
For you windows users, there is not an equivalent to this in WIndows. Basically, it would be like you're logged into your windows box, and your also logged into to your windows box virtually running two different sessions each completely independent to each other running simultaneously. You can run different apps in each session (or the same apps for the matter).
How does vnc4server/tightvnc differ from vnc that comes with KM R5.5 and LinHES R6?
The vnc that comes with KM R5.5 and LinHES R6 is called x11vnc. It allows you to connect to your KM/LinHES box and see exactly what is outputted to your TV - basically, the 'main' session as I have called it. This [vnc4server/tightvnc] is different from the x11vnc in that it runs in a totally parallel fashion as described above. In other words, you don't need to run the mythfrontend in your virtual session. You can run anything you want. For example, you might want to run a GUI bittorrent client, or a web browser, etc. on the same box as your mythtv without interrupting the mythfrontend. The virtual session can run an ANY resolution and can be INDEPENDENT of your mythtv's output resolution.
Example, my HDTV box outputs 1880x1050 to our HDTV, but I run a virtual session in 1440x900 to keep a slightly smaller portal to my my main desktop's resolution which is also 1680x1050. Again, you can make it anything you want.
This next part of the guide is for
R6 only. If you have R5.5 I have placed the original version of my howto at under the R6 portion.
Read this portion for R6
1. Installing tightvncserver on LinHES R6
Installation is trivial:
Code:
# pacman -Sy && pacman -S tightvnc
You're done!
2. First-time setupFirst, let's setup our vnc-session password. This can be ANYTHING you want and is totally independent to the vnc password you're using for your standard x11vnc session on your 'main' myth session.
Do the following:
Code:
$ vncserver
Now it will ask you to select a password and type it twice to make sure you got it right. Do so. That's it! You can also assign a view-only password if you wish. The server is now running. Stop it by issuing the following:
Code:
$ vncserver -kill :1
Now we just need to make a minor modification to one file:
Code:
$ cd ~/.vnc
$ nano xstartup
Make your xstartup like this:
Code:
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
exec fluxbox &
That's it!
Running tightvncserverYou have two basic commands, one to start the server and one to stop it.
To start your server, enter the following and note that the resolution doesn't need to be an official monitor resolution (such as 640x480, 1024x768, 1280x1024, etc.) since you're running a virtual desktop, it can be anything you want (for example 1250x960 or 1400x888, etc.)!
Example:
Code:
$ vncserver -geometry 1400x850 :1
That's it! Now you're running on port 5901 by default unless you're not running x11vnc on your mythtv's 'main' session.
To stop the server, simply issue:
Code:
$ vncserver -kill :1
Connecting to your vncserverTo connect, simply use your favorite vncviewer and connect as you normally would except, specify the different port.
If you're using windows, try
tightvncviewer which is available on sourceforge and is very good.
For LINUX, you can use xvnc4viewer (just download it from apt-get or aptitude).
Remember: the default port for VNC is 5900. If you're using x11vnc (comes with KM and LinHES), it will be running on 5900. Your tightvncserver will be running on 5901 so adjust the port you're attempting to connect to accordingly.
---
Read this portion for R5.5
1. Installing vnc4server on KM R5.5Installation is trivial:
Code:
# aptitude install vnc4server
You're done!
2. First-time setupFirst, let's setup our vnc-session password. This can be ANYTHING you want and is totally independent to the vnc password you're using for your standard x11vnc session on your 'main' myth session.
Do the following:
Code:
$ vncserver
Now it will ask you to select a password and type it twice to make sure you got it right. Do so. That's it! The server is now running. Stop it by issuing the following:
Code:
$ vncserver -kill :1
Now we just need to make a minor modification to one file:
Code:
$ cd ~/.vnc
$ nano xstartup
Make your xstartup like this:
Code:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -nowin &
That's it!
Running vnc4serverYou have two basic commands, one to start the sever and one to stop it.
To start your server, enter the following and note that the resolution doesn't need to be an official monitor resolution (such as 640x480, 1024x768, 1280x1024, etc.) since you're running a virtual desktop, it can be anything you want (for example 1250x960 or 1400x888, etc.)!
Example:
Code:
$ vncserver -geometry 1680x1040
That's it! Now you're running on port 5901 by default unless you're not running x11vnc on your mythtv's 'main' session. If that's the case, the default port is 5900.
To stop the sever, simply issue:
Code:
$ vncserver -kill :1
Connecting to your vnc4serverTo connect, simply use your favorite vncviewer and connect as you normally would except, specify the different port.
If you're using windows, try
tightvncviewer which is available on sourceforge and is very good.
For LINUX, you can use xvnc4viewer (just download it from apt-get or aptitude).
Remember: the default port for VNC is 5900. If you're using x11vnc (comes with KM), it will be running on 5900. Your vnc4server will be running on 5901 so adjust the port you're attempting to connect to accordingly.
Making vnc4server start automaticallyYou can make your vnc4server start automatically with a simple one-line script.
Code:
# nano /etc/init.d/startvnc
Paste the following into the script editing the resolution to your liking:
Code:
su -c '/usr/bin/vncserver -geometry 1680x1040 -alwaysshared' mythtv
Now save the file and exit nano. You'll also need to make the file an executable, do so with the following command:
Code:
# chmod a+x /etc/init.d/startvnc
Finally, to have this script run automatically, simply add it to your startup group:
Code:
# update-rc.d startvnc defaults
That will make the needed links so that it runs when your machine boots. Just as an FYI, to remove it from your startup list, do this:
Code:
# update-rc.d -f startvnc remove
That's it!
Note: if you're using a non-KM LINUX and are trying this, you might have to do an extra step (this is useful if you're using Gnome as your WM):
Code:
# chmod 755 /etc/X11/xinit/xinitrc