One of the things still left to be done on my Ubuntu laptop is to get the full resolution output on my LG 5K monitor. This is still work in progress, but one of the most useful tools for getting there is xrandr.[Read more…] about Show Monitor Resolutions with xrandr
I needed to forward X11 output from one of my Linux servers recently to run virt-manager (manager for virtual machines in KVM), and because it's been a while I had to download and install X11 server again.
As some of you know, Xorg server is no longer shipped/installed with macOS by default. So you have to download it from XQuartz page: https://www.xquartz.org/releases/index.html. Usually you do it, install it and that's it – no additional steps are needed.
But things are slightly different for the macOS High Sierra, apparently.
The latest release hasn't been updated since 2016 which I believe is before High Sierra – which explains why things don't "just work" anymore. Fear not though – I tracked the issue down and it's explained below.
UPDATE 03/2019: MacOS Mojave works just great, you may skip Step 3 in the procedure below.
Steps to get X11 Forwarding in macOS High Sierra
- Download and install the latest release from xquartz.org website
- Start XQuartz
- IMPORTANT: verify xauth location
SSH configuration file /etc/ssh/ssh_config might contain path to xauth tool, which may be incorrect depending on your OSX/MacOS version. Here's how to check:
greys@maverick:~ $ grep xauth /etc/ssh/sshd_config
if this returns nothing, you can skip to Step 4 below. If this gives you an output, compare it to the path from the next command:
greys@maverick:~ $ which xauthIf the locations differ, update the /etc/ssh/ssh_config file:
greys@maverick:~ $ sudo vi /etc/ssh/ssh_config
- Connect to remote server using -X option which does X11 forwarding for SSH:
greys@maverick:~ $ ssh -X centos.unixtutorial.or
- Check the DISPLAY variable, it should now be set correctly:
greys@centos:~ $ echo $DISPLAY
That's it for today!
This is a common problem when you're trying to run a graphical (X11) application on a server without graphics system like Xorg. As you probably guess, the problem is to do with fonts.
Specifically, it's a problem of your remote Linux server not having any fonts installed, because Xorg (graphics system) was never installed on it (servers usually have server-specific version of distro or at least a package selection that disables desktop related things).
Once we install standard fonts package like this:
greys@s5:~ $ sudo yum install xorg-x11-fonts-Type1 ... Installed: xorg-x11-fonts-Type1.noarch 0:7.5-9.el7 Dependency Installed: libXfont.x86_64 0:1.5.2-1.el7 libfontenc.x86_64 0:1.1.3-3.el7 ttmkfdir.x86_64 0:3.0.9-42.el7 xorg-x11-font-utils.x86_64 1:7.5-20.el7 ...
… restarting application will result in a normal window with quite readable fonts: