# X11 forwarding through ssh on lxplus

**URL:** <https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836>\
**Category:** ROOT\
**Created:** [September 14, 2015, 5:45pm UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836 "2015-09-14T17:45:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahler](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mahler](https://root-forum.cern.ch/u/mahler)\
**Post date:** [September 14, 2015, 5:45pm UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/1 "2015-09-14T17:45:13Z")

</div>

Hey, recently, I’ve been getting messages like this:

[code]root [0] TCanvas c  
libGL error: No matching fbConfigs or visuals found  
libGL error: failed to load driver: swrast  
Error in : GLXBadContext (XID: 39846151, XREQ: 154)

root [0]  
root [1] TBrowser tb  
Error in : GLXBadContext (XID: 39846174, XREQ: 154)[/code]

When trying to use root through ssh on lxplus. Any idea how to solve this? google searches indicate a problem with libGL, but I’m pretty sure my local version is fine, and I can do nothing about lxplus’s…

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [September 15, 2015, 7:03am UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/2 "2015-09-15T07:03:29Z")

</div>

It is strange that Lib GL is invoked on lxplus. do you have SetCanvasPerferGL in your rootlogon.C ?  
Or system.rootrc ?

---

<div class="post-metadata">

**Author:** ![mahler](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mahler](https://root-forum.cern.ch/u/mahler)\
**Post date:** [September 16, 2015, 1:28pm UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/3 "2015-09-16T13:28:57Z")

</div>

I’ve attached my ~/.rootlogon.C ~/.rootrc and system.rootrc for my local machine. To my knowledge I have no .rootlogon.C or .rootrc for lxplus.  
[system.rootrc.txt](https://root-forum.cern.ch/uploads/default/original/2X/1/113ade65636926d4b225858f1d717e93a20e2e37.txt) (32.4 KB)  
[.rootrc.txt](https://root-forum.cern.ch/uploads/default/original/2X/8/8d0a7b1f82d3072cbfefc1f54a9ad4830a47fff1.txt) (84 Bytes)  
[.rootlogon.C.txt](https://root-forum.cern.ch/uploads/default/original/2X/2/2cf1d21aebb30ae5562c72cc544922c652b348f9.txt) (5.54 KB)

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [September 16, 2015, 1:37pm UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/4 "2015-09-16T13:37:06Z")

</div>

These files do not trigger the GL option on.  
Does the canvas your a creating have the thing GL in its title ?

---

<div class="post-metadata">

**Author:** ![mahler](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mahler](https://root-forum.cern.ch/u/mahler)\
**Post date:** [September 16, 2015, 4:12pm UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/5 "2015-09-16T16:12:01Z")

</div>

No, I just called ‘TCanvas c’.

So whatever the default canvas is.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [September 16, 2015, 7:23pm UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/6 "2015-09-16T19:23:52Z")

</div>

Note: it’s not “.rootlogon.C” but “rootlogon.C” (no “.” in the front) and you should search for it in the “current subdirectory” (i.e. where you start the ROOT executable), not in your “${HOME}”.  
And search for “.rootrc” in both, your “${HOME}” and in the “current subdirectory”.  
Also, search for “rootalias.C” in the “current subdirectory”.

---

<div class="post-metadata">

**Author:** ![mahler](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mahler](https://root-forum.cern.ch/u/mahler)\
**Post date:** [September 22, 2015, 9:32am UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/7 "2015-09-22T09:32:46Z")

</div>

Okay, Just to simplify matters, I’m launching my ssh connection from my home directory on my local machine, and I’m starting root in my local directory on lxplus.

I’ve found no trace of files with ‘rootlogon’, ‘rootrc’, or ‘rootalias’ in their name in the current directory on both machines (That counts as $HOME as well). different than the ones I attached.

I tried launching both root and ssh with LIBGL\_DEBUG=verbose, and I encountered the following output:

`root [0] TBrowser tb
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: Can't open configuration file /afs/cern.ch/user/m/mkrafczy/lxplus/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Error in <RootX11ErrorHandler>: GLXBadContext (XID: 90177789, XREQ: 154)`

My labmate isn’t having problems, and I didn’t have any problems before I changed to Arch, so I’m fairly certain that the problem is on my end.

To that end, I tried seeing if /usr/lib64/dri/swrast\_dri.so existed on my local machine. It didn’t, so I created a symbolic link to it’s actual location which was /usr/lib/xorg/modules/dri.

This didn’t help anything though.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [September 22, 2015, 9:39am UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/8 "2015-09-22T09:39:34Z")

</div>

> [@](#):
>
> I’m launching my ssh

I guess you should do “ssh -Y” ?

---

<div class="post-metadata">

**Author:** ![mahler](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mahler](https://root-forum.cern.ch/u/mahler)\
**Post date:** [September 22, 2015, 9:53am UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/9 "2015-09-22T09:53:27Z")

</div>

Yes, I’m doing this.

other x programs such as ‘xclock’ work just fine.

Also when I launch root without -l, The splash screen appears just fine.

I’ve also added

Host lxplus\*  
User mkrafczy  
ForwardX11Trusted yes

to my local ~/.ssh/config file, so that it X11 connections are forwarded in the trusted fashion each time.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [September 22, 2015, 9:56am UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/10 "2015-09-22T09:56:19Z")

</div>

> [@SL 6.X / SLC 6.X / CentOS 6.X / RHEL 6.X](https://root-forum.cern.ch/t/sl-6-x-slc-6-x-centos-6-x-rhel-6-x/15248/1):
>
> I encountered a strange problem that causes OpenGL (GLX) applications to fail on SL6X, SLC6X, CentOS6X and RHEL6X (where X = 3 for the time being). Applications die with errors in form (I login to a remote machine, running one of these systems, using “ssh -X -Y”): […]$ glxinfo name of display: localhost:11.0 Error: couldn’t find RGB GLX visual or fbconfig […]$ glxgears Error: couldn’t get an RGB, Double-buffered visual […]$ root (…) Error in TGLWidget::CreateWindow: No good OpenGL visua…

See also:  
[CMSPublic → OpenGL and X11 problems](https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookFireworksHowToFix#OpenGL_and_X11_problems)

---

<div class="post-metadata">

**Author:** ![mahler](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mahler](https://root-forum.cern.ch/u/mahler)\
**Post date:** [September 22, 2015, 10:08am UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/11 "2015-09-22T10:08:31Z")

</div>

Well, that was promising, but I’m still getting the GLXBadContext error…

After exporting LIBGL\_ALWAYS\_INDIRECT=1, when I use LIBGL\_DEBUG=verbose when launching root, here is my new output:

[code]LIBGL\_DEBUG=verbose root

* * *

- 

```
                                    *

```

- 

```
   W E L C O M E to R O O T *

```

- 

```
                                    *

```

- Version 5.34/32 23 June 2015 \*
- 

```
                                    *

```

- You are welcome to visit our Web site \*
- 

```
     http://root.cern.ch *

```

- 

```
                                    *

```

* * *

ROOT 5.34/32 (heads/v5-34-00-patches@v5-34-30-102-g626b950, Jul 03 2015, 15:01:00 on linuxx8664gcc)

CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010  
Type ? for help. Commands must be C++ statements.  
Enclose multiple statements between { }.  
root [0] TCanvas c  
Error in : GLXBadContext (XID: 90177799, XREQ: 154)[/code]

---

<div class="post-metadata">

**Author:** ![mahler](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mahler](https://root-forum.cern.ch/u/mahler)\
**Post date:** [September 22, 2015, 10:10am UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/12 "2015-09-22T10:10:39Z")

</div>

Okay, I’m getting worried that this is a driver interaction of some type which will be very difficult to change.

Is there a way I can tell root to not use OpenGL at all?

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [September 22, 2015, 10:14am UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/13 "2015-09-22T10:14:33Z")

</div>

Try to remove the additional “swrast\_dri.so” link that you created and restart your X server (i.e. return to the original / standard configuration) and then try to run “glxinfo” and “glxgears” and see if they report any problems (btw. try to run them on your local machine and then on the remote one when you login using “ssh -X -Y”).

---

<div class="post-metadata">

**Author:** ![mahler](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mahler](https://root-forum.cern.ch/u/mahler)\
**Post date:** [September 22, 2015, 10:28am UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/14 "2015-09-22T10:28:18Z")

</div>

glxgears works great on my local machine.

In the original configuration, when I try to run glxgears on lxplus with ssh -X -Y, I get

[code]ssh -X -Y [mkrafczy@lxplus.cern.ch](mailto:mkrafczy@lxplus.cern.ch)  
Password:  
Password:  
Last login: Sat Aug 29 17:03:55 2015 from [pb-d-128-141-132-42.cern.ch](http://pb-d-128-141-132-42.cern.ch)

* * *

- Welcome to [lxplus0091.cern.ch](http://lxplus0091.cern.ch), SLC, 6.7
- Archive of news is available in /etc/motd-archive
- Reminder: You have agreed to comply with the CERN computing rules
- [http://cern.ch/ComputingRules](http://cern.ch/ComputingRules)
- Puppet environment: production
- Puppet hostgroup: bi/inter/plus/live/login
- LXPLUS Public Login Service
- 2015-09-01 - nano the editor(?) installed

* * *

Node is : LXPLUS

mkrafczy on lxplus0091 [12:19:38]  
~  
○ glxgears  
libGL error: No matching fbConfigs or visuals found  
libGL error: failed to load driver: swrast  
X Error of failed request: BadValue (integer parameter out of range for operation)  
Major opcode of failed request: 154 (GLX)  
Minor opcode of failed request: 3 (X\_GLXCreateContext)  
Value in failed request: 0x0  
Serial number of failed request: 33  
Current serial number in output stream: 35[/code]

That’s without LIBGL\_ALWAYS\_INDIRECT or LIBGL\_DEBUG

I’ve gone and tried the X forwarding on another machine, and it works fine on a machine running centos6. (both the TCanvas as well as glxgears).

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [September 22, 2015, 10:37am UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/15 "2015-09-22T10:37:11Z")

</div>

[google.pl/search?q=libGL+er … 8&oe=utf-8](https://www.google.pl/search?q=libGL+error%3A+failed+to+load+driver%3A+swrast&ie=utf-8&oe=utf-8)

---

<div class="post-metadata">

**Author:** ![mahler](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mahler](https://root-forum.cern.ch/u/mahler)\
**Post date:** [September 22, 2015, 1:10pm UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/16 "2015-09-22T13:10:34Z")

</div>

Well, google searches like that have not turned up anything helpful for me.

In my case, the only the apparently wrong with my opengl installation is the inability to do X11 forwarding. Literally everything else I’ve tried works perfectly.

It’s definitely me though, I tried another server (my own home server) and I’m getting the same problem.

If I find the answer, I’ll post it here.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [September 22, 2015, 1:23pm UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/17 "2015-09-22T13:23:56Z")

</div>

You’ll get another set of hints if you try: [google.pl/search?q=ssh+libG … 8&oe=utf-8](https://www.google.pl/search?q=ssh+libGL+error:+failed+to+load+driver:+swrast&ie=utf-8&oe=utf-8)

---

<div class="post-metadata">

**Author:** ![mahler](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mahler](https://root-forum.cern.ch/u/mahler)\
**Post date:** [November 17, 2015, 10:03am UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/18 "2015-11-17T10:03:05Z")

</div>

At this time, I can now launch TCanvas windows without getting that GLX error!

I didn’t do anything specific to fix it though. Either lxplus updated their xorg installation, or it was me upgrading to xorg 1.17.4 which fixed the problem or something like this.

I’m going to mark this question as solved though since I’m no longer having this issue.

---

<div class="post-metadata">

**Author:** ![odylalalaaa](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/odylalalaaa/32/16600_2.png) [@odylalalaaa](https://root-forum.cern.ch/u/odylalalaaa)\
**Post date:** [July 28, 2016, 11:09am UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/19 "2016-07-28T11:09:33Z")

</div>

Hi

Ive been facing the same problem, here is a solution if others arent working

[posting.php?mode=reply&f=3&t=20297](https://root.cern.ch/phpBB3/posting.php?mode=reply&f=3&t=20297)

The current version of XQuartz, 2.7.9 has a problem with recent X11 libs from Linux. When starting a X11 app on lxplus with a display on the Mac, the users get an error message like

libGL error: failed to load driver: swrast  
X Error of failed request: BadValue (integer parameter out of range for operation)  
Major opcode of failed request: 149 (GLX)  
Minor opcode of failed request: 3 (X\_GLXCreateContext)  
Value in failed request: 0x0  
Serial number of failed request: 26  
Current serial number in output stream: 28

This issue is independent of the OS X version used.

For the time being the only work-around consists of installing a beta version of XQuartz that already contains a patch for this issue, and change some XQuartz related defaults. Using a pre-release beta version unfortunately implies the risk of new bugs and incompatibilities, so you have to decide whether this risk is acceptable.

To install the beta version of XQuartz:

```
Quit the actual version of Xquartz if it is still running.

To get this beta version go to [xquartz.org/releases/index.html](https://www.xquartz.org/releases/index.html), download and install XQuartz 2.7.10_beta2 (or a newer beta if available).

Once it is installed execute on the command line of your Mac

```

defaults write org.macosforge.xquartz.X11 enable\_iglx -bool true

You might have to reboot your Mac to activate the new XQuartz.

hope this helps, 🙂

---

<div class="post-metadata">

**Author:** ![mato](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mato/32/12317_2.png) [@mato](https://root-forum.cern.ch/u/mato)\
**Post date:** [July 28, 2016, 12:37pm UTC](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836/20 "2016-07-28T12:37:44Z")

</div>

Thanks very much. The ROOT part works nicely for me.  
But still does not work for me is using GL applications with the swrast driver. I still get the following error just doing:

```auto
$ ssh -Y lxplus
...
$ setenv LIBGL_DEBUG verbose
$ glxgears
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: Can't open configuration file /afs/cern.ch/user/m/mato/.drirc: No such file or directory.
libGL: Can't open configuration file /afs/cern.ch/user/m/mato/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
...
```

[Next page](https://root-forum.cern.ch/t/x11-forwarding-through-ssh-on-lxplus/19836.md?page=2)
