You are not logged in.
Hello
I have this problem, that I have tried to avoid for some time now, however, it is unavoidably now unfortunately. The problem is that when I want to start chromium from the terminal, I use the following command, in order to use a specific namespace:
ip netns exec secondvpn sudo -u [username] firejail chromium --user-data-dir="/home/[username]/.config/chromium/Profile 2" https://duckduckgo.comChromium opens just as it should, however, when doing the same from a launcher from the panel with gksudo, as below, it doesn't work, it just starts a normal chromium profile.
gksudo 'ip netns exec secondvpn sudo -u [username] firejail chromium --user-data-dir="/home/[username]/.config/chromium/Profile 2" https://duckduckgo.com'Any ideas on how to solve this problem would be greatly appreciated.
Last edited by Fred7109 (2017-09-18 06:18:52)
Offline
gksudo 'foo sudo -u [username] bar'Why is there an inner sudo and how does it get the password and/or username?
ip netns exec secondvpn gksudo -u [username] firejail chromium --user-data-dir="/home/[username]/.config/chromium/Profile 2" https://duckduckgo.com?
Offline
Hello Seth
Thank you for the reply.
I have just replaced my actual username with [username], so it has the username. In addition, the username is the one of the logged in user, so it doesn't need a password. Finally, the reason there is an inner sudo is that I can only launch a program in the namespace where I run my second VPN with administrative privileges, however, I don't want the program that I launch inside the namespace to have administrative privileges, which I why I use sudo -u [username], to get to normal privileges.
Do you have any idea why it works great when I execute the command in the terminal, but not from the panel with a launcher?
Last edited by Fred7109 (2017-09-17 16:15:47)
Offline
The answer will be in the behavior of gksudo - I assume you're elevating privileges using plain sudo or su from an interactive shell?
Tried various combinations of -l, -k, -w and -S to gksu[do]?
Offline
Hello Seth
Yes, I am elevating the privileges using sudo from an interactive shell, where it works as it should. I have tried with the combinations you proposed, when running the command from the panel, but trying the various combinations did not solve the problem either unfortunately. However, something else solved the problem (I really don't know why it makes a difference?), namely removing the quotations marks around my profile for chromium.
Thank you for the help.
Last edited by Fred7109 (2017-09-18 06:18:32)
Offline
ftr, you should not have to (single) quote parameters to gksudo - maybe it took the inner quotes "literally" or to quit the command parsing? (sounds like a bug in gksu)
Offline