vncserver 1.7 failed command /etc/X11/Xvnc-session Debian Stretch

8,729 views
Skip to first unread message

Mark Dlastname

unread,
Sep 29, 2018, 6:17:31 PM9/29/18
to TigerVNC User Discussion/Support
Hi,

I am connected via SSH into my server which is Debian Stretch/Gnome. I am using Tiger VNC 1.7 for now as that is what is in the repository.

I run 'vncserver' with no parameters. It starts, then terminates. I think again I may be missing something obvious?


New 'ux305.workgroup:1 (mark)' desktop at :1 on machine ux305.workgroup

Starting applications specified in /etc/X11/Xvnc-session
Log file is /home/mark/.vnc/ux305.workgroup:1.log

Use xtigervncviewer -SecurityTypes VncAuth -passwd /home/mark/.vnc/passwd :1 to connect to the VNC server.


vncserver: Failed command '/etc/X11/Xvnc-session': 256!

=================== tail -15 /home/mark/.vnc/ux305.workgroup:1.log ===================

Xvnc TigerVNC 1.7.0 - built Apr  9 2017 14:38:13
Copyright (C) 1999-2016 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 11903000, The X.Org Foundation


Sat Sep 29 15:11:18 2018
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on local interface(s), port 5901
 vncext:      created VNC server for screen 0
Terminated
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
      after 173 requests (173 known processed) with 0 events remaining.
Killing Xtigervnc process ID 1730... which seems to be deadlocked. Using SIGKILL!

======================================================================================

Starting applications specified in /etc/X11/Xvnc-session has failed.
Maybe try something simple first, e.g.,
    tigervncserver -xstartup /usr/bin/xterm

Any help much appreciated!
Mark

Mark Dlastname

unread,
Sep 30, 2018, 9:19:26 AM9/30/18
to TigerVNC User Discussion/Support

After much hacking, I do have tigervncserver listening and I can connect to it from a viewer.

However there is no window manager when I connect.

I edited /etc/X11/Xvnc-session and inserted  the following which works:
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

However the line: "gnome-session &" does not seem to work. If I try to run that manually in the xterm window, I get the response "Terminated"

I suspect this is a greeter issue and/or I can't use Gnome as the window manager when using vncserver, but I am struggling as my Linux-fu is weak in this area.

Any suggestions much appreciated!
Mark




Mark Dlastname

unread,
Sep 30, 2018, 12:27:27 PM9/30/18
to TigerVNC User Discussion/Support
More progress!

After more hacking.. I can connect and use the XFCE environment. BUT -- what I'd like, is to use Gnome. Also, I'd like to see the Gnome login screen when I connect rather than going in to the desktop. Will Gnome just not work or am I missing something?


Following is what works for me with XFCE.
#! /bin/sh

test x"$SHELL" = x"" && SHELL=/bin/bash
test x"$1"     = x"" && set -- default

vncconfig -iconic &
$SHELL -l <<EOF

xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
DESKTOP_SESSION=xfce
export DESKTOP_SESSION
startxfce4




Pierre Ossman

unread,
Oct 3, 2018, 3:32:16 AM10/3/18
to Mark Dlastname, TigerVNC User Discussion/Support
On 30/09/2018 18:27, Mark Dlastname wrote:
> However the line: "gnome-session &" does not seem to work. If I try to run
> that manually in the xterm window, I get the response "Terminated"
>

Debian uses their own script, so unfortunately we can't provide that
much help. However have you tried without the & ? Normally such scripts
terminate the session after the command exits, so putting it in the
background like that is often wrong.

> More progress!
>
> After more hacking.. I can connect and use the XFCE environment. BUT --
> what I'd like, is to use Gnome. Also, I'd like to see the Gnome login
> screen when I connect rather than going in to the desktop. Will Gnome just
> not work or am I missing something?
>

A login screen requires a rather special setup. And it won't give a new
login screen for each connection, so it's not generally what people want
anyway.

For now the norm is that you start an entire desktop session and connect
to it already running.

Regards
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46-13-214600 https://plus.google.com/+CendioThinLinc

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Mark Dlastname

unread,
Oct 5, 2018, 4:57:37 PM10/5/18
to TigerVNC User Discussion/Support
Hi Pierre,

Thanks much for your reply.

I have 1.7 working nicely now.

After learning more, I agree, there's no need for a graphical greeter screen. That was too many years of Windows experience talking ;-)

I'm posting here recipe that worked for me, in case it is helpful to others. I'm sure that for someone more experienced, not all of this will be necessary:

Debian Stretch
Disable Wayland and use x.org
Install LightDM in place of GDM to handle logins
Install Mate desktop in place of Gnome
Edit ~/.vnc/Xstartup to run mate-session, the full contents being:
 
  #!/bin/sh
  unset SESSION_MANAGER
  unset DBUS_SESSION_BUS_ADDRESS
  vncconfig -nowin &
  exec dbus-launch mate-session

For my scenario, I have vncserver listen on localhost and connect via SSH tunnel.

Thanks again for your help and the great software!

Mark
Reply all
Reply to author
Forward
0 new messages