You are not logged in.

#1 2016-06-15 21:49:24

xamindar
Member
Registered: 2010-08-07
Posts: 45

vncserver fails through systemd but works from terminal

I followed the wiki here: https://wiki.archlinux.org/index.php?ti … edirect=no
Created a systemd service file but no matter what I try, it fails to keep the vncserver running. It appears to launch it, then it dies a few seconds later. If I run the vncserver command directly in the terminal as the user I want then it runs just fine. Here is my systemd file:

# The vncserver service unit file system mode
#
# 1. Copy this file to /etc/systemd/system/vncserver@:<display>.service
# 2. Edit User=
#   ("User=foo")
# 3. Edit the vncserver parameters appropriately
#   ("/usr/bin/vncserver %i -arg1 -arg2 -argn")
# 4. Run `systemctl --system daemon-reload`
# 5. Run `systemctl enable vncserver@:<display>.service`
#
# DO NOT RUN THIS SERVICE if your local area network is untrusted!
#
# See the wiki page for more on security
# https://wiki.archlinux.org/index.php/Vncserver

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=simple
User=xamindar
PAMName=login

ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver -geometry 1440x900 -alwaysshared -fg %i
ExecStop=/usr/bin/vncserver -kill %i

[Install]
WantedBy=multi-user.target

My .vnc folder gets this log file when the systemd launches it and it fails:

 
Xvnc TigerVNC 1.6.0 - built Dec 25 2015 07:29:03
Copyright (C) 1999-2015 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 11800000, The X.Org Foundation


Wed Jun 15 14:44:44 2016
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5901
 vncext:      created VNC server for screen 0
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
      after 112 requests (112 known processed) with 0 events remaining.
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
      after 24 requests (24 known processed) with 0 events remaining.
** Message: main.vala:99: Session is LXDE
** Message: main.vala:100: DE is LXDE
** Message: main.vala:131: log directory: /home/xamindar/.cache/lxsession/LXDE
** Message: main.vala:132: log path: /home/xamindar/.cache/lxsession/LXDE/run.log

This is driving me zrazy and I can not find anyone else who has had these errors with vnc.

Offline

Board footer

Powered by FluxBB