You are not logged in.
[Synopsys] Edit /etc/shells manually, and add /bin/zsh to the list of shells and specify the full path to the app in the policy file. i.e. /usr/bin/leafpad and NOT just leafpad. The policy file for gparted serves as a good one to model your own policy files after.
My environment variable SHELL is still being set to /bin/zsh even though binaries have been moved to /usr/bin/zsh making pkexec complain and fail to run apps in privileged mode.
Where is SHELL set and where would be the most appropriate place to fix it globally for all users?
Last edited by KairiTech (2013-06-29 20:53:49)
Offline
SHELL is /bin/zsh for me, too, and pkexec is just fine
Online
/bin is a symlink to /usr/bin
$ ls -l /bin
lrwxrwxrwx 1 root root 7 05-31 20:40 /bin -> usr/bin
so everything should be OK.
What exactly does pkexec say?
Offline
What exactly does pkexec say?
The value for the SHELL variable was not found the /etc/shells file
This incident has been reported.
...but if I set SHELL like so...
export SHELL=`which zsh` ; pkexec gnome-system-monitor !
...after I enter a password the error message changes to...
(process:9562): GLib-WARNING **: GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(). Most likely the process is ignoring SIGCHLD, or some other thread is invoking waitpid() with a nonpositive first argument; either behavior can break applications that use g_child_watch_add()/g_spawn_sync() either directly or indirectly.
==== AUTHENTICATION COMPLETE ===
(gnome-system-monitor:9562): Gtk-WARNING **: cannot open display:
Last edited by KairiTech (2013-06-29 17:40:34)
Offline
That's because, for some reason, the maintainer of zsh removed the part of the install script that adds /bin/zsh to the shells file. It's fine on my machine because it only affects new installs of zsh.
Bug report: https://bugs.archlinux.org/task/35724
Online
Okay thanks. I'll not mark this solved until, well..., it's solved.
Offline
Edit /etc/shells manually, and add /bin/zsh to the list of shells. You should never use /usr/bin/* in /etc/shells. I think this is because the shebang in scripts needs to match what is in /etc/shells, so in order to maintain compatibility with all scripts, we need to keep using /bin/* despite the fact that it is a path through a symlink. This topic came up with the filesystem /usr merge on the mailing list. It was proposed that all install scripts should be changed to /usr/bin/bash, and one of the devs (I think it was falconindy) gave reasons why this was a bad idea. I'm sure you could find it with a quick google.
Offline
Edit /etc/shells manually, and add /bin/zsh to the list of shells.
That seems to work for ...
pkexec leafpad
but I still have the display issue...
==== AUTHENTICATION COMPLETE ===
leafpad: Cannot open display:
Offline
That's because pkexec doesn't allow GUI apps by default. Google will turn up all of the info you need, also see the polkit policy file for gparted.
Online
Are you running 'pkexec leafpad' in X or from a tty?
Offline
Not an Installation issue, moving to Apps & DEs...
Offline
Gparted works perfectly but modifying its policy file for leafpad still give the display error.
Is it that leafpad itself needs to be compatible with pkexec?
Offline
Are you running 'pkexec leafpad' in X or from a tty?
From terminator. And for gparted, running it from there works perfectly.
Last edited by KairiTech (2013-06-29 20:34:48)
Offline
What an idiot I am.
I need to specify the full path to the app in the policy file. i.e. /usr/bin/leafpad and NOT just leafpad. Duh!!!
Last edited by KairiTech (2013-06-29 20:45:54)
Offline
What an idiot I am.
I need to specify the full path to the app in the policy file. i.e. /user/bin/leafpad and NOT just leafpad. Duh!!!
It's /usr/bin/leafpad - /usr, not /user.
I'm not sure we're on the same page wrt tty v X, but as you've solved it, it doesn't really matter :-)
Offline
KairiTech wrote:What an idiot I am.
I need to specify the full path to the app in the policy file. i.e. /user/bin/leafpad and NOT just leafpad. Duh!!!
It's /usr/bin/leafpad - /usr, not /user.
I'm not sure we're on the same page wrt tty v X, but as you've solved it, it doesn't really matter :-)
Yep. That was a typo in my post. Thanks everyone for walking me through my own stupidity...LOL
Offline