Page 1 of 1

[SOLVED] Problem launching Software Manager Issue

PostPosted: Jul 12th, '16, 03:37
by pnbalaji
Hi,

For the past couple of weeks, I have been facing the issue of launching software manager in Mageia. It works most of the times, but does not work few times.

When I try to launch it from the command line, I am seeing the below error after entering the root password.

Code: Select all
[bneelka@localhost ~]$ gksu rpmdrake
Unable to get Terminal Size. The TIOCGWINSZ ioctl didn't work. The COLUMNS and LINES environment variables didn't work. The resize program didn't work. The stty program didn't work. at /usr/lib/perl5/vendor_perl/5.20.1/x86_64-linux-thread-multi/Term/ReadKey.pm line 451.
No protocol specified
[bneelka@localhost ~]$


Can some one help? I am not sure whether reinstalling perl will help.

Thanks,
Balaji.

Re: Problem launching Software Manager Issue

PostPosted: Jul 12th, '16, 18:25
by doktor5000
Why do you run it via gksu ?

At the very least please provide the output of the following commands, run as your regular user in a terminal:
Code: Select all
loginctl show-session $XDG_SESSION_ID
ps -ef|grep -v grep|grep -iE "polkit|policykit"
pkexec whoami     # you need to enter your root password when asked by the authentication dialog
echo $DISPLAY

and as root from:
Code: Select all
systemctl status polkit.service -a

Re: Problem launching Software Manager Issue

PostPosted: Jul 13th, '16, 02:45
by pnbalaji
Whenever we launch the graphical package manager, it asks for root password, right? That is the reason I launched rpmdrake via gksu.

Output of the commands are below.

Code: Select all
[bneelka@localhost ~]$ loginctl show-session $XDG_SESSION_ID
Id=c1
Name=bneelka
Timestamp=Tue 2016-07-12 19:23:06 IST
TimestampMonotonic=1521451243
VTNr=1
TTY=tty1
Display=:0
Remote=no
Service=lxdm
Scope=session-c1.scope
Leader=2330
Audit=0
Type=x11
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
[bneelka@localhost ~]$ ps -ef|grep -v grep|grep -iE "polkit|policykit"
polkitd   1175     1  0 Jul12 ?        00:00:00 /usr/lib/polkit-1/polkitd --no-debug
bneelka   2569  2482  0 Jul12 ?        00:00:00 /usr/libexec/polkit-mate-authentication-agent-1

Code: Select all
[bneelka@localhost ~]$ pkexec whoami
root

Code: Select all
[bneelka@localhost ~]$ echo $DISPLAY
:0.0

The final command output as root user is below.

Code: Select all
[root@localhost ~]# systemctl status polkit.service -a
● polkit.service - Authorization Manager
   Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
   Active: active (running) since Tue 2016-07-12 18:58:17 IST; 11h ago
     Docs: man:polkit(8)
 Main PID: 1175 (polkitd)
   CGroup: /system.slice/polkit.service
           └─1175 /usr/lib/polkit-1/polkitd --no-debug

Jul 12 18:58:17 localhost polkitd[1175]: Started polkitd version 0.113
Jul 12 18:58:17 localhost polkitd[1175]: Loading rules from directory /etc/polkit-1/rules.d
Jul 12 18:58:17 localhost polkitd[1175]: Loading rules from directory /usr/share/polkit-1/rules.d
Jul 12 18:58:17 localhost polkitd[1175]: Finished loading, compiling and executing 6 rules
Jul 12 18:58:17 localhost polkitd[1175]: Acquired the name org.freedesktop.PolicyKit1 on the system bus
Jul 12 19:23:15 localhost polkitd[1175]: Registered Authentication Agent for unix-session:c1 (system bus name :1.45 [/usr/libexec/polkit-mate-authentication-agent-1], object path /org/mate/PolicyKit1/AuthenticationAgent, locale en_IN.UTF-8)
Jul 13 06:12:19 localhost.localdomain polkitd[1175]: Operator of unix-session:c1 successfully authenticated as unix-user:bneelka to gain ONE-SHOT authorization for action org.freedesktop.policykit.exec for unix-process:3728:4043079 [bash] (owned by unix-user:bneelka)
[root@localhost ~]#

Re: Problem launching Software Manager Issue

PostPosted: Jul 13th, '16, 07:17
by jkerr82508
Perhaps caused by the problem with Term::ReadKey discussed here:

https://bugs.mageia.org/show_bug.cgi?id=15282

Jim

Re: Problem launching Software Manager Issue

PostPosted: Jul 13th, '16, 17:38
by doktor5000
jkerr82508 wrote:Perhaps caused by the problem with Term::ReadKey discussed here:

https://bugs.mageia.org/show_bug.cgi?id=15282

Nope, only a cosmetic issue, but not the cause. One line afterwards in the OP is the problem:
Code: Select all
No protocol specified

this happens when the underlying code cannot figure out if it should run with the X frontend or with the ncurses one, usually this happens when $DISPLAY is not set properly or something like that.


pnbalaji wrote:Whenever we launch the graphical package manager, it asks for root password, right? That is the reason I launched rpmdrake via gksu.

Well, why don't you ask how to configure it to ask for the user password or for no password (for a single-user workstation e.g.) ?
For that, please see http://doc.mageia.org/mcc/5/en/content/draksec.html

Re: Problem launching Software Manager Issue

PostPosted: Jul 14th, '16, 03:10
by pnbalaji
Thanks for the clarification about the bug.

Is there a fix for the "No Protocol Specified" error? What makes rpmdrake to act like this?

Thanks,
Balaji.

Re: Problem launching Software Manager Issue

PostPosted: Jul 15th, '16, 04:44
by pnbalaji
Hi doktor5000,

Today I am having problems launching the update manager and I tried the commands that you provided last time.

The command "systemctl status polkit.service -a" is outputting different result than last time. The output of the command is below.

Code: Select all
[root@localhost ~]# systemctl status polkit.service -a
● polkit.service - Authorization Manager
   Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
   Active: active (running) since Thu 2016-07-14 20:53:58 IST; 11h ago
     Docs: man:polkit(8)
 Main PID: 1170 (polkitd)
   CGroup: /system.slice/polkit.service
           └─1170 /usr/lib/polkit-1/polkitd --no-debug

Jul 14 20:53:57 localhost polkitd[1170]: Started polkitd version 0.113
Jul 14 20:53:57 localhost polkitd[1170]: Loading rules from directory /etc/polkit-1/rules.d
Jul 14 20:53:57 localhost polkitd[1170]: Loading rules from directory /usr/share/polkit-1/rules.d
Jul 14 20:53:58 localhost polkitd[1170]: Finished loading, compiling and executing 6 rules
Jul 14 20:53:58 localhost polkitd[1170]: Acquired the name org.freedesktop.PolicyKit1 on the system bus
Jul 14 20:54:29 localhost polkitd[1170]: Registered Authentication Agent for unix-session:c1 (system bus name :1.47 [/usr/libexec/polkit-mate-authentication-agent-1], object path /org/mate/PolicyKit1/AuthenticationAgent, locale en_IN.UTF-8)
Jul 15 08:06:35 localhost.localdomain polkitd[1170]: Operator of unix-session:c1 successfully authenticated as unix-user:bneelka to gain TEMPORARY authorization for action org.mageia.drakrpm-update.pkexec.run for unix-process:3690:4037749 [/bin/sh /bin/MageiaUpdate --no-media-update --no-confirmation --no-splash] (owned by unix-user:bneelka)
Jul 15 08:06:59 localhost.localdomain polkitd[1170]: Operator of unix-session:c1 successfully authenticated as unix-user:bneelka to gain TEMPORARY authorization for action org.mageia.drakrpm-update.pkexec.run for unix-process:3798:4040132 [/bin/sh /bin/MageiaUpdate --no-media-update --no-confirmation --no-splash] (owned by unix-user:bneelka)
Jul 15 08:08:59 localhost.localdomain polkitd[1170]: Operator of unix-session:c1 successfully authenticated as unix-user:bneelka to gain ONE-SHOT authorization for action org.freedesktop.policykit.exec for unix-process:3908:4048596 [bash] (owned by unix-user:bneelka)
[root@localhost ~]#

Re: Problem launching Software Manager Issue

PostPosted: Jul 16th, '16, 22:11
by doktor5000
pnbalaji wrote:Is there a fix for the "No Protocol Specified" error? What makes rpmdrake to act like this?

Probably due to gksu, and the fix is to run like it's intended to be run.

For the polkit output, the systemctl status polkit.service -a is mostly irrelevant if it's running, the other outputs are important.

Re: Problem launching Software Manager Issue

PostPosted: Jul 17th, '16, 05:29
by pnbalaji
This is happening irrespective of whether I use gksu or not. rpmdrake is spitting this error even when I launch the "Install & Remove Software" from the menu.

Thanks,
Balaji.

Re: [SOLVED] Problem launching Software Manager Issue

PostPosted: Jul 17th, '16, 17:45
by pnbalaji
Based on some google search and little bit of troubleshooting, I was able to solve this issue by adding the below two lines in ~/.bashrc file.

xhost +local:root
export DISPLAY=:0.0

Thanks,
Balaji.