How Do You Access a Linux Server’s GUI Desktop?

Problem scenario
Normally you use Putty to a Debian distribution of a Linux server. You are having trouble using some of the Linux server's utilities. You try to run the "jsql" command, but you see this:

Apr 29, 2019 1:46:15 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
13:46:17,296 ERROR root:67 - HeadlessException, command line execution in jSQL not supported yet:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
        at java.awt.Window.<init>(Window.java:536)
        at java.awt.Frame.<init>(Frame.java:420)
        at javax.swing.JFrame.<init>(JFrame.java:233)
        at com.jsql.view.swing.JFrameView.<init>(JFrameView.java:80)
        at com.jsql.MainApplication.main(MainApplication.java:62)

How do you access a Debian distribution of Linux's GUI?

Solution
Assuming you are using Linux Mint, Kali Linux, Ubuntu or a Debian derivative of Linux, run these commands:

sudo apt -y update
sudo apt -y install xrdp
sudo service xrdp start

Now you should be able to RDP into the server (e.g., use Remote Desktop from a Windows computer). If something is blocking port 3389, you may want to consult with this posting.

Leave a comment

Your email address will not be published. Required fields are marked *