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:
[email protected]:~$ 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:
[email protected]:~$ 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:
[email protected]:~$ 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:
[email protected]:~$ 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 [email protected]: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='[email protected]: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]: [email protected]: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='[email protected]: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='[email protected]: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='[email protected]: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 "[email protected]: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
- 9.1K All Categories
- 15 LFX Mentorship
- 68 LFX Mentorship: Linux Kernel
- 380 Linux Foundation Boot Camps
- 233 Cloud Engineer Boot Camp
- 75 Advanced Cloud Engineer Boot Camp
- 30 DevOps Engineer Boot Camp
- 9 Cloud Native Developer Boot Camp
- 976 Training Courses
- 15 LFC110 Class Forum
- 16 LFD102 Class Forum
- 106 LFD103 Class Forum
- 6 LFD121 Class Forum
- 56 LFD201 Class Forum
- 1 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum
- 19 LFD254 Class Forum
- 450 LFD259 Class Forum
- 90 LFD272 Class Forum
- 1 LFD272-JP クラス フォーラム
- 16 LFS200 Class Forum
- 712 LFS201 Class Forum
- LFS201-JP クラス フォーラム
- 282 LFS211 Class Forum
- 50 LFS216 Class Forum
- 27 LFS241 Class Forum
- 28 LFS242 Class Forum
- 19 LFS243 Class Forum
- 6 LFS244 Class Forum
- 12 LFS250 Class Forum
- LFS250-JP クラス フォーラム
- 113 LFS253 Class Forum
- 814 LFS258 Class Forum
- 8 LFS258-JP クラス フォーラム
- 54 LFS260 Class Forum
- 81 LFS261 Class Forum
- 18 LFS262 Class Forum
- 76 LFS263 Class Forum
- 14 LFS264 Class Forum
- 10 LFS266 Class Forum
- 10 LFS267 Class Forum
- 9 LFS268 Class Forum
- 6 LFS269 Class Forum
- 182 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- 191 LFW211 Class Forum
- 114 LFW212 Class Forum
- 880 Hardware
- 207 Drivers
- 74 I/O Devices
- 44 Monitors
- 115 Multimedia
- 205 Networking
- 98 Printers & Scanners
- 82 Storage
- 730 Linux Distributions
- 85 Debian
- 64 Fedora
- 12 Linux Mint
- 13 Mageia
- 22 openSUSE
- 127 Red Hat Enterprise
- 33 Slackware
- 13 SUSE Enterprise
- 349 Ubuntu
- 450 Linux System Administration
- 33 Cloud Computing
- 64 Command Line/Scripting
- Github systems admin projects
- 89 Linux Security
- 76 Network Management
- 105 System Management
- 45 Web Management
- 51 Mobile Computing
- 19 Android
- 19 Development
- 1.2K New to Linux
- 1.1K Getting Started with Linux
- 501 Off Topic
- 121 Introductions
- 193 Small Talk
- 19 Study Material
- 756 Programming and Development
- 243 Kernel Development
- 479 Software Development
- 903 Software
- 247 Applications
- 178 Command Line
- 2 Compiling/Installing
- 73 Games
- 314 Installation
- 26 All In Program
- 26 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)