1

I'm trying to setup a Graphical Desktop on top of my RHEL server, so when I connect to it, it won't just be CLI, it will be a full GUI.

(I.e. my setup now is, I use Putty on Windows to connect to my various Linux remote servers, and for our Windows remote servers, we use RDP, which is a full GUI). Essentially, I'm looking for the equivalent of RDP but for Linux remote servers. So if I'm on my Windows client, I log in (and instead of Putty) use some type of program like it, but one that can show a fully GUI.

Is looking at VNC or freeNX my best option? I've tried x-11, but it was painfully slow. I'm hoping I can do something that's like the Windows RDP I use - no latency, full desktop GUI.

I'm confused on to fully set it up. I've seen guides from my research for yum groupinstall <packagename> (and using "Desktop" or "KDE Desktop" "GNOME desktop") etc, as well as seeing guides to install a VNC server yum install vncserver (then configuring it) and trying to use VNC Viewer or Tiger VNC to connect to it from Windows side.

My confusion lies in those. Are they separate or related processes? I.e. if I install "Desktop" or "KDE" it seems like I have just to just change some settings and enable it to GUI from CLI - does that I mean I don't need a VNC program? I feel like I still need the VNC Viewer program on my windows side (a la in place of Putty to connect to it, but hopefully to show the GUI and not just CLI)

Am I completely wrong on the order/steps I need to? In the end, I'm looking to be able to open something on the Windows end, (putty or vnc viewer etc) and log into my server (by hostname or IP) just Like I do with Putty but have a full graphical experience - if this is possible.

I'm running RHEL 6.8 on the linux side - and my client machine, is Windows 7.

EDIT: In regards to the comments, editing in to add my output of netstat command.

EDIT 2: Switching netsat -l to netstat -nlp

