Closed nicholasadamou closed 6 years ago
Just assign a unique ID to the instant you are starting, e.g. sudo systemctl enable vncserver@1.service && sudo systemctl start vncserver@1.service
Notice the "1" after the @? That's the ID it is expecting.
Please let me know how you go
sudo systemctl enable vncserver@1.service
returns:
failed to enable unit: unit file vncserver@1.service does not exist
This does work when I type the following command:
sudo systemctl enable /lib/systemd/system/vncserver@.service
.
However, I am able to start the service after typing:
sudo systemctl enable /lib/systemd/system/vncserver@.service && sudo systemctl start vncserver@1.service
Additionally, please keep in mind that on subsequent reboots, the service is never started. Is that because I am enabling vncserver@.service
and not vncserver@1.service
?
Where did you put the service file?
I put it in /lib/systemd/system/
Should work. This just worked for me without any problems:
root@kali-pi:/home/re4son# wget -O /lib/systemd/system/vncserver@.service https://github.com/Re4son/vncservice/raw/master/vncserver@.service
root@kali-pi:/home/re4son# systemctl enable vncserver@1.service && sudo systemctl start vncserver@1.service
root@kali-pi:/home/re4son# systemctl status vncserver@1
â vncserver@1.service - VNC Service for remote desktop sharing
Loaded: loaded (/lib/systemd/system/vncserver@.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2018-04-10 06:28:49 AEST; 26s ago
Process: 840 ExecStart=/usr/bin/vncserver :1 (code=exited, status=0/SUCCESS)
Are you using Sticky Fingers or stock Kali?
Okay, well after re-running the below commands, everything seems to be running smoothly now. Don't know what was going wrong, but seems to work now.
wget -O /lib/systemd/system/vncserver@.service https://github.com/Re4son/vncservice/raw/master/vncserver@.service
systemctl enable vncserver@1.service && sudo systemctl start vncserver@1.service
Tnx @nicholasadamou this is solved my problem
Thank you, @nicholasadamou seem to work with other services as well!
I downloaded and enabled the
vncserver@
service, however,systemctl
doesn't want to start it.After running:
sudo systemctl start /ib/systemd/system/vncserver@.service
I am presented with the following error:Failed to start ib-systemd-system-vncserver\x40.service.mount: Unit ib-systemd-system-vncserver\x40.service.mount not found.
Why?
Additionally, simply running:
sudo systemctl start vncserver@.service
will invoke the following error:Running:
systemctl status vncserver@.service
outputs:Failed to get properties: Unit name vncserver@.service is neither a valid invocation ID nor unit name.