# Mathematica Needs Root Access to Run

## MaraschinoPanda

I recently installed Wolfram Mathematica, and have discovered that it needs root access to run properly. When run as a normal user, it boots up with a broken logo, and crashes on attempting to load the welcome screen. Running it with sudo fixes this, but I'm not comfortable running Mathematica as root, considering that it has functionality to arbitrarily modify files and run shell commands. After crashing, it produces errors like this:

```

sh: -m: command not found

X Error of failed request:  BadGC (invalid GC parameter)

  Major opcode of failed request:  59 (X_SetClipRectangles)

  Resource id in failed request:  0x0

  Serial number of failed request:  2195

  Current serial number in output stream:  2197

X Error of failed request:  BadGC (invalid GC parameter)

  Major opcode of failed request:  59 (X_SetClipRectangles)

  Resource id in failed request:  0x0

  Serial number of failed request:  2196

  Current serial number in output stream:  2197

X Error of failed request:  BadGC (invalid GC parameter)

  Major opcode of failed request:  59 (X_SetClipRectangles)

  Resource id in failed request:  0x2000296

  Serial number of failed request:  2199

  Current serial number in output stream:  2202

X Error of failed request:  BadGC (invalid GC parameter)

  Major opcode of failed request:  59 (X_SetClipRectangles)

  Resource id in failed request:  0x0

  Serial number of failed request:  2201

  Current serial number in output stream:  2202

--snip many more similar messages--

```

Any advice?

----------

## lxg

As far as I know, Mathematica is not in Portage. How did you install it? Did the installation instructions say anything about user permissions?

----------

## paultschi

We are talking Mathematica 9? For me it does not work even in root mode. I get the same error message as you. I contacted their support team, they are aware of their Qt libraries not being compatible with the ones in Gentoo. They are also claiming to be working on it.

----------

## rigel314

I had the same problem as MaraschinoPanda.  Mathematica would only run with sudo.  It wouldn't even run after 'su -'ing to root.  Only with sudo.

I fixed it by setting my Qt Graphics System to Native.

On my system, 'eselect qtgraphicssystem list' returns two items.  

```

cody@Laptop-Cody> eselect qtgraphicssystem list

Available Qt Graphics Systems:

  [1]   native *

  [2]   raster (default)

```

Setting it to Native fixed it.

To set it to native, I used: 'eselect qtgraphicssystem set 1'

Of course, you should check what number it is on your system using the list command above.

----------

## moosh

Thanks rigel314! This solved the problem for me.

----------

## paultschi

 *rigel314 wrote:*   

> I had the same problem as MaraschinoPanda.  Mathematica would only run with sudo.  It wouldn't even run after 'su -'ing to root.  Only with sudo.
> 
> I fixed it by setting my Qt Graphics System to Native.
> 
> On my system, 'eselect qtgraphicssystem list' returns two items.  
> ...

 

From Wolfram support. You can also run Mathematica with the option

```

Mathematica -graphicssystem native

```

Works for me.

----------

## diablo465

Thanks, this solves my problem also

----------