rr83008@LAB2138:~> netstat -nlp
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 0.0.0.0:8060                0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:56765             0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:445                 0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:3838                0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:8000                0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:2049                0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:801                 0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:9121              0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:8001              0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:9090              0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:3939                0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:9187              0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:36196               0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:5989                0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:44678               0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:6311                0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:44075               0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:875                 0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:139                 0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:37419             0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:9100              0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:40590             0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:4750                0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:6000                0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:9168              0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:8080              0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:8081              0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:6001                0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:35218               0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:49522               0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:8787                0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:34421             0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:47830             0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:45207               0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:4151                0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:8888                0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:6010              0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:51002             0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:6011              0.0.0.0:*                   LISTEN      -
tcp        0      0 0.0.0.0:443                 0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:43451             0.0.0.0:*                   LISTEN      -
tcp        0      0 127.0.0.1:46043             0.0.0.0:*                   LISTEN      -
udp        0      0 0.0.0.0:47968               0.0.0.0:*                               -
udp        0      0 0.0.0.0:58978               0.0.0.0:*                               -
udp        0      0 0.0.0.0:875                 0.0.0.0:*                               -
udp        0      0 0.0.0.0:111                 0.0.0.0:*                               -
udp     9160      0 0.0.0.0:631                 0.0.0.0:*                               -
udp        0      0 0.0.0.0:760                 0.0.0.0:*                               -
udp        0      0 10.XXX.XX.65:123            0.0.0.0:*                               -
udp        0      0 127.0.0.1:123               0.0.0.0:*                               -
udp        0      0 0.0.0.0:123                 0.0.0.0:*                               -
udp        0      0 0.0.0.0:2049                0.0.0.0:*                               -
udp        0      0 10.XXX.XX.255:137           0.0.0.0:*                               -
udp        0      0 10.XXX.XX.65:137            0.0.0.0:*                               -
udp        0      0 0.0.0.0:137                 0.0.0.0:*                               -
udp        0      0 10.XXX.XX.255:138           0.0.0.0:*                               -
udp        0      0 10.XXX.XX.65:138            0.0.0.0:*                               -
udp        0      0 0.0.0.0:138                 0.0.0.0:*                               -
udp        0      0 127.0.0.1:659               0.0.0.0:*                               -
udp        0      0 0.0.0.0:43291               0.0.0.0:*                               -
udp        0      0 0.0.0.0:40353               0.0.0.0:*                               -
udp        0      0 0.0.0.0:47924               0.0.0.0:*                               -
udp        0      0 0.0.0.0:54209               0.0.0.0:*                               -
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node PID/Program name    Path
unix  2      [ ACC ]     STREAM     LISTENING     12310  -                   @/var/run/hald/dbus-pfcv2kTrVT
unix  2      [ ACC ]     STREAM     LISTENING     36108297 -                   @/tmp/dbus-O9QGf8R8Zc
unix  2      [ ACC ]     STREAM     LISTENING     6556269 -                   /tmp/rstudio-rserver/session-server-rpc.socket
unix  2      [ ACC ]     STREAM     LISTENING     6556128 -                   /tmp/rstudio-rserver/rserver.socket
unix  2      [ ACC ]     STREAM     LISTENING     6556314 -                   /tmp/rstudio-rserver/rserver-monitor.socket
unix  2      [ ACC ]     STREAM     LISTENING     6556330 -                   /tmp/rstudio-rserver/rserver-launcher.socket
unix  2      [ ACC ]     STREAM     LISTENING     6569731 -                   /tmp/shiny-server/rserver-monitor.socket
unix  2      [ ACC ]     STREAM     LISTENING     30610346 -                   /tmp/connect-server/rserver-monitor.socket
unix  2      [ ACC ]     STREAM     LISTENING     31607547 -                   @/tmp/.X11-unix/X0
unix  2      [ ACC ]     STREAM     LISTENING     31607326 -                   @/tmp/.X11-unix/X1
unix  2      [ ACC ]     STREAM     LISTENING     31607327 -                   /tmp/.X11-unix/X1
unix  2      [ ACC ]     STREAM     LISTENING     12258  -                   /var/run/acpid.socket
unix  2      [ ACC ]     STREAM     LISTENING     31607548 -                   /tmp/.X11-unix/X0
unix  2      [ ACC ]     STREAM     LISTENING     27487395 -                   /var/opt/gitlab/postgresql/.s.PGSQL.5432
unix  2      [ ACC ]     STREAM     LISTENING     128344874 28107/gconfd-2      /tmp/orbit-rr83008/linc-6dcb-0-25c293a147828
unix  2      [ ACC ]     STREAM     LISTENING     128344889 28108/gnome-keyring /tmp/orbit-rr83008/linc-6dc9-0-434569cf4e5ef
unix  2      [ ACC ]     STREAM     LISTENING     14370  -                   /var/run/tog-pegasus/cimxml.socket
unix  2      [ ACC ]     STREAM     LISTENING     128344856 28108/gnome-keyring /tmp/keyring-L2uzmu/socket
unix  2      [ ACC ]     STREAM     LISTENING     10459  -                   /var/run/vmware/guestServicePipe
unix  2      [ ACC ]     STREAM     LISTENING     128344893 28108/gnome-keyring /tmp/keyring-L2uzmu/socket.ssh
unix  2      [ ACC ]     STREAM     LISTENING     128344895 28108/gnome-keyring /tmp/keyring-L2uzmu/socket.pkcs11
unix  2      [ ACC ]     STREAM     LISTENING     12305  -                   @/var/run/hald/dbus-EnsWjU8vSp
unix  2      [ ACC ]     STREAM     LISTENING     7401   -                   @/com/ubuntu/upstart
unix  2      [ ACC ]     STREAM     LISTENING     27496827 -                   /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket
unix  2      [ ACC ]     STREAM     LISTENING     27484394 -                   /var/opt/gitlab/redis/redis.socket
unix  2      [ ACC ]     STREAM     LISTENING     128444503 -                   /var/opt/quest/vas/vasd/.vasd_11406
unix  2      [ ACC ]     STREAM     LISTENING     27498254 -                   /var/opt/gitlab/gitaly/gitaly.socket
unix  2      [ ACC ]     STREAM     LISTENING     10834  -                   /var/run/rpcbind.sock
unix  2      [ ACC ]     STREAM     LISTENING     27498301 -                   /var/opt/gitlab/gitlab-workhorse/socket
unix  2      [ ACC ]     STREAM     LISTENING     33632870 -                   /var/nmbd/unexpected
unix  2      [ ACC ]     STREAM     LISTENING     11093  -                   /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     42567568 -                   @/tmp/dbus-XpphHBjGKs
unix  2      [ ACC ]     STREAM     LISTENING     11300  -                   /var/opt/quest/vas/vasd/.vasd40_ipc_sock
unix  2      [ ACC ]     STREAM     LISTENING     11303  -                   /var/opt/quest/vas/vasd/.vasd_2000
unix  2      [ ACC ]     STREAM     LISTENING     11306  -                   /var/opt/quest/vas/vasd/.vasd_2003
unix  2      [ ACC ]     STREAM     LISTENING     11313  -                   /var/opt/quest/vas/vasd/.vasd_2002
unix  2      [ ACC ]     STREAM     LISTENING     14161  -                   /var/run/abrt/abrt.socket
unix  2      [ ACC ]     STREAM     LISTENING     11315  -                   /var/opt/quest/vas/vasd/.vasd_2001
unix  2      [ ACC ]     STREAM     LISTENING     128344845 28103/dbus-daemon   @/tmp/dbus-Qrg0vIDr4c

