[bash] running a GUI program as root
Hi all. I'm writing a simple backup script in bash.
At a certain point of my script (I run it as "root") I need to launch a graphical program but it isn't possible because I'm logged to X as "user". Does it is possible to temporary permit root to launch graphical programs? How can I solve this problem? Best regards. |
with the 'su' command u can have root priviledges
|
The other option is to set root's DISPLAY environment variable to the user's session. Something like:
Code:
$root ~> export DISPLAY=:0.0 Hopefully that helps. |
Thank you. It helped.
|
All times are GMT -5. The time now is 06:14 AM. |