Showing posts with label X. Show all posts
Showing posts with label X. Show all posts

Saturday, April 16, 2022

Setting up X2Go

If you wish to have Windows Remote Desktop-like experience when we access a Linux hosts, X2GO is probably the best solution. X2GO runs on the NX or NoMachine protocol. Contrast to the solution that runs a X server on a Linux host, and run a client application on another host, we can leave a session and resume it with NX or X2GO, which offers the experience similar to Windows Remote Desktop. 

Below is a "minimal" setup for a Fedora Linux server and a Windows client. We call it a "minimal" setup because we do not install a full Linux desktop, rather, we install a graphical terminal like xterm. 

  1. Install the X2GO server on Fedora Linux
    
    sudo dnf install x2goserver x2goserver-xsessions xterm
        
  2. Install the X2GO client on Windows. For this, we download the client installation package, and run the installation package.
  3. Now we can use X2GO -- nothing needs to be done on the Linux server
    1. Start the X2GO client on the Windows host
    2. Create a new sessiono if we have not done so
    3. When creating the new session, we specify the Linux host we connect to and the user name we log on
    4. It is important to note that we should select the "Session Type" as "Single Application" and enter the command as "/usr/bin/xterm" since we did not install a full Linux Deskop and only installed xterm
    5. To connect to the Linux server and run xterm, we open the session.
    6. We can close the session. Next time when we open it, it resumes from where we close it

Saturday, August 29, 2020

X Server on Windows Host for Linux Virtual Machine Guests

We can run thin Linux (or other UNIX) virtual machine guests systems including Docker containers without GUI. Linux systems often need memory on the order of hundred megabytes to run. Without GUI, we can run more virtual machine instances and run the instances faster. These instances on the VMs or in the containers can still run GUI applications if we install X server on the host. 

For host systems that comes with X natively, this is quite easy, and just need to inform the guest which display to use. However, not all host systems have X natively. For instance, Windows does not come with one natively. Luckily, there are  a few free or inexpensive X Server for Windows available. Below are the simple steps to realize this idea on a Windows host,

  1. Download and install vcXsrv. 
  2. Launch vcXsrv using the XLaunch shutcut. If you run it on the host for the guest Linux systems on the hosted VMs, and the host has firewall like Windows Defender to prevent outside access to the X server, you can safely check "Disable access control" to allow any X client to display on the server. 
  3. vcXsrv has a tray icon on Windows. Right-click the tray icon, open "Show log", and the log will tell us what host IP addresses the X server is bound to, such as, 192.168.1.101. 
  4. Log in to a Linux guest,  such as, ssh to the Linux guest,
  5. Set the DISPLAY environment variable, e.g., if our host IP address is 192.168.1.101
    export DISPLAY=192.168.1.101:0.0
    
  6. Lanuch a GUI application from the Linux guest, and we shall see it's running and the X server is displaying the GUI.

Very importantly, we are not using SSH's X forwarding feature here. Not everyone can successfully enable SSH's X forwarding feature smoothly. This method is simpler to set up to those who have a problem to set SSH's X forwarding up. 

In next post, we shall discuss what it takes to set up SSH's X forwarding.


Thursday, August 27, 2020

X Servers for Windows

When we run multiple thin Linux/Unix systems on virtual machines on a Windows host, we wish to have X server for windows. There are in fact a few free ones, at least for personal use. Here are some of these X servers.

  • MobaXterm that integrates PuTTY and Cygwin/X with feature-rich GUI
     
  • VcXsrv that is based on from xorg's source code, compiled with Visual Studio (Visual C++, so vc - X - srv)
     
  • Cygwin/X.
     
  • Xming. An older version of Xming is available for free, but new versions require a donation like $20.