EDIT 3: This is what I get from "vncserver -list"

rr83008@LAB2138:~> service vncserver start
rr83008@:LAB2138:~> vncserver -list

TigerVNC server sessions:

X DISPLAY #     PROCESS ID
  • Have you confirmed that vncserver is running (for example by running netstat)? If vncserver is running try to connect to it not juz typing ip, but ip with port, for example: $your_ip:5901 – mrc02_kr Jul 11 '17 at 17:32
  • I did - but I'm not an expert so I might be doing it wrong. I ran netstat -L and didn't see much, i'll post back with my output, but I did the IPtables command to add port 5901 and 5902, and when I view the file in Vi, it does show those ports as saved and added. And to your 2nd part, from VNCviewer's end, I've tried ip, ip:5901, and ip:5902. All of them spit out the same error: "The connection was refused by the computer" and that's all the detail it gives. Nothing specific on what went wrong. – robromo Jul 11 '17 at 17:35
  • "Connection refused" means that probably there is no service on port you are trying connect to. Show your netstat output and show how you run vncserver. It probably doesn't start automatically, so you have to run something like that: vncserver -name "gnome" :1 . Check [this](automatically) manpage for reference. – mrc02_kr Jul 11 '17 at 17:44
  • @mrc02_kr Based on Stack overflow's tooltip that popped up on if I'm adding new info - also since it's so many characters I can't paste it as a comment - I'm editing the output of my netstat -l to main post at the end. Maybe you'll notice something off from it! – robromo Jul 11 '17 at 20:52
  • Please change netstat -l to netstat -nlp – mrc02_kr Jul 11 '17 at 21:05
3

Yes, installing a GUI on your server is separate from installing and configuring a VNC server. Most likely, you'll want to install a desktop environment on your server first, and make sure it works, then configure the VNC server.

In general, there are a lot of ways to set up remote access to a Linux GUI; I'll describe my approach, for accessing a Red Hat or Fedora desktop from a Windows system, which I think is relatively straightforward.

The simplest way to install a desktop environment is to use a group package that will include the GNOME desktop by default:

# yum group install graphical-server-environment

After installing and verifying you've got a working desktop environment on the server, continue by installing and configuring the VNC server. To install TigerVNC:

# yum install tigervnc-server tigervnc-server-module

If both systems are in a LAN, i.e., safe behind a firewall, than you should be able to safely open the ports on the server's local firewall:

# firewall-cmd --permanent --add-service vnc-server && firewall-cmd --reload

Otherwise, you'll want to set up an SSH tunnel.

Now, log on with the regular user account you want to have access the desktop, and create a password for accessing the VNC server.

$ vncpasswd

On the other system, you'll want a VNC client, like vncviewer, the TigerVNC client.

When I actually want to access the GUI remotely, I open up an SSH session with PuTTY, and send a command (specifying a session ID for VNC, and that it will close the session when I log out of the desktop session):

$ vncserver :2 -autokill

(Note that this PuTTY session could also be used for an SSH tunnel.)

Then, I open the vncviewer application, and fill in the IP address of the server and the session ID, e.g, 1.2.3.4:2

It should prompt you for your VNC password, and connect you to the desktop.

2

I use following setup:

  • XMing (http://www.straightrunning.com/XmingNotes/) is installed on Windows
  • No X11 server nor display manager is launched on Linux
  • I connect to Linux with SSH and "X11 forwarding enabled" option in Putty
  • SSH creates tunnel for me and sets DISPLAY variable.
  • I then run any X client (like xterm or chromium) and it is displayed on my Windows machine.

It works pretty fast.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.