Applications not launching from menu [SOLVED]

If none of the more specific forums is the right place to ask

Applications not launching from menu [SOLVED]

Postby shloz » 2021-02-05 15:15

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.
shloz
 
Posts: 11
Joined: 2021-02-05 15:10

Re: Applications not launching from menu

Postby Head_on_a_Stick » 2021-02-05 15:37

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#Don.27t_make_a_FrankenDebian?
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13450
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Applications not launching from menu

Postby shloz » 2021-02-05 15:46

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
shloz
 
Posts: 11
Joined: 2021-02-05 15:10

Re: Applications not launching from menu

Postby CwF » 2021-02-05 16:12

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.
CwF
 
Posts: 945
Joined: 2018-06-20 15:16

Re: Applications not launching from menu

Postby shloz » 2021-02-05 16:21

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!
shloz
 
Posts: 11
Joined: 2021-02-05 15:10

Re: Applications not launching from menu

Postby CwF » 2021-02-05 16:30

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.
CwF
 
Posts: 945
Joined: 2018-06-20 15:16

Re: Applications not launching from menu

Postby shloz » 2021-02-05 16:35

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

Postby shloz » 2021-02-05 16:39

~$ 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]
shloz
 
Posts: 11
Joined: 2021-02-05 15:10

Re: Applications not launching from menu

Postby CwF » 2021-02-05 16:50

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
CwF
 
Posts: 945
Joined: 2018-06-20 15:16

Re: Applications not launching from menu

Postby Head_on_a_Stick » 2021-02-05 16:54

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.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13450
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Applications not launching from menu

Postby CwF » 2021-02-05 16:56

Head_on_a_Stick wrote:Both gparted and synaptic already supply polkit rules.

..yes, a rule for the user, not the action.
CwF
 
Posts: 945
Joined: 2018-06-20 15:16

Re: Applications not launching from menu

Postby shloz » 2021-02-05 17:26

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

Postby shloz » 2021-02-05 17:30

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...)
shloz
 
Posts: 11
Joined: 2021-02-05 15:10

Re: Applications not launching from menu

Postby CwF » 2021-02-05 17:37

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?
CwF
 
Posts: 945
Joined: 2018-06-20 15:16

Re: Applications not launching from menu

Postby Head_on_a_Stick » 2021-02-05 17:39

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.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13450
Joined: 2014-06-01 17:46
Location: /dev/chair

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 20 guests

fashionable
cron