You are not logged in.

#1 2015-05-19 00:17:23

bibo01
Member
Registered: 2015-05-19
Posts: 2

VNCServer does not work

Hi everybody. I am not an expert user and I need your help.
I setup vncserver as service, but it does not work with a vnc client.
However, if in ssh I give "vncserver -geometry 1360x768 -alwaysshared -dpi 96 :1", the service starts and vnc client works.

The content of vncserver@:1.service is:

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

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

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

    [Install]
    WantedBy=multi-user.target


If I do systemctl status, I get:

    ● vncserver@:1.service - Remote desktop service (VNC)
       Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
       Active: failed (Result: exit-code) since Sun 2015-05-17 11:38:26 CEST; 23s ago
      Process: 431 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=224/PAM)
    May 17 11:38:26 archaudio systemd[1]: Starting Remote desktop service (VNC)...
    May 17 11:38:26 archaudio systemd[431]: pam_nologin(login:account): conversation failed
    May 17 11:38:26 archaudio systemd[431]: Failed at step PAM spawning /bin/sh: Operation not permitted
    May 17 11:38:26 archaudio systemd[1]: vncserver@:1.service: control process exited, code=exited status=224
    May 17 11:38:26 archaudio systemd[1]: Failed to start Remote desktop service (VNC).
    May 17 11:38:26 archaudio systemd[1]: Unit vncserver@:1.service entered failed state.
    May 17 11:38:26 archaudio systemd[1]: vncserver@:1.service failed.

Any suggestions?
Thanks

Offline

#2 2015-05-20 10:40:44

hifi25nl
Member
Registered: 2011-05-07
Posts: 264

Re: VNCServer does not work

I guess this is without monitor connected.

The problem is here

    May 17 11:38:26 archaudio systemd[431]: pam_nologin(login:account): conversation failed
    May 17 11:38:26 archaudio systemd[431]: Failed at step PAM spawning /bin/sh: Operation not permitted

It is working with ssh because you have made a login before launching
"vncserver -geometry 1360x768 -alwaysshared -dpi 96 :1"

Offline

#3 2015-05-20 10:53:50

hifi25nl
Member
Registered: 2011-05-07
Posts: 264

Re: VNCServer does not work

See also this
https://bbs.archlinux.org/viewtopic.php … 1#p1390811

Create the file /etc/systemd/system/vncserver@:1.service.d/wait-for-systemd-user-sessions.conf with inside

[Unit]
After=systemd-user-sessions.service

Not sure if the folder name in this case must be vncserver@:1.service.d or simply vncserver@:.service.d

Offline

#4 2015-05-21 03:31:15

bibo01
Member
Registered: 2015-05-19
Posts: 2

Re: VNCServer does not work

hifi25nl wrote:

See also this
https://bbs.archlinux.org/viewtopic.php … 1#p1390811

Create the file /etc/systemd/system/vncserver@:1.service.d/wait-for-systemd-user-sessions.conf with inside

[Unit]
After=systemd-user-sessions.service

Not sure if the folder name in this case must be vncserver@:1.service.d or simply vncserver@:.service.d

I tried to implement your suggestion, trying both folder names - it does not work.

â vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2015-05-21 13:25:16 CEST; 3min 38s ago
  Process: 430 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=224/PAM)

Offline

Board footer

Powered by FluxBB