You are not logged in.

#61 2017-08-27 04:04:37

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,057

Re: Ship unattended-upgrades with BunsenLabs?

Yeah this is looking like a red herring. The blog I linked is Ubuntu stuff and while there is a package that provides update-notifier-common which provides the apt-check binary, it is apparently a part of Gnome-PackageKit in Debian. I should have looked that over better.

GnomePackageKit might not be for Bunsenlabs as it has about a dozen dependencies but it does provide a cli to handle the entire thing plus a bunch more stuff. I think this is the back-end for their gui package handling system. Like it would literally provide it all, along with an update icon.

Edit: Allow me to provide the link to the wiki:
https://help.gnome.org/users/gnome-pack … on.html.en

Last edited by tknomanzr (2017-08-27 04:07:00)

Offline

#62 2017-08-27 07:28:35

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,741

Re: Ship unattended-upgrades with BunsenLabs?

Stuff I don't understand
- Why is combo of execp_interval = 1 and execp_continuous = 1 not working for me? Or is that working differently than one would expect? (I would expect that script would do whatever it does for one second and then it is 'violently' restarted by tint2)
- many more

Last edited by brontosaurusrex (2017-08-27 07:28:52)

Offline

#63 2017-08-27 13:07:20

o9000
tint2 developer
From: Network Neighborhood
Registered: 2015-10-24
Posts: 417
Website

Re: Ship unattended-upgrades with BunsenLabs?

Tint2 does not kill the script. execp_interval = 1 and execp_continuous = 1 means that after the script exits by itself, tint2 waits for 1 second before running it again.

Offline

#64 2017-08-27 18:36:36

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,057

Re: Ship unattended-upgrades with BunsenLabs?

I have installed GnomPackageKit along with pk-update-icon, which is supposed to allow GnomePackageKit work in a desktop agnostic manner. I won't know if the darn thing works til I have some acvtual updates, however. As usual, there is probably going to be half a dozen different ways to accomplish the same task. If it does work, I may try to decipher the code that creates the system tray icon and which methods it is calling with various mouse actions. It might be possible to reverse engineer a simple update notifier without needing to pull in the entire GnomePackageKit that way.

Another blog post to read:
http://blog.tenstral.net/2015/09/update … essie.html

Offline

#65 2017-08-28 02:00:14

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,057

Re: Ship unattended-upgrades with BunsenLabs?

I have been playing around with GnomePackageKit and pk-update-icon tonight. Screenshots are below but this is what I have figured out so far:

1.) About 15 packages end up installed without a --no-install-recommends switch on  a fairly new system.
2.) It will setup apt with the necessary daily update timers, along with the systemd service files that are very similar to the service I wrote above.
3.) An autostart desktop entry will be put into /etc/xdg/autostart, so one is not needed in ~/.config/openbox/autostart
4.) The icon will not appear until there are updates to install. When there are updates it will use that burst-like icon to notify of pending updates.
5.) Clicking the icon results in a gui called Package Updater coming up.
6.) It will download the updates but it is still necessary to click the Install Updates button on the gui to install the updates.
7.) It appears to notify if a restart is required, thus the needrestart package is optional.

It is very gui but is written in c++ so it is much quicker than anything I could come up with in pygtk. However, it is not likely that I can reverse engineer it, given my present knowledge of C++. Please note that I have updated this install to track Stretch but have not yet updated any Bunsenlabs configs. It is using the default gtk Raleigh theme so the scrot looks pretty plain. The scrot below is showing what a dist-upgrade to Sid would look like.

I like the executor in tint2 using johnraff's bl-includes.cfg for updates/upgrades, etc because it will allow me to thread my backup strategy through it, but this is pretty slick, albeit very Gnomey.

Screenshot_2017-08-27_20-21-17.th.png

Last edited by tknomanzr (2017-08-28 02:01:32)

Offline

#66 2017-08-28 06:25:33

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,741

Re: Ship unattended-upgrades with BunsenLabs?

o9000 wrote:

Tint2 does not kill the script. execp_interval = 1 and execp_continuous = 1 means that after the script exits by itself, tint2 waits for 1 second before running it again.

That of course makes sense. Thanks for explanation.

Offline

#67 2017-09-06 05:10:55

