#4520 closed enhancement (duplicate)
Gparted-0.17.0 contains instructions that should belong to other package
Reported by: | Armin K | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | BOOK | Version: | SVN |
Severity: | normal | Keywords: | |
Cc: |
Description
First of all, it isn't clear to me why does GParted page contain instructions for building a software from OpenSSH source?
Second, these instructions belong to the OpenSSH page, with deps and explanations on why they are necessary or what not.
Furthermore, gparted_polkit script uses "which", but the package isn't listed as a dependency or even mentioned at all.
Change History (21)
follow-up: 12 comment:1 by , 11 years ago
follow-ups: 4 5 comment:2 by , 11 years ago
I've now seen which, sorry for the noise about that. I do agree that you could use "type -p pkexec", but there isn't any need for that since you can just use a simple sed to modify gparted .desktop file to use pkexec. The script isn't necessary at all. Polkit configuration file. however, is.
I propose the following:
Move build instructions for ssh-askpass to OpenSSH page where it belongs. Add optional configuration to Sudo page to utilize ssh-askpass if it's installed Add a note to gparted that links that sudo package should be configured for ssh-askpass
The current situation is really ugly no matter how complicated it might be.
Also, I find the note "Any graphical program requiring root privileges can be run using "pkexec <program>"" to be incorrect. pkexec won't run any GUI app by default unless you create a configuration file which explicitly tells pkexec "this app should be run as root but it's gui app."
comment:3 by , 11 years ago
Oh, and I also think it would be nice instead of listing polkit agents as dependencies for individual packages to simply add them as a runtime dependency to polkit page with a note that they are required if using gui, in general. Similar thing is done for libnotify, where it lists notification daemons as runtime dependencies. This should go to another ticket though.
comment:4 by , 11 years ago
Replying to Krejzi:
I've now seen which, sorry for the noise about that. I do agree that you could use "type -p pkexec", but there isn't any need for that since you can just use a simple sed to modify gparted .desktop file to use pkexec. The script isn't necessary at all. Polkit configuration file. however, is.
I propose the following:
Move build instructions for ssh-askpass to OpenSSH page where it belongs.
Then gparted could link directly to that part.
Add optional configuration to Sudo page to utilize ssh-askpass if it's installed Add a note to gparted that links that sudo package should be configured for ssh-askpass
OK.
Also, I find the note "Any graphical program requiring root privileges can be run using "pkexec <program>"" to be incorrect.
Incomplete. Just have to add with a configuration file. Intention was to get both alternatives in the same level so the user chooses.
pkexec won't run any GUI app by default unless you create a configuration file which explicitly tells pkexec "this app should be run as root but it's gui app."
comment:5 by , 11 years ago
Replying to Krejzi:
I've now seen which, sorry for the noise about that. I do agree that you could use "type -p pkexec", but there isn't any need for that since you can just use a simple sed to modify gparted .desktop file to use pkexec. The script isn't necessary at all. Polkit configuration file. however, is.
If you search in the archives, I discussed all this, before. I added the script because it would not run without it. There are references there to other distributions using scripts.
comment:6 by , 11 years ago
I waited for somebody to tell me why it would not run without a script for me. Untill today.
I discovered that gparted page was not "ugly", but incomplete. Started changing it. Finished changing, after that very long thread in which you told someone how to do it. I had another solution. Wanted to offer both to the users. Ugly as it is it is much better than before. At least, now, the users can use it.
comment:7 by , 11 years ago
Owner: | changed from | to
---|
comment:8 by , 11 years ago
The script is rather unnecesary. If an user chooses polkit, then he could just use the sed to change desktop file to use pkexec, as done for sudo -A. Why is it safe for sudo to do so but not pkexec? You don't need to check for pkexec, since the polkit is mentioned as dependency in that part and is expected to be installed if polkit method is chosen.
comment:9 by , 11 years ago
Ah sorry, missed your reply about "would not run without the script".
Well, I am not sure what you did, but here it runs just fine. I don't even use --disable-internal-agent when running pkexec. Note that polkit-gnome/lxpolkit *must* be running and that ConsoleKit *must* show valid and *active* *local* session.
As for the "Any graphical program requiring root privileges can be run using "pkexec <program>"" part, I don't think that really belongs to that page. It should go to polkit page since it has something to do with polkit configuration, it isn't related to gparted at all.
comment:10 by , 11 years ago
I use lx-polkit, so I suppose this is the reason for the script in more than on distributions.
Actually, this whole ticket is a duplicate of #4454, omnly what I asked to be done there is being done here. I am starting to think if I should reopen that ticket.
There, I write
I have a page ready and will commit. Please, check it is written properly and if the instructions are correct. Please, Armin, have a look, because I have tried to reproduce a part of your posts to Dan. Hopefully, I will not need to revert the whole thing.
comment:11 by , 11 years ago
Can you confirm that "pkexec /usr/sbin/gparted" works from terminal when ran as normal user? I'm starting to think it's rather an issue with the desktop environment .desktop file parser or whatever. It works fine for me under Xfce4.
comment:12 by , 11 years ago
Replying to [http://wiki.linuxfromscratch.org/blfs/ticket/4454?replyto=1#comment:1 bdubbs@…:
I agree that the building and configuring of ssh-askpass should be in the ssh page, but this is a complicated scenario. We need ssh, sudo, and gparted working together to run the program as a regular user.
OK.
As far as 'which' goes, the package *is* mentioned in the text. However, I'd prefer to incorporate 'type -pa pkexec' instead.
Thanks, that worked fine. It is my first encounter with it.
comment:13 by , 11 years ago
comment:14 by , 11 years ago
I would like (and would prefer, if worked for me) to remove the script, but cannot include instructions that do not work for me. This is the only thing remaining. The others, I already agreed with.
Alternatively, I can release the ticket to the book, and somebody else, for whom the instructions work without the script, could take it and fix it.
comment:16 by , 11 years ago
So it is indeed a desktop issue (panel or whatever). Keep the script. But I'd rather suggest to simplify it. There is no need to check if pkexec binary is there, since if user decided to use pkexec, then it should be definitely there. If it's not there, but it is mentioned that it needs to be there, he needs to be laughed at, seriously :P
Also, you shouldn't fallback to anything in that case, because it will still fail silently if pkexec is not found, compared to "no such file or directory" message. These are just my two cents. As for the mail-link, as I said I don't pay attention to most things anymore.
This script should be enough, because your instruction assure that there should be a polkit agent running:
#!/bin/bash pkexec /usr/sbin/gparted $@
Finally, it seems to be a practice for naming .actions files like this: reverse.domain.dbus-service-name(or package-name).optional-subservice-name.policy
org.freedesktop.NetworkManager.policy org.freedesktop.upower.policy org.kde.kcontrol.kcmremotewidgets.policy
The good naming scheme for gparted file might be org.gnome.gparted.policy as gparted seems to claim it is "Partition Manager for GNOME". Just a suggestion, it isn't really important.
The original suggestion still stands.
comment:17 by , 11 years ago
Owner: | changed from | to
---|
comment:18 by , 11 years ago
Sorry, at this time my eyes barely see the characters, and sent that to the other ticket.
Have been thinking about this. I would suggest that Armin send a patch here to fix it and myself or preferably somebody else would take it and commit, after possible discussions.
comment:19 by , 11 years ago
Sorry, but I am not interested in fixing it myself. I did my job on reporting that what has been done might be incorrect. It's your choice on how to act. Note that no other package does something like this nor has ever done something like this - at least as far as I can remember.
comment:20 by , 11 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
It is not your job reporting. Nor duplicating tickets. Please, Next time you decide to interfere, first do the basics and see if you are not duplicating a ticket. It is not my problem if you cannot catch up with what is being done. I will reopen the other ticket, close this one and fix it. Please, next time you report anything, use the word *please*, or I will immediately close as invalid. Everybody here, except you, are polite.
I agree that the building and configuring of ssh-askpass should be in the ssh page, but this is a complicated scenario. We need ssh, sudo, and gparted working together to run the program as a regular user.
As far as 'which' goes, the package *is* mentioned in the text. However, I'd prefer to incorporate 'type -pa pkexec' instead.