forums.xandros.com Forum Index forums.xandros.com
Xandros User Forums
 
 FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

HOWTO turn Xandros into a VNC based terminal server
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forums.xandros.com Forum Index -> Tips & Tricks
View previous topic :: View next topic  
Author Message
stein
Xandrosianling
Xandrosianling


Joined: 21 Jan 2005
Posts: 304
Location: norway

PostPosted: Mon May 09, 2005 6:15 pm    Post subject: HOWTO turn Xandros into a VNC based terminal server Reply with quote

HOWTO turn your Xandros machine into a VNC based terminal server / application server.

Log into your Xandros terminal server from any Windows or Xandros machine, and run applications residing on your Xandros machine.
Many users can concurrently run applications on the Xandros terminal server. This is not simple desktop sharing, it is simultanious multi user login. Not unlike LTSP.

Your Xandros machine just needs to add a tiny VNC server and some small configuration changes to become a terminal server / application server. The client machines (Windows and Linux) needs just a small VNC client program added.

It is quite easy to do this setup. No command line is necessary. You only need to use 'Xandros File Manager (Administrator)' as a navigating tool, and 'Text Editor' to alter some config files. and Xandros Networks to install readily awailable programs.

In order to have video working well for lets say 3 concurrent clients, your server should probably have at least 1.5 GHz cpu, 256 MB ram, and at least 100 Mbps network card.

This HOWTO is based on a terminal server HOWTO found at http://linuxreviews.org/howtos/xvnc/ and my own experiences.
It has also been discussed in thread http://forums.xandros.com/viewtopic.php?t=14512

Here is a step-by-step guide to the installation:
Remember the ' sign is used to quote names and expressions (e.g. 'Remote=false'). Do NOT enter the quote signs.

A. Open 'Xandros Networks' and enable 'Unsupported Debian' repository.
If you don't know how to do this, you should not continue this exercise.

B. (skipped)

C. Search for 'tightvncserver' and install it.

D. Search for 'xinetd' and install it.

E. Start 'Xandros File Manager (Administrator)'.

F. Configure the login manager (kdm) to listen to XDCMP requests by doing as follows:
- Open '/etc/kde3/kdm/kdmrc' with 'Text Editor'.
- In section '[Xdmcp]' make sure there is a line saying 'Enable=true', without a '#' in the beginning of the line.
- In section '[X-*-Core]' I recommend the following parameters:
'AllowRootLogin=false' (means root cannot login from clients).
'AllowShutdown=Root' (means root password is required to shut down server).
'AllowSdForceNow=Root' (means root password is required to force shut down running apps).

G. Open '/etc/kde3/kdm/Xaccess' and specify who has access to 'XDMCP' by removing the '#' in front f 'any host can get a login window' (it should then look like this: '*. . . #any host can get a login window').
(If you want only machines on the local my.domain network to be able to connect, it should look like this: '*.my.domain #any host on my.domain can get a login window').

H. Configure '/etc/xinetd.conf' to listen to external calls. You do this by making sure there is no line saying 'only_from = localhost', or put a '#' in front of the line if it is existing.

I. In '/etc/services' the new VNC services must be specified by adding the following lines at the bottom of the file (just do a cut and paste to make it quick).
#
# VNC Servers
#
vnc-640x480x8 5950/tcp
vnc-800x600x8 5951/tcp
vnc-1024x768x8 5952/tcp
vnc-1280x1024x8 5953/tcp
vnc-1600x1200x8 5954/tcp
vnc-640x480x16 5960/tcp
vnc-800x600x16 5961/tcp
vnc-1024x768x16 5962/tcp
vnc-1280x1024x16 5963/tcp
vnc-1600x1200x16 5964/tcp
vnc-640x480x24 5970/tcp
vnc-800x600x24 5971/tcp
vnc-1024x768x24 5972/tcp
vnc-1280x1024x24 5973/tcp
vnc-1600x1200x24 5974/tcp
vnc-640x480x32 5980/tcp
vnc-800x600x32 5981/tcp
vnc-1024x768x32 5982/tcp
vnc-1280x1024x32 5983/tcp
vnc-1600x1200x32 5984/tcp

