You are not logged in.

#1 2013-11-19 10:31:15

Nadstaky
Member
Registered: 2013-10-08
Posts: 9

my x11vnc.service does not work, it used to...

Hello,

I've created /etc/init.d/x11vnc :

#!/bin/bash

# Waiting for X to run
while ! pgrep -f X;
  do sleep 0.1;
done

# Now we get auth file
Auth=$(ps wwwwaux | grep xauth  | sed -n 2p | awk -F' ' '{print $14}')
sudo chmod 666 $Auth

case "$1" in
  start)
    [[ -z "$PID" ]] && /usr/bin/x11vnc -auth $Auth -noxdamage -many -display :0 -forever -bg -geometry 1600x1000 &> /dev/null &
    ;;
  stop)
    [[ ! -z "$PID" ]]  &  kill $PID &> /dev/null
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"
esac
exit 0

Launching x11vnc from /etc/init.d/x11vnc start *ALWAYS* works fine.

Then, I created a x11vnc.service file :


[Unit]
Description=VNC Server for X11
Requires=graphical.target
After=graphical.target

[Service]
Type=forking
ExecStart=/etc/init.d/x11vnc start
ExecStop=/etc/init.d/x11vnc stop
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

It used to work in the past (<1 month ago)

Please help me for a working .service file, it's out of my knowledge...

I thank you,

Nad

Last edited by Nadstaky (2013-11-19 14:54:18)

Offline

#2 2013-11-19 14:39:04

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: my x11vnc.service does not work, it used to...

When posting configs, code or command output, please use [ code ] tags https://bbs.archlinux.org/help.php#bbcode

like this

Offline

#3 2013-11-19 14:56:04

Nadstaky
Member
Registered: 2013-10-08
Posts: 9

Re: my x11vnc.service does not work, it used to...

Done smile

Offline

#4 2013-12-30 12:59:10

ArgelErx
Member
Registered: 2013-12-30
Posts: 13

Re: my x11vnc.service does not work, it used to...

Nadstaky wrote:

[...]
Please help me for a working .service file, it's out of my knowledge...

See https://bbs.archlinux.org/viewtopic.php?id=168756.

Offline

Board footer

Powered by FluxBB