You are not logged in.
Pages: 1
Hi,
I followed the guide here https://wiki.archlinux.org/index.php/Vncserver.
I created /etc/systemd/system/vncserver@:1.service but when I try to run the service with systemctl start vncserver I get this error
Job for vncserver.service failed. See "systemctl status vncserver.service" and "journalctl -xe" for details.
and when I run journalctl -xe I have this
déc 18 10:16:05 revopc vncserver[12555]: vncserver: The HOME environment variable is not set.
déc 18 10:16:05 revopc systemd[1]: vncserver.service: control process exited, code=exited status=2
déc 18 10:16:05 revopc systemd[1]: Failed to start Remote desktop service (VNC).
-- Subject: L'unité (unit) vncserver.service a échoué
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li … temd-devel
--
-- L'unité (unit) vncserver.service a échoué, avec le résultat failed.
déc 18 10:16:05 revopc systemd[1]: Unit vncserver.service entered failed state.
déc 18 10:16:05 revopc systemd[1]: vncserver.service failed.
My /etc/systemd/system/vncserver@:1.service
# The vncserver service unit file
# The vncserver service unit file
#
# 1. Copy this file to /etc/systemd/system/vncserver@:<display>.service
# 2. Edit User=
# ("User=foo")
# 3. Edit and vncserver parameters appropriately
# ("/usr/bin/vncserver %i -arg1 -arg2 -argn")
# 4. Run `systemctl 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=dschaefer79
PAMName=login
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver -geometry 1440x900 -fg -alwaysshared -dpi 100 %i
ExecStop=/usr/bin/vncserver -kill %i
[Install]
WantedBy=multi-user.target
Last edited by dschaefer79 (2014-12-18 09:27:05)
Offline
Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Fo … s_and_Code
Not an Installation issue, moving to NC...
Offline
Hi,
I'm sorry that I am unable to help, but I have the same problem. Have you found a solution yet?
Thanks
Offline
The .service file in “/etc/systemd/system” should be named just “vncserver@.service” (no “:1” part) as it is a parameterised service file. You do specify the part after the "@" in the systemctl commands, not in the actual on-disk filename.
So I suggest you:
• remove the existing link “systemctl disable vncserver@:1.service”
• rename vncserver@:1.service to vncserver@.service
• do a systemctl daemon-reload
• reenable service “systemctl enable vncserver@:1.service”
Offline
The .service file in “/etc/systemd/system” should be named just “vncserver@.service” (no “:1” part) as it is a parameterised service file.
Are you sure? I have mine like this on multiple boxes that work just fine.
% cat /etc/systemd/system/vncserver@:1.service
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=simple
User=facade
PAMName=login
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver -geometry 1792x1008 -fg -alwaysshared -dpi 100 %i
ExecStop=/usr/bin/vncserver -kill %i
[Install]
WantedBy=multi-user.targetAnd...
% status vncserver@:1 | sed 's/squishy/facade/g'
* vncserver@:1.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2015-01-04 17:13:42 EST; 3 days ago
Process: 493 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
Main PID: 531 (perl)
CGroup: /system.slice/system-vncserver.slice/vncserver@:1.service
> 531 perl /usr/bin/vncserver -geometry 1792x1008 -fg -alwaysshared -dpi 100 :1
Jan 04 17:13:41 phobos systemd[493]: pam_unix(login:session): session opened for user facade by (uid=0)
Jan 04 17:13:42 phobos systemd[531]: pam_unix(login:session): session opened for user facade by (uid=0)@op - what is the contents of your user's ~/.vnc/xstartup
Offline
I dont think the problem is related to systemd service file.
Try start vncserver as user dschaefer79 manually first.
Offline
Pages: 1