J. Create a file called '/etc/xinetd.d/xvncserver' in the following special manner:
- Make a copy of one of the files in '/etc/xinetd.d/'
- Rename the copy to 'xvncserver' (without quotes remember).
- Delete all content of the new 'xvncserver' file.
- Add the following lines (again, do a copy and paste):

service vnc-640x480x8
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 640x480 -depth 8
}

service vnc-800x600x8
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 800x600 -depth 8
}

service vnc-1024x768x8
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 1024x768 -depth 8
}

service vnc-1280x1024x8
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 1280x1024 -depth 8
}

service vnc-1600x1200x8
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 1600x1200 -depth 8
}

service vnc-640x480x16
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 640x480 -depth 16
}

service vnc-800x600x16
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 800x600 -depth 16
}

service vnc-1024x768x16
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 1024x768 -depth 16
}

service vnc-1280x1024x16
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 1280x1024 -depth 16
}

service vnc-1600x1200x16
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 1600x1200 -depth 16
}

service vnc-640x480x24
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 640x480 -depth 24
}

service vnc-800x600x24
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 800x600 -depth 24
}

service vnc-1024x768x24
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 1024x768 -depth 24
}

service vnc-1280x1024x24
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 1280x1024 -depth 24
# port = 5973
}

service vnc-1600x1200x24
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 1600x1200 -depth 24
}

service vnc-640x480x32
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 640x480 -depth 32
}

service vnc-800x600x32
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 800x600 -depth 32
}

service vnc-1024x768x32
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 1024x768 -depth 32
}

service vnc-1280x1024x32
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 1280x1024 -depth 32
}

service vnc-1600x1200x32
{
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -geometry 1600x1200 -depth 32
}


K. Reboot the machine.

L. On the server, open 'Connect to Desktop' (in 'Applications' > 'System' > 'Desktop Sharing'). (If you don't have it, use 'Xandros Networks' to install 'krdc' ('KDE Remote Desktop Connection')).
In the dialog window type in 'localhost:61' (still without quotes) and click the 'Connect' button.
If you get a Xandros login window and manage to log in, you have done a smooth job so far.
'localhost:61' gives you a 800x600 window, '62' gives you 1024x768.

M. Make sure more than one user account is defined on the server ('Control Center' > 'System Admin' > 'User manager').


N. Log out and move along to the machines you want to use as VNC based clients. They could be running Linux, Windows, Mac or any OS for which there exist a VNC client (VNC viewer).
Setting up the VNC client software is not covered in this HOWTO. Instead, take a look at 'HOWTO turn Windows and Xandros into VNC clients' under the 'Tips & Tricks' thread ( http://forums.xandros.com/viewtopic.php?t=15376 ).
_________________
Stein - www.tinnitus-tips.no


Last edited by stein on Sat Feb 03, 2007 12:09 pm; edited 5 times in total
Back to top
View user's profile Send private message Visit poster's website
Whiskerburn
Xandrosian
Xandrosian


Joined: 21 Jun 2003
Posts: 187
Location: Utah, USA

PostPosted: Tue May 10, 2005 10:31 am    Post subject: Reply with quote

Wow Surprised Thanks again Stein!!

Danny
Back to top
View user's profile Send private message MSN Messenger
n3qik
Xplorer


Joined: 16 Jan 2005
Posts: 130
Location: Telford, Pa.

PostPosted: Wed Sep 21, 2005 5:13 pm    Post subject: Reply with quote

B. Search for 'krfb' ('KDE Remote Screen Server') and REMOVE it.

Well seems that post-SP2 remote desktop sharing is part of krfb so leave it if you want to test the server on the local machine.
Back to top
View user's profile Send private message
vandaboy
Xplorer


Joined: 18 Sep 2004
Posts: 22

PostPosted: Fri Nov 11, 2005 3:03 pm    Post subject: Audio follow Reply with quote

Any way to get the audio to play on the remote client? I read in the other posts that you did have some success and some shortcommings. Did you get a chance to figure out the correct way of doing it without trashing the system?
Back to top
View user's profile Send private message
texan
Xplorer


Joined: 04 Nov 2005
Posts: 29
Location: San Antonio, TX

PostPosted: Mon Nov 14, 2005 10:54 am    Post subject: Reply with quote

I have used this technique for quite a while on my home lan and it is quite handy... especially as I have become more "mobility challlanged" due to arthritis. I can sit at one location and manage all the computers on my LAN!

I have some comments / additions:

1. The technique works with the default inetd that comes with Xandros. While the strategy is the same, the tactical details differ a bit. Here are my edits to the various files:

added at bottom of /etc/servi\ces file:
# Local services
vnc1 5951/tcp # vncserver-640x480
vnc2 5952/tcp # vncserver-800x600
vnc3 5953/tcp # vncserver-1000x700

added at bottom of /etc/inetd.conf file:
# VNC resolution services
vnc1 stream tcp nowait nobody /usr/sbin/tcpd /usr/bin/Xvnc -inetd -query localhost -once -geometry 640x480 -depth 16
vnc2 stream tcp nowait nobody /usr/sbin/tcpd /usr/bin/Xvnc -inetd -query localhost -once -geometry 800x600 -depth 16
vnc3 stream tcp nowait nobody /usr/sbin/tcpd /usr/bin/Xvnc -inetd -query localhost -once -geometry 950x660 -depth 16

NOTE: Beware of word-wrap. the above defs are all on one line for eace service defined..., i.e. vnc1, vnc2, and vnc3.

2. Note I have only defined 3 resolutions. In all practicality I only use one... the vnc3. It can save you a lot of typing if you don't plan to use various modes.

3. vnc works faster at smaller color depths. I find a depth of 16 is a good compromise between faithful reproductions of graphics and lan speed.

4. I have selected the "geometry" statements aboveto suit my desires to fit on my laptop screen. If you use these, you might want to experiment a bit.

The remainder of the instructions on getting kdm to work are the same. If you want to do remote functions that need root access, you might consider activating this in KDM too. Normally using SSH is a more secure method to do the same thing.

HTH,
-Don Spoon-
Back to top
View user's profile Send private message
stein
Xandrosianling
Xandrosianling


Joined: 21 Jan 2005
Posts: 304
Location: norway

PostPosted: Mon Nov 14, 2005 1:29 pm    Post subject: Reply with quote

-
Texan, thanks for adding to this knowhow!

Vandaboy, you'll find my answer in the original discussion thread in the 'Networking and internet' section:
http://forums.xandros.com/viewtopic.php?t=14512
-
_________________
Stein - www.tinnitus-tips.no


Last edited by stein on Wed Oct 04, 2006 12:28 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
arereal2
Xplorer


Joined: 05 Jan 2006
Posts: 22

PostPosted: Mon Feb 27, 2006 2:59 pm    Post subject: Reply with quote

Is there anyway to make a session persist? So that I could log in via vnc, do something, quit vnc, and then later restart vnc to continue what I was doing without losing my work.

I can do this using 'tightvncserver -httpport 8080 :1' but the problem is the gui, it's a standard X desktop, which is workable, but a pain as I'm very used to KDE now.

Any help would be much appreciated, cheers!
Back to top
View user's profile Send private message
stein
Xandrosianling
Xandrosianling


Joined: 21 Jan 2005
Posts: 304
Location: norway

PostPosted: Mon Feb 27, 2006 4:01 pm    Post subject: Reply with quote

arereal2 wrote:
Is there anyway to make a session persist? So that I could log in via vnc, do something, quit vnc, and then later restart vnc to continue what I was doing without losing my work.

In the logoff dialog box ('Logout Xandros Session'), check 'Save session for future logins'.
_________________
Stein - www.tinnitus-tips.no


Last edited by stein on Thu Sep 21, 2006 1:19 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
arereal2
Xplorer


Joined: 05 Jan 2006
Posts: 22

PostPosted: Wed Mar 01, 2006 7:20 am    Post subject: Reply with quote

Thanks Stein, but that didn't really work. It seems very picky about what apps it saves the state of and I don't think it runs anything in the background.

I'va managed to get tightvncserver working with kde as a window manager and it's persistent, which is just what I'm looking for.
Back to top
View user's profile Send private message
caschwall
Xplorer


Joined: 15 Aug 2005
Posts: 5

PostPosted: Mon Mar 20, 2006 7:16 pm    Post subject: Reply with quote

This setup is great! I just have one problem. The monitor hooked up to my Terminal server is not on. When it boots up I can see the processes starting, but when it should go the login screen it goes blank. I can access it from the remote clients just fine. Can you help?
Back to top
View user's profile Send private message
ecowan
Xplorer


Joined: 06 May 2003
Posts: 135
Location: Ottawa, Ontario

PostPosted: Tue Oct 03, 2006 3:45 pm    Post subject: Getting this to work through a firewall... Reply with quote

One extra step will let vnc work through the firewall that comes standard with X4 Home Edition - Premium.

I added an incoming service, vnc-2, with ports 5950-5984 and protocol TCP & UDP to the list of allowed services. The vnc entry that is supplied is protected.

Thanks for the HOWTO, stein. I love using vnc to manage my server. - Erny
_________________
ecowan@nospam.magma.ca
Back to top
View user's profile Send private message
ecowan
Xplorer


Joined: 06 May 2003
Posts: 135
Location: Ottawa, Ontario

PostPosted: Fri Jan 05, 2007 2:34 pm    Post subject: Allow local root Reply with quote

I also added 'AllowRootLogin=true" to the section [X-:*-Core] in /etc/kde3/kdm/kdmrc. Otherwise I can't log in as root from my server's keyboard. - Erny
_________________
ecowan@nospam.magma.ca
Back to top
View user's profile Send private message
ecowan
Xplorer


Joined: 06 May 2003
Posts: 135
Location: Ottawa, Ontario

PostPosted: Fri Jan 05, 2007 2:37 pm    Post subject: Reply with quote

Unfortunately I have had to reinstall X4 sans SP1 on my server to be able to install tightvncserver. SP1 broke the apt environment for all the vncserver packages. - Erny
_________________
ecowan@nospam.magma.ca
Back to top
View user's profile Send private message
Ray Greene
Xplorer


Joined: 13 Feb 2004
Posts: 13

PostPosted: Mon Mar 05, 2007 10:55 pm    Post subject: Reply with quote

ecowan wrote:
Unfortunately I have had to reinstall X4 sans SP1 on my server to be able to install tightvncserver. SP1 broke the apt environment for all the vncserver packages. - Erny


I've just had the same problem. I tried downloading and installing the rpm from the tightvnc site but something isn't working properly.
When I try to connect to localhost:71 from the Xandros host I get this error:
"The connection to the host has been interrupted"
When I try to connect from Windows the VNC window appears for a second or two then closes.

Does anyone have any idea how to fix this? I am setting up a headless machine so I really need it. I don't want to have to reinstall Sad
Back to top
View user's profile Send private message
Arne Anka
Xanspiration
Xanspiration


Joined: 21 Mar 2004
Posts: 4186
Location: Stockholm, Sweden

PostPosted: Tue Mar 06, 2007 8:00 am    Post subject: Reply with quote

X4 (and I believe X3 as well) comes preinstalled with a VNC like Remote Desktop Sharing software. No need to install another one.

Try Launch|Applications|System|Remote Desktop Sharing|Share My Desktop.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.xandros.com Forum Index -> Tips & Tricks All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group