Linux Lite Forums
Development => Linux Lite Software Development => Topic started by: shaggytwodope on August 14, 2015, 05:38:49 AM
-
This is by no means an offical thing, but as a side project been trying to find a cool way to check for updates (without sudo lol). And it's fun to make my own stuff lol. Gonna post progress (and code later this week) as I go along. Maybe a few people are interested in testing it out down the road. For now tho a fun screenshot.
(http://i.imgur.com/D5cTtAu.png)
Whats really fun here is I can get the count of new packages with no sudo. No fancy stuff really. But atm this is only at startup. Gotta add a timer, and most likely manual execution of the update check.
Again I stress this isnt an offical tool, just has linuxlite in the about because why not lol.
-
/me licks his lips. Looking forward to seeing more shaggy, awesome!
-
@ shaggytwodope
Woh... a couple of expressions spring to mind...
"U da man" & "That's the dog's bo!*&%ks"
-
So been playing around with this now for some time, Decided to post video of it "semi" working. It's still work in progress. I'll decide later if or when I put up a copy online if anyone is interested in testing for me.
Here is a video, be warned music might be NSFW for some. No intent to offend.. I just get bored.
https://puu.sh/nidgS/fac680e363.webm
-
Would love to help test.
-
Unless someone wants to stop me, I'm going to ramble on some dev stuff.
So at the moment It checks for packages that can be updated, It does so via python apt module/tools. In addition to this it monitors the file system for changes. Now understand it only monitors the directory for apt that it needs to... so don't worry you tinfoil hatters. While the video didn't show things accurately, the icon state does change with the state of the update check. Going to need to finalize some icon's eventually.
Not sure how in depth I want to get this tool to be, for now it executes the update tool provided on LL already. This makes the tool very simple overall.
-
How often does it check for updates?
-
How often does it check for updates?
After filesytem events, so if a user runs updates... then it monitors for that. It also checks within it's self every few 3600 seconds atm. This is ofc trivial, the plan is to include a apt/cron config to allow apt to check for updates on it's own in the bg. So the user has little interaction, and should have nothing to worry about.
-
Sounds good looking forward to further development.
What I'd like to see in a tray updater:
- Left click launches updates-gui
- Right click gives the options: About, Check for Updates, Change Update Sources, Install Updates.
in other words, an all options Updates menu.
-
(http://puu.sh/nigQq/4315ebd223.png)
(http://puu.sh/nigQU/e26960e890.png)
I think they speak for themselves.
-
Wunderbar :) How about little icons beside each menu choice?
-
@shaggytwodope
Great work...
Very nice indeed :) :)
-
(http://puu.sh/niizA/0fcd6eb3b0.png)
For now only setting these icons. Til I decide paths and more things.
-
Nice!
-
It's always ideal to have the assets set in stone before hand. But for the time being I'm using these place holders.
(http://puu.sh/nijGM/2ab56b8770.png)
-
Polished :)
-
Keep it "Lite & Simple"
No need for over the top eye candy...
-
Keep it "Lite & Simple"
No need for over the top eye candy...
... so your against embedding windows10 iso in it...?
-
I need to think about it... Thinks... :o
.0000001 nano seconds later.... "YES"
-
Another video of things in action.
https://puu.sh/nim6L/dccb510208.webm (https://puu.sh/nim6L/dccb510208.webm)
I'm tired now... lol.
-
Well I'll buy one now... Thank you :)
-
So added auto start toggle functionality.
https://puu.sh/niq8w/dead083f14.webm (https://puu.sh/niq8w/dead083f14.webm)
-
So now you have wetted everybody's appetite...
How long to a test version..??
-
I'll talk to Jerry sometime tomorrow or in coming days, I need to speak with him in a text chat (irc) or something first. Making a tool for a distro rather then personal use takes SOME planning. Tomorrow evening I should have a working version I'm happy to begin testing.
-
O.K,,, I wait with baited breath
-
The icon's are far from final, but I think I'm happy now with how it looks in relation to other tray programs LL already has by default.
(http://puu.sh/nj18J/a4070d98d7.png)
-
Liking what I see.
-
https://puu.sh/njjW1/9a1d292546.webm (https://puu.sh/njjW1/9a1d292546.webm)
New video, showing off the notification events... pretty pop ups everywhere.
-
This is maturing nicely.
-
Looking good Shaggy 8)
-
That is awesome, shaggytwodope. :)
-
now you are just teasing us....
-
now you are just teasing us....
(https://beingdrusilla.files.wordpress.com/2011/02/teasing_hurts_big.jpg)
-
So, new video. Showing some updates + state change (checks for crap in cache after it sees any updates run etc). Video really shows it better then I can explain lol.
Also new cache updating method.. Jerry might be happy with that. (Note lack of sudo needed.)
https://puu.sh/nk1mx/48904caeac.webm (https://puu.sh/nk1mx/48904caeac.webm)
It should all be ready to go for the most part soon, refinement with icon's and dialog's down the road.
-
shaggytwodope, how about an option to switch between the dark and light tray icon from the right-click menu?
In /usr/scripts/updates-gui is a method that kills synaptic and gdebi-gtk if they are open.
# Kill off any package managers that may be running
if [ "$(pidof synaptic)" ]; then
sudo killall -9 synaptic
fi
if [ ! -z "$(pgrep gdebi-gtk)" ]; then
killall -9 gdebi-gtk
fi
If there is an install process running that causes problems.
What if a loop runs untill the lock is released or the user clicks Cancel?
Something like:
function checklock () {
# Checks for exclusive lock and wait until package managers are closed
while fuser /var/lib/dpkg/lock 2>&1 >/dev/null ; do
echo "# Waiting for other software managers to finish..." $"\n"
if [ "$(pidof synaptic)" ]; then
echo "# Please close any open package managers..." $"\nsynaptic"
fi
echo 1
sleep 1
echo 30
sleep 1
echo 60
sleep 1
if [ ! -z "$(pgrep gdebi-gtk)" ]; then
echo "# Please close any open package managers..." $"\ngdebi-gtk"
fi
echo 95
sleep 1
done | (if ! zenity --progress --title="$APPNAME - close any open package managers" --percentage=20 --auto-close;then killall $(basename $0); exit; fi)
}
checklock
-
Icon's are not finalized at all. This is up to Jerry or anyone that would like to create or find icon's to use. Some can be theme neutral, so it's a non issue if done right. Short of that a preferences menu may come along in time to permit changing the icon's. I never planned to provide "options" with this tool. But it seems it's only natural. (short of it is.. the current icon's are nothing more then placeholders)
As far as the update script, I've not worked on it at all, short of adding dist-upgrade to it recently. If you have any improvement ideas to that.. open a PR. I've not had time myself to go into detail with it. (Needs some linting fixes lol) I think in addition to your fix, we may want to consider a network connection testing method before executing. Quite similar to what you've provided.
-
@updater: An option to change the update interval, that would be the most usefull option. :)
@Network connection testing: great idea
In lite control center, we used this method to check the connection to the internet:
Pinging Gooogle dns servers.
ping -c 1 8.8.8.8 2>&1 | grep "connect: Network is unreachable" &>/dev/null
if [ $? = 1 ]; then
echo Active
else
echo Not connected
fi
But if we use this method when google is down the script would not update. lol
-
misko_2083,
Hurry and post something else. You're stuck on a bad luck number of posts.
-
I'd going to work on this for sometime tonight, if anyone has any idea's it would be great time to mention it...
So far I'm going to try and build a gui tool for perfs in updater. This will include:
- update interval adjustments
- possibly toggling notifcations
- toggle autostart (removing from right click menu)
-
Sounds good shaggy.
-
Might head to bed soon, or at least lay down for tv lol. But here is another video for folks.
https://puu.sh/nktfB/1751856da5.webm (https://puu.sh/nktfB/1751856da5.webm)
-
Hi Shaggy,
Another possible option for preferences would be restricting the updates only to security updates.
If someone is out and about and just wants to make sure possible security holes are closed, there wouldn't be the need to download a huge libre office update - if it's not a security patch of course ;)
-
Hi Shaggy,
Another possible option for preferences would be restricting the updates only to security updates.
If someone is out and about and just wants to make sure possible security holes are closed, there wouldn't be the need to download a huge libre office update - if it's not a security patch of course ;)
This will take some consideration, security update is a relative term. Minor fixes for some things, may not always be marked as such. Notability with ppa packages. Which ALOT of users have installed. This feature will be considered for sure, but no promises. My personal intent atm is to provide a means of displaying amount of possible updates. But not all packages with security updates may be flagged as such with how debian/ubuntu/ppa's work in general.
That being said, any and all ideas are welcomed. I try not to influence things with my personal tastes within reason lol.
-
For all folks, always remain focused on our target audience, Windows users and new folk to linux, not existing linux users. We cannot assume in Linux Lite, we need to spell things out and make them easy to understand. Remember, grandma has to look at this app and understand what it does. It needs to stay simple and not 'over-optioned'.
-
Maybe I missed this.?, if Not
If it is running, does the actual tray icon change colour to reflect status.?
Like:
Green = Running & No Updates
Yellow = Running & Updates Available
Red = Running, but problems like, No Internet, Repository Not responding
Blue = Running, But Updates checks not enabled
-
Nice! How about either days or hours check? Checking once a day is enough to me.
-
I am waiting patiently. =]
-
New video of stuff in progress.
https://puu.sh/nlzqt/7cb86f019d.webm (https://puu.sh/nlzqt/7cb86f019d.webm)
-
Nice! How about either days or hours check? Checking once a day is enough to me.
This is relative, the current option is based in seconds. I'll try to figure out a "daily" option... maybe something that cancels out the seconds option. But you can still set the time in seconds per 24 hours. Which would be 86400 seconds. I personally think something in the range of 3600 is ok. There is room to improve all of this, as I have time I'll try to improve on any options. But remember I'm only one person, And I get nothing from my work but helping some people adopt Linux hopefully.
If Jerry wants to make a release soon for people to test (I need testers and info reported back to improve things) otherwise any dev work will be shared here. And the code is available on my github: https://github.com/shaggytwodope/lite-updater (https://github.com/shaggytwodope/lite-updater) with no packaging or installer yet.
-
After a few hours of hacking away. We now have minutes and hour option in the config. This time is added together and works wonderfully as of this post. Save for any testing from users.
(http://puu.sh/nlOIi/81c410bba8.png)
Thanks for all the input, Always motivates development. Remember any new ideas are welcome... but no promises lol.
-
Maybe I missed this.?, if Not
If it is running, does the actual tray icon change colour to reflect status.?
Like:
Green = Running & No Updates
Yellow = Running & Updates Available
Red = Running, but problems like, No Internet, Repository Not responding
Blue = Running, But Updates checks not enabled
I'm sorry for the delay in response, yes the icon will change on it's state. Currently there is "upgrades" "security/important" "working" and "inactive".
Upgrade icon will simply show for upgrades.
Security marked packages will show a different icon.
Working will show when it's doing something, updating cache being the primary reason.
Inactive is it just sitting there... looking pretty.
The icon's are not finalized as of this post, but soon will be and we will then share that. And I assume in time will be added to help manual to help users understand the functionality.
-
Wow, Shaggy, very impressive! Great work! :)
@ Jerry regarding target audience:
Were best to have a dialog about this? Am happy to re-post, don't want to hijack this dev talk.
I do hear you and know Windows users and new folks to Linux, but not existing Linux users are the target audience. Would really like to know/discuss why NOT for existing Linux users - AS LONG AS it doesn't chase away new users? Linux Lite is an outstanding distribution and of course I do hope Windows user switching to it will be so impressed that they stay with it which means they are ultimately "existing Linux users" :) I can't see it as desirable to loose them. As much as I agree and support having a distribution like Linux Lite specifically for new users/ Windows converts, I don't see it as contradiction to also serve existing users. The challenge such a distribution needs to master in addition to "normal" distributions is providing a smooth transition. Linux Lite is one of the best, if not currently the best providing this smooth transition. Let's attract many more Windows users AND keep them :) By keeping it light and simple and smart :)
-
Although our target audience is Windows folk, this doesn't imply that Linux folk are completely ignored. The Windows audience are used as a guide to how simple our software looks and operates. If they can use it with minimal guidance, Linux folk should have an even easier time. Cheers :)
Sent from my Nexus 6 using Tapatalk
-
After a few hours of hacking away. We now have minutes and hour option in the config. ...
Thanks, shaggytwodope! 8)
-
... this doesn't imply that Linux folk are completely ignored. ...
Linux Lite and this forum is what Xubuntu should be. 8)
-
Previously there was a memory bug, going upwards of 300mb, being Linux Lite this will be worked on more. But currently on avg 80mb ram use. For such a feature this is more then acceptable to me.
Other small changes not shown is seconds for notifications is disabled if toggled with checkbox in options. Enable Autostart now shows icon accordingly. From this stage most work to be done will be hardly noticeable for users. But always fun!
https://puu.sh/nmDgI/c69ebcef0d.webm (https://puu.sh/nmDgI/c69ebcef0d.webm)
-
Remember if anyone has ideas for features, we are open to suggestions. Don't expect magic... Harry stole my wand.
-
But currently on avg 80mb ram use. For such a feature this is more then acceptable to me.
Hey Shaggy, is this the RAM used while actually checking for updates or just the general idle usage?
Thanks :)
-
But currently on avg 80mb ram use. For such a feature this is more then acceptable to me.
Hey Shaggy, is this the RAM used while actually checking for updates or just the general idle usage?
Thanks :)
At idle. Just keep in mind this is "alpha" state software. Already having cut ram down by a third... I say it's coming along nicely.
-
Remember if anyone has ideas for features, we are open to suggestions. Don't expect magic... Harry stole my wand.
I thought it was a tea stir stick. Just laying there.
harry@biker:~
$ whoami
harry
Back on topic. Might look into throwing a
apt list --upgradable
into the mix. Or not. Up to you.
-
Back on topic. Might look into throwing a
apt list --upgradable
into the mix. Or not. Up to you.
Can you explain?
-
Back on topic. Might look into throwing a
apt list --upgradable
into the mix. Or not. Up to you.
Can you explain?
It lists upgradeable packages without installing them.
-
The only problem I see with using the "apt list --upgradable" is that it will also show packages that are held and might cause some confusion with new users.
-
I can't see how a list of package names fits into updater at this time. It's job is only to notify, does not handle updates. If the scope changes I'll gladly introduce something like this. But I'm not sure how it fits with the goal atm.
-
New video showing off ram use, while its not perfect. coming in around 60-70MB at idle is acceptable imo.
https://puu.sh/nnM0g/bdfb6ff388.webm (https://puu.sh/nnM0g/bdfb6ff388.webm)
-
The first Beta release of Lite Updater is now available. Thanks to the tireless work of shaggytwodope, we now have a native Linux Lite Updates application that sits in your tray. This is something that will be bundled into Linux Lite 3.0
This is test ready. We'd love for as many people to get involved in this as possible.
sudo apt-get update && sudo apt-get install lite-updater
Menu > Settings > Lite Updater
(http://i.imgur.com/Z305Z8Z.png)
(http://i.imgur.com/XkhMwV3.png)
Please feedback into this thread with anything you find or suggest. You can also make suggestions for features and report bugs directly here - https://github.com/linuxlite/lite-updater/issues which for developers is much easier to track.
Thank you, we're looking forward to hearing from you all! :)
-
Thanks, Shaggy, for all the effort!
Can't start it, I'm ending up with this:
$ lite-updater
Traceback (most recent call last):
File "/usr/bin/lite-updater", line 15, in <module>
import apt
File "/usr/lib/python2.7/dist-packages/apt/__init__.py", line 34, in <module>
apt_pkg.init_config()
SystemError: E:Opening configuration file /etc/apt/apt.conf.d/local - ifstream::ifstream (13: Permission denied)
Have opened issue on GitHub.
-
I don't know if this will be an issue with new users, but I suspect it might. If you have held packages they still show up as available updates this is also true with the control center, and will likely have new users confused as to why they can't install their updates, just my opinion. On a side note it might be useful to be able to set a specific time for checking for updates like once a day at 7:00 am. This will work better for people with limited bandwidth at certain hours. Again just my opinion, everything seems to work fine have not noticed any issues. Good work. :)
-
I tried the lite-updater in LL 2.8 on my 64-bit Dell Latitude E6410. It correctly notified me of 67 available updates and did the updating.
However, after the update the checkmark icon was still visible (maybe lighter?) and the tooltip showed that the same 67 updates were available. I quit the program and re-ran from the menu. The tooltip then correctly showed no updates available.
Also, I opened the configuration menu for it and found it a bit confusing. There were two enties for update checking interval, one minutes and one for hours. Do these add together? It was not clear.
Hope this helps.
Andy N1KSN
Added a bit later:
I installed the updater in my 32-bit Gateway LT40 notebook. When I first ran it the behaviour was the same as above, with the tooltip and icon still indicating updates available after an update.
However, on the second run (after a reboot) it now showed 7 updates available. When I ran it this time the update process completed and said there had actually been no updates available, not seven. And the tooltip and icon still said 7 updates available.
Andy
-
Kudos Shaggy!!!!
Installed the updater - informed of 29 updates..
Very nice :)
-
Just for FYI... Checked tonight ..
Updater showed 22 only 2 updates thou...
(http://i.imgur.com/NaebHfH.png)
-
Open Synaptic Package Manager.
Look at the left, see if you have anything in "Installed(upgradable) .??,,
I think they are included in the count also.
-
Just for FYI... Checked tonight ..
Updater showed 22 only 2 updates thou...
(http://i.imgur.com/NaebHfH.png)
This has been fixed, once I contact Jerry a update will be made.
-
I tried the lite-updater in LL 2.8 on my 64-bit Dell Latitude E6410. It correctly notified me of 67 available updates and did the updating.
However, after the update the checkmark icon was still visible (maybe lighter?) and the tooltip showed that the same 67 updates were available. I quit the program and re-ran from the menu. The tooltip then correctly showed no updates available.
Also, I opened the configuration menu for it and found it a bit confusing. There were two enties for update checking interval, one minutes and one for hours. Do these add together? It was not clear.
Hope this helps.
Andy N1KSN
Added a bit later:
I installed the updater in my 32-bit Gateway LT40 notebook. When I first ran it the behaviour was the same as above, with the tooltip and icon still indicating updates available after an update.
However, on the second run (after a reboot) it now showed 7 updates available. When I ran it this time the update process completed and said there had actually been no updates available, not seven. And the tooltip and icon still said 7 updates available.
Andy
There was bug in updating the count, this as been fixed.
The config option is added up, I'll see if I can make it any clearer. If you have any ideas as to improve this please let me know.
-
I don't know if this will be an issue with new users, but I suspect it might. If you have held packages they still show up as available updates this is also true with the control center, and will likely have new users confused as to why they can't install their updates, just my opinion. On a side note it might be useful to be able to set a specific time for checking for updates like once a day at 7:00 am. This will work better for people with limited bandwidth at certain hours. Again just my opinion, everything seems to work fine have not noticed any issues. Good work. :)
I'll look into specific timed events, this may be a fair bit of work before it's added. No promises ofc.
-
I think you could leave the minutes and hours boxes as-is (although they could be horizontally smaller) but just put "Minutes" and "Hours" in front of them (to their left). Then put a text line above the two saying "Time between checks" (or your favorite wording).
Or maybe better, under the description line put the two boxes on the same line, (smaller, of course), with the simple hour and minute labels beneath or above them and a big "+" sign or ":" colon between them.
Andy
-
New update now available.
-
Cool - I'll run updates and watch :)
Well done gentlemen!!!
**UPDATE**
Ran updates from LLCC = Error: couldn't fetch the package cache information lists.
From terminal using sudo apt-get update
W: GPG error: http://extras.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.
I removed google from source, for the time being (this is a 64-bit system) Now just the no PUBKEY
W: GPG error: http://extras.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192
** FYI; Occurring on multiple systems..
-
Cool - I'll run updates and watch
Well done gentlemen!!!
**UPDATE**
Ran updates from LLCC = Error: couldn't fetch the package cache information lists.
From terminal using sudo apt-get update
W: GPG error: http://extras.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.
I removed google from source, for the time being (this is a 64-bit system) Now just the no PUBKEY
W: GPG error: http://extras.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192
** FYI; Occurring on multiple systems..
Recently google removed 32bit chrome from repo. However not updated repo data yet.
If you are on 64bit, simply edit /etc/apt/sources.list.d/google-chrome.list
Change from:
deb http://dl.google.com/linux/chrome/deb/ stable main
To:
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
-
Shaggy - That fixed the google prompt (yes 64-bit)
Still getting the NOKEY message..
*Reminder for the folks running Chrome on 32-bit systems; Google ended 32-bit Linux support (for more info please search the forums)
Chromium or another will need to be installed/utilized.
**Update*
Shaggy.. if it helps
I found the following info.. http://askubuntu.com/questions/520828/gpg-error-no-pubkey-warning-the-following-packages-cannot-be-authenticated
Which suggests running the following command;
Replacing "ABCDEFGH12345678" with key error when running updates
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABCDEFGH12345678
It did resolve the NOKEY message on a system I tested...
-
I think you could leave the minutes and hours boxes as-is (although they could be horizontally smaller) but just put "Minutes" and "Hours" in front of them (to their left). Then put a text line above the two saying "Time between checks" (or your favorite wording).
Or maybe better, under the description line put the two boxes on the same line, (smaller, of course), with the simple hour and minute labels beneath or above them and a big "+" sign or ":" colon between them.
Andy
It's been redone slightly:
(http://puu.sh/nsZwU/ce5b9b7ceb.png)
-
Thanks shaggy, new update available folks.
-
I stayed up a bit longer then I planned, but I re did the config tool a bit. It's still a work in progress. But I'd like to know if people are ok with the direction I'm going in.
(http://puu.sh/nugb2/981da2fa00.png)
-
I prefer that layout to the current.
-
https://github.com/linuxlite/lite-updater/commit/2d884091deb6b5206bd4d9d899f459129faa1861
New config pushed, no icons for buttons atm. When I get time I'll add. But It's ready and working for new release.
-
New version available.
-
@shaggytwodope..
Been busy, just tested on 1 PC, looks really good, and all seems to be working... well done, big thanks
I had previously done the Chrome repository fix, so it work 1st time.
Config layout look good to me.
-
Shaggy, the new config box layout is nice. Much more understandable.
Andy N1KSN
-
Shaggy, the new config box layout is nice. Much more understandable.
Andy N1KSN
Thanks, tried to improve from what people have said. Sometimes when creating things you worry more about the code. Less about how it looks lol. I think overall the UI for updater is great.
-
Useful.Thanks.
-
Is it available for LL 3.0?
I was enjoying it on 2.8..
-
I thought it was going to be incorporated in LL 3.0 but I can't find it.
Am I missing something?
I tried to install via the terminal but got a 'package not found' message then
I have downloaded Lite Updater Master from git hub, but have no idea how to install it...