jerk-o
Member
Registered: 2017-08-27
Posts: 18

Re: Ship unattended-upgrades with BunsenLabs?

I just had the thought of adding a menu entry labeled "Check for updates" to the System menu that would run "sudo apt-get update && sudo apt-get upgrade" in a terminal, that way people could check for updates whenever they want without having to worry about unwanted packages being installed.

Offline

#68 2017-09-06 05:57:18

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,560
Website

Re: Ship unattended-upgrades with BunsenLabs?

^Such an entry was in the CrunchBang menu long ago. I don't know exactly why it was removed.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#69 2017-09-06 10:57:16

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,741

Re: Ship unattended-upgrades with BunsenLabs?

^ Certainly the cleanest one (My aptitude 'solution' fails in all the ways imaginable btw, Actually after some more testing it doesn't, script is fine, only the aptitude command line is slightly flawed, it will cross the stable > backports barrier, so one will get update notification when there is backports upgrade as well (not wanted I guess). The problem I actually had with this specific machine was missing 'inotify-tools', so that's why it never updated the status after upgrade, oh well... (silly one I know)).

Last edited by brontosaurusrex (2017-09-08 10:07:41)

Offline

#70 2017-09-06 14:03:19

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,011

Re: Ship unattended-upgrades with BunsenLabs?

I have and alias I use every few days:

alias up2='sudo apt update && sudo apt upgrade --no-install-recommends'

I see no need to put it in an OB Menu - especially if it was hidden in a sub-menu that won't be:

"IN THEIR FACE".

This is something most Linux users know to do anyway, and new users should be taught ASAP upon arriving on the Linux scene.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#71 2017-09-06 15:13:04

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: Ship unattended-upgrades with BunsenLabs?

I also use an alias. Let the user take some responsibility for how they update their system, IMO.

...although a System menu entry would be an unobtrusive addition hmm


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#72 2017-09-06 16:26:44

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,011

Re: Ship unattended-upgrades with BunsenLabs?

My point, hidden in a sub-directory on the OB Menu.  Why not a HowTo to use 'synaptic' - it's installed.

Every post I see there is mention of "apt - update - upgrade" - so we are leading people to the CLI.

damo wrote:

Let the user take some responsibility for how they update their system, IMO.

I concur 100%

My personal opinion here:

install by default:
firefox  - drop the pipemenu to get others.  Users don't want FF, they instalkl what they want and delete FF
thunar - they want pcmanfm they get it and delete thunar
medit - they want geany they get it and delete medit. (I'm reversed here - geany is for programmers)

And here's why.

1. If the person is NEW to Linux, they may not be aware of other options, so a good sane set of default apps will serve well.
2. If a person is already Linux aware and likes other programs, then they will know how to get them and tweak things.

Why are we holding hands?  And if we include Palemoon as a "Would you like to install:" option, why not ALL the other browsers?  A pipe-menu to collect them all or no pipe-menu and a sane choice out of the box.

Case in point:
My wife cousin has had BunsenLabs Hydrogen installed on her old laptop for a week and a half now, she was nervous as hell when we wiped WinXP.  Her First Linux Experience.  I have been helping her via emails ... she is doing everything via the command line and "LOVES IT" - her words.  I never told her about "synaptic" to get programs.  She's using aliases to search for, show and get programs, and understands and uses "man name" as I have seen in emails.  She's watching videos, listening to music checking her mail, cruising the web and using LO to edit work related MSOffice documents.  She's happy, and thinks I'm some sort of Linux guru, that's how little she knows, and I've tried to tell her too.

So why are we attempting to hold users hands and relieve them of the responsibility of tweaking/maintaining their own system?


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#73 2017-09-06 18:26:52

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,057

Re: Ship unattended-upgrades with BunsenLabs?

A simple terminal script is fine and most of the code for it already exists in bl-includes.cfg

As for a notifier, that is a whole other story. Suffice it to say, I am working on one, not because I believe it is something BL needs but because you would not believe how something that sounds so simple provides some significant challenges (gtk, app has to run threaded, service in one thread and front end in another.).  It remains to be seen how long it takes me to overcome all of those hurdles. As for why I am doing it, I am doing it because I have to learn python, so I need to sharpen my skills. I have all the pieces built, and am starting to hook them together. I still need to implement some thread communication. I built a generic logger for it as well that is completely reusable for any code I write in the future. So for me, it is a problem I want to try and solve. But at the end of it all, apt or apt-get are perfectly fine tools, so why not use them?

Offline

#74 2017-09-07 04:35:37

nore
>2⁹
From: squirrels' nest
Registered: 2015-09-29
Posts: 537

Re: Ship unattended-upgrades with BunsenLabs?

Sector11 wrote:

1. If the person is NEW to Linux, they may not be aware of other options, so a good sane set of default apps will serve well.
2. If a person is already Linux aware and likes other programs, then they will know how to get them and tweak things.

So why are we attempting to hold users hands and relieve them of the responsibility of tweaking/maintaining their own system?

Make this list sticky in Development & Suggestions. Then link it in response for "my favorite app by default" requests.

"responsibility and joy of tweaking..."

Offline

#75 2017-09-07 15:52:15

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 1,146

Re: Ship unattended-upgrades with BunsenLabs?

There's hand-holding and hand-holding, there are a number of things !# delivered by pipe-menu or cb-welcome which were more difficult than a simple apt-get + add to menu.

Updates I pretty much grokked from the outset, but things like adding the apt-key and repo for Opera were way beyond me at that stage, before I dug into how *you* did it and began to learn..
I think the balance is not far off right at present.. just enough hand-holding across the rocky stretches..

I'm not sure updates count as rocky though.. but installing things outside the Debian eco-system SAFELY is something that example definitely has it's place.. as does some of the more complex stuff like setting up a LAMP stack.

Just muy opinion.


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

#76 2017-09-08 10:10:55

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,741

Re: Ship unattended-upgrades with BunsenLabs?

Like I wrote, my aptSpy script is basically fine (after a lot more testing, but still not really sure), only the 'aptitude search "~U"' is slightly flawed, since it will (sometimes?) also show updates from backports (unwanted), so if we can fix that, we are close (if you have that perfect aptitude line, do post it).

Last edited by brontosaurusrex (2017-09-08 17:44:40)

Offline

#77 2017-09-08 16:12:09

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,011

Re: Ship unattended-upgrades with BunsenLabs?

 08 Sep 17 @ 13:09:25 ~
   $ aptspy
status on interval

So I know where it is sitting ... but what is it suppose to do?

EDIT: Please excuse me: I'm a noob.

Last edited by Sector11 (2017-09-08 16:12:47)


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#78 2017-09-08 16:23:47

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,741

Re: Ship unattended-upgrades with BunsenLabs?

@Sector11; You would add it to tint2 as new executor with parameters like

execp = new
execp_centered = 0
execp_has_icon = 0
execp_command = aptSpy
execp_continuous = 1
execp_font = cuprum 13
execp_font_color = #111111 100
execp_padding = 8 0 0
execp_tooltip = updates
execp_lclick_command = urxvt -e bash -c "sudo apt update && sudo apt dist-upgrade && sleep 5"

It shows nothing if there are no updates, else it should show number of updates, on lclick it will do it's lclick_command. Ii will refresh once per 3600 seconds and/or after some updates are made, basically spying on changes to file "/var/log/apt/history.log".

Needs: inotify-tools, aptitude

To have some visual feedback on where it will pop in tint2, you can change lines

status () {
    num=$(aptitude search "~U" | wc -l); if [ $num != 0 ]; then echo "$num"; fi
}

to

status () {
    num=$(aptitude search "~U" | wc -l); if [ $num != 1337 ]; then echo "$num"; fi
}

temporarily.

Last edited by brontosaurusrex (2017-09-08 16:26:59)

Offline

#79 2017-09-08 16:49:58

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,011

Re: Ship unattended-upgrades with BunsenLabs?

OH I see, in your link the Tint2 lines were commented out so I thought that it could work in some way without tint2.  Silly me.  smile


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#80 2017-09-08 17:18:30

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,741

Re: Ship unattended-upgrades with BunsenLabs?

It does work without tint2 as well, but i guess it doesn't make much sense.

Last edited by brontosaurusrex (2017-09-08 17:20:32)

Offline

Board footer

Powered by FluxBB