Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #207616

Re: Stretch with MATE DE - odd new file association problem

From "Alexander V. Makartsev" <avbetev@gmail.com>
Newsgroups linux.debian.user
Subject Re: Stretch with MATE DE - odd new file association problem
Date 2019-04-17 08:00 +0200
Message-ID <xNLLY-2s8-3@gated-at.bofh.it> (permalink)
References (2 earlier) <xNh1v-q4-1@gated-at.bofh.it> <xNjmG-1HW-1@gated-at.bofh.it> <xNqo9-6cS-9@gated-at.bofh.it> <xNrtT-6Qe-7@gated-at.bofh.it> <xNJTQ-1eL-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 17.04.2019 8:51, Andy Smith wrote:
> Hi,
>
> On Tue, Apr 16, 2019 at 01:15:07PM +0500, Alexander V. Makartsev wrote:
>> On 16.04.2019 12:08, Andy Smith wrote:
>>> I don't have seamonkey installed so haven't tried myself, but does
>>> it even run as root?
>>>
>> I don't use SeaMonkey either, but I'm pretty sure it does not need root
>> privileges to run. :)
> My point is that the OP is asking why, when they click a link from
> within a GUI app that is running as root (synaptic), the wrong
> browser is launched. So what I am asking is, once the correct
> browser is set up via alternatives, isn't it going to launch
> seamonkey as root?
I was pretty sure it isn't gonna run browser as root. Because it is
pretty silly mistake from a developer standpoint.
Let's double check:
    $ sudo ps aux | egrep "x-www-browser|synaptic"
    amak 2344 0.0 0.0 4280 744 ? S 10:08 0:00 /bin/sh
/usr/bin/synaptic-pkexec
    root 2345 0.6 0.8 557104 142048 ? Sl 10:08 0:02 /usr/sbin/synaptic
    amak 2378 1.1 1.4 2121228 244576 ? Sl 10:09 0:03
/usr/bin/x-www-browser http://0install.net/

It looks like Synaptic starts with user privileges as a wrapper and
PolicyKit asks for root privileges to spawn actual synaptic process.
So Synaptic's UI and every process (e.g. x-www-browser) it spawns later
will run with user privileges.
Special actions, like package installation or removal, will be forwarded
to real synaptic process which is running as root.
>
> Further implication being, it is good to learn about the
> alternatives system, but maybe not a great idea to solve this
> problem this way.
There is no other sane way, I think. Synaptic will execute
"x-www-browser <URL>" so this symlink has to point to actual browser
and to manage those symlinks in a convenient and controllable way, you
should use "update-alternatives".
Of course, you can do the same thing by hand, but then you have to
remember and keep track of all changes to your "/bin", "/usr/bin", etc,
so you won't break anything later.


-- 
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀ 

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Stretch with MATE DE - odd new file association problem Richard Owlett <rowlett@cloud85.net> - 2019-04-15 15:20 +0200
  Re: Stretch with MATE DE - odd new file association problem "Alexander V. Makartsev" <avbetev@gmail.com> - 2019-04-15 20:20 +0200
    Re: Stretch with MATE DE - odd new file association problem Richard Owlett <rowlett@cloud85.net> - 2019-04-15 23:10 +0200
      Re: Stretch with MATE DE - odd new file association problem "Alexander V. Makartsev" <avbetev@gmail.com> - 2019-04-16 01:40 +0200
        Re: Stretch with MATE DE - odd new file association problem Andy Smith <andy@strugglers.net> - 2019-04-16 09:10 +0200
          Re: Stretch with MATE DE - odd new file association problem "Alexander V. Makartsev" <avbetev@gmail.com> - 2019-04-16 10:20 +0200
            Re: Stretch with MATE DE - odd new file association problem Andy Smith <andy@strugglers.net> - 2019-04-17 06:00 +0200
              Re: Stretch with MATE DE - odd new file association problem "Alexander V. Makartsev" <avbetev@gmail.com> - 2019-04-17 08:00 +0200
                Re: Stretch with MATE DE - odd new file association problem Andy Smith <andy@strugglers.net> - 2019-04-17 09:10 +0200
      Re: Stretch with MATE DE - odd new file association problem didier gaumet <didier.gaumet@gmail.com> - 2019-04-16 10:00 +0200

csiph-web