Sample Header Ad - 728x90

gksudo is different from sudo

0 votes
1 answer
803 views
**Background:** I'm running linux mint on a VM env where i have a mounted folder that only root can access and i want my Deluge client to download my torrents to that folder. If i go on terminal and execute: sudo deluge it asks my password and runs as my_user with privileged rights. Ok untill far. Now i want to make a bash script to ask for password on screen, in a prompt manner. **Problem:** If i write my bash file as: /usr/bin/gksudo deluge or /usr/bin/gksudo -u root deluge i get the exact same result, i run deluge as root with all my env as root, my home folder is on root folder, so it doesn't import my_user preferences/configs nor my queued torrents. If i write my bash file as: /usr/bin/gksudo -u my_user deluge it runs as my_user and without elevated privileges, it doesn't have access to write on the shared folder. **The real question:** How can i write a bash script that allow me to run deluge as my_user (the same env) with elevated rights and prompting for password ? **PS:** I tried -k arg in many ways without success.
Asked by Not a privileged user (135 rep)
Jan 21, 2017, 05:43 PM
Last activity: Jan 21, 2017, 11:52 PM