WM menu systems for DebianDog/MintPup using xdg etc

A home for all kinds of Puppy related projects
Message
Author
User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#21 Post by saintless »

fredx181 wrote:Here is low resources jwm-obmenu v 0.0.3-nocache.
Thanks Fred.
Removing libgdk-pixbuf2.0 dependency from Wheezy deb makes possible to use jwm-obmenu in DD-Squeeze also :)
I will test it in all versions but it will take some time.

Toni

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#22 Post by fredx181 »

Toni wrote:Removing libgdk-pixbuf2.0 dependency from Wheezy deb makes possible to use jwm-obmenu in DD-Squeeze also Smile
Ah, great!

Fred

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#23 Post by mcewanw »

fredx181 wrote:menu-cached is very stubborn, btw, needs to get killed by first remove ~/.cache/menus/* and then 'pkill menu-cached'
Hi Fred,

I didn't find menu-cached stubborn, but I think it may be the order you kill the processes. I guess menu-cached is restarted by openbox-menu because I found earlier that if you pkill openbox-menu, jwm-obmenu will then automatically be killed. After that a simple pkill menu-cached works fine without it coming back.

Of course, in terms of system resource usage it may be good to also rm ~/.cache/menus/* (though maybe it is tiny anyway).

The other,perhaps more important, issue that crosses my mind is that killing the processes may or may not (?) clean up any RAM memory caches they may have been using. So it might be worth considering freeing up RAM (cleaning dirty caches) after killing the processes:

Code: Select all

sync && echo 3 > /proc/sys/vm/drop_caches
If you run the command 'free' before and after using that command in a terminal you will notice the huge difference it makes. Being only one-off temporary and at menu generation time I can't see any disadvantages in using that - never noticed any disadvantages anyway. I used to have an old low RAM machine like Toni's and that drop_caches command made a huge difference in terms of reducing need to swap (which is a real slowdown) and absolutely prevented crashes when I was trying to do too much otherwise. Of course Linux will quickly allocate new buffers, but at least these will not be caches and buffers abandoned by dead processes (EDIT: I don't know much about how Linux frees up processes RAM usage though so whether that is done automatically following a pkill terminate signal I don't know).

I wrote quite a bit about such matters long ago, because I was trying to get as much performance out of my low resource machine as I could. Actually, I stopped using swap space altogether around that time because that was the biggest slowdown of all on my old machine with its slow hard-drives (and Linux insists on using some swap regardless of swappiness settings). Note that I utterly disagree with the commonly advertised idea that for optimum performance swap space should at least equal machines physical RAM - that is a lot of nonsense IMO (swap/virtual memory is a compromise - it provides more 'apparent' RAM but inevitable system slow down - especially noticeable in old machines with slow harddrives, which alas, also tend to be machines with low RAM...):

http://www.murga-linux.com/puppy/viewtopic.php?p=529914

William
github mcewanw

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#24 Post by fredx181 »

Hi Toni, William,

I made small mistake with jwm-obmenu:
There should be no 'user settings' category when logged in as root.

Re-Attached fixed versions, see here.
http://murga-linux.com/puppy/viewtopic. ... 811#861811
menu-cached is very stubborn, btw, needs to get killed by first remove ~/.cache/menus/* and then 'pkill menu-cached'
Hi Fred,

I didn't find menu-cached stubborn,
Yes, that's right. removing ~/.cache/menus/* is not needed, left it in the script though, as it doesn't do any harm.

Fred

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#25 Post by mcewanw »

Hi Fred,

I've probably just done something silly, but I lost my menu altogether for a while after apt-get purge jwm-obmenu and then installing latest 0.0.3 version.

I note that if I currently run /opt/bin/menu-openbox I get the following terminal output:

Code: Select all

mint bin # ./menu-openbox 
cat: /root/.jwm/jwm.tail: No such file or directory
** Message: wrote to /root/.cache/jwm-app-menu
But I note that my menu has mysteriously reappeared (I'm not sure when or how - I've rebooted a few times...).

May as I say, just be something I did and not a problem - I'm not sure.

William
github mcewanw

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#26 Post by saintless »

Hi Fred, William.

I think jwm-obmenu needs mkjwmmenu as dependency inside control file as the setup is now. It depends on already created ~/.jwm folder and jwm.tail file inside (provided from mkjwmmenu). This could be the reason William lost the menu while reinstalling. Maybe mkjwmmenu package is uninstalled because jwm.tail is missing according the terminal output.

Fred,
if you like to setup jwm-obmenu to work without depending on files included in mkjwmmenu package I prefer to wait with further testing because the scripts will be changed. I don't think User Settings category in previous version for root account was a problem but it is ok for me to remove it. The only included in this category script will give message for running as root anyway.
The suggestion from William for clearing the cache command didn't work from user account from quick testing installing packages with apt-get for me. Again - if you like to add the change I prefer to wait for updated package before further testing.

In my opinion jwm-obmenu package depending on mkjwmmenu is fine. I don't plan to remove mkjwmmenu.

I made some localisation tests in MintPup comparing the menus with my native language (which is not well supported in Debian/Ubuntu desktop files).
Click for desktop files menus screenshot.
Click for debian menu screenshots.

Terry's mk-jwm menu doesn't support translation for main categories and displays only the english name inside desktop files.
Mitra's mjwm menu doesn't support translation for main categories but displays the correct localisation name inside desktop files.
Jwm-obmenu supports both - localisation for main categories and for the names inside desktop files.
Debian menu supports localisation for main categories but /usr/share/menu files don't have name localisation lines and the programs have only the included name in English.

In general DD and MintPup don't have many desktop files with diffrent localisation name included. Even official Debian and Ubuntu don't include my native language in desktop files for many installed official packages.
I guess English is the only language with 100% supported localisation for main menu categories and names inside desktop files.

Edit: One thing I like more in Terry's menu is it doesn't add duplocate menu entries in different categories. Testing all programs from menu is faster when you have only one entry for each program.

Toni

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#27 Post by fredx181 »

Hi Toni, William
Toni wrote:I think jwm-obmenu needs mkjwmmenu as dependency inside control file as the setup is now.
Thanks, I couldn't understand first, but now I think I do, probably William removed mkjwmmenu earlier, as the result that ~/.jwm/jwm.tail doesn't exist anymore.
But how could the menu re-appear again after reboot?
In my opinion jwm-obmenu package depending on mkjwmmenu is fine. I don't plan to remove mkjwmmenu.
Fine for me also, but in case you'd like it as independent package, /opt/bin/menu-openbox script can be changed easily by having something like this (mkdir ~/.jwm and adding jwm.tail to copy commands):

Code: Select all

mkdir -p $HOME/.jwm 2> /dev/null

if [ "`whoami`" != "root" ]; then
cp -a /etc/xdg/templates/jwm_user.head $HOME/.jwm/jwm.head
else
cp -a /etc/xdg/templates/jwm.head $HOME/.jwm/
fi
cp -a /etc/xdg/templates/jwm.main $HOME/.jwm/
cp -a /etc/xdg/templates/jwm.tail $HOME/.jwm/
# cd $HOME/.jwm/
cat $HOME/.jwm/jwm.head $HOME/.jwm/jwm.main $HOME/.jwm/jwm.tail >  $HOME/.jwmrc
But then, if someone wants to change jwm.tail it needs to be done in /etc/xdg/templates/jwm.tail for menu-openbox.

I don't mind how it is done. I'll leave the choice up to you, as Jwm version is your project.
I guess English is the only language with 100% supported localisation for main menu categories and names inside desktop files.
I agree, it's disappointing.

Edit:
The suggestion from William for clearing the cache command didn't work from user account from quick testing installing packages with apt-get for me
It needs probably sudo, BTW, it could be very useful for you to run this command from time to time (as you have little RAM), to avoid as much as possible having to use swap, I agree with William, the system gets terribly slow when using swap.

Edit2:
Edit: One thing I like more in Terry's menu is it doesn't add duplocate menu entries in different categories. Testing all programs from menu is faster when you have only one entry for each program.
Yes, to many programs in e.g. System or Accesories from menu-openbox, it's partly because we added multiple categories in custom made .desktop files.

Fred

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#28 Post by saintless »

Hi Fred.
fredx181 wrote:Thanks, I couldn't understand first, but now I think I do, probably William removed mkjwmmenu earlier, as the result that ~/.jwm/jwm.tail doesn't exist anymore.
But how could the menu re-appear again after reboot?
I'm not sure about this. But after removing mkjwmenu if you don't run "jwm -restart" and running menu-openbox it will appear without Shutdown category. But "jwm -restart" will break it again.
Changing the jwm theme will copy new jwm.tail in ~/.jwm and fix the menu again.
But maybe William's result is caused by something else. Testing will show it.
I don't mind how it is done. I'll leave the choice up to you, as Jwm version is your project.
Thanks, probably I will add only mkjwmmenu as dependency in the deb and include jwm-openbox in next iso as fourth menu choice after some testing. It is great to have it since the ram usage problem is solved.
The suggestion from William for clearing the cache command didn't work from user account from quick testing installing packages with apt-get for me
It needs probably sudo...
Yes, it works with sudo but I mean I couldn't make the command work inside jwm-obmenu scripts for user account. Maybe I will try again later.
Yes, to many programs in e.g. System or Accesories from menu-openbox, it's partly because we added multiple categories in custom made .desktop files.
Most extra categories are included to sort better the entries in Mitras menu-mkjwm or I get too many in category Others. It is difficult to make the desktop file suitable for different menu systems without extra categories. And some categories are different for Jwm and OpenBox version. We can't avoid this I'm afraid.

Toni

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#29 Post by mcewanw »

saintless wrote:Hi Fred.
fredx181 wrote:Thanks, I couldn't understand first, but now I think I do, probably William removed mkjwmmenu earlier, as the result that ~/.jwm/jwm.tail doesn't exist anymore.
But how could the menu re-appear again after reboot?
I'm not sure about this. But after removing mkjwmenu if you don't run "jwm -restart" and running menu-openbox it will appear without Shutdown category. But "jwm -restart" will break it again.
Changing the jwm theme will copy new jwm.tail in ~/.jwm and fix the menu again.
But your description of what would happen, Toni, seems to be correct. When I said menu reappeared I didn't at the time notice that jwm tail part (Shutdown etc) still wasn't there. And on rebooting this morning the whole menu is gone again.

William

EDIT: Unfortunately, I didn't think about using /opt/bin/jwm-theme-change and not having a menu I didn't actually remember about that program or the themes location. Instead, I just deleted whiteout files for ~/root/.jwm and some other whiteout files to do with menu programs in /opt/bin. Since I was using Porteus boot changes dir, that was easy to do, and it worked on a reboot (no doubt there was easier way), though perhaps I have broken some dpkg thing (I don't know, but doesn't matter for me just now since this particular install is only a temporary one). After I got jwm-obmenu back, I re-installed the other menu systems and then purged them again to in the hope that would fix any dpkg misundertandings... Anyway, my jwm-obmenu is back.

Note that at some stage (alas i can't give details - I think on running menu-openbox) I got message about "can't make menu..." and something about "is .menu file okay". That's just from memory and wording is not exact.

EDIT2: Actually, turned out to not be quite so 'simple' as above edit. On rebooting, openbox menu was gone again and running menu-openbox told me .jwm tail was gone again (presumably because I had purged mjwm. Anyway, the menu appeared albeit without the tail part and I was able to run jwm-theme-changer from there, which as Toni suggested, seemed to fix everything once more...
github mcewanw

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#30 Post by saintless »

Hi William.

You can find and delete whiteout files in all boot method in /live/cow but doing this from your running system could have unpredictable results. I don't know what is the reason but with live-boot-2 I had similar strange experience after deleting whitout files in /live/cow

To test menu-openbox it is better to start with new save filder and keep mkjwmmenu package installed. I'm not sure changing the theme is enough but it will add jwm.tail needed for menu-openbox.
When I upload jwm-openbox deb on the site it will have mkjwmmenu as dependency and installing jwm-openbox will auto-install mkjwmmenu (if it is missing).
I made some tests in MintPup uninstalling and installing all menu packages and it works witout problems for me. After installing again mkjwmmenu the openbox-menu works well. I will test this more.

Toni

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#31 Post by saintless »

Hi William, Fred.

All repositories updated with jwm-obmenu package with correct version for Jessie, MintPup, Wheezy and Squeeze. It has mkjwmmenu included as dependency without any scripts changes.
You can install it after running apt-get update:

Code: Select all

sudo apt-get update
sudo apt-get install jwm-obmenu
I will continue testing menu-openbox but it seems to work well for me and will be added as fourth menu setup in DD-Jwm and MintPup.

The old versions uploaded here in case we need them later (in mintpup no-repo-packages because the old versions work only in MintPup and DD-Jessie):
http://kazzascorner.com.au/saintless/Mi ... -packages/

I can't make the cache clearing work from user account inside menu-openbox scripts. The only way to make it work for user account is making separate script with cache clear command and sudo (gsu) line. But executing the script from update-menus scripts while installing packages opens new gsu window for typing password for every package containing menu entry.

I will add some script in opt bin for manually clearing the cache in DD-Squeeze atleast.
This one maybe (it has the same line suggested from William with messages about free ram before and after running the script):
https://gist.github.com/pklaus/837023

Toni

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#32 Post by mcewanw »

Hi Toni,

Installed new jwm-obmenu and seems to work fine. Also tried out the cache-clearing script and good too - always nice to be able to reduce cache/buffer use manually; especially on low RAM machines.

William
github mcewanw

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#33 Post by fredx181 »

Hi Toni,

As addition to I wrote earlier about clearing cache;
it could be very useful for you to run this command from time to time (as you have little RAM), to avoid as much as possible having to use swap, I agree with William, the system gets terribly slow when using swap.
Even more useful can be setting the amount of RAM left as a limit to begin using swap, just for info, in case you don't know, you can add the line "vm.swappiness=10" to /etc/sysctl.conf

Code: Select all

echo "vm.swappiness=10" >> /etc/sysctl.conf
And reboot to apply the change.
I believe the default is vm.swappiness=60, which will begin using swap very early, setting it to 10 will begin using swap only when absolutely necessary.
For high RAM machines it doesn't matter, but in your case it might be a big difference.

Fred

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#34 Post by saintless »

Thanks Fred, I will test this.

Toni

Post Reply