Menu

TurboVNC on Arch Linux

2014-05-06
2016-09-14
  • Bruno Marques

    Bruno Marques - 2014-05-06

    Hi,
    I am trying to use VirtualGL with TurboVNC on an Arch Linux machine, and I am experiencing some issues I hope you could help me to solve =)

    I cannot get vncserver to start, this is my output:

    $> vncserver
    
    WARNING: The first attempt to start Xvnc failed, possibly because the vncserver
    script was not able to figure out an appropriate X11 font path for this system
    or because the font path you specified with the -fp argument was not valid.
    Attempting to restart Xvnc using the X Font Server (xfs) ...
    Could not start Xvnc.
    
    Unrecognized option: /var/run/gdm/auth-for-bruno-Hn8byF/database
    

    I made a few unseccessful attempts to solve the problem, by reinstalling the xorg fonts, specify the -fp option with /usr/share/fonts/75dpi / 100dpi, uninstalling every packages I suspected could interfere with Turbovnc (vine vinagre, Tigervnc, etc) but couldn't get vncserver to run properly.

    I've been told the problem could come from my distro, since some file locations on arch linux are quite unconventional...?

    Hope you can help me =)

     
  • DRC

    DRC - 2014-05-07

    Can you post the contents of ~/.vnc/{hostname}-:1.log ?? There might be something revealing in there.

     
  • Bruno Marques

    Bruno Marques - 2014-05-07

    Here we go:

    Unrecognized option: /var/run/gdm/auth-for-bruno-nl5i8s/database
    use: X [:<display>] [option]
    -a #                   mouse acceleration (pixels)
    -ac                    disable access control restrictions
    -audit int             set audit trail level
    -auth file             select authorization file
    bc                     enable bug compatibility
    -bs                    disable any backing store support
    -c                     turns off key-click
    c #                    key-click volume (0-100)
    -cc int                default color visual class
    -co file               color database file
    -core                  generate core dump on fatal error
    -dpi int               screen resolution in dots per inch
    -deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs
    -f #                   bell base (0-100)
    -fc string             cursor font
    -fn string             default font name
    -fp string             default font path
    -help                  prints message with these options
    -I                     ignore all remaining arguments
    -ld int                limit data space to N Kb
    -lf int                limit number of open files to N
    -ls int                limit stack space to N Kb
    -nolock                disable the locking mechanism
    -logo                  enable logo in screen saver
    nologo                 disable logo in screen saver
    -nolisten string       don't listen on protocol
    -p #                   screen-saver pattern duration (minutes)
    -pn                    accept failure to listen on all ports
    -nopn                  reject failure to listen on all ports
    -r                     turns off auto-repeat
    r                      turns on auto-repeat 
    -render [default|mono|gray|color] set render color alloc policy
    -norender              disable render extension
    -s #                   screen-saver timeout (minutes)
    -su                    disable any save under support
    -t #                   mouse threshold (pixels)
    -terminate             terminate at server reset
    -to #                  connection time out
    -tst                   disable testing extensions
    ttyxx                  server started from init on /dev/ttyxx
    v                      video blanking for screen-saver
    -v                     screen-saver without video blanking
    -wm                    WhenMapped default backing-store
    -x string              loads named extension at init time 
    -query host-name       contact named host for XDMCP
    -broadcast             broadcast for XDMCP
    -indirect host-name    contact named host for indirect XDMCP
    -port port-num         UDP port number to send messages to
    -once                  Terminate server after one session
    -class display-class   specify display class to send in manage
    -cookie xdm-auth-bits  specify the magic cookie for XDMCP
    -displayID display-id  manufacturer display ID for request
    -geometry WxH          set framebuffer width & height
    -depth D               set framebuffer depth
    -pixelformat format    set pixel format (BGRnnn or RGBnnn)
    -udpinputport port     UDP port for keyboard/pointer data
    -rfbport port          TCP port for RFB protocol
    -rfbwait time          max time in ms to wait for RFB client
    -nocursor              don't display a cursor
    -rfbauth passwd-file   enable VNC password authentication
    -otpauth               enable one-time password (OTP) authentication
    -pamauth               enable PAM user/password authentication
    -noreverse             disable reverse connections
    -noclipboardsend       disable server->client clipboard synchronization
    -noclipboardrecv       disable client->server clipboard synchronization
    -nocutbuffersync       disable clipboard synchronization for applications
                           that use the (obsolete) X cut buffer
    -idletimeout S         exit if S seconds elapse with no VNC viewer connections
    -httpd dir             serve files from the specified directory using HTTP
    -httpport port         port for HTTP server
    -deferupdate time      time in ms to defer updates (default 40)
    -noflowcontrol         when continuous updates are enabled, send updates whether
                           or not the client is ready to receive them
    -alr S                 enable automatic lossless refresh and set timer to S
                           seconds (S is floating point)
    -interframe            always use interframe comparison
    -nointerframe          never use interframe comparison
    -economictranslate     less memory hungry translation
    -desktop name          VNC desktop name (default x11)
    -alwaysshared          always treat new clients as shared
    -nevershared           never treat new clients as shared
    -dontdisconnect        don't disconnect existing clients when a new non-shared
                           connection comes in (refuse new connection instead)
    -viewonly              only let clients view the remote desktop
    -localhost             only allow connections from localhost
    -interface ipaddr      only bind to specified interface address
    -ipv6                  enable IPv6 support
    -inetd                 Xvnc is launched by inetd
    -compatiblekbd         set META key = ALT key as in the original VNC
    -version               report Xvnc version on stderr
    Unrecognized option: /var/run/gdm/auth-for-bruno-nl5i8s/database
    use: X [:<display>] [option]
    -a #                   mouse acceleration (pixels)
    -ac                    disable access control restrictions
    -audit int             set audit trail level
    -auth file             select authorization file
    bc                     enable bug compatibility
    -bs                    disable any backing store support
    -c                     turns off key-click
    c #                    key-click volume (0-100)
    -cc int                default color visual class
    -co file               color database file
    -core                  generate core dump on fatal error
    -dpi int               screen resolution in dots per inch
    -deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs
    -f #                   bell base (0-100)
    -fc string             cursor font
    -fn string             default font name
    -fp string             default font path
    -help                  prints message with these options
    -I                     ignore all remaining arguments
    -ld int                limit data space to N Kb
    -lf int                limit number of open files to N
    -ls int                limit stack space to N Kb
    -nolock                disable the locking mechanism
    -logo                  enable logo in screen saver
    nologo                 disable logo in screen saver
    -nolisten string       don't listen on protocol
    -p #                   screen-saver pattern duration (minutes)
    -pn                    accept failure to listen on all ports
    -nopn                  reject failure to listen on all ports
    -r                     turns off auto-repeat
    r                      turns on auto-repeat 
    -render [default|mono|gray|color] set render color alloc policy
    -norender              disable render extension
    -s #                   screen-saver timeout (minutes)
    -su                    disable any save under support
    -t #                   mouse threshold (pixels)
    -terminate             terminate at server reset
    -to #                  connection time out
    -tst                   disable testing extensions
    ttyxx                  server started from init on /dev/ttyxx
    v                      video blanking for screen-saver
    -v                     screen-saver without video blanking
    -wm                    WhenMapped default backing-store
    -x string              loads named extension at init time 
    -query host-name       contact named host for XDMCP
    -broadcast             broadcast for XDMCP
    -indirect host-name    contact named host for indirect XDMCP
    -port port-num         UDP port number to send messages to
    -once                  Terminate server after one session
    -class display-class   specify display class to send in manage
    -cookie xdm-auth-bits  specify the magic cookie for XDMCP
    -displayID display-id  manufacturer display ID for request
    -geometry WxH          set framebuffer width & height
    -depth D               set framebuffer depth
    -pixelformat format    set pixel format (BGRnnn or RGBnnn)
    -udpinputport port     UDP port for keyboard/pointer data
    -rfbport port          TCP port for RFB protocol
    -rfbwait time          max time in ms to wait for RFB client
    -nocursor              don't display a cursor
    -rfbauth passwd-file   enable VNC password authentication
    -otpauth               enable one-time password (OTP) authentication
    -pamauth               enable PAM user/password authentication
    -noreverse             disable reverse connections
    -noclipboardsend       disable server->client clipboard synchronization
    -noclipboardrecv       disable client->server clipboard synchronization
    -nocutbuffersync       disable clipboard synchronization for applications
                           that use the (obsolete) X cut buffer
    -idletimeout S         exit if S seconds elapse with no VNC viewer connections
    -httpd dir             serve files from the specified directory using HTTP
    -httpport port         port for HTTP server
    -deferupdate time      time in ms to defer updates (default 40)
    -noflowcontrol         when continuous updates are enabled, send updates whether
                           or not the client is ready to receive them
    -alr S                 enable automatic lossless refresh and set timer to S
                           seconds (S is floating point)
    -interframe            always use interframe comparison
    -nointerframe          never use interframe comparison
    -economictranslate     less memory hungry translation
    -desktop name          VNC desktop name (default x11)
    -alwaysshared          always treat new clients as shared
    -nevershared           never treat new clients as shared
    -dontdisconnect        don't disconnect existing clients when a new non-shared
                           connection comes in (refuse new connection instead)
    -viewonly              only let clients view the remote desktop
    -localhost             only allow connections from localhost
    -interface ipaddr      only bind to specified interface address
    -ipv6                  enable IPv6 support
    -inetd                 Xvnc is launched by inetd
    -compatiblekbd         set META key = ALT key as in the original VNC
    -version               report Xvnc version on stderr
    

    It is actually the exact output I get when launching vncserver, without the part I wrote in my first post.

     
  • DRC

    DRC - 2014-05-07

    Can you try editing vncserver and changing the following line:

    $cmd = $exedir."Xvnc :$displayNumber";
    

    to

    $cmd = "echo ".$exedir."Xvnc :$displayNumber";
    

    ? That will print out the arguments that vncserver is trying to pass to Xvnc, and hopefully I can see where that weird argument is coming from.

     

    Last edit: DRC 2014-05-07
  • Bruno Marques

    Bruno Marques - 2014-05-07

    done:

    /usr/bin/Xvnc :1 -desktop TurboVNC: oldArch:1 (bruno) -httpd -auth /var/run/gdm/auth-for-bruno-tH1kkZ/database -dontdisconnect -geometry 1240x900 -depth 24 -rfbwait 120000 -rfbauth /home/bruno/.vnc/passwd -otpauth -pamauth -rfbport 5901 -fp /usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/Type1 -deferupdate 1
    /usr/bin/Xvnc :1 -desktop TurboVNC: oldArch:1 (bruno) -httpd -auth /var/run/gdm/auth-for-bruno-tH1kkZ/database -dontdisconnect -geometry 1240x900 -depth 24 -rfbwait 120000 -rfbauth /home/bruno/.vnc/passwd -otpauth -pamauth -rfbport 5901 -deferupdate 1 -fp unix/:7100
    

    I don't know if it is useful information, but I just checked and all the font, gdm/auth and .vnc/passwd paths specified here are valid

     

    Last edit: Bruno Marques 2014-05-07
  • DRC

    DRC - 2014-05-07

    OK, this was a legitimate bug in the vncserver script that occurred whenever the server was built without Java support. It has been fixed in the subversion repository, and you can check out a patched version from the stable branch by doing the following:

    svn co svn://svn.code.sf.net/p/turbovnc/code/branches/1.2.x vnc
    

    Let me know if you run into any further issues.

     

    Last edit: DRC 2014-05-07
  • Bruno Marques

    Bruno Marques - 2014-05-07

    First of all, thanks a lot for your help and your excellent reactivity =)
    I've been able to successfully install turboVNC with your patched version,
    but I don't think i am using it correctly.

    I use vglconnect to connect to the server from the client.
    I run vncserver from the ssh session. This gives me the display number to use later one
    I run vglrun -d :display_number_obtained_earlier myopengl_program

    when I do so, I get the following error message from vglrun:

    bruno@oldArch ~ % vglrun -d :1 dev/sofa/build/Debug/bin/runSofa
    [VGL] NOTICE: Automatically setting VGL_CLIENT environment variable to
    [VGL]    10.0.0.6, the IP address of your SSh client.
    Xlib:  extension "GLX" missing on display ":1".
    freeglut (dev/sofa/build/Debug/bin/runSofa): OpenGL GLX extension not supported by display 'localhost:10.0'
    

    Did I forget a step in the process?
    I also noticed that when I run vglrun on a headless server (disabling gdm) I can't connect even on display :0 (vglrun with no argument). Is it normal?

     
  • DRC

    DRC - 2014-05-07

    No, you need to install the TurboVNC Viewer on your client machine and then connect to the server display (your_machine:1 or whatever) using the TurboVNC Viewer. This gives you a remote desktop on the server machine. You can then open a shell within the remote desktop and run:

    vglrun {application}
    

    to launch a 3D application. You do not use vglconnect when using VirtualGL with an X proxy such as VNC, unless the X proxy and VirtualGL are running on different machines (they aren't in this case.) vglconnect is only used if you want to display VirtualGL using its internal image transport, which encodes only the 3D portion of the application's GUI as a video stream and sends the 2D portions of the GUI using regular remote X11 commands. In other words, with vglconnect, the 3D is rendered on the server, but the 2D is still rendered on the client. When using an X proxy, both 2D and 3D are rendered on the server.

    The -d argument to vglrun specifies the display on which 3D rendering will take place. This is usually :0, because that's where the GPU is attached, so most people don't need to specify this argument (:0 is the default).

    This is all very thoroughly documented in the VirtualGL and TurboVNC User's Guides.

     
  • Bruno Marques

    Bruno Marques - 2014-05-12

    Thanks for the answer,
    I actually tried that, but faced a problem that made me think I wasn't doing the right thing, which is why I tried with vglconnect:
    When I connect turbovnc Viewer on the client machine to the turbovncserver, I get a gray window (very tight black and white meshing) with a clock on the top right corner, but no remote desktop, and I can't find a way to interact with it.
    I attached a screenshot to illustrate my problem.
    No wierd output from vncviewer though, as you can see.

     
  • DRC

    DRC - 2014-05-12

    That just means that the window manager isn't starting properly in the VNC session for some reason. Probably because Arch Linux is putting things in different paths than everyone else. Probably fixing that is going to require me to boot up Arch Linux in a virtual machine and see where it's storing things. If you have a working ~/.vnc/xstartup file from a different VNC flavor, however, then you should be able to copy it to ~/.vnc/xstartup.turbovnc and make TurboVNC do the same thing as the other VNC flavor. If you can get that to work, I'd be curious to see the contents of the working xstartup script.

     
  • Bruno Marques

    Bruno Marques - 2014-05-13
    Post awaiting moderation.
  • DRC

    DRC - 2014-05-13

    I'll have to investigate further. In the meantime, TigerVNC works in a pinch. It just won't have the 3D-specific features that TurboVNC has.

     

    Last edit: DRC 2014-05-13
  • Bruno Marques

    Bruno Marques - 2014-05-13

    Ok. I am exploring other leads anyway (c++ plugin in my program sending vertex, texture coordinates etc to an opengl remote client app), so no worries, I am not stuck yet =)
    Keep me in touch

     

    Last edit: Bruno Marques 2014-05-13
  • Rob Eastham

    Rob Eastham - 2014-06-13

    Seems I'm running in to exactly the same problems on Arch and so if you ever do spin up that Arch VM to work out where the paths differ then I'd love to know. I'm extremely keen to try VirtualGL and TurboVNC on Arch.

     

    Last edit: Rob Eastham 2014-06-13
  • DRC

    DRC - 2014-07-01

    VirtualGL: seems to work with no issues. Note that to get vglserver_config working, you have to install gdm and xauth.

    TurboVNC: builds and runs with no problem, but since TurboVNC currently lacks the X Composite extension, it can't run Gnome 3 (even the "classic" mode checks for X Composite, although I don't think it actually uses it.)

    Gnome runs in TigerVNC, but it's tortuously slow because of the lack of 3D acceleration (ideally, at some point, we'll be able to run these WM's in VirtualGL, but doing so is still very experimental at the moment. For instance, it isn't as simple as just doing 'vglrun gnome-session'.)

    My suggestion for the moment is to use a more simplified window manager in VNC such as IceWM, which doesn't have compositing capabilities.

    NOTE:
    For both VGL and TurboVNC builds, you need to install the TurboJPEG wrapper for libjpeg-turbo (pacman -S turbojpeg), which installs libjpeg-turbo as a dependency. You can then pass -DTJPEG_LIBRARY=/usr/lib/libturbojpeg.so to cmake in order to use the system's version of TurboJPEG.

     
  • DRC

    DRC - 2014-07-03

    More information on this:

    The version of Gnome in RHEL 7 is similar to the one in Arch Linux-- not quite as new but still new enough that it won't run without the X Composite extension. Moreover, unlike the Gnome implementation in Arch Linux, the one in RHEL 7 doesn't seem to want to run without 3D acceleration either. Thus, it won't run in any version of VNC, including the TigerVNC implementation that ships with RHEL 7.

    KDE Plasma does, however, seem to work fine in both TurboVNC and TigerVNC, so if you can get KDE up and running in Arch Linux, that could be another workaround until I can look at the Gnome 3 issues in more detail.

     

    Last edit: DRC 2014-07-03
  • DRC

    DRC - 2014-07-03

    CORRECTION: KDE Plasma actually does work in both TigerVNC and TurboVNC. That was a user error on my part.

     
  • DRC

    DRC - 2016-09-14

    This is an old thread, but I wanted to post an update that GNOME 3 should now fully work with TurboVNC 2.1. See http://www.turbovnc.org/Documentation/Compatibility

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.