The command "vncserver -list" return error code 1

60 views
Skip to first unread message

magnus...@gmail.com

unread,
Nov 21, 2019, 8:12:41 AM11/21/19
to TigerVNC User Discussion/Support
Hi,

I have noticed that the command "vncserver -list" returns error code 1.

This can be seen from this Python snippet:

>>> import subprocess
>>> subprocess.run(["vncserver", "-list"], shell=False, check=True)

TigerVNC server sessions:

X DISPLAY #    PROCESS ID
:2        1646
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['vncserver', '-list']' returned non-zero exit status 1.

The same behavior can be seen in a normal terminal:

$ vncserver -list

TigerVNC server sessions:

X DISPLAY #    PROCESS ID
:2        1646

$ echo $?
1

Is this intended or might it be a bug?

Regards
Magnus

Pierre Ossman

unread,
Dec 9, 2019, 7:40:56 AM12/9/19
to magnus...@gmail.com, TigerVNC User Discussion/Support
On 21/11/2019 14:12, magnus...@gmail.com wrote:
>
> Is this intended or might it be a bug?
>

I am not seeing that with our "vncserver". Is this perhaps a modified
version from your distribution? E.g. Red Hat does return 1 in their
version for some odd reason.

Regards
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46-13-214600

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

magnus...@gmail.com

unread,
Dec 12, 2019, 3:37:26 AM12/12/19
to TigerVNC User Discussion/Support
That is interesting.

I am running "vncserver" on CENTOS 8, which fits your Red Hat comment.

Thank you for the answer.

Regards
Magnus
Reply all
Reply to author
Forward
0 new messages