Author Topic: should pamac be started with superuser rights?  (Read 2012 times)

0 Members and 1 Guest are viewing this topic.

Offline emninger

  • Vollwertiges Mitglied
  • ***
  • Posts: 138
  • I'm new. Be nice!
  • Branch: 16.04 open-rc
  • Desktop: JWM
  • GPU Card: nvidia
  • GPU driver: no
  • Kernel: linux 4.4.8-1-Manjaro x86_64
  • Skill: Novice
should pamac be started with superuser rights?
« on: 02. May 2016, 08:47:52 »
I installed pamac (for the better listing of existing packages. I know, pacli is more powerful and better and i use it too ;) ) but i encounter a problem:

The starter file pamac-manager.desktop in /usr/share/applications/ starts pamac-manager with user rights, which for me results in "authentication failed" when i try to install a package. But it works when i start pamac-manager by gksu (or gksudo). Is that correct, or an error somewhere in my setup?

On the other hand, pacli starts normally, but asks me for the authentication before it installs something (what seems more logical to me).

Thanks a lot in advance.

Offline badbodh

  • Held Mitglied
  • *****
  • Posts: 923
  • Windows assumes I'm stupid, Linux proves it.
  • Branch: Testing
  • Desktop: Xfce, i3
  • GPU Card: Intel Mobile 4 Series
  • Kernel: linux41 64-bit
  • Skill: Intermediate
Re: should pamac be started with superuser rights?
« Reply #1 on: 02. May 2016, 09:36:16 »
please complete your profile mentioning your hardware and DE/kernels etc. Prevents us from asking the same question every time.

run
Code: [Select]
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 or
Code: [Select]
/usr/lib/mate-polkit/polkit-mate-authentication-agent-1 before you run pamac as normal user. Do you still get authentication failed ?
« Last Edit: 02. May 2016, 09:38:27 by badbodh »
You can't feel the love till it hurts a little. Go rolling, go bleeding-edge !

Offline emninger

  • Vollwertiges Mitglied
  • ***
  • Posts: 138
  • I'm new. Be nice!
  • Branch: 16.04 open-rc
  • Desktop: JWM
  • GPU Card: nvidia
  • GPU driver: no
  • Kernel: linux 4.4.8-1-Manjaro x86_64
  • Skill: Novice
Re: should pamac be started with superuser rights?
« Reply #2 on: 02. May 2016, 16:00:44 »
Code: [Select]
# /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1

(polkit-gnome-authentication-agent-1:10299): polkit-gnome-1-WARNING **: Unable to determine the session we are in: GDBus.Error:org.freedesktop.ConsoleKit.Manager.Error.General: Unable to lookup session information for process '10299'

What do i do with this?

In any case, i do not have a problem with starting the graphical package manager with superuser rights (i know that was default for debian e.g. as well), i wanted to know if it is correct; and, if so, why the installer installs the desktop starter file without?
« Last Edit: 02. May 2016, 16:25:08 by emninger »

Offline curiouseag

  • Sr. Mitglied
  • ****
  • Posts: 267
  • I'm new. Be nice!
  • Branch: stable
  • Desktop: undicieded
  • GPU Card: Intel Core i3-5010U
  • GPU driver: Intel
  • Kernel: grsec self build
  • Skill: Advanced
Re: should pamac be started with superuser rights?
« Reply #3 on: 02. May 2016, 17:23:02 »
looks like gnome polkit does not support jwm.


You can launch pamac as root, yes but you will have this problem with every app requiring root rights.


is this the jwm iso? ask in the jwm thread since it is not default manjaro configuration


Offline emninger

  • Vollwertiges Mitglied
  • ***
  • Posts: 138
  • I'm new. Be nice!
  • Branch: 16.04 open-rc
  • Desktop: JWM
  • GPU Card: nvidia
  • GPU driver: no
  • Kernel: linux 4.4.8-1-Manjaro x86_64
  • Skill: Novice
Re: should pamac be started with superuser rights?
« Reply #4 on: 02. May 2016, 18:10:15 »
looks like gnome polkit does not support jwm.


You can launch pamac as root, yes but you will have this problem with every app requiring root rights.


is this the jwm iso? ask in the jwm thread since it is not default manjaro configuration

May be it's a stupid question, but shouldn't be default, that what reqires root rights should ask for the root pswd? It's at least what i was used to by slackware? But ok, i'll go to the jwm departement ;)

Offline philm

  • Core Team
  • *****
  • Posts: 10671
    • Manjaro Linux
  • Branch: Unstable
  • Desktop: XFCE
  • GPU Card: Geforce GTX 650
  • GPU driver: non-free
  • Kernel: Maintainer - so all ;)
  • Skill: Guru
Re: should pamac be started with superuser rights?
« Reply #5 on: 02. May 2016, 18:15:51 »
You have to run at least one polkit daemon to get pamac workin properly.

Offline curiouseag

  • Sr. Mitglied
  • ****
  • Posts: 267
  • I'm new. Be nice!
  • Branch: stable
  • Desktop: undicieded
  • GPU Card: Intel Core i3-5010U
  • GPU driver: Intel
  • Kernel: grsec self build
  • Skill: Advanced
Re: should pamac be started with superuser rights?
« Reply #6 on: 02. May 2016, 18:33:50 »
May be it's a stupid question, but shouldn't be default, that what reqires root rights should ask for the root pswd? It's at least what i was used to by slackware? But ok, i'll go to the jwm departement ;)


noo, polkit is used to give root access after you tip in your password. You can browser software as local user and only use root rights for the install process.
It makes sense this way.


Take a look at pamac after you got polkit working. Only if you try to edit the software on your system or change pamac settings you will be asked for your password via polkit.


^the right way of doing it


now take a look at gparted. You will be asked for your password at the very beginning of starting gparted. since you are not able to do anything with gparted without rootrights, that is okay.


^okayish, I prefer the least needed rights given. Gparted could list all partitoions without root rights and ask for the password if needed. But it does not.

Offline emninger

  • Vollwertiges Mitglied
  • ***
  • Posts: 138
  • I'm new. Be nice!
  • Branch: 16.04 open-rc
  • Desktop: JWM
  • GPU Card: nvidia
  • GPU driver: no
  • Kernel: linux 4.4.8-1-Manjaro x86_64
  • Skill: Novice
Re: should pamac be started with superuser rights?
« Reply #7 on: 02. May 2016, 19:14:38 »
I don't want to ask stupid questions so, may you knowledged people can point me to a site where i could learn about polkits and how to get them running. In my system, according to pamac, i have polkit-consolekit and polkit-gnome installed. But what to do with them?

Offline curiouseag

  • Sr. Mitglied
  • ****
  • Posts: 267
  • I'm new. Be nice!
  • Branch: stable
  • Desktop: undicieded
  • GPU Card: Intel Core i3-5010U
  • GPU driver: Intel
  • Kernel: grsec self build
  • Skill: Advanced
Re: should pamac be started with superuser rights?
« Reply #8 on: 02. May 2016, 19:37:44 »
I don't want to ask stupid questions so, may you knowledged people can point me to a site where i could learn about polkits and how to get them running. In my system, according to pamac, i have polkit-consolekit and polkit-gnome installed. But what to do with them?


you have jwm installed. Gnome, kde/plasma, Cinnamon ... and a few more have a polkit manager included.
Jwm is just a very simple window manager. You can choose yourself the which polkit you want to use.


try this: since the gnome polkit does not work for you, remove it. Now install lxqt-policykit, it is in the repos.
It miosses a autostart file but we can add it ourself.


open a terminal and create a file named lxqt-policykit.desktop in /etc/xdg/autostart/


Code: [Select]
sudo nano /etc/xdg/autostart/lxqt-policykit.desktop

put this into it


Code: [Select]
[Desktop Entry]
Type=Application
Name=LXQTPolicyKit
Comment=Policykit Authentication Agent
Exec=lxqt-policykit-agent
TryExec=lxqt-policykit-agent
Icon=gtk-dialog-authentication
NotShowIn=GNOME;KDE;MATE;
Hidden=true


save and reboot. Now you have a simple qt based polkit gui.


Offline mandog

  • Held Mitglied
  • *****
  • Posts: 1921
  • Architect Forum And G+ Forum Owner With Daniel S
  • Branch: All
  • Desktop: Gnome, Mate, E19, Openbox,FLuxbox,Budgie, XFCE openRC,
  • GPU Card: nvidia
  • GPU driver: Non Free
  • Kernel: latest
  • Skill: Advanced
Re: should pamac be started with superuser rights?
« Reply #9 on: 02. May 2016, 19:54:12 »
This is how you start gnome-polkit what the would you need to add QT bloat?
In the home folder look for .jwm folder it may be hidden ctrl+h if it is then open look for a file called "start" look for this line
<StartupCommand>/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1</StartupCommand>
if its not there add it by copy paste  make sure you leave a blank line above the bottom

</JWM>
then reboot
A ENGLISHMAN IN PERU
I'm dyslexic Please do not complain about punctuation or spelling,
FANBOY,Taken from the urban dictionary
 A pathetic insult often used by fanboys themselves to try and put down people who don't like whatever it is they like.