Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Applications not launching from menu [SOLVED]

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
shloz
Posts: 11
Joined: 2021-02-05 15:10

Applications not launching from menu [SOLVED]

#1 Post by shloz »

I'm running Debian 10.7 LXQT. Suddenly Synaptic, Grub-Customizer, GParted aren't launching from the menu. They all launch from the terminal just fine (with sudo for GParted and Synaptic). The common denominator seems to be that these applications prompt for the root password before launching. Please help me fix this. Thanks, Shloz
Last edited by shloz on 2021-02-05 18:10, edited 2 times in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Applications not launching from menu

#2 Post by Head_on_a_Stick »

Do you have a graphical polkit authentication agent running?

Code: Select all

pgrep -a polkit
shloz wrote:Suddenly
Sounds like you've broken it:

Code: Select all

apt policy
https://wiki.debian.org/DontBreakDebian ... nkenDebian?
deadbang

shloz
Posts: 11
Joined: 2021-02-05 15:10

Re: Applications not launching from menu

#3 Post by shloz »

This is the output I get. How can I check if it's broken?

~$ pgrep -a polkit
552 /usr/lib/policykit-1/polkitd --no-debug

CwF
Global Moderator
Global Moderator
Posts: 2638
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: Applications not launching from menu

#4 Post by CwF »

Menu entries or action files changed. If the menu is using pkexec, check it...

Code: Select all

$  pkcheck --process $$ --action-id com.ubuntu.pkexec.synaptic --allow-user-interaction --enable-internal-agent
Drop the last two options and in a terminal should return nothing, or errors. The last enable reveals if you need an agent.

shloz
Posts: 11
Joined: 2021-02-05 15:10

Re: Applications not launching from menu

#5 Post by shloz »

When I drop the last 2 options I get:
Authorization requires authentication and -u wasn't passed.
With the options it gives me the prompt (dialog box) to enter my root password, when I enter the password nothing happens...

Don't understand the significance of all this but hopefully you do!

CwF
Global Moderator
Global Moderator
Posts: 2638
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: Applications not launching from menu

#6 Post by CwF »

shloz wrote:when I enter the password nothing happens...
Yes. No response is good, means you have authority - with the password. If the password was wrong, or you don't have authority it would say so. No response is 0 and is success!
Since you click the menu, and it's command is pkexec, some dialog entry should pop up, provided by a user agent you don't have...

I don't have one either, so I can't say on your desktop what broke. There may be a specific polkit-something-user-agent for your desktop if you'd like a password dialog, was there one before?

Or you can create a rule for pkexec if you have root rights.

shloz
Posts: 11
Joined: 2021-02-05 15:10

Re: Applications not launching from menu

#7 Post by shloz »

Yes there was one before and in LXQT session settings LXQT Policy Handler is running. I also seem to have LXQT-policykit installed. I reinstalled it but it didn't help. Anything you can suggest to get these applications launching from the menu again? I do have root privileges (I'm the only user)...

shloz
Posts: 11
Joined: 2021-02-05 15:10

Re: Applications not launching from menu

#8 Post by shloz »

~$ sudo apt list --installed | grep policy

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

lxqt-policykit-l10n/stable,now 0.14.1-1 all [installed,automatic]
lxqt-policykit/stable,now 0.14.1-1 amd64 [installed,automatic]
policykit-1/stable,now 0.105-25 amd64 [installed,automatic]

CwF
Global Moderator
Global Moderator
Posts: 2638
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: Applications not launching from menu

#9 Post by CwF »

shloz wrote:Anything you can suggest to get these applications launching from the menu again?
..create this file as root for a permanent solution without a password;
/etc/polkit-1/localauthority/30-site.d/42-users.pkla

Code: Select all

[User Permissions]
Identity=unix-user:username;
Action=com.ubuntu.pkexec.synaptic;org.gnome.gparted;
ResultActive=yes
To find your other actions to add

Code: Select all

$ pkaction -l

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Applications not launching from menu

#10 Post by Head_on_a_Stick »

CwF wrote:Or you can create a rule for pkexec if you have root rights.
Both gparted and synaptic already supply polkit rules.
shloz wrote:

Code: Select all

lxqt-policykit/stable,now 0.14.1-1 amd64 [installed,automatic]
^ That supplies the graphical polkit authentication agent but it doesn't seem to be running.

Try this:

Code: Select all

lxqt-policykit-agent &
synaptic-pkexec
Does that offer a password prompt and then launch synaptic? Note that this requires your user's password rather than the root password.
deadbang

CwF
Global Moderator
Global Moderator
Posts: 2638
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: Applications not launching from menu

#11 Post by CwF »

Head_on_a_Stick wrote: Both gparted and synaptic already supply polkit rules.
..yes, a rule for the user, not the action.

shloz
Posts: 11
Joined: 2021-02-05 15:10

Re: Applications not launching from menu

#12 Post by shloz »

CwF wrote:
shloz wrote:Anything you can suggest to get these applications launching from the menu again?
..create this file as root for a permanent solution without a password;
/etc/polkit-1/localauthority/30-site.d/42-users.pkla

Code: Select all

[User Permissions]
Identity=unix-user:username;
Action=com.ubuntu.pkexec.synaptic;org.gnome.gparted;
ResultActive=yes
To find your other actions to add

Code: Select all

$ pkaction -l
I tried the above, I rebooted afterwards, but still nothing...

shloz
Posts: 11
Joined: 2021-02-05 15:10

Re: Applications not launching from menu

#13 Post by shloz »

Head_on_a_Stick wrote:
CwF wrote:Or you can create a rule for pkexec if you have root rights.
Both gparted and synaptic already supply polkit rules.
shloz wrote:

Code: Select all

