Questions tagged [gksudo]

gksudo is a frontend to sudo. Its primary purpose is to run graphical commands that need root without the need to run an X terminal emulator and using su directly.

gksudo is a frontend to sudo. Its primary purpose is to run graphical commands that need root without the need to run an X terminal emulator and using su directly.

See the Linux Man Page for more.

34 questions
24
votes
9 answers

Is there any graphical "sudo" for Mac OS X?

I'm designing a little software in Java. I don't know the term/definition to what I'm doing, but I'm prompting commands from Java to the terminal. Something like this: Process process = Runtime.getRuntime().exec("command"); I've done this before in…
Johannes
  • 10,706
  • 18
  • 65
  • 84
10
votes
3 answers

Run a Python project in Eclipse as root

I use Eclipse as my IDE, and when I run my application I wish the application itself to run as root. My program currently checks if it is root, and if not it restarts itself with gksudo. The output, however, isn't written to the console. I can't use…
lfaraone
  • 44,680
  • 16
  • 48
  • 70
9
votes
8 answers

How do I sudo the current process?

Is it possible to use a sudo frontend (like gksudo) to elevate the privileges of the current process? I know I can do the following: sudo cat /etc/passwd- But I'm interested in doing this: sudo-become-root # magic function/command cat…
Michael Terry
  • 193
  • 1
  • 5
6
votes
1 answer

Packaging multiple scripts in PyInstaller

I'm using PyInstaller to turn two scripts into one executable file, one of which calls the other. The issue I'm having is I can't figure out how to bundle the two scripts and still let them reference each other: The code that causes the issue is…
Parker
  • 7,943
  • 7
  • 60
  • 91
6
votes
4 answers

Get netbeans to run my project with sudo?

I am working on a project in netbeans that requires the running project to have root privileges. I would like it so that each time I push "Run Project" (F6) my project is run as root, so with the equivalent of "gksudo javac Main", as it is has a…
Andy Smith
  • 3,056
  • 4
  • 22
  • 34
5
votes
2 answers

How to gain root privileges in python via a graphical sudo?

Part of my python program needs administrator access. How can I gain root privileges using a GUI popup similar to the gksudo command? I only need root privileges for a small part of my program so it would be preferable to only have the privileges…
david4dev
  • 4,656
  • 2
  • 23
  • 33
3
votes
1 answer

ProcessBuilder getOutputStream and interacting with processes

I am having trouble interacting with a process using getOutputStream. Here is my code: Process p = null; ProcessBuilder pb = new ProcessBuilder("/home/eric/this.sh"); pb.directory(new File("/home/eric/")); p = pb.start(); …
Eric
  • 688
  • 1
  • 9
  • 22
3
votes
3 answers

Prompt user for password with dialog window when using sudo

I need to execute a command with sudo and want to display a dialog window for the user to enter their credentials. Attempts to customize a prompt with Applescript have been nothing short of excruciating and using the built in "do shell script with…
braitsch
  • 12,644
  • 5
  • 39
  • 33
3
votes
1 answer

Replace gksudo with pkexec using a individual message

My GUI will started as an user. There is an update-mechanism in the program, which calls a wrapper-script with root rights. For that i used gksudo, until i realized, that it is replaced by pkexec. If i just replaced gksudo by pkexec it works quite…
imizeropt
  • 166
  • 1
  • 11
3
votes
2 answers

shell script- How can I use gksudo to perform consecutive sudo operations with only one password prompt?

I want to use sudo to mount two separate network drives on an ad-hoc basis as my NAS device is not always on line, so I am not convinced that adding anything to /etc/fstab is necessary. The following code is able to achieve this, however I do not…
Stutz Jr
  • 33
  • 1
  • 5
2
votes
1 answer

python script to check and install packages

I am trying to write a python script to check and install packages in linux. I have two questions: First, I tried to write the below code to check the packages, but non is working. What I am missing is how can I convert printing into terminal to a…
Zidan Shafik
  • 345
  • 2
  • 10
1
vote
1 answer

java gksudo persist elevation

I have a java application that has a timer that executes a separate application that requires elevated privileges. I have been doing this: String command = "gksudo /home/bob/sensor"; Process child = Runtime.getRuntime().exec(command); The problem…
Bob Baddeley
  • 2,234
  • 1
  • 14
  • 22
1
vote
0 answers

How to run grafical tool (e.g. deja-dup) as root on Ubuntu 17.10

When trying to setup automated backup under Ubuntu 17.10 using Deja-Dup I realized that one can not backup the root directory since a normal user starting the deja-dup application does not have all rights to access all files in /. (german discussion…
Simeon
  • 446
  • 1
  • 5
  • 20
1
vote
2 answers

gksudo replacement for gnome 3

gksudo doesn't support persistent sessions - normally the sudo command retains the privilege granted as a session which lasts 5 minutes or so. gksudo doesn't feature this, and requires the user to enter a password each time. While using gnome 3 (via…
Athan Clark
  • 3,654
  • 1
  • 17
  • 36
1
vote
1 answer

how to umount from python script

i want to umount a mounting point named VirtualDVD. i want to run the command, "gksudo umount VirtualDVD" My function is: def umount(self): '''unmounts VirtualDVD''' cmd = 'gksudo umount VirtualDVD' proc = subprocess.Popen(str(cmd),…
demosthenes
  • 998
  • 1
  • 11
  • 17
1
2 3