Difference between revisions of "Set up a terminal server using VNC"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
I want to set up a terminal server using VNC. This will enable you to work on a remote computer and use your local computer as a display only.
+
I want to set up a terminal server using VNC. This will enable you to work on a remote computer and use your local computer as a display only. For this example I used SUSE Linux 13.1 but it should work same or similar on other distributions as well.
 +
 
 +
= Procedure =
 +
* install VNC incl. the config files for xinetd
 +
yast -i xorg-x11-Xvnc
 +
* edit /etc/xinet.d/vnc to contain
 +
service vnc1
 +
{
 +
        socket_type    = stream
 +
        protocol        = tcp
 +
        wait            = no
 +
        user            = nobody
 +
        server          = /usr/bin/Xvnc
 +
        server_args    = -securitytypes=none -noreset -inetd -once -query localhost -geometry 1024x768 -depth 16
 +
        type            = UNLISTED
 +
        port            = 5901
 +
}
  
* SUSE
 
* edit /etc/xinet.d/vnc
 
 
* start xinetd
 
* start xinetd
 +
xinetd
 +
* Start yast -> System -> /etc/sysconfig editor -> Desktop -> Display manager -> DISPLAYMANAGER_REMOTE_ACCESS to yes and restart the display manager service with the [[command]]
 +
* rcxdm restart
  
 +
= TroubleShooting =
 +
 +
== No password configured ==
 +
* now I got an error message
 
  No password configured for VNC Auth
 
  No password configured for VNC Auth
  
 
-securitytypes=none
 
-securitytypes=none
 +
* xinetd re start
 +
 +
== Not a valid vnc server ==
 +
;Symptom: When starting vncviewer you get an error message like this:
 +
# vncviewer 54.186.202.224:1
 +
Not a valid VNC server
 +
An [[strace]] delivers a line like
 +
read(4, "Unrecognized option: -bla\n", 8192) = 26
 +
write(2, "Not a valid VNC server\n", 23Not a valid VNC server
 +
;Reason: In /etc/xinetd.d/vnc you have provided an illegal server option, in this case ''bla''.
 +
;Solution: Remove the illegal server option from /etc/xinet.d/vnc and restart xinetd.
 +
 +
== No window comes up ==
 +
;Symptom: After typing
 +
vncviewer whatever:1
 +
no window comes up
 +
;Reason 1: The firewall on the vnc server is active
 +
;Solution 1: Allow access for VNC on the firewall on the server or shut it down, e.g. for SUSE Linux:
 +
rcSuSEfirewall2 stop
 +
 +
== You only see a black screen ==
 +
;Symptom: You only see a black screen in vncviewer
 +
;Solution: Start yast -> System -> /etc/sysconfig editor -> Desktop -> Display manager -> DISPLAYMANAGER_REMOTE_ACCESS to yes and restart the display manager service with the [[command]]
 +
rcxdm restart
 +
 +
== root logins are not allowed ==
 +
;Symptom: When trying to log in as root you get the error message
 +
root logins are not allowed
 +
You have set AllowRootLogin=true in /usr/share/kde4/config/kdm/kdmrc or whereever you have to set it
 +
;Reason: The sysconfig contains a setting to allow or disallow remote root logins.
 +
;Solution: For SUSE, call yast2 -> System -> Sysconfig editor -> Desktop -> Display Manager -> DISPLAYMANAGER_ROOT_LOGIN_REMOTE and set it to "yes"
  
* black window only
+
= See also =
 +
* [[VNC]]
 +
* [[terminal server]]

Latest revision as of 14:57, 24 July 2014

I want to set up a terminal server using VNC. This will enable you to work on a remote computer and use your local computer as a display only. For this example I used SUSE Linux 13.1 but it should work same or similar on other distributions as well.

Procedure

  • install VNC incl. the config files for xinetd
yast -i xorg-x11-Xvnc
  • edit /etc/xinet.d/vnc to contain
service vnc1
{
       socket_type     = stream
       protocol        = tcp
       wait            = no
       user            = nobody
       server          = /usr/bin/Xvnc
       server_args     = -securitytypes=none -noreset -inetd -once -query localhost -geometry 1024x768 -depth 16
       type            = UNLISTED
       port            = 5901
}
  • start xinetd
xinetd
  • Start yast -> System -> /etc/sysconfig editor -> Desktop -> Display manager -> DISPLAYMANAGER_REMOTE_ACCESS to yes and restart the display manager service with the command
  • rcxdm restart

TroubleShooting

No password configured

  • now I got an error message
No password configured for VNC Auth

-securitytypes=none

  • xinetd re start

Not a valid vnc server

Symptom
When starting vncviewer you get an error message like this:
# vncviewer 54.186.202.224:1
Not a valid VNC server

An strace delivers a line like

read(4, "Unrecognized option: -bla\n", 8192) = 26
write(2, "Not a valid VNC server\n", 23Not a valid VNC server
Reason
In /etc/xinetd.d/vnc you have provided an illegal server option, in this case bla.
Solution
Remove the illegal server option from /etc/xinet.d/vnc and restart xinetd.

No window comes up

Symptom
After typing
vncviewer whatever:1

no window comes up

Reason 1
The firewall on the vnc server is active
Solution 1
Allow access for VNC on the firewall on the server or shut it down, e.g. for SUSE Linux:
rcSuSEfirewall2 stop

You only see a black screen

Symptom
You only see a black screen in vncviewer
Solution
Start yast -> System -> /etc/sysconfig editor -> Desktop -> Display manager -> DISPLAYMANAGER_REMOTE_ACCESS to yes and restart the display manager service with the command
rcxdm restart

root logins are not allowed

Symptom
When trying to log in as root you get the error message
root logins are not allowed

You have set AllowRootLogin=true in /usr/share/kde4/config/kdm/kdmrc or whereever you have to set it

Reason
The sysconfig contains a setting to allow or disallow remote root logins.
Solution
For SUSE, call yast2 -> System -> Sysconfig editor -> Desktop -> Display Manager -> DISPLAYMANAGER_ROOT_LOGIN_REMOTE and set it to "yes"

See also