LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   gksudo to wine? (https://www.linuxquestions.org/questions/linux-software-2/gksudo-to-wine-905336/)

j0eh4x 09-28-2011 12:33 AM

gksudo to wine?
 
I'm always tweeking ubuntu and i'm running on 11.04, and was wondering if it would be possible to launch a script, that uses gksudo to authenticate root, chmod to 777, and then launch the executable in wine.

It would in a way create the same windows asking yes or no when clicking an executable. And would save me time from having to open a terminal and typing
Quote:

cd ~/Downloads
sudo chmod 777 winefile.exe
Enter Password:
I'm aware its not that much typing but was just wondering if its possible

zuzoa 09-28-2011 03:50 PM

Perhaps something like

Code:

#!/bin/sh
gksu chmod 777 $1
wine $1

And then try opening the file with that shell script? Or just `script.sh ~/Downloads/winefile.exe`. Dunno if it'll work :P

TobiSGD 09-28-2011 03:55 PM

May be I am not getting the point, but why do you need to be root do to change the permissions on that file?

j0eh4x 09-28-2011 04:46 PM

Quote:

Originally Posted by TobiSGD (Post 4484706)
May be I am not getting the point, but why do you need to be root do to change the permissions on that file?

oops your right, you can make something executable without root, I thought you needed to be root, basically I would just want to call a script when clicking a file ending in .exe that automatically chmods to 777 and then executes with wine

j0eh4x 09-28-2011 04:51 PM

Quote:

Originally Posted by zuzoa (Post 4484704)
Perhaps something like

Code:

#!/bin/sh
gksu chmod 777 $1
wine $1

And then try opening the file with that shell script? Or just `script.sh ~/Downloads/winefile.exe`. Dunno if it'll work :P


thanx, that worked perfectly, for anyone that wants to know I just put the script in bin and set it to open all exe's


All times are GMT -5. The time now is 01:59 PM.