Welcome to the Linux Foundation Forum!

Lab 5.8 issue VNC Server

I cannot get the vnc service to begin. I made the /etc/systemd/vncserver@.service file. Here is my file configuration:

Unit]
Description=Remote desktop service (VNC) on port :%I
After=syslog.target network.target

[Service]
Type=forking
User=justine

ExecStartPre=-/usr/bin/vncserver -kill :%i
ExecStart=/usr/bin/vncserver :%i -localhost
PIDFile=/home/student/.vnc/%H:%i.pid
ExecStop=-/usr/bin/vncserver -kill :%i

[Install]
WantedBy=multi-user.target

I changed ownership to justine using chown command.
sudo systemctl start vncserver42.service gives the "service not found " error

I must be missing something. Any help apppreciated

Comments

  • Posts: 380

    Try:

    sudo systemctl start vncserver@42.service

    The @ sign causes systemctl to pass whatever is after the @ as an argument to the service.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training