Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 01 Oct 2016, 06:39
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Making a better freememapplet_tray
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 1115
Location: Japan

PostPosted: Tue 15 Sep 2015, 11:45    Post subject:  Making a better freememapplet_tray  

I see that gyro is currently digging into the sourcecode of freememapplet_tray, the little tray icon showing the total/remaining size of personal storage when the user places the mouse cursor over it.

This reminds me that I changed the behaviour of this little thing some time ago because it drove me nuts. The 2 main problems:
1) When leftclicking the icon it pops up "partview", a tiny application that has little if any relation to free personal storage. Basically it shows only free hard disk space. Some may find this useful, I don't.

One of the most frequent questions in the forum is "What is eating my pupsave space?". The icon alerts to low personal storage, but a leftclick gives no answer.

2) What really annoyed me was that "partview" scans even unmounted partitions. I run Puppy from a USB stick. My harddisk is old, noisy and contains 2 Windows partitions. I don't need it and spin it down when I start Puppy. But when I accidentally clicked the freemem icon, my HD would slowly come back to life with a rattling noise. Then partview pops up and happily tells me that I have 84GB left on my Windows partition...grhhh...I know that! And I don't care!

Fortunately this is easy to fix:
1) Go to /usr/sbin/partview and rename partview to something else - or delete it (it remains part of the main sfs and can still be run from /initrd/pup_ro2/usr/sbin/partview)

2) Create a new script /usr/sbin/partview. Leftclicking the freemem icon will call this script. What's in the script depends on the user's needs. One of the most simple, but still useful scripts I can think of:
Code:
#!/bin/sh
gdmap -f  /initrd/pup_rw

This will call gdmap (see screenshot) with a graphical representation of /initrd/pup_rw.
My own creation "Disk & RAM usage" is an old fashioned console window and less colorful, but that's the way I like it and I'm happy with it.
Gdmap is not my favorite, but it's included in many Puppies. TreeSize is too terse for me. As a good compromise between these 2 extremes I still like and use xdiskusage, but this thing seems to be abandonware. Better ideas always welcome!
partview_replacement.png
 Description   Top: Partview - the original
Middle: Gdmap
Bottom: Mochimoppel's partview
 Filesize   79.31 KB
 Viewed   367 Time(s)

partview_replacement.png


Last edited by MochiMoppel on Fri 18 Sep 2015, 01:43; edited 1 time in total
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 10984
Location: Stratford, Ontario

PostPosted: Tue 15 Sep 2015, 12:48    Post subject:  

Check out Partview v2015.
Back to top
View user's profile Send private message 
Jasper

Joined: 25 Apr 2010
Posts: 1350
Location: England

PostPosted: Tue 15 Sep 2015, 14:53    Post subject:  

Hi MochiMoppel, rcrsn51 et al

Graphical Disk Map is, to me, an unfathomed maze and I'm a fan of LargeFilesFinder from SFR:
http://murga-linux.com/puppy/viewtopic.php?search_id=709327873&t=77779

As I don't need the freemem tray icon I run:
Code:
kill `pidof freememapplet_tray`

from a file in /root/Startup
I could run Partview from Menu > Filesystem > Partview in Precise 5.6

My regards
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 10984
Location: Stratford, Ontario

PostPosted: Thu 17 Sep 2015, 07:34    Post subject:  

Quote:
Better ideas always welcome!


@MochiMoppel: No reply? This variant of Partview has been around since 2012 and should do exactly what you want.
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1248
Location: Brisbane, Australia

PostPosted: Thu 17 Sep 2015, 07:57    Post subject:  

Hi,

In freememapplet_tray.c, "partview" is run by the following line of code:
Code:
system("partview &");
So it would be very easy to change it to run something else, and recompile.

But I think that rcrsn51's improved "partview" could be the way to go.

gyro

Last edited by gyro on Thu 17 Sep 2015, 08:14; edited 1 time in total
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1248
Location: Brisbane, Australia

PostPosted: Thu 17 Sep 2015, 08:09    Post subject:  

Jasper wrote:
As I don't need the freemem tray icon I run:
Code:
kill `pidof freememapplet_tray`
from a file in /root/Startup
Or you could stop freememapplet_tray from starting by deleting it (or any reference to it) from /root/Startup.
Or use System->Boot Manager->Startup Apps->Manage startup apps, if it exists on your puppy.

Edit: Sorry just noticed "Precise 5.6", I don't think it has "Startup Apps" gui.

gyro
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1062s ][ Queries: 12 (0.0127s) ][ GZIP on ]