X11 setup?

4,983 views
Skip to first unread message

Matthew Persico

unread,
Jan 17, 2013, 10:57:21 AM1/17/13
to chromiu...@chromium.org
Is there a doc that explains how to set up the environment to allow X11 programs to work properly. I thought I had it with a proper export of DISPLAY, but that was only when I had a Putty already up that set up X11. Thanks.

Robert Ginda

unread,
Jan 17, 2013, 1:42:09 PM1/17/13
to Matthew Persico, chromium-hterm
That depends on your setup.

If you're ssh'ing into the local machine and just want to run X11 apps, then "export DISPLAY=:0.0" is enough.

If you want to forward X11 sessions over the SSH connection, that's more difficult.  The "-X" option in ssh involves a unix domain socket, but NaCl (which Secure Shell depends on) doesn't support those.  I don't think there is a way to tell -X to use a TCP socket instead.

You should be able to fake it using TCP forwarding, but I can't explain exactly how without digging into the documentation myself.


Rob.

Matthew Persico

unread,
Jan 17, 2013, 4:01:14 PM1/17/13
to Robert Ginda, chromium-hterm
I need the -X option. I can fake it for now by opening a putty with -X and using whatever display it comes up with. I'll defer the tcp stuff for now. Thanks
--
Matthew O. Persico

Aaron Fellin

unread,
Jan 23, 2013, 7:58:40 PM1/23/13
to Matthew Persico, Robert Ginda, chromium-hterm
I've tried (unsuccessfully) a few ways to get this working under ChromeOS. The principles for any other machine should be the same.

For TCP, you should just need to reverse forward a valid, unused X11 port (6000-6099) and then use that value to determine $DISPLAY. It will be something like:

user@local$ ssh -R 6021:localhost:6000 user@remote
user@remote$ export DISPLAY=:21

21 is just an example; you can choose any number you like, as long as the display and local port match. Of course, if your local X11 is running on a port other than 6000, you'll need to modify that port, as well. Unfortunately, it looks like there isn't a way to automate setting the DISPLAY variable (modulo your shell's profile file).

Robert Ginda

unread,
Jan 23, 2013, 9:19:07 PM1/23/13
to afe...@chromium.org, Matthew Persico, chromium-hterm
This isn't supported in any way on a stock Chrome OS device.  While they do currently depend on an X server, it doesn't listen for TCP connections.

You might be able to get something wonky working in dev mode, but I don't know what kind of window management you'd end up with.

Chrome OS reserves the right to replace X at some point in the future, so whatever you got working may not last long.


Rob.

Jeff Bailey

unread,
Jan 24, 2013, 2:11:37 PM1/24/13
to afe...@chromium.org, Matthew Persico, Robert Ginda, chromium-hterm
Don't count on ChromeOS providing X.  Your best bet is probably to consider re-implementing the X wire and display protocols using canvas or Native Client and a surface with the existing X libraries.  I didn't go further with it because in every case I care about, I can just use a remote desktop setup to get to Eclipse, etc. for far less pain.

Jeff Bailey | Software Engineer | jeffb...@google.com | Google



On Wed, Jan 23, 2013 at 4:58 PM, Aaron Fellin <afe...@chromium.org> wrote:

Jacob Certain

unread,
Mar 6, 2013, 4:05:30 AM3/6/13
to chromiu...@chromium.org, afe...@chromium.org, Matthew Persico, Robert Ginda
On Thursday, January 24, 2013 12:11:37 PM UTC-7, Jeff Bailey wrote:
> I can just use a remote desktop setup to get to Eclipse, etc. for far less pain.

Can you go into a little more detail? A link would be fine. I'd love to set up remote desktop using the official app with chromium on my linux tower and my arm chromebook, but so far I'm stumped.

Thanks,

Jacob Certain

Aaron Fellin

unread,
Mar 6, 2013, 12:29:44 PM3/6/13
to Jacob Certain, chromiu...@chromium.org, Matthew Persico, Robert Ginda
The app you're looking for is called Chrome Remote Desktop (nee "chromoting"). If you built chromium from source, it should still be in the source tree. Even though there are only instructions on that site for a Windows or Mac host, it does work under Ubuntu, as well. As with all things Linux, with other distros, ymmv.
Reply all
Reply to author
Forward
0 new messages