Is there any way to make programs ask for password when root is required? For example I want to extract some files with File Roller into /usr/share/ where apparently root is required but instead of the error that it gives me I would like a password prompt.
|
|
||||
|
|
|
To directly answer your question: No, there is no way (as far as I am aware) to make a program to ask for a password instead of failing when it doesn't have enough permissions to perform an operation. There are two options:
|
|||
|
|
|
The usual way is to go in command line mode (alt + F2 sudo and gksudo will give you root privileges. |
|||||
|
|
You'd have to start File Roller using
If you are using that File Roller once to update stuff in |
||||
|
|
Is there any way to make programs ask for password when root is required? Yes - with the helper scripts. Here is an example with the bash copy (cp). The copying (backup) is wrapped in the perl script to check the owner of the file. The script is using the perl stat /1/ command. Here the script is called from the KDE service menu /2/. If the file is owned by the root /3/ then the KDE frontend for sudo is used /4/, /5/. backup.pl: usage: "backup.pl filename"
Links: |
|||
|
|
