Monday, October 12, 2020

Xquartz, XDMCP & Xfce tips (aka restoring my sanity)

 (from the X11 is fun!! department)

Hi everyone,

This is a quick posting.  For various reasons too long to go into here, I've been trying to connect to a Ubuntu 18.04 LTS Linux box via XDMCP from a MacBook Pro using XQuartz (MacOS Catalina) or from a Microsoft Surface Pro using VcXsrv (Windows 10).

The key points for all operating systems - you must set up your Ubuntu Linux box to run XDMCP.  All of these commands need to be done from a terminal window on the Linux box you're connecting to:

  • You have to install and select Xfce - it won't work with any of the other modern desktops, since Remote X11 is 2D only.  Try this to install it:
  • sudo apt-get install xfce4
  • You have to use Lightdm - this doesn't seem to work right with GDM.  To install:
  • sudo apt-get install lightdm
  • Make sure it's selected with:
  • sudo dpkg-reconfigure gdm3
  • You have to turn on XDMCP in Lightdm by adding the following to /etc/lightdm/lightdm.conf:
  • [XDMCPServer]
    enabled=true
  • You have to install an additional Greeter with Lightdm.  I used lightdm-gtk-greeter which I installed with:
  • sudo apt install lightdm-gtk-greeter lightdm-gtk-greeter-settings
  • Check firewalls, etc.
Okay, most likely, your Windows box will work at this point.  Set up a VcXsrv profile using XDMCP and point it at your Ubuntu Linux box.  The Mac - using XQuartz - needs additional steps:
  • You have to manually start the session via command line - replacing the 192.168.0.71 with your Ubuntu XDMCP IP address:
  • X -query 192.168.0.71 -terminate
  • It turns out the Mac doesn't define the "Super" key, so Xfce reacts unpredictably.  For me, it was a broken spacebar.  There was no way to enter a space - the cursor would just blink at you frustratingly. 
    • To fix this, in Xfce, go to Applications --> Settings --> iBus Preferences and remove the "<super>Space" mapping from the Next input method field on the General tab.  Since I don't need iBus, I just deleted the mapping entirely.
  • Additionally, starting Chrome would prevent any text from being entered.  This turned out to be a old Chrome App I had loaded by default.
    • To fix this temporarily, I went into Chrome extensions (chrome://extensions/) and unchecked "Google Play Music".  You don't have to uninstall it - just disable it.
Good luck!!

Cheers,
Paul