vncserver running or not ?
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2009
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    vncserver running or not ?

    Hi,

    for several days I have been trying to sort out what was a working remote desktop.

    I have remote root login via an SSH tunnel but can't get the vncserver working as it was just recently.

    If I try connecting with vncviewer localhost:0 it drops out with messages identical to if I try to connect to :2 which I know is not running.

    So I go to check and vncserver -list tells me that indeed nothing is running.

    Code:
    [root@localhost ~]# vncserver -list
    
    TigerVNC server sessions:
    
    X DISPLAY #     PROCESS ID
    [root@localhost ~]#
    Fine, let's try starting it.

    Code:
    [root@localhost ~]# vncserver :0   
    
    Warning: localhost.localdomain:0 is taken because of /tmp/.X0-lock
    Remove this file if there is no X server localhost.localdomain:0
    A VNC server is already running as :0
    [root@localhost ~]# rm  /tmp/.X0-lock
    [root@localhost ~]# vncserver :0
    
    Warning: localhost.localdomain:0 is taken because of /tmp/.X11-unix/X0
    Remove this file if there is no X server localhost.localdomain:0
    A VNC server is already running as :0
    [root@localhost ~]# rm   /tmp/.X11-unix/X0
    [root@localhost ~]# vncserver :0
    
    WARNING: The first attempt to start Xvnc failed, possibly because the font
    catalog is not properly configured.  Attempting to determine an appropriate
    font path for this system and restart Xvnc using that font path ...
    Could not start Xvnc.
    
    _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
    _XSERVTransMakeAllCOTSServerListeners: server already running
    (EE) 
    Fatal server error:
    (EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 
    _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
    _XSERVTransMakeAllCOTSServerListeners: server already running
    (EE) 
    Fatal server error:
    (EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 
    
    [root@localhost ~]#

    I get the same if I try to run via the service:

    Code:
     systemctl start vncserver@:0.service
    Job for vncserver@:0.service failed because the control process exited with error code. See "systemctl status vncserver@:0.service" and "journalctl -xe" for details.
    Code:
    systemctl status vncserver@:0.service
    * vncserver@:0.service - Remote desktop service (VNC)
       Loaded: loaded (/etc/systemd/system/vncserver@.service; disabled; vendor preset: disabled)
       Active: failed (Result: exit-code) since Thu 2016-12-15 12:56:13 GMT; 38s ago
      Process: 5570 ExecStart=/usr/bin/vncserver %i (code=exited, status=255)
      Process: 5564 ExecStartPre=/usr/bin/vncserver -kill %i (code=exited, status=2)
    
    Dec 15 12:56:10 localhost.localdomain vncserver[5570]: WARNING: The first attempt to start Xvnc failed, possibly because the font
    Dec 15 12:56:10 localhost.localdomain vncserver[5570]: catalog is not properly configured.  Attempting to determine an appropriate
    Dec 15 12:56:10 localhost.localdomain vncserver[5570]: font path for this system and restart Xvnc using that font path ...
    Dec 15 12:56:13 localhost.localdomain vncserver[5570]: Could not start Xvnc.
    Dec 15 12:56:13 localhost.localdomain vncserver[5570]: _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
    Dec 15 12:56:13 localhost.localdomain vncserver[5570]: _XSERVTransMakeAllCOTSServerListeners: server already running
    Dec 15 12:56:13 localhost.localdomain systemd[1]: vncserver@:0.service: Control process exited, code=exited status=255
    Dec 15 12:56:13 localhost.localdomain systemd[1]: Failed to start Remote desktop service (VNC).
    Dec 15 12:56:13 localhost.localdomain systemd[1]: vncserver@:0.service: Unit entered failed state.
    Dec 15 12:56:13 localhost.localdomain systemd[1]: vncserver@:0.service: Failed with result 'exit-code'.
    Can someone explain how I should interpret this info and how I can remove this blockage so that I can start the server?



    TIA. 8)
    Last edited by feddy; 15th December 2016 at 01:59 PM.

  2. #2
    Join Date
    Nov 2009
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: vncserver running or not ?

    I've set this up as a sevice and 'enabled' it. I now see similar output to that posted above in /var/log/messages .
    Code:
    Dec 16 14:40:46 localhost systemd: Removed slice system-vncserver.slice.
    Dec 16 14:45:03 localhost systemd: Created slice system-vncserver.slice.
    Dec 16 14:45:04 localhost vncserver: Can't find file /home/<user>/.vnc/localhost.localdomain:0.pid
    Dec 16 14:45:04 localhost vncserver: You'll have to kill the Xvnc process manually
    Dec 16 14:45:04 localhost vncserver: Warning: localhost.localdomain:0 is taken because of /tmp/.X0-lock
    Dec 16 14:45:04 localhost vncserver: Remove this file if there is no X server localhost.localdomain:0
    Dec 16 14:45:04 localhost vncserver: A VNC server is already running as :0
    Dec 16 14:45:04 localhost audit: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=vncserver@:0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
    Dec 16 14:45:04 localhost systemd: vncserver@:0.service: Control process exited, code=exited status=29
    Dec 16 14:45:04 localhost systemd: vncserver@:0.service: Unit entered failed state.
    Dec 16 14:45:04 localhost systemd: vncserver@:0.service: Failed with result 'exit-code'.
    It says it is not running then gets confused by lock files indicating that it is running.

    What the heck is this?



    If vncserver was running on DISPLAY:0 how would it be seen? Is it a kernel module or a process I can find in ps ax ? What can I look for to get a definitive answer as to whether the server is running or not?

    If it is not running, what is creating these lock files. I something failing to start but leaving behind dead lock files?


    How can I dig further to find the problem?
    Last edited by feddy; 16th December 2016 at 09:06 PM.

  3. #3
    Join Date
    Oct 2011
    Posts
    1,917
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: vncserver running or not ?

    You should see Xvnc process if vncserver is running and a listening port.

    Code:
    $ ps aux | grep Xvnc
    $ sudo netstat -tulpn | grep Xvnc
    Make sure there is not something else running on :0, like a client running a desktop session on Xorg. To play it safe you could try with higher number.

  4. #4
    Join Date
    Nov 2009
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: vncserver running or not ?

    OK, thanks, they both draw a blank.

    something seems to be creating the lock files then failing and leaving them there.

    Any suggestions how to find out what's blocking this?

  5. #5
    Join Date
    Oct 2011
    Posts
    1,917
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: vncserver running or not ?

    These lock files are created by either Xorg server running at the same time at that display number, or Xvnc itself fails to cleanup by itself when it fails. If unsure, try with higher display number, that will rule out Xorg as being an issue.
    Last edited by srakitnican; 17th December 2016 at 08:29 AM. Reason: Every method known that searches for active display numbers seems to not work with current Fedora release

  6. #6
    Join Date
    Nov 2009
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: vncserver running or not ?

    What I can't find is a clear description of what this 'sefver' and how it works.

    Does it need to start before X11 display:0 is started, afterwards? Is a plugin or what. This is getting like running a windoze system: undocumented processes and just fishing around for an arbitrary tweek on the internet.

    Without digging in the source code to see what is going on, where can I find a description of EXACTLY what this does and how it hooks into the main 'desktop'?

    It seems like those lockfiles are normal xorg.x11 so they should be expected to be there.

    So far this is just stabbing around in the dark.

  7. #7
    Join Date
    Oct 2011
    Posts
    1,917
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: vncserver running or not ?

    I think you and me are not on the same page. TigerVNC is doing something different from what you want, judging from your last comment. x11vnc is designed to connect to existing, real desktop session while TigerVNC is designed to run a virtual (headless) desktop sessions.

    https://help.ubuntu.com/community/VNC/Servers
    https://wiki.archlinux.org/index.php/TigerVNC
    https://wiki.archlinux.org/index.php/X11vnc

    Frankly, you are tampering with a non officially supported graphical environment so things are to be expected to not go very smooth. Gnome, the official Fedora DE, has an integrated remote desktop for sharing screen (vino) which is extremely easy to set up even through a phone. Although, I think it does not work in default Wayland display server, last time I used it worked with a Xorg session just fine.

  8. #8
    Join Date
    Nov 2009
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: vncserver running or not ?

    I'm not tampering, I installed from the LXDE spin which is linked from Fedora.org download page.

    What is doubly frustrating is that I had this working for years with Kubuntu as the remote OS and recently installed Fed24 instead. Having done that I got the same remote desktop working effortlessly on site having installed Fed24 LXDE spin.

    I was accessing via it's external IP so it should work the same now I'm truly remote. I can still login via ssh so there are no router problems.

    There must be something fairly trivial stopping this from working.

    ---------- Post added at 06:54 AM ---------- Previous post was at 06:52 AM ----------

    x11vnc is designed to connect to existing, real desktop session while TigerVNC is designed to run a virtual (headless) desktop sessions.
    https://wiki.archlinux.org/index.php/X11vnc

    Note: x11vnc is not the only way to accomplish a remote control of the real X display; x0vncserver is part of tigervnc and allows for the same operation.

  9. #9
    Join Date
    Oct 2011
    Posts
    1,917
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: vncserver running or not ?

    Well, it is entirely possible that there is a bug somewhere. Can't tell for sure since I am not very familiar with this particular setup.

  10. #10
    Join Date
    Nov 2009
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: vncserver running or not ?

    I have no reason to suspect a bug at this stage, I suspect I'm just doing something wrong.

    Unfortunately the only person who has been kind enough to reply does not know enough to help.

    Looks like I'm on the wrong forum for Fedora help. Is there anywhere I should look?

    thx

Similar Threads

  1. VNCServer?!
    By enko in forum Using Fedora
    Replies: 6
    Last Post: 28th November 2009, 01:11 AM
  2. Vncserver
    By beny in forum Installation, Upgrades and Live Media
    Replies: 8
    Last Post: 5th September 2008, 02:26 PM
  3. Changing the size of a running vncserver
    By daviddoria in forum Servers & Networking
    Replies: 1
    Last Post: 3rd June 2008, 03:11 PM
  4. vncserver
    By ArsePit in forum Servers & Networking
    Replies: 2
    Last Post: 25th June 2007, 07:26 PM
  5. no local screen when running vncserver?
    By marcel458 in forum Servers & Networking
    Replies: 3
    Last Post: 5th October 2004, 11:03 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •