LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-27-2011, 11:33 PM   #1
j0eh4x
Member
 
Registered: Dec 2005
Distribution: Ubuntu Lucid Lynx, BT5
Posts: 84

Rep: Reputation: 2
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
 
Old 09-28-2011, 02:50 PM   #2
zuzoa
Member
 
Registered: Nov 2008
Location: USA
Distribution: Arch 64-bit
Posts: 159

Rep: Reputation: 36
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
 
Old 09-28-2011, 02:55 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
May be I am not getting the point, but why do you need to be root do to change the permissions on that file?
 
Old 09-28-2011, 03:46 PM   #4
j0eh4x
Member
 
Registered: Dec 2005
Distribution: Ubuntu Lucid Lynx, BT5
Posts: 84

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by TobiSGD View Post
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
 
Old 09-28-2011, 03:51 PM   #5
j0eh4x
Member
 
Registered: Dec 2005
Distribution: Ubuntu Lucid Lynx, BT5
Posts: 84

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by zuzoa View Post
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] gksudo nautilus error mfdc1969 Ubuntu 1 08-24-2010 12:50 AM
gksudo with stdin redirection gd2shoe Linux - Software 3 12-25-2008 11:43 AM
gksudo vs. sudo strangeness CJS Programming 5 05-15-2008 06:47 PM
gksudo problems FBorges22 Linux - Software 1 09-07-2007 04:59 PM
gksudo nautilus ronbrooks Linux - Software 8 02-02-2007 02:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration