MEPIS Community Forum

A Linux operating system based on Debian Stable
View unanswered posts | View unsolved topics | View active topics |



Reply to topic  [ 324 posts ]  Go to page 1, 2, 3, 4, 5 ... 33  Next
Anybody thinking about an apt-notify plasmoid? 
Author Message
Forum Veteran
Forum Veteran
User avatar

Joined: Fri Dec 15, 2006 8:07 pm
Posts: 8711
Location: Skullcrusher Mountain, Santee, CA USA
Has thanked: 589 times
Have thanks: 1962 times
Post # 225089
Post Anybody thinking about an apt-notify plasmoid?
What was the old KDE 3 app polling to find out if there were updates?

A python plasmoid is quite easy to build, either manually or with Kdevelop (install kdevelop and kdesdk) see this link: http://www.ibm.com/developerworks/linux/library/l-kde-plasmoids/?ca=drs-

but I really don't know the code to insert into the plasmoid. You can look at something like the simple CPU temperature plasmoid at kde-look.org to see how he greps the cpu temp (a .plasmoid file is just a renamed tar.gz, easy to extract), and one that displays the number of updates would show it on the desktop or on the taskbar.

Edit: Latest test versions of the applet:


You do not have the required permissions to view the files attached to this post.


Sun Apr 04, 2010 11:27 pm
Profile
Forum Regular
Forum Regular
User avatar

Joined: Tue Jan 15, 2008 7:32 am
Posts: 335
Has thanked: 1 time
Have thanks: 1 time
Post # 225091
Post 
I once had trouble with mepis apt-notify & had to add this to my /etc/sudoers file to make it work again. Maybe this points you in the right direction?

Code:
%users   ALL=NOPASSWD: /usr/bin/apt-get -s upgrade

_________________
Image


Sun Apr 04, 2010 11:47 pm
Profile
Forum Veteran
Forum Veteran
User avatar

Joined: Wed Jul 12, 2006 2:26 pm
Posts: 7112
Has thanked: 390 times
Have thanks: 2313 times
Post # 225094
Post 
Could you do something with apt-show-versions -u, it can run as either user or root.

If you have upgrades available you get something like:
Code:
[kent@mepis1 ~]$ apt-show-versions -u
adduser/squeeze upgradeable from 3.110 to 3.112
apt/squeeze upgradeable from 0.7.20.2+lenny1 to 0.7.25.3
apt-show-versions/squeeze upgradeable from 0.15 to 0.16
.
.
.
{I temporarily enabled squeeze so there would be upgrades available to show you}

You could grep on the word "upgradeable".

With some fancy scripting (beyond my ability) you might even be able to keep a count of how many occurances of "upgradeable" were grep'd.

How would the apt-get update as a regular user get performed? Could fakeroot do that?


Sun Apr 04, 2010 11:56 pm
Profile
Forum Veteran
Forum Veteran
User avatar

Joined: Fri Dec 15, 2006 8:07 pm
Posts: 8711
Location: Skullcrusher Mountain, Santee, CA USA
Has thanked: 589 times
Have thanks: 1962 times
Post # 225097
Post 
There's an apt updating script in /etc/cron.daily that already is doing that, and it could be moved into the cron.hourly folder. I think that was what the old notifier was using.


Mon Apr 05, 2010 12:05 am
Profile
Forum Veteran
Forum Veteran
User avatar

Joined: Wed Jul 12, 2006 2:26 pm
Posts: 7112
Has thanked: 390 times
Have thanks: 2313 times
Post # 225099
Post 
The old mepis-aptnotify package installed a /etc/apt/apt.conf.d/15periodic-update file that contained:
Quote:
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";


Mon Apr 05, 2010 12:11 am
Profile
Forum Novice
Forum  Novice

Joined: Tue Dec 09, 2008 7:35 pm
Posts: 73
Has thanked: 0 time
Have thanks: 0 time
Post # 225132
 Porting suggestion....
Hello,

What about porting what PCLinuxOS uses? Eventhough it is rpm based they use synaptic package manager like we do. I am going to check to see if I could download an rpm and covert to alien and see what I can do from there. I will keep everyone posted.

Update: Looked in the their repo and did not see any obvious file. I believe the have one though and I think any accompanying scripts could be modified from rpm to deb based. I think I will leave this to those who have more experience, but let us know if I could be on to something.

regards,
tzefanyah

_________________
Only Linux since 1997. Athlon XP3000 3gb RAM 256mb Nvidia FX6200 MAudio 1010LT snd card ;)


Mon Apr 05, 2010 8:06 am
Profile
Forum Veteran
Forum Veteran
User avatar

Joined: Wed Jul 12, 2006 1:42 am
Posts: 4609
Has thanked: 495 times
Have thanks: 653 times
Post # 225143
Post 
The Garage wrote:
I once had trouble with mepis apt-notify & had to add this to my /etc/sudoers file to make it work again. Maybe this points you in the right direction?

Code:
%users   ALL=NOPASSWD: /usr/bin/apt-get -s upgrade


Yes, that's it, MEPIS 8 and some older version had that in sudoers. I can't try apt-get -s upgrade right now because I don't have anything to update on my system but I bet you could use some simple grep/cut commands to get how many upgrades are available.


Mon Apr 05, 2010 10:17 am
Profile
Forum Veteran
Forum Veteran
User avatar

Joined: Fri Dec 15, 2006 8:07 pm
Posts: 8711
Location: Skullcrusher Mountain, Santee, CA USA
Has thanked: 589 times
Have thanks: 1962 times
Post # 225145
Post 
Yes, that's it. Pehaps we can add some of those older apt-notify files to a apt-notify python plasmoid to get it working like the old one: the sudoers modification, the /etc/apt/apt.conf.d/15periodic-update,and the plasmoid. It would require the plasma-python engine, but that's 180 K uncompressed.


Mon Apr 05, 2010 11:01 am
Profile
Forum Veteran
Forum Veteran
User avatar

Joined: Wed Jul 12, 2006 2:26 pm
Posts: 7112
Has thanked: 390 times
Have thanks: 2313 times
Post # 225151
Post 
Do you need to do anything else after having used visudo to add
Code:
%users    ALL=NOPASSWD: /usr/bin/apt-get -s upgrade
to /etc/sudoers?

Do you need to logout, restart X, run some other command, etc.

I still get the following error message:
Code:
[kent@mepis1 ~]$ /usr/bin/apt-get -s upgrade
E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?


Mon Apr 05, 2010 11:19 am
Profile
Administrator
User avatar

Joined: Wed Jul 12, 2006 2:17 pm
Posts: 10705
Location: Rochester NY
Has thanked: 838 times
Have thanks: 1442 times
Post # 225152
Post 
You are more knowledgeable than me about this. But shouldn't you be

root@mepis1

[kent@mepis1 ~]$ /usr/bin/apt-get -s upgrade
E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

_________________
Forum Rules
Guide - How to Ask for Help
Link to Wiki
Rich

Acer Laptop V5-572G: Intel i5, 12 GIG mem, nVidia GT720M/Intel integrated graphics
Mx-14 Symbiosis
Kubuntu 13.10, KDE 4.11.2


Mon Apr 05, 2010 11:23 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 324 posts ]  Go to page 1, 2, 3, 4, 5 ... 33  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.