lxqt-policykit/stable,now 0.14.1-1 amd64 [installed,automatic]
^ That supplies the graphical polkit authentication agent but it doesn't seem to be running.

Try this:

Code: Select all

lxqt-policykit-agent &
synaptic-pkexec
Does that offer a password prompt and then launch synaptic? Note that this requires your user's password rather than the root password.
the first command returns the following:
sz@x240:~$ lxqt-policykit-agent &
[1] 1336
sz@x240:~$ (0x7ffcfec50210) Debug: New PolkitAgentListener 0x56267f5c1e80
(0x7ffcfec50210) Debug: Adding new listener PolkitQt1::Agent::Listener(0x7ffcfec50220) for 0x56267f5c1e80

** (process:1336): WARNING **: 13:17:06.897: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
(0x7ffcfec50210) Warning: "Cannot register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject"

the second command does offer a password prompt and then launch synaptic
(nothing doing from the menu however, also for gparted and grub-customizer...)

CwF
Global Moderator
Global Moderator
Posts: 2638
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: Applications not launching from menu

#14 Post by CwF »

shloz wrote:I tried the above, I rebooted afterwards, but still nothing...
You did put in your username right? It should work on any DE, except broken ones?

watch what the menu entries do on the command line?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Applications not launching from menu

#15 Post by Head_on_a_Stick »

Let's check the error messages for a fresh session.

Log out and back in again and run

Code: Select all

rm ~/.xsession-errors
Then attempt to launch synaptic from the menu and post the content of ~/.xsession-errors here but please use code tags instead of just pasting the output directly into your post.

And I really do think we need to see the output of

Code: Select all

apt policy
Please read the "Don't Break Debian" link I provided earlier — most problems of this nature are due to user misconfiguration.

@CwF: I think we should try to narrow down the source of the problem before applying a hacky workaround. The menu entries should work without having to bypass polkit.
deadbang

CwF
Global Moderator
Global Moderator
Posts: 2638
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: Applications not launching from menu

#16 Post by CwF »

Head_on_a_Stick wrote: @CwF: I think we should try to narrow down the source of the problem before applying a hacky workaround. The menu entries should work without having to bypass polkit.
Well, not quite hacky, more like official DE-agnostic method.. It does not 'bypass' polkit, it USES it! It completes the chain - the chain that is broken in more than one DE! That's why I ask the way I did and pointed towards the agent, which is not required...unless you want one.

The qualifier is simple, only user desktop. The mechanism is not required, so I propose the logical to not fix what we don't need!

shloz
Posts: 11
Joined: 2021-02-05 15:10

Re: Applications not launching from menu

#17 Post by shloz »

Head_on_a_Stick wrote:Let's check the error messages for a fresh session.

Log out and back in again and run

Code: Select all

rm ~/.xsession-errors
Then attempt to launch synaptic from the menu and post the content of ~/.xsession-errors here but please use code tags instead of just pasting the output directly into your post.

And I really do think we need to see the output of

Code: Select all

apt policy
Please read the "Don't Break Debian" link I provided earlier — most problems of this nature are due to user misconfiguration.

@CwF: I think we should try to narrow down the source of the problem before applying a hacky workaround. The menu entries should work without having to bypass polkit.
I logged out and back in, ran rm ~/.xsession-errors, tried to launch synaptic, but there's no ~/.xsession-errors file (assuming it's supposed to be in my home/sz/ as per the ~)
The following is the output of apt policy:

Code: Select all

sz@x240:~$ apt policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://deb.debian.org/debian buster-updates/non-free amd64 Packages
     release o=Debian,a=stable-updates,n=buster-updates,l=Debian,c=non-free,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian buster-updates/main amd64 Packages
     release o=Debian,a=stable-updates,n=buster-updates,l=Debian,c=main,b=amd64
     origin deb.debian.org
 500 http://security.debian.org/debian-security buster/updates/non-free amd64 Packages
     release v=10,o=Debian,a=stable,n=buster,l=Debian-Security,c=non-free,b=amd64
     origin security.debian.org
 500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
     release v=10,o=Debian,a=stable,n=buster,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
 500 http://deb.debian.org/debian buster/non-free amd64 Packages
     release v=10.7,o=Debian,a=stable,n=buster,l=Debian,c=non-free,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian buster/contrib amd64 Packages
     release v=10.7,o=Debian,a=stable,n=buster,l=Debian,c=contrib,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian buster/main amd64 Packages
     release v=10.7,o=Debian,a=stable,n=buster,l=Debian,c=main,b=amd64
     origin deb.debian.org
Pinned packages:

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Applications not launching from menu

#18 Post by Head_on_a_Stick »

CwF wrote:It does not 'bypass' polkit, it USES it!
Touché.
I should have wrote:The menu entries should work without having to bypass the polkit authentication mechanism.
shloz wrote:there's no ~/.xsession-errors file
No, of course, silly me — the errors wouldn't be written there.

Open a terminal and follow the journal to see the errors as they're written:

Code: Select all

journalctl --follow
If your user isn't in the systemd-journal group then the command will have to be run as root.

EDIT: your sources are fine btw.
deadbang

shloz
Posts: 11
Joined: 2021-02-05 15:10

Re: Applications not launching from menu

#19 Post by shloz »

OK here's the error when I try to launch synaptic from the menu:

Code: Select all

Feb 05 13:45:25 x240 pkexec[2103]: sz: The value for environment variable TERM contains suscipious content [USER=root] [TTY=unknown] [CWD=/home/sz] [COMMAND=/usr/sbin/synaptic]

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Applications not launching from menu

#20 Post by Head_on_a_Stick »

shloz wrote:

Code: Select all

The value for environment variable TERM contains suscipious content
^ I put this into a search engine:

https://www.digitalfoundations.com.au/b ... t-in-lxqt/

Does that help?
deadbang

Post Reply