You are not logged in.

#1 2014-07-16 22:35:53

grim3271
Member
Registered: 2014-07-12
Posts: 37

[SOLVED] Gnome launcher as root?

Hello.
I have two minecraft installations, One on my user account and one over at /root/
I have configured a script to run the minecraft on my user account, However for the one at /root/, I have been having a bit of a problem, When i access /root/ in thaunar as root, I can run said minecraft just fine, I made a script to also run that as root and when i run it in thaunar as root, It starts the minecraft at /root just fine, But when i set my permissions to /root/ as read only then made a launcher through alacarte, The same script launches the minecraft on my user account, Can i get any help? smile

Also the script used to launch minecraft from my regular account

Minecraft.sh

 optirun minecraft 

Now for the root one


Maincraft

 su
cd /root/
optirun minecraft 

I would be grateful for any help smile

Edit: My desktop environment is gnome 3
Ps:- I hope this is the correct section

Last edited by grim3271 (2014-07-18 04:54:38)

Offline

#2 2014-07-16 23:07:18

Steef435
Member
Registered: 2013-08-29
Posts: 577
Website

Re: [SOLVED] Gnome launcher as root?

Why would you even...

su requires a password. If you want to give the password in a graphical fashion take a look at gksu.

Offline

#3 2014-07-16 23:43:37

grim3271
Member
Registered: 2014-07-12
Posts: 37

Re: [SOLVED] Gnome launcher as root?

Steef435 wrote:

Why would you even...

su requires a password. If you want to give the password in a graphical fashion take a look at gksu.

Because i need to easily switch between 2 sets of mods without editing the mods file or disabling mods smile

And i am just trying to make an icon that launches a specific minecraft of the two installed, I don't really think gksu can help with that :l

Offline

#4 2014-07-17 11:36:04

Steef435
Member
Registered: 2013-08-29
Posts: 577
Website

Re: [SOLVED] Gnome launcher as root?

Right now you try to use su to get root rights. su asks for a password which you'll never be giving since you're not launching it from a terminal. gksu however aks for the password in a graphical fashion so that you can provide it even if you launch it from the gnome launcher for example.

I don't know what optirun is or does but I guess this will do the trick:

gksu optirun /root/minecraft

By the way, you could also install minecraft somewhere in your home folder so that you won't need root permissions to access it.

If you want to create a launcher you might want to look into .desktop files. See /usr/share/applications and ~/.local/share/applications.

EDIT: This is all assuming there actually is an executable file called minecraft in /root.

Last edited by Steef435 (2014-07-17 12:18:07)

Offline

#5 2014-07-18 04:54:22

grim3271
Member
Registered: 2014-07-12
Posts: 37

Re: [SOLVED] Gnome launcher as root?

Steef435 wrote:

Right now you try to use su to get root rights. su asks for a password which you'll never be giving since you're not launching it from a terminal. gksu however aks for the password in a graphical fashion so that you can provide it even if you launch it from the gnome launcher for example.

I don't know what optirun is or does but I guess this will do the trick:

gksu optirun /root/minecraft

By the way, you could also install minecraft somewhere in your home folder so that you won't need root permissions to access it.

If you want to create a launcher you might want to look into .desktop files. See /usr/share/applications and ~/.local/share/applications.

EDIT: This is all assuming there actually is an executable file called minecraft in /root.

Thanks a lot, I never though of using gksu before optirun, By the way, Optirun is a bumblebee command that basically uses the nvidia GPU if you have an "Optimus" system smile

Offline

#6 2014-07-18 09:57:48

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] Gnome launcher as root?

holy mother... why dont you just create a 2nd minecraft folder in your home...
and even if you dont, you at least create another user for the 2nd instance...


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

Board footer

Powered by FluxBB