11 months ago
One thing, Linux Mint is not very famous for are automatic updates! :( You know that kind of simple thing every Windows user never needs to care about!? By default, Windows just installs important updates! That's it!
Using Mint, the only thing you get is the info to do so! But it is not done automatically! :( Damned!
And for Xmas my mom got a new laptop from me. And she is over 80! Did you ever try to explain such computer stuff to a not even digital immigrant!? No way! So I needed a solution!
As result, I developed a tiny little script that will do this job! No need for her to click any button. No need for me to do it remote or real!
And because I think it could be helpful for more people here a small tutorial what it does and how to install it:
It is just a kind of wrapper around
mintupdate-tool that does the real stuff.
Nowerdays a normal user has a notebook, laptop, ultrabook or similar. You just use it. Take it, open it, close it, leave it, ... It will suspend and resume a couple of times a day.
And this is where my script hooks in. On every wakeup, it will be called. And with a quite intelligent neat algorythm *haha* it will check for new updates maybe 1-3 times a day. (Even if there are some hundred resumes.) Together with the ability to send some destop notifications.
It will be hooked into
/lib/systemd/system-sleep. Thus it will be called on every suspend/resume.
Then it checks its last run and it that was too early ago, nothing will happen. Otherwise minteupdate-tool will be called to check for and install the updates (depending on your needs).
Sounds simple!? Yes! Using my script it (hopefully) is that simple.
As I discovered, in mint 19 mintupdate-tool was replaced by mintupdate-cli. Sorry, I am currently not on 19, so I currently can not port it there. But I guess this will be not very hard.
Maybe someone can show me the differences so that I can implement it?
(In about 2 weeks, I will install a laptop using 19, then I will definitly port it myself. :) )
$HOME/bin(or any folder you like)
> chown 755 $HOME/bin/mintupdate-on-wakeup
> sudo ln -s $HOME/bin/mintupdate-on-wakeup /lib/systemd/system-sleep/
Well... Since the introduction of
mintupdate-tool it is quite easy to start updating from a script.
But I can not ask my mom to launch a script! Even if I place it on desktop. No way!
So I needed an automatism. But damned, it was quite tricky to resolve some issues being called from systemd (root), launching a backround process and sending notifications from root to the desktop user...
Placing a script in
/lib/systemd/system-sleep is quite easy.
Because I want to know when it is working, throwing some notifications would be nice, I thought.
By using notify-send, this is quite easy. Just do it!
So I needed a while to figure all that out. But I could solve all issues, i think. (I am not sure about DBUS, if this is waterproof. But anyway, the only thing that not happens, if there is a problem are notiifications. ;) )
So have fun and hopefully no pain with it.
I am open for any kind of feedback, credits, feature-requests, donations, praise, ... :D
Thanks for your work on this.
I eagerly await an LM19 version
@ZeckeSZ, as I already wrote in my text above, I have developed it on LM18 and there is no mintupdate-cli, only mintupdate-tool.
I will port it asap.
Calling mintupdate-tool in terminal shows this hint:
"mintupdate-tool is depecrated, please use mintupdate-cli instead"
@remoulder, this is just a bash script, not a binary, dude.
You can take a look into it and will see, it does not do anything bad. (As long as you trust mintupdate-tool :D)
Very /helpful/ comment. Tnx. :(
It would have been more useful if you'd take a look into it, review it and give some real helpful comment on it.
WARNING: Do not install software from unknown sources