Hello, before even working on an older problem, I have a new one. I installed Matlab 2015b on my OpenSuse Leap, but I cannot make a working shortcut in Main Menu. I boiled the problem down to using this script :
#!/bin/bash cd /home/Wabbajack/MATLAB/R2015b/bin; ./matlab -desktop
This works great when I run it from the terminal as a normal user, but if I run it as root, it runs as if the option '-desktop' was not present (runs in terminal). This same behavior occurs when I try to run this script via created shortcut through the Gnome favorites. This makes me think that gnome runs the applications as root by default. How can I change this?
Well i have been digging around a little and I think the problem that it only runs in terminal under root is that I have to X display associated with the root account. The thing is that it runs great as non-root. I will just run it from terminal until I find a solution.
Might be because the X variable is not set (or however this is called) try using su - for starting the root session. But I would heavy suggest to NOT do this, why would you want that?
might be something similar but think google or someone else using gnome and shortcuts would know better than me.
It does not need to. Sorry, English is not my native language. It only seems to me that Gnome 3 runs it as root. When I run the script as a normal user through terminal, it opens matlab GUI and works great. If I run it as root, it opens in terminal instead running GUI. When I click on the icon created by me, it does not start the GUI, so I deduced that Gnome might run it as root. Anyway, I am starting to think the problem is elsewhere and has something to do with xrandr.
So an update is in order. Today I installed the launcher and it didn't launch. Tried to edit it's settings with gedit. Did not help. Just out of desperation tried the bash script I posted here. It works... No idea what was wrong.