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 portFeb 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
- 167 LFX Mentorship
- 219 LFX Mentorship: Linux Kernel
- 795 Linux Foundation IT Professional Programs
- 355 Cloud Engineer IT Professional Program
- 179 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 127 Cloud Native Developer IT Professional Program
- 112 Express Training Courses
- 112 Express Courses - Discussion Forum
- 6.2K Training Courses
- 48 LFC110 Class Forum - Discontinued
- 17 LFC131 Class Forum
- 35 LFD102 Class Forum
- 227 LFD103 Class Forum
- 14 LFD110 Class Forum
- 39 LFD121 Class Forum
- 15 LFD133 Class Forum
- 7 LFD134 Class Forum
- 17 LFD137 Class Forum
- 63 LFD201 Class Forum
- 3 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 1 LFD233 Class Forum
- 2 LFD237 Class Forum
- 23 LFD254 Class Forum
- 697 LFD259 Class Forum
- 109 LFD272 Class Forum
- 3 LFD272-JP クラス フォーラム
- 10 LFD273 Class Forum
- 152 LFS101 Class Forum
- 1 LFS111 Class Forum
- 1 LFS112 Class Forum
- 1 LFS116 Class Forum
- 1 LFS118 Class Forum
- LFS120 Class Forum
- 7 LFS142 Class Forum
- 7 LFS144 Class Forum
- 3 LFS145 Class Forum
- 1 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 1 LFS157 Class Forum
- 33 LFS158 Class Forum
- 8 LFS162 Class Forum
- 1 LFS166 Class Forum
- 1 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 1 LFS178 Class Forum
- 1 LFS180 Class Forum
- 1 LFS182 Class Forum
- 1 LFS183 Class Forum
- 29 LFS200 Class Forum
- 736 LFS201 Class Forum - Discontinued
- 2 LFS201-JP クラス フォーラム
- 14 LFS203 Class Forum
- 102 LFS207 Class Forum
- 1 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 301 LFS211 Class Forum
- 55 LFS216 Class Forum
- 48 LFS241 Class Forum
- 42 LFS242 Class Forum
- 37 LFS243 Class Forum
- 15 LFS244 Class Forum
- LFS245 Class Forum
- LFS246 Class Forum
- 50 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 154 LFS253 Class Forum
- LFS254 Class Forum
- LFS255 Class Forum
- 5 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.3K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 111 LFS260 Class Forum
- 159 LFS261 Class Forum
- 41 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 20 LFS267 Class Forum
- 24 LFS268 Class Forum
- 29 LFS269 Class Forum
- 1 LFS270 Class Forum
- 199 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS274 Class Forum
- 3 LFS281 Class Forum
- 9 LFW111 Class Forum
- 260 LFW211 Class Forum
- 182 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 782 Hardware
- 198 Drivers
- 68 I/O Devices
- 37 Monitors
- 96 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 83 Storage
- 743 Linux Distributions
- 80 Debian
- 67 Fedora
- 15 Linux Mint
- 13 Mageia
- 23 openSUSE
- 143 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 348 Ubuntu
- 461 Linux System Administration
- 39 Cloud Computing
- 70 Command Line/Scripting
- Github systems admin projects
- 90 Linux Security
- 77 Network Management
- 101 System Management
- 46 Web Management
- 64 Mobile Computing
- 17 Android
- 34 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 371 Off Topic
- 114 Introductions
- 174 Small Talk
- 19 Study Material
- 507 Programming and Development
- 285 Kernel Development
- 204 Software Development
- 1.8K Software
- 211 Applications
- 180 Command Line
- 3 Compiling/Installing
- 405 Games
- 309 Installation
- 97 All In Program
- 97 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)