View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 11 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Tue Jan 13, 2009 3:25 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
:!: 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.

:arrow: 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 setup

First, 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 tightvncserver

You 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 vncserver

To 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.

---

:arrow: Read this portion for R5.5
1. Installing vnc4server on KM R5.5

Installation is trivial:
Code:
# aptitude install vnc4server


You're done!

2. First-time setup

First, 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 vnc4server

You 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 vnc4server

To 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 automatically

You 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

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Last edited by graysky on Sun Mar 08, 2009 11:41 am, edited 6 times in total.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 14, 2009 11:21 am 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
This looks very interesting. Thanks for posting it!

Noob question: What is the difference between apt-get and aptitude?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 14, 2009 1:57 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
jzigmyth wrote:
This looks very interesting. Thanks for posting it!

Noob question: What is the difference between apt-get and aptitude?


Good question. Have a look at this thread over at debian.net

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2009 3:01 am 
Offline
Joined: Tue Mar 29, 2005 8:19 am
Posts: 67
Location: Torino, ITALY
Have you managed to do the same on R6?
Is it likely to be a similar procedure (using pacman instead of apt-get, obviously)?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2009 3:14 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
benotto wrote:
Have you managed to do the same on R6?
Is it likely to be a similar procedure (using pacman instead of apt-get, obviously)?


Yes and no. There isn't a vnc4server package for R6, but there is a tightvncserver package. You need to uncomment the lines pointing to the official arch repos in your /etc/pacman.conf, then update, then install:

Code:
# pacman -Sy && pacman -S tightvnc


I can't remember if you need to edit your ~/.vnc/xstart or not. Once R6 goes gold, I am planning to update all my howtos for it as well. I think I had to add a line "exec fluxbox" to get it to start.

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2009 7:46 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
graysky wrote:
Yes and no. There isn't a vnc4server package for R6, but there is a tightvncserver package. You need to uncomment the lines pointing to the official arch repos in your /etc/pacman.conf, then update, then install...


Graysky: Why do you need the Arch repos for tightvnc?

Code:
[root@mythbox-mbe ~]# pacman -Ss tightvnc
extra-testing/tightvnc 1.3.9-300
    VNC Unix server && viewer

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2009 7:47 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
..it's in cesman's repos?

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2009 7:56 pm 
Offline
Joined: Sun Sep 25, 2005 3:50 pm
Posts: 1013
Location: Los Angeles
graysky wrote:
..it's in cesman's repos?

Yes. Been there for a while.

_________________
Mike
My Hardware Profile


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 27, 2009 10:40 pm 
Offline
Joined: Fri Oct 20, 2006 12:04 pm
Posts: 905
Location: LA, CA
This is awesome bro! Works very nice.

Is there a problem running this from startup?

Would

Code:
[startup] {vncserver -geometry 1400x850 :1}


in

/home/mythtv/.fluxbox/apps

work?

Also is there a way to get the second session to not respond to my remote control?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 28, 2009 1:02 am 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
Too Many Secrets wrote:
This is awesome bro! Works very nice.

Is there a problem running this from startup?

Would

Code:
[startup] {vncserver -geometry 1400x850 :1}


in

/home/mythtv/.fluxbox/apps

work?


Give it a try... I don't see why it wouldn't work. You can always call the script that I proposed from /home/mythtv/.fluxbox/apps as well.

Too Many Secrets wrote:
Also is there a way to get the second session to not respond to my remote control?


I don't think so, but if you're not running the frontend or other apps in the keymap it shouldn't matter right? I'm no lirc expert :)

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 29, 2009 9:01 pm 
Offline
Joined: Fri Oct 20, 2006 12:04 pm
Posts: 905
Location: LA, CA
graysky wrote:
Too Many Secrets wrote:
This is awesome bro! Works very nice.

Is there a problem running this from startup?

Would

Code:
[startup] {vncserver -geometry 1400x850 :1}


in

/home/mythtv/.fluxbox/apps

work?


Give it a try... I don't see why it wouldn't work. You can always call the script that I proposed from /home/mythtv/.fluxbox/apps as well.

Too Many Secrets wrote:
Also is there a way to get the second session to not respond to my remote control?


I don't think so, but if you're not running the frontend or other apps in the keymap it shouldn't matter right? I'm no lirc expert :)


As for the lirc (no expert here either) I'm getting response on the 2nd session to my remote control (streamzap). It makes it annoying when I'm ripping a DVD and DW is using remote. Before I know it, I'm watching TV (audio thru TV and all) and she's looking at a menu. Right now it's this bug-a-boo that's keeping me from running the 2nd session all the time.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu