How do I set up a Linode with an X windows display configured?
I'm trying to run a Java app that requires X windows, and it complains that DISPLAY is not set. So far I haven't found any way to configure a Linode to have a display, and searching for documentation hasn't been fruitful. What am I missing?
3 Replies
It's likely that the Java app is referring to the X/X11 display setting rather than a display for your Linode itself. There's a StackOverflow post here with a few suggestions on how to get a display configured in X11, though it depends on your particular setup:
https://stackoverflow.com/questions/662421/no-x11-display-variable-what-does-it-mean
Aside from that, if you ever need quick access to a graphical display for your Linode, you can use Glish:
This is a blast from the past! Just a note about the stackoverflow.com article @mjones cited…
It's unlikely that your Linode has a display…let alone a bit-mapped display. Whatever machine you want your windows to display on will need an X Server running…AND (here's the important part), the IP address or the DNS name must be known to the Linode! Traffic must be routable in both directions between your Linode and the X Server machine! If your X Server machine sits on the LAN side of your router, it is extremely unlikely that this is going to be the case (it's why you have a router in the first place).
If by some miracle you can get your netadmin to set your X Server machine with a WAN-side IP address, you're going to need to punch a hole in your firewall for X11 traffic.
When you set the DISPLAY environment variable in .bashrc or wherever, the complete form is like this:
export DISPLAY=name:display#.screen#
where name is the WAN-side IP address or domain name that your netadmin gave you; display# is X display number (usually 0) and screen# X screen number (usually 0). In the stackoverflow.com article, the only example given is
export DISPLAY=:0.0
which assumes the X Server machine is localhost (your Linode…definitely not right for a remote display). If you use glish as @mjones suggests, then the above will work just fine (and you don't need to worry about routable traffic or firewall holes…your Linode still needs to be running an X Server though).
-- sw