permission systemd x11vnc.service solved

Message
Author
klein
Posts: 5
Joined: Wed Sep 26, 2018 8:29 pm

permission systemd x11vnc.service solved

#1 Post by klein »

hi

i have just installed mx17.01 32bit on an old hp dx2000.
i updated the system and tried setting up x11vnc with systemd,
so it will let me login headless.

i'v done this on ubuntu and sparky but it seems to me i'm having a
permission problem in mx :

Code: Select all

$ systemctl start x11vnc
Failed to add /run/systemd/ask-password to directory watch: No such file or directory
Failed to start x11vnc.service: Unknown unit: x11vnc.service

i do not wont it to ask for a password , i would like it to start automatically .
could someone point me in the right direction.



i created the file :
/etc/systemd/system/x11vnc.service

Code: Select all

 [Unit]
Description=x11vnc
Requires=display-manager.service
After=display-manager.service

 [Service]
ExecStart=/usr/bin/x11vnc -xkb -noxrecord -noxfixes -noxdamage -auth /var/run/lightdm/root/:0 -auth guess -rfbauth /etc/x11vnc.pass
ExecStop=/usr/bin/killall x11vnc
Restart=on-failure
Restart-sec=2

 [Install]
WantedBy=multi-user.target
then i did in a terminal :

Code: Select all

$ chown root:root /etc/systemd/system/x11vnc.service

Code: Select all

$ chmod 700 /etc/systemd/system/x11vnc.service

Code: Select all

$ systemctl daemon-reload

Code: Select all

$ systemctl start x11vnc
Failed to add /run/systemd/ask-password to directory watch: No such file or directory
Failed to start x11vnc.service: Unknown unit: x11vnc.service
Last edited by klein on Fri Sep 28, 2018 10:30 am, edited 2 times in total.

User avatar
dolphin_oracle
Developer
Posts: 20031
Joined: Sun Dec 16, 2007 1:17 pm

Re: permission systemd x11vnc.service

#2 Post by dolphin_oracle »

have you booted up in systemd mode? MX boots sysvinit by default, but there is the option under the "Advanced" tab in the grub boot menu.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
fehlix
Developer
Posts: 10383
Joined: Wed Apr 11, 2018 5:09 pm

Re: permission systemd x11vnc.service

#3 Post by fehlix »

Would you mind editing your post and wrap the file text-content into [code] [/code]
for better readability by marking/highlight the text-part with the cursor and pressing </> above the editor window.
Thanks
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
fehlix
Developer
Posts: 10383
Joined: Wed Apr 11, 2018 5:09 pm

Re: permission systemd x11vnc.service

#4 Post by fehlix »

dolphin_oracle wrote: Thu Sep 27, 2018 10:21 am have you booted up in systemd mode? MX boots sysvinit by default, but there is the option under the "Advanced" tab in the grub boot menu.
Exactly, that's the error message you get when running privileged systemctl commands within booted SysVinit MX17:

Code: Select all

Failed to add /run/systemd/ask-password to directory watch: No such file or directory
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
dolphin_oracle
Developer
Posts: 20031
Joined: Sun Dec 16, 2007 1:17 pm

Re: permission systemd x11vnc.service

#5 Post by dolphin_oracle »

fehlix wrote: Thu Sep 27, 2018 10:30 am
dolphin_oracle wrote: Thu Sep 27, 2018 10:21 am have you booted up in systemd mode? MX boots sysvinit by default, but there is the option under the "Advanced" tab in the grub boot menu.
Exactly, that's the error message you get when running privileged systemctl commands within booted SysVinit MX17:

Code: Select all

Failed to add /run/systemd/ask-password to directory watch: No such file or directory

as expected, since systemd isn't running. if you want to do things with .service files, which are a systemd beast, then you need to boot in systemd mode to test them.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

klein
Posts: 5
Joined: Wed Sep 26, 2018 8:29 pm

Re: permission systemd x11vnc.service

#6 Post by klein »

hi
fehlix i'm unsure of how to edit my first post on this forum, but i will try .

dolphin_oracle i was unaware that mx did not run systemd at time of my first post.
i checked for the dir for systemd, i have no love for systemd !
i was reading mx17.1 pdf and hadn't gotten to the part about systemd.
init.d is the startup that mx is using ?
at this point i'm reading about SysVinit
i would like to have the x11vnc server running at the login page, so i can login head less

User avatar
fehlix
Developer
Posts: 10383
Joined: Wed Apr 11, 2018 5:09 pm

Re: permission systemd x11vnc.service

#7 Post by fehlix »

klein wrote: Thu Sep 27, 2018 2:16 pm hi
fehlix i'm unsure of how to edit my first post on this forum, but i will try .

dolphin_oracle i was unaware that mx did not run systemd at time of my first post.
i checked for the dir for systemd, i have no love for systemd !
i was reading mx17.1 pdf and hadn't gotten to the part about systemd.
init.d is the startup that mx is using ?
at this point i'm reading about SysVinit
i would like to have the x11vnc server running at the login page, so i can login head less
To edit you first post just click the left pencil-icon at right upper corner of the post.

The default is SysVInit (init.d) start is used by MX. With in the Grub submenu
you'll find a systemd boot option. The main idea is just incase
to offer this for those who need or who prefer to have systemd running.
Their might be some glitches with systemd as it is not main focus of MX.
You'll find some statement about systemd and MX with the manual and the wiki.

The service file you created need just to be "converted" to a init.d file.
If you have checked that the command above with the service file will work,
for the start I might look and see I post a simple template for a init.d startup file.
With further instruction how to start... :snail:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

klein
Posts: 5
Joined: Wed Sep 26, 2018 8:29 pm

Re: permission systemd x11vnc.service

#8 Post by klein »

hi
does mx17.1 use init.d System-V or upstart?

User avatar
fehlix
Developer
Posts: 10383
Joined: Wed Apr 11, 2018 5:09 pm

Re: permission systemd x11vnc.service

#9 Post by fehlix »

klein wrote: Thu Sep 27, 2018 8:27 pm hi
does mx17.1 use init.d System-V or upstart?
MX default is SysVinit.
You can look in to the existing init.d scripts at /etc/init.d.

An alternative simple solution to have your vnc daemon up and running
would be to add your vnc-start -line into /etc/rc.local, so it would run at the end of the runlevel.
e.g. like this:

Code: Select all

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# x11vnc
/usr/bin/x11vnc -xkb -noxrecord -noxfixes -noxdamage -auth /var/run/lightdm/root/:0 -auth guess -rfbauth /etc/x11vnc.pass

exit 0
Might be this is already a working solution for you.
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Richard
Posts: 1577
Joined: Fri Dec 12, 2008 10:31 am

Re: permission systemd x11vnc.service

#10 Post by Richard »

MX Linux uses SysV init by default.

It makes use of the systemd shim and installs basic systemd for compatibility
with some apps that are hard-wired for systemd against all logic.

Apps are supposed to be indifferent to init system used, but (some apps) & systemd break this --hence systemd-shim.
Last edited by Richard on Fri Sep 28, 2018 1:47 pm, edited 2 times in total.
Thinkpad T430 & Dell Latitude E7450, both with MX-21.3.1
kernal 5.10.0-26-amd64 x86_64; Xfce-4.18.0; 8 GB RAM
Intel Core i5-3380M, Graphics, Audio, Video; & SSDs.

Post Reply

Return to “Software / Configuration”