LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 04-06-2023, 09:30 AM   #1
skeating
LQ Newbie
 
Registered: Apr 2023
Posts: 1

Rep: Reputation: 0
vncserver service will not stay on


Hello
I am trying to run vncserver service on my CentOS7 VM. I have already done the tigervnc install and configured the file for it:

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

[Service]
#Type=simple
User=tagroot
#Group=tagroot
#WorkingDirectory=/home/tagroot
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
PIDFile=/home/tagroot/.vnc/%H%i.pid
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l tagroot -c "/usr/sbin/vncserver %i"
#PIDFile=/home/tagroot/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'

[Install]
WantedBy=multi-user.target

I have noticed that the failure always occurs after the ExecStart=/sbin/runuser -l tagroot -c "/usr/sbin/vncserver %1" line or the line ExecStart=/usr/bin/vncserver_wrapper %1. Is there something in the vncserver_wrapper file that needs to be config'd?

Yes I have commented lines in it, but in trying to make it work, I have had to modify the file. I then run sudo systemctl daemon-reload, then sudo systemctl start vncserver@:1.service and finally sudo systemctl status vncserver@:1.service, and I get the following:
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 2023-04-06 09:05:23 EDT; 18s ago
Process: 18572 ExecStart=/sbin/runuser -l tagroot -c /usr/sbin/vncserver %i (code=exited, status=1/FAILURE)
Process: 18557 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
Main PID: 18572 (code=exited, status=1/FAILURE)

Clearly something in Process 18572 is causing this. Is there something I can do?

Last edited by skeating; 04-06-2023 at 12:11 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Job for vncserver@:1.service failed. See 'systemctl status vncserver@:1.service' and anis123 Linux - Server 0 09-16-2015 08:44 AM
[SOLVED] chkconfig / service / init.d and VNCserver szejiekoh Linux - Newbie 2 12-06-2014 12:54 PM
vncserver -bash: /usr/bin/vncserver: /usr/bin/env: bad interpreter ravindert Linux - Server 1 07-23-2014 05:48 PM
Robust vncserver startup file (rc.vncserver) arobinson74 Slackware 4 05-14-2005 05:33 AM
vncserver service greenmeanie Mandriva 3 12-12-2004 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 02:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration