Welcome!
Important information
-- Required MX 15/16 Repository Changes
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

News
-- Introducing our new Website
-- MX Linux on social media: here

Current releases
-- MX-18.3 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.4.1 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

Updating as a regular user

User avatar
oops
Forum Regular
Forum Regular
Posts: 725
Joined: Tue Apr 10, 2018 5:07 pm

Re: Updating as a regular user

#11

Post by oops » Sat May 18, 2019 6:19 pm

... The ability of updating for a regular user is interesting, but mostly for the web browsers, openoffice, the security patches, etc ... but not recommended for a grub update, or a kernel update for example.
$ inxi -Fxxxz : System: Host:XEON ... Distro: MX-18_x64 Continuum

User avatar
b3ta
Forum Novice
Forum  Novice
Posts: 4
Joined: Mon Aug 20, 2018 4:34 am

Re: Updating as a regular user

#12

Post by b3ta » Sun May 19, 2019 11:49 am

EDIT: Some wit said "In theory there is no difference between practice and theory; in practise there is."
This doesn't work! (Guess I should have tested first). I'll look at it again soonish. Right now the Long Island Iced Tea my wife gave me precludes any further investigation.

---

Thank you for all the help.

Four points, and I'm OK to mark this a SOLVED (it is for me). [See the EDIT, above]

ONE
oops wrote:
Sat May 18, 2019 6:19 pm
... but not recommended for a grub update, or a kernel update for example.
Indeed. That's where I think Mint's idea of update levels is probably a Good Thing.
That said, I don't really want to end up here (because I've been there): https://forums.linuxmint.com/viewtopic.php?t=233882.

TWO

Reading https://wiki.archlinux.org/index.php/Polkit and https://doc.opensuse.org/documentation/ ... cykit.html brought me to the following insights:
  • Local authorisation rules should be placed in /etc/polkit-1/rules.d/ to preclude updates from clobbering them.
  • The sed script should be amended not to change the authorisation requirements for <allow_any> or <allow_inactive>.
I have written the following script I'm saving as ~/bin/local-polkit_admin2self. It adds a few more authorisations I think are useful in the context of a single-user laptop. The reason I'm scripting it as opposed to running it once is to have a record of what I've done, as a diff a few upgrades hence might induce a headache, depending on which new policies there are. Yes, I'm not defining a trap to delete the directory, this could all be one line, etc., but I'd also rather read it easily.

Code: Select all

#!/bin/bash

SDIR=/usr/share/polkit-1/actions
DDIR=/etc/polkit-1/rules.d
TDIR=`mktemp -d`

if [ ! -d $DDIR ]; then
  sudo mkdir -p $DDIR
fi

for sf in\
 $SDIR/org.mxlinux.pkexec*\
 $SDIR/com.ubuntu.pkexec.synaptic.policy\
 $SDIR/org.freedesktop.timedate1.policy
do
  df=`basename $sf`
  sudo sed "s/<allow_active>auth_admin/<allow_active>auth_self/g" $sf >$TDIR/$df
done

sudo /bin/mv $TDIR/* $DDIR/.
rmdir $TDIR
THREE

The ArchWiki source above speaks of their package called polkit-explorer, a GUI to the whole thing. That seems like a better idea than this kind of mucking around. Given how structured those files are and that this need exists, it should not be too great a hurdle to port / do the same.

FOUR

It would also be useful to look at how /usr/share/polkit-1/rules.d/ is used.

---

8-)
John
Last edited by b3ta on Sun May 19, 2019 12:01 pm, edited 1 time in total.

User avatar
Head_on_a_Stick
Forum Regular
Forum Regular
Posts: 348
Joined: Sun Mar 17, 2019 3:37 pm

Re: Updating as a regular user

#13

Post by Head_on_a_Stick » Sun May 19, 2019 11:56 am

oops wrote:
Sat May 18, 2019 6:19 pm
... The ability of updating for a regular user is interesting, but mostly for the web browsers, openoffice, the security patches, etc ... but not recommended for a grub update, or a kernel update for example.
Debian buster has unattended-upgrades enabled by default so I'm not sure if that's true.

FWIW our family laptop runs Debian stable with unattended-upgrades enabled for all the repositories and it's been fine for several years now, including many kernel & GRUB updates.

But perhaps things would be different under MX.

User avatar
asqwerth
Forum Veteran
Forum Veteran
Posts: 4587
Joined: Sun May 27, 2007 5:37 am

Re: Updating as a regular user

#14

Post by asqwerth » Sun May 19, 2019 12:14 pm

Head_on_a_Stick wrote:
Sun May 19, 2019 11:56 am

Debian buster has unattended-upgrades enabled by default so I'm not sure if that's true.

FWIW our family laptop runs Debian stable with unattended-upgrades enabled for all the repositories and it's been fine for several years now, including many kernel & GRUB updates.

But perhaps things would be different under MX.
Isn't Unattended Upgrades the setting in MX-Updater that manyroads and I mentioned? You can enable it in MX-Updater for your family's MX-installed computers.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
Head_on_a_Stick
Forum Regular
Forum Regular
Posts: 348
Joined: Sun Mar 17, 2019 3:37 pm

Re: Updating as a regular user

#15

Post by Head_on_a_Stick » Sun May 19, 2019 12:34 pm

asqwerth wrote:
Sun May 19, 2019 12:14 pm
Isn't Unattended Upgrades the setting in MX-Updater that manyroads and I mentioned?
I'm not sure, does that setting install and configure the unattended-upgrades package?
asqwerth wrote:
Sun May 19, 2019 12:14 pm
You can enable it in MX-Updater for your family's MX-installed computers.
Erm, full disclosure: I don't use MX :bagoverhead:

I hope the community doesn't mind, I'm just here to help out where I can.

User avatar
oops
Forum Regular
Forum Regular
Posts: 725
Joined: Tue Apr 10, 2018 5:07 pm

Re: Updating as a regular user

#16

Post by oops » Sun May 19, 2019 12:56 pm

Head_on_a_Stick wrote:
Sun May 19, 2019 11:56 am
oops wrote:
Sat May 18, 2019 6:19 pm
... The ability of updating for a regular user is interesting, but mostly for the web browsers, openoffice, the security patches, etc ... but not recommended for a grub update, or a kernel update for example.
Debian buster has unattended-upgrades enabled by default so I'm not sure if that's true.

FWIW our family laptop runs Debian stable with unattended-upgrades enabled for all the repositories and it's been fine for several years now, including many kernel & GRUB updates.

But perhaps things would be different under MX.
Sometime, the systeme ask some questions (to keep or not the existing config, to install grub into MBR ou PBR etc) ... so cross the fingers, until now, the answers given by your family was always the good one. ;-)

In an other hand, for an update for some basic tools as regular user, the alternative is to use the appimages, flatpak ,etc ...
$ inxi -Fxxxz : System: Host:XEON ... Distro: MX-18_x64 Continuum

User avatar
manyroads
Forum Guide
Forum Guide
Posts: 1506
Joined: Sat Jun 30, 2018 6:33 pm

Re: Updating as a regular user

#17

Post by manyroads » Sun May 19, 2019 1:11 pm

oops wrote:
Sun May 19, 2019 12:56 pm
[...]

Sometime, the systeme ask some questions (to keep or not the existing config, to install grub into MBR ou PBR etc) ... so cross the fingers, until now, the answers given by your family was always the good one. ;-)

[...]
Which is why I check things every 5+/- weeks. My recommendation to my father & sister is to just say 'yes'. I know Nancy Reagan is turning in her grave... but this has worked 100% so far for me. :crossfingers:
"Don't believe everything you think."
Pax vobiscum,
Mark Rabideau - http://many-roads.com - Reg. Linux User #449130
MX-18.3 kernel: 5.1.5-antix.1-amd64-smp x86_6
Dell Latitude E5470
Intel i5-6300U~ 24GB RAM ~ SSD: 1TB
Coding since 1974

User avatar
Head_on_a_Stick
Forum Regular
Forum Regular
Posts: 348
Joined: Sun Mar 17, 2019 3:37 pm

Re: Updating as a regular user

#18

Post by Head_on_a_Stick » Sun May 19, 2019 1:12 pm

oops wrote:
Sun May 19, 2019 12:56 pm
Sometime, the systeme ask some questions (to keep or not the existing config, to install grub into MBR ou PBR etc)
That doesn't happen in Debian stable, those questions would only be asked for an upgrade between releases.

@OP: sorry for the diversion.

User avatar
kmathern
Forum Veteran
Forum Veteran
Posts: 9590
Joined: Wed Jul 12, 2006 2:26 pm

Re: Updating as a regular user

#19

Post by kmathern » Sun May 19, 2019 1:19 pm

Head_on_a_Stick wrote:
Sun May 19, 2019 12:34 pm
asqwerth wrote:
Sun May 19, 2019 12:14 pm
Isn't Unattended Upgrades the setting in MX-Updater that manyroads and I mentioned?
I'm not sure, does that setting install and configure the unattended-upgrades package?
Unattended-Upgrades is enabled/disabled by the 'Auto-update' setting in the MX Updater preferences dialog. (btw I'm not crazy about the 'Auto-update' name for that setting, I would have preferred to stick with the 'Unattended Upgrades' wording.).

Unattended-upgrades (the .deb package) is installed by default (the apt-notifier package has it as a dependency), but unattended-upgrades aren't enabled by default. The MX Updater preference enables (or disables) them. i.e. APT::Periodic::Unattended-Upgrade "1"; (enabled) / APT::Periodic::Unattended-Upgrade "0"; (disabled)



Head_on_a_Stick wrote:
Sun May 19, 2019 1:12 pm
oops wrote:
Sun May 19, 2019 12:56 pm
Sometime, the systeme ask some questions (to keep or not the existing config, to install grub into MBR ou PBR etc)
That doesn't happen in Debian stable, those questions would only be asked for an upgrade between releases.

@OP: sorry for the diversion.
As far as I know Unattended Upgrades will hold back upgrades if they would require answering config questions during the upgrade.

User avatar
Richard
Posts: 2711
Joined: Fri Dec 12, 2008 10:31 am

Re: Updating as a regular user

#20

Post by Richard » Sun May 19, 2019 2:07 pm

@HOAS,
Personally, I find your posts enlightening, in the main. You bring a point of view that helps keep us aligned with MX's focus on adapting and/or changing Debians defaults to this very useful result which I've been using since April 2014.

Stable, with backports, lots of time-saving utilities in the MXTools and the antiX/Refracta Snapshot plus all the antiX & MX improvements. All good stuff for lazy users who haven't the time or inclination to build their own.

It's been a few years since I used Debian, mainly testing in the past, as a daily ride, although I do take a look at new releases in Vbox. It is the base of the most useful distros I have used.

Thanks for your opinions.
LT: MX18.2: Thinkpad T430: DualCore, Intel i5-3320M, Ivy Bridge; 8GB RAM; 4.19.0-5-amd64; 119GB SSD 840PRO, Intel Graphics-Audio-Network
NB: MX18.1, antiX17.4: AsusTek EeePC 1005HA: Intel DualCore Atom N270, 1GB RAM, 4.19.0-1-686, 150GB HDD

Post Reply

Return to “Software / Configuration”