Page **2** of **2**

### Re: Mathematica start-up crashing RDP session

Posted: **Thu Mar 24, 2016 12:57 pm**

by **drupol**

I've installed Raspbian from the .img file using the dd command in Linux and I have the same file.

Code: Select all

```
pi@rpi8gb:~ $ cat /usr/share/raspi-ui-overrides/applications/wolfram-mathematica.desktop [Desktop Entry]
Encoding=UTF-8
Type=Application
Version=1.0
Name=Mathematica
Comment=Technical Computing System
Icon=wolfram-mathematica
Exec=mathematica %F
TryExec=mathematica
Terminal=False
MimeType=application/mathematica;application/vnd.wolfram.cdf;application/mathematicaplayer
Categories=Application;Development;
StartupNotify=true
pi@rpi8gb:~ $
```

### Re: Mathematica start-up crashing RDP session

Posted: **Thu Mar 24, 2016 3:37 pm**

by **dgordon42**

OK, its most odd that Mathematica won't work for you.

I'm away from base now until Monday, so no Pi, but I'll have another think about it then.

There don't seen to be any reports of this in the Wolfram forums either

Dave.

### Re: Mathematica start-up crashing RDP session

Posted: **Thu Mar 24, 2016 3:42 pm**

by **drupol**

dgordon42 wrote:OK, its most odd that Mathematica won't work for you.

I'm away from base now until Monday, so no Pi, but I'll have another think about it then.

There don't seen to be any reports of this in the Wolfram forums either

Dave.

Let things be clear: Mathematice works if i connect the Pi to my TV (hdmi) and when I use a keyboard and a mouse connected to it.

But I would like to work "remotely" with Mathematica. This is why I'm using XRDP. Easy, fast and well integrated in Linux.

And it's only when using XRDP that it crashes.

I will try to make a video tomorrow, I'll post it here.

### Re: Mathematica start-up crashing RDP session

Posted: **Sat Mar 26, 2016 10:25 am**

by **jpsa**

I've reinstalled wolfram-engine, just in case, and it made no difference.

I've reconnected my pi3 to a screen & mouse, and Mathematica works fine, as before, if I use those. Remote desktop in to the same machine and it still crashes out during Mathematica startup.

Right-click>About on the window banner of the Windows remote desktop client connection screen says

- rdc.png (12.78 KiB) Viewed 14455 times

Is that the version you are using on your Windows 10 machine?

### Re: Mathematica start-up crashing RDP session

Posted: **Sat Mar 26, 2016 11:08 am**

by **jpsa**

Some more information which may or may not be relevant... if I give the following command

Code: Select all

`LIBGL_DEBUG=verbose mathematica >m.txt 2>&1`

from the real screen & keyboard, nothing is written to the m.txt log file. If, however, I give it from the remote desktop I get

Code: Select all

```
libGL: OpenDriver: trying /usr/lib/arm-linux-gnueabihf/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/arm-linux-gnueabihf/dri/swrast_dri.so
libGL: Can't open configuration file /home/pi/.drirc: No such file or directory.
libGL: Can't open configuration file /home/pi/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
```

The file /usr/lib/arm-linux-gnueabihf/dri/swrast_dri.so

*does* exist on my machine, though (Googling suggests it's part of the libgl1-mesa-dri package, which is already installed). I have no idea what the rest of the messages might signify!

### Re: Mathematica start-up crashing RDP session

Posted: **Thu Mar 31, 2016 6:34 am**

by **Gerd**

Based on jpsa's findings above I placed a file .drirc in /home/pi with content

That eliminated the "Can't open file" errors in the libGL log.

Additionally calling mathematica as root

Code: Select all

`LIBGL_DEBUG=verbose sudo mathematica >m.txt 2>&1`

also eliminated the first 2 lines from the log as I now only get in m.txt

Code: Select all

```
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
```

but Mathematica still crashes over XRDP.

This is how far I got. But I am clueless how to proceed. Does this mean we have a driver access problem? Which config needs to be in /home/pi/.drirc ?

Edit:

**This is not only Mathematica related.**
After installing the mesa-utils package with

running the demo

*glxgears* with

it shows the same behaviour: Running fine when attached to Screen, KB, Mouse; over XRDP crash with the same errors.

When launching with

Code: Select all

`LIBGL_DEBUG=verbose glxgears >g.txt 2>&1`

I get the following in g.txt

Code: Select all

```
libGL: OpenDriver: trying /usr/lib/arm-linux-gnueabihf/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/arm-linux-gnueabihf/dri/swrast_dri.so
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":11.0"
after 160 requests (37 known processed) with 0 events remaining.
```

### Re: Mathematica start-up crashing RDP session

Posted: **Tue Apr 05, 2016 7:15 pm**

by **drupol**

Still no solution ?

### Re: Mathematica start-up crashing RDP session

Posted: **Wed Apr 06, 2016 1:17 am**

by **shkng**

removed xrdp, installed vnc4server instead --

https://linuxconfig.org/quick-vnc-serve ... x-jessie-8
same problem - as mathematica starts the connection aborts

### Re: Mathematica start-up crashing RDP session

Posted: **Tue Apr 12, 2016 9:09 am**

by **Gerd**

No update with the original problem, but I can report a working alternative.

Just install tightvnc (together with autocutsel if you want clipboard exchange) and use your prefered VNC viewer on the client side. On Windows I use the portable Version of MobaXterm because it also contains SSH, SFTP, X11 Server etc.

With tightvnc I had none of the GDBus Errors that were mentioned earlier in this thread.

The performance of thightvnc is quite good. Rotate a 3DPlot with the mouse and you will see!

### Re: Mathematica start-up crashing RDP session

Posted: **Thu Apr 14, 2016 10:16 pm**

by **shkng**

Thank you. Uninstalled vnc4server, installed tightvncserver, works!!

### Re: Mathematica start-up crashing RDP session

Posted: **Thu Apr 14, 2016 11:29 pm**

by **shkng**

some observations:

1. see tightvnc docs to set password, and start tightvncserver before it allows connection

2. tightvnc default settings don't seem to have a US-keyboard, so Ctrl-Enter (to evaluate) does something weird -- but definitely works because menu "Evaluate" works fine

3. just tried xrdp on a whim, now that works ! suspect something in vnc4server that was removed and when tightvnc was installed it allows xrdp to work ..

### Re: Mathematica start-up crashing RDP session

Posted: **Thu Apr 14, 2016 11:52 pm**

by **shkng**

silly me - evaluate is Shift-Enter, which works fine.

so tightvnc is fine too, probably more lightweight if you don't want the full desktop.