vncserver & vncviewer

Hi guys,
In chapter 30 Remote Graphical Login, it's suggested we try running vncserver, followed by vncviewer:1.
Each time I try vncviewer:1 (I have also tried 2, 3, 4, 5, 6, etc), I get a GUI popup "Unable connect to socket: Connection refused (111)". I looked around online and didn't find a ton of useful info. Is there some configuration file out there that I need to update for this to work?
vncserver output:
- ronnie@mint-laptop:~$ vncserver
- New 'mint-laptop:1 (ronnie)' desktop at :1 on machine mint-laptop
- Starting applications specified in /etc/X11/Xvnc-session
- Log file is /home/ronnie/.vnc/mint-laptop:1.log
- Use xtigervncviewer -SecurityTypes VncAuth -passwd /home/ronnie/.vnc/passwd :1 to connect to the VNC server.
vncviewer:1 console output:
- ronnie@mint-laptop:~$ vncviewer localhost:1
- TigerVNC Viewer 64-bit v1.10.1
- Built on: 2020-04-09 06:49
- Copyright (C) 1999-2019 TigerVNC Team and many others (see README.rst)
- See https://www.tigervnc.org for information on TigerVNC.
- Tue Feb 2 16:40:43 2021
- DecodeManager: Detected 4 CPU core(s)
- DecodeManager: Creating 4 decoder thread(s)
- CConn: unable connect to socket: Connection refused (111)
GUI popup output:
- unable connect to socket: Connection refused (111)
Comments
-
Hi rroberts,
The output you shared from the vncviewer is indicating there is no vnc-server listening on the port. That is expected output when the vncviewer cannot find the server.
Now the vncserver, did you set a password for the vncserver with the vncpasswd command? The password should be set before attempting to start the vncserver. Once the server is confirmed running , use another terminal session to run the vncviewer.
Regards Lee
1 -
Thanks for helping. I did set the password with the vncpasswd command. When I check my ~/.vnc/mint-laptop:1.log file, I get the following, which does indicate it's running. I'm not quite Linux savvy to know how to check if a port is being blocked. (I don't have a firewall running on my pc)
- Wed Feb 3 14:28:59 2021
- vncext: VNC extension running!
- vncext: Listening for VNC connections on local interface(s), port 5901
- vncext: created VNC server for screen 0
- X connection to :1 broken (explicit kill or server shutdown).
- Wed Feb 3 14:29:00 2021
- ComparingUpdateTracker: 0 pixels in / 0 pixels out
- ComparingUpdateTracker: (1:-nan ratio)
- Killing Xtigervnc process ID 30828... which seems to be deadlocked. Using SIGKILL!
0 -
Hi @rroberts ,
I did a test on Ubuntu 18.04, the server started and I can get to the VNC GUI using vncviewer. BTW, what distro and version you are using?
Let's see if the ports are open:
Before starting vncserver:
luis@ubuntu18server:~$ ss -tln
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 127.0.0.53%lo:53 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 511 :80 *:
LISTEN 0 128 [::]:22 [::]:*After started the vncserver:
luis@ubuntu18server:~$ ss -tln
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 5 127.0.0.1:5901 0.0.0.0:*
LISTEN 0 128 127.0.0.53%lo:53 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 5 [::1]:5901 [::]:*
LISTEN 0 511 :80 *:
LISTEN 0 128 [::]:22 [::]:*Regards,
Luis.0 -
Ahh. Thank you. I was trying to find a command that would show the ports that were open. It appears my 5901 port is not listening for some reason.
My distro is Linux Mint. I understand that some distros handle things better, but I'm trying to get better at addressing my issues, as that's something I'll need to do in the future.
- State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
- LISTEN 0 4096 127.0.0.1:42631 0.0.0.0:*
- LISTEN 0 10 0.0.0.0:3689 0.0.0.0:*
- LISTEN 0 32 192.168.122.1:53 0.0.0.0:*
- LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:*
- LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
- LISTEN 0 5 127.0.0.1:631 0.0.0.0:*
- LISTEN 0 10 [::]:3689 [::]:*
- LISTEN 0 128 [::]:22 [::]:*
- LISTEN 0 5 [::1]:631 [::]:*
0 -
Hi @rroberts ,
If I'm not wrong, Linux Mint comes with ufw by default (firewall). So let's check if it's enabled:
sudo ufw status
Regards,
Luis.0 -
Firewall is inactive.
0 -
Hi @rroberts ,
I suggest to do a test on Ubuntu 18/20 or CentOS 8, so I can try to reproduce the issue, if any. Perhaps it's just your distro that's failing, but I don't have Linux Mint here to do a test case.
Regards,
Luis.0 -
Hi there!
I've same issue in my manjaro linux. Service does not start, listen to port- Feb 13 11:01:54 manjaropluser sudo[3063]: pluser : TTY=pts/1 ; PWD=/home/pluser ; USER=root ; COMMAND=/usr/bin/systemctl start vncserver@:1
- Feb 13 11:01:54 manjaropluser sudo[3063]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
- Feb 13 11:01:54 manjaropluser kernel: audit: type=1101 audit(1613203314.441:374): pid=3063 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="pluser" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
- Feb 13 11:01:54 manjaropluser kernel: audit: type=1110 audit(1613203314.441:375): pid=3063 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
- Feb 13 11:01:54 manjaropluser kernel: audit: type=1105 audit(1613203314.441:376): pid=3063 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
- Feb 13 11:01:54 manjaropluser audit[3063]: USER_START pid=3063 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
- Feb 13 11:01:54 manjaropluser systemd[1]: Starting Remote desktop service (VNC)...
- Feb 13 11:01:54 manjaropluser kernel: audit: type=1006 audit(1613203314.458:377): pid=3072 uid=0 subj==unconfined old-auid=4294967295 auid=1001 tty=(none) old-ses=4294967295 ses=13 res=1
- Feb 13 11:01:54 manjaropluser kernel: audit: type=1105 audit(1613203314.461:378): pid=3072 uid=0 auid=1001 ses=13 subj==unconfined msg='op=PAM:session_open grantors=pam_loginuid,pam_namespace,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="remote" exe="/usr/bin/vncsession" hostname=203.0.113.20 addr=203.0.113.20 terminal=? res=success'
- Feb 13 11:01:54 manjaropluser audit[3072]: USER_START pid=3072 uid=0 auid=1001 ses=13 subj==unconfined msg='op=PAM:session_open grantors=pam_loginuid,pam_namespace,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="remote" exe="/usr/bin/vncsession" hostname=203.0.113.20 addr=203.0.113.20 terminal=? res=success'
- Feb 13 11:01:54 manjaropluser vncsession[3072]: pam_unix(tigervnc:session): session opened for user remote(uid=1001) by (uid=0)
- Feb 13 11:01:54 manjaropluser systemd[1]: Started Remote desktop service (VNC).
- Feb 13 11:01:54 manjaropluser audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=vncserver@:1 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
- Feb 13 11:01:54 manjaropluser vncsession[3072]: vncsession: vncserver exited with status=71
- Feb 13 11:01:54 manjaropluser vncsession[3072]: pam_unix(tigervnc:session): session closed for user remote
- Feb 13 11:01:54 manjaropluser audit[3072]: USER_END pid=3072 uid=0 auid=1001 ses=13 subj==unconfined msg='op=PAM:session_close grantors=pam_loginuid,pam_namespace,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="remote" exe="/usr/bin/vncsession" hostname=203.0.113.20 addr=203.0.113.20 terminal=? res=success'
- Feb 13 11:01:54 manjaropluser sudo[3063]: pam_unix(sudo:session): session closed for user root
- Feb 13 11:01:54 manjaropluser audit[3063]: USER_END pid=3063 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
- Feb 13 11:01:54 manjaropluser audit[3063]: CRED_DISP pid=3063 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
- Feb 13 11:01:54 manjaropluser systemd[1]: vncserver@:1.service: Succeeded.
- Feb 13 11:01:54 manjaropluser kernel: audit: type=1130 audit(1613203314.461:379): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=vncserver@:1 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
- Feb 13 11:01:54 manjaropluser kernel: audit: type=1106 audit(1613203314.461:380): pid=3072 uid=0 auid=1001 ses=13 subj==unconfined msg='op=PAM:session_close grantors=pam_loginuid,pam_namespace,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="remote" exe="/usr/bin/vncsession" hostname=203.0.113.20 addr=203.0.113.20 terminal=? res=success'
- Feb 13 11:01:54 manjaropluser kernel: audit: type=1106 audit(1613203314.461:381): pid=3063 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
- Feb 13 11:01:54 manjaropluser kernel: audit: type=1104 audit(1613203314.461:382): pid=3063 uid=1000 auid=1000 ses=4 subj==unconfined msg='op=PAM:setcred grantors=pam_env,pam_fprintd acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
- Feb 13 11:01:54 manjaropluser audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=vncserver@:1 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
- Feb 13 11:01:54 manjaropluser kernel: audit: type=1131 audit(1613203314.464:383): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=vncserver@:1 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Interesting things are "vncsession: vncserver exited with status=71" and "pam_systemd_home(sudo:account): Not a user managed by systemd-homed: No home for user pluser known"
But somehow "vncserver@:1.service: Succeeded"
0 -
Hi @pluser ,
Please check on topic "Target Linux Distributions", of Chapter 1 on LFS201, so you can work on a supported OS and we can provide the support you need.
Thanks,
Luis.0 -
to be specific, we do not support either Mint or Manjaro--we just cannot support minor distros as it requires too much work. we do not disapprove of either distro. however, manjaro is very different as it is based on archlinux which is cutting edge and rolling, mint is a unneccesary clone of ubuntu which is built on debian, so there are two structures built on top of a steady foundation, and would be more likely to work. so good luck -- i am sure this is fixable but we have neither the systems or time to sort out this corner case
1
Categories
- All Categories
- 138 LFX Mentorship
- 138 LFX Mentorship: Linux Kernel
- 815 Linux Foundation IT Professional Programs
- 366 Cloud Engineer IT Professional Program
- 184 Advanced Cloud Engineer IT Professional Program
- 83 DevOps Engineer IT Professional Program
- 151 Cloud Native Developer IT Professional Program
- 142 Express Training Courses & Microlearning
- 142 Express Courses - Discussion Forum
- Microlearning - Discussion Forum
- 6.6K Training Courses
- 48 LFC110 Class Forum - Discontinued
- 72 LFC131 Class Forum
- 49 LFD102 Class Forum
- 234 LFD103 Class Forum
- 21 LFD110 Class Forum
- 44 LFD121 Class Forum
- LFD123 Class Forum
- LFD125 Class Forum
- 18 LFD133 Class Forum
- 8 LFD134 Class Forum
- 18 LFD137 Class Forum
- 72 LFD201 Class Forum
- 5 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 2 LFD233 Class Forum
- 4 LFD237 Class Forum
- 24 LFD254 Class Forum
- 719 LFD259 Class Forum
- 111 LFD272 Class Forum - Discontinued
- 4 LFD272-JP クラス フォーラム
- 13 LFD273 Class Forum
- 240 LFS101 Class Forum
- 2 LFS111 Class Forum
- 3 LFS112 Class Forum
- 3 LFS116 Class Forum
- 7 LFS118 Class Forum
- LFS120 Class Forum
- 9 LFS142 Class Forum
- 8 LFS144 Class Forum
- 4 LFS145 Class Forum
- 4 LFS146 Class Forum
- 16 LFS148 Class Forum
- 15 LFS151 Class Forum
- 5 LFS157 Class Forum
- 65 LFS158 Class Forum
- LFS158-JP クラス フォーラム
- 11 LFS162 Class Forum
- 2 LFS166 Class Forum
- 7 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 3 LFS178 Class Forum
- 3 LFS180 Class Forum
- 2 LFS182 Class Forum
- 5 LFS183 Class Forum
- 33 LFS200 Class Forum
- 737 LFS201 Class Forum - Discontinued
- 3 LFS201-JP クラス フォーラム - Discontinued
- 20 LFS203 Class Forum
- 135 LFS207 Class Forum
- 2 LFS207-DE-Klassenforum
- 2 LFS207-JP クラス フォーラム
- 302 LFS211 Class Forum
- 56 LFS216 Class Forum
- 53 LFS241 Class Forum
- 50 LFS242 Class Forum
- 38 LFS243 Class Forum
- 16 LFS244 Class Forum
- 5 LFS245 Class Forum
- LFS246 Class Forum
- LFS248 Class Forum
- 87 LFS250 Class Forum
- 2 LFS250-JP クラス フォーラム
- 1 LFS251 Class Forum
- 156 LFS253 Class Forum
- 1 LFS254 Class Forum
- 2 LFS255 Class Forum
- 12 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.3K LFS258 Class Forum
- 11 LFS258-JP クラス フォーラム
- 135 LFS260 Class Forum
- 161 LFS261 Class Forum
- 43 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 24 LFS267 Class Forum
- 25 LFS268 Class Forum
- 37 LFS269 Class Forum
- 7 LFS270 Class Forum
- 202 LFS272 Class Forum - Discontinued
- 2 LFS272-JP クラス フォーラム
- 4 LFS147 Class Forum
- 2 LFS274 Class Forum
- 4 LFS281 Class Forum
- 16 LFW111 Class Forum
- 262 LFW211 Class Forum
- 185 LFW212 Class Forum
- 15 SKF100 Class Forum
- 1 SKF200 Class Forum
- 2 SKF201 Class Forum
- 797 Hardware
- 199 Drivers
- 68 I/O Devices
- 37 Monitors
- 104 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 85 Storage
- 761 Linux Distributions
- 82 Debian
- 67 Fedora
- 17 Linux Mint
- 13 Mageia
- 23 openSUSE
- 149 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 355 Ubuntu
- 470 Linux System Administration
- 39 Cloud Computing
- 71 Command Line/Scripting
- Github systems admin projects
- 95 Linux Security
- 78 Network Management
- 102 System Management
- 47 Web Management
- 69 Mobile Computing
- 18 Android
- 38 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 379 Off Topic
- 115 Introductions
- 177 Small Talk
- 26 Study Material
- 808 Programming and Development
- 304 Kernel Development
- 486 Software Development
- 1.8K Software
- 263 Applications
- 183 Command Line
- 3 Compiling/Installing
- 988 Games
- 317 Installation
- 103 All In Program
- 103 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)