You are not logged in.
Pages: 1
Certain applications require root privileges to run (gparted etc.).
Is there a way to run these from dmenu? How can I get an automatic popup window or terminal to enter the root password? I installed gksu but it just shows the warning message and does not offer password enter. Thanks.
Offline
The method I employ is to write a small script that runs said program with sudo and your terminal of choice.
General format:
#!/bin/bash
your_terminal_emulator -e sudo program_requiring_sudoPersonal example:
#!/bin/bash
urxvt -e sudo solfegeOnce the file is created, don't forget to chmod +x, and then you can copy/move it to /usr/local/bin (though I'm not certain this is the best directory for dropping these files). Finally, try running from dmenu ![]()
transcend to the fifth abode
Offline
Look up the -A option of sudo and askpass.
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
For ASKPASS option you need to execute sudo with -A option, which is not good for Dmenu - is it? ntness' post is also a workaround solution.
I have seen in DEs that an "authentication" window pops up so you can enter the password there - how does it work? Google did not help me in this.
Offline
Why is -A not good for dmenu?
I use a script that calls dmenu (or slmenu), gets the response and then calls
sudo -A $RESPONSEIf the application is run in a terminal, you don't need a pop-up and can enter the password at the command prompt of that terminal.
If the application is gui, you can do the above. If the script is background (eg I have one to unmount removable drives that has no ui) then again, you can use the above method.
Unless I'm missing something?
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
https://bbs.archlinux.org/viewtopic.php … 37#p777137 provides an example how to use "sudo -A" together with dmenu.
Offline
Pages: 1