Light-Debian-Core-Live-CD-Wheezy + Porteus-Wheezy

For talk and support relating specifically to Puppy derivatives
Message
Author
User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#1471 Post by saintless »

fredx181 wrote:Porteus-Wheezy2-deb-kern-3.2.0-4-486.iso
Hi, Fred.
Uploaded here and first post updated:
http://www.smokey01.com/saintless/Porte ... -4-486.iso
I think it is best to keep it there if anyone else has troubles with newer kernel.

Toni

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

#1472 Post by saintless »

Hi, William, Fred and all interested from menu structure.
It is easy to get the result on the picture just by commenting few lines in /etc/menu-methods/icewm-common Run update-menus after the changes.
Here is full icewm-common content:

Code: Select all

#!/usr/bin/install-menu

compat="menu-1"

!include menu.h

outputencoding="LOCALE"

function iconordash()=ifelse(icon(),"\"" icon() "\"","-")
function q($com)=esc($com,"\"")

supported
  x11= "  prog    \"" q(title()) "\" " iconordash() " /bin/sh -c \"" q($command) "\"\n"
  text= "  prog    \"" q(title()) "\" " iconordash() " /bin/sh -c \"" q(term())   "\"\n"
  wm=   "  restart \"" q(title()) "\" " iconordash() " /bin/sh -c \"" q($command) "\"\n"
endsupported

startmenu=ifneq($title,"Debian menu",ifroot("menu \"" q(title()) "\" folder {\n","menu \"" q(title()) "\" folder {\n"))
endmenu=ifneq($title,"Debian menu","}\n")
genmenu="programs"
#submenutitle=""
#submenutitle="  menu \"" $title "\" folder {\n"
#preoutput="\n"
rootprefix="/etc/X11/icewm/"
mainmenutitle="Debian menu"
#treewalk="(M)"
userprefix=".icewm"
Toni
Attachments
2014-02-22-230049_517x362_scrot.png
(91.56 KiB) Downloaded 428 times

tony
Posts: 334
Joined: Sat 14 Jan 2006, 10:52
Location: Montreal.ca

#1473 Post by tony »

Hi Fred,

Porteus-Wheezy2-deb-kern-3.2.0-4-486.iso boots up OK on my Asus Eeepc.

No wl driver but I connected to the internet with wired lan.

Regards Tony.

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

#1474 Post by fredx181 »

Hi Toni
Hi, William, Fred and all interested from menu structure.
It is easy to get the result on the picture just by commenting few lines in /etc/menu-methods/icewm-common Run update-menus after the changes.
Here is full icewm-common content:
Nice find!
Just tried it and noticed that even the annoying subcategories are merged in the main ones.
This probably is the best solution and without using more space.

Fred

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

#1475 Post by fredx181 »

tony wrote:Hi Fred,

Porteus-Wheezy2-deb-kern-3.2.0-4-486.iso boots up OK on my Asus Eeepc.

No wl driver but I connected to the internet with wired lan.

Regards Tony.
Thanks very much for reporting.
So the problem is caused somehow :?: by the newer kernel.

Fred

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

#1476 Post by mcewanw »

saintless wrote:Hi, William, Fred and all interested from menu structure.
It is easy to get the result on the picture just by commenting few lines in /etc/menu-methods/icewm-common Run update-menus after the changes.
That's great news Toni. Good find indeed. I looked at that file in my struggles with translate_menus but never thought to think how it might work.
github mcewanw

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

Alternative menu solution

#1477 Post by mcewanw »

Toni, your above find suggested an alternative solution because thinking about the 'why' of your solution suggested to me that it comes from:

Extract from icewm-common:

Code: Select all

#!/usr/bin/install-menu

compat="menu-1"

!include menu.h #<<<<<<<< William noted#
and

Code: Select all

root@debian:~# install-menu --help
install-menu [-vh] <menu-method>
  Read menu entries from stdin in "update-menus --stdout" format
  and generate menu files using the specified menu-method
I deduced, therefore, that the key to this lies in menu.h:

Extract:

Code: Select all

#   -*- mode: shell-script; -*-
#The definitions here are used by all window managers that !include menu.h.
#This way, you can set your preferences (like whether to use xterm/rxvt,
#how long do you want your menu titles, etc) for all window-managers.
#
#This file is part of the menu package (version 1.4 and higher).
#For more information, see /usr/share/doc/menu/html
And looking further in the code for menu.h led me to this alternative solution:

Remove the comments you put in icewm-common, Toni, and change from false to true inside /etc/menu-methods/menu.h the following:

Code: Select all

#If you want menu to optimize the tree, set this to true:
hint_optimize=false
Then run update-menus and check the result.

Note that there are other alterables in menu.h and that:
#The definitions here are used by all window managers that !include menu.h
One subtle difference is in the arrangement of Administration and System subdirectories, but this alternative should also work with jwm. Also iceweasel, if installed, now appears on first level of Programs menu and everything now in alphabetical order!

The debian menu system turns out to be really clever. I like it!

EDIT: So now that I've found that answer by backwards reasoning, I've since, via googling, also found documentation (see section 2.2):

http://www.debian.org/doc/packaging-man ... l/ch2.html

I thought I was on the right track yesterday concentrating on /etc/menu-methods, but I went off track a bit focussing on translate_menus, so missed the wood for the trees then! All I can say is "HAIL DEBIAN!" - that is a wonderful menu system - now I'm going to take the time to read through all of their docs...
github mcewanw

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

Re: Alternative menu solution

#1478 Post by saintless »

Hi, William.
mcewanw wrote:One subtle difference is in the arrangement of Administration and System subdirectories, but this alternative should also work with jwm. Also iceweasel, if installed, now appears on first level of Programs menu and everything now in alphabetical order!
Thank you! I will check it out proper tonight. Much work today unfortunately for DebianDog tests.
As I already wrote the menu structure is fine for me anyway. If you prefer to keep subdirectory trees for Administration and System and keep the option to have same result for other WM I do not mind. I think we will be able to hide this subbdirectorys from icewm_common with commenting only one line if we use menu.h edit you suggest. I will check with JWM because it is already included in DebianDog remaster I have, but note JWM and other WM will not have separate menu file like ICEWM for Utilities and System menu above Programs menu.
If we decide to use menu.h edit for menu tree it will be better to reconstruct the menu and put all content from Utilities and System in Programs menu by creating files in /usr/share/menu. This way it will be visible for all WM.
The debian menu system turns out to be really clever. I like it!
Yes, I like it too but unfortunately I read many new programs stoped providing files for /usr/share/menu and I'm afraid debian menu will be history in the next debian stable. The need to install separate packages just to have working xdg_menu does not serves well for light and small system.

Toni

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

debian menu system future

#1479 Post by mcewanw »

saintless wrote: I will check with JWM because it is already included in DebianDog remaster I have, but note JWM and other WM will not have separate menu file like ICEWM for Utilities and System menu above Programs menu.
If we decide to use menu.h edit for menu tree it will be better to reconstruct the menu and put all content from Utilities and System in Programs menu by creating files in /usr/share/menu. This way it will be visible for all WM.
Yes, I see that might be necessary for jwm.
unfortunately I read many new programs stoped providing files for /usr/share/menu and I'm afraid debian menu will be history in the next debian stable. The need to install separate packages just to have working xdg_menu does not serves well for light and small system.
Unfortunately true, as I commented in my earlier post:

http://www.murga-linux.com/puppy/viewto ... 199#760199
mcewanw wrote: Seems that Debian aren't too sure about whether to continue with Debian menu system:

https://bugs.debian.org/cgi-bin/bugrepo ... bug=707851
Most apps are pretty sure to be going to need to include .desktop files though, so it will still be worth working on a 'scan desktop files'/'translate from xdg' approach in the future (hopefully one that is tiny to implement). Actually, I think it could be relatively easy, to loop through all desktop files and translate them into equivalent entries in /usr/share/menu, but that is not going to help if the debian menu system itself (its program parts) simply vanishes.

Having said that, the alternative of somehow building the whole icewm menu (and menus for other non-xdg compliant wm's) out of interpreted destop files seems non-trivial. Seems to me that even if debian dropped its menu system (and didn't provide anything non-bloated as an alternative for using wm's like icewm) we could simply extract the current debian menu system program parts and build a script to translate desktop file entries into /usr/share/menu entries so that we could still use debian menu structure in future stable debian builds. But maybe something better will come out of debian anyway - EDIT: I half expect them to come up with a new debian menu version based on desktop files.

To get entries for top level Utilities and System menu into Program submenu, it seems to me the easiest way is just to create /usr/share/menu entries for the programs in these top level categories [edit: aah, just noticed that is what you were saying above].

According to the Debian menu docs:
Each package containing a menu manager (i.e., a program that can display a menu) should provide a script or program in /etc/menu-methods/ that can read the menu files.
...
Good examples for these scripts for nearly all Debian window managers are included in the menu package in /usr/share/doc/menu/examples. Note that while working on your script, you can use the tricks described in "The internals of the menu package", section "The update-menus program", to run just your script, instead of having update-menus run all scripts (can save quite a lot of time).
so I'm presuming one must be provided by jwm (if from Debian pkg).

EDIT: But apparently there isn't. From Debian fetched jwm, /usr/share/doc/jwm/README.Debian:
There is no automatic configuration which would add programs to the menus. Edit /etc/jwm/jwmrc or copy it to personal ~/.jwmrc startup file.
EDIT2: well there is a file /etc/menu-methods/jwm which has "!include menu.h" but yes, we don't get the top level Utilities and System menus as you say Toni. Well... there is a sample /etc/jwm/system.jwmrc, which could be modified and copied over to ~/.jwmrc and then modified.
github mcewanw

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

Re: Alternative menu solution

#1480 Post by saintless »

mcewanw wrote:Remove the comments you put in icewm-common, Toni, and change from false to true inside /etc/menu-methods/menu.h the following:

Code: Select all

#If you want menu to optimize the tree, set this to true:
hint_optimize=false
Then run update-menus and check the result.
Hi, William.
See the result on the picture after changing false to true.
Is this what I should see or I have to make other changes?
Isn't less submenus what we are looking for or I do something wrong and the result is different for you?

Toni
Attachments
scrot.jpg
(24.08 KiB) Downloaded 241 times

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

Re: Alternative menu solution

#1481 Post by mcewanw »

saintless wrote:Hi, William.
See the result on the picture after changing false to true.
Is this what I should see or I have to make other changes?
Isn't less submenus what we are looking for or I do something wrong and the result is different for you?
Hmmm, the result is different, but I'm wondering if I made a mistake. I'll check again on a clean live-rw. I was getting a menu very similar to what you had commenting out the submenus. I'll report back later.
github mcewanw

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#1482 Post by sunburnt »

It`s good to hear that at least William has a grasp on Debian menu setup.

Toni; You say menu files in /usr/share/menu are the menu`s source files.?
If you are going to add option in your scripts to create .desktop files, you should make also possible to add file in /usr/share/menu
DebianDog auto-creates menu entry from there.
Debian docs say source varies with config. & setup, so it`s hard to know.

# I find no problem with wallpapers.gui, it starts & stops in root & puppy.
I did find that it changes to desktop #1 when it starts.
I intended to fix that in my last update, sorry... I`ll do that.


### Does anyone else have the same problem Toni is having.?

For him WallPapers does not start with the [Start WallPapers] button.
Currently it should jump to desktop #1.
And switching desktops should switch wallpapers if there is a list file.
$HOME/.wallpapers/wallpapers.lst
If no list file or empty list file, then it should show default wallpaper.
.

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

#1483 Post by saintless »

Hi, Terry.
I have a problem with walppaers.gui but test with simple replace wallpapers.gui in /opt/bin in 01-v4.squashfs does not indicate the problem and seems all works.
The problem becomes visible after new remaster is made. I have newer version with more fixes added and still not uploaded.

Slower way to test it is to make new remaster as me.
Quicker way is to simulate the problem with 01-v4.squashfs is to replace wallpaper.gui in /opt/bin and delete /root/desktop.conf /root/.wallpapers and replace /root/Startup/wallpapers link to link to Rox for example. There is no other way to delete startup link. The point of this is to let new wallpapers.gui to recreate the configuration files it self.
Then make second squashfs with:

Code: Select all

mksquashfs /live/cow /live/image/live/02-new-wallpapers.squashfs
and reboot. If /root/desktop.conf and /root/.wallpapers are still there just delete them again without reboot this time.
When you first start new wallpaers.gui choose 4 pictures and see if the desktops change changes wallpaper.
Another strange issue is every time new wallpapers.gui is started it has Start wallpapers button activated even if it is stoped the last time wallpapers.gui was running. It happens in single session without reboot or logout.
I have a feeling it does not read wallpapers.lst file because When I change the first picture it appears as default picture for all desktops but changing desktops does not appear the next picture in wallpapers.lst

I hope this is issue only on mine machine.

Toni

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

#1484 Post by saintless »

sunburnt wrote:Toni; You say menu files in /usr/share/menu are the menu`s source files.?
If you are going to add option in your scripts to create .desktop files, you should make also possible to add file in /usr/share/menu
DebianDog auto-creates menu entry from there.
Debian docs say source varies with config. & setup, so it`s hard to know
Hi, Terry.
The menu package with update-menus command reads the files in /usr/share/menu and generates menu entris from them. If you like to add only .desktop files in your applications it is fine, but they will not auto appear in DebianDog or any Debian with Icewm, JWM start menu.

Toni

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

Re: Alternative menu solution

#1485 Post by mcewanw »

saintless wrote: Hi, William.
See the result on the picture after changing false to true.
Is this what I should see or I have to make other changes?
Isn't less submenus what we are looking for or I do something wrong and the result is different for you?

Toni
Toni, it was because I had some other applications installed and debian menu system is semi-intelligent so reorganises menus best it can when hint_optimize=true.

However, when booting without a live-rw, in menu.h please try:

Code: Select all

#If you want menu to optimize the tree, set this to true:
hint_optimize=true
#for more info on the other variables, see /usr/share/doc/menu/
#hint_nentry=6
hint_topnentry=7
hint_mixedpenalty=64
Then update-menus again. The result I get is very similar to what you achieved by modifying icewm-common, but without needing to do so (the submenu Applications/Windows Managers, for example, disappears).

The meaning of these hints is given in sections 7.3 and 7.4 here:

http://www.debian.org/doc/packaging-man ... l/ch7.html

You can play with these hint values for different results. Terry... it's not that I understand debian menu system - it is all a bit of black magic...

Advantage of using menu.h only is that changes so reflect also in other wm such as jwm. If you want to just cut out submenus in fixed way then your alternative method to modify icewm-control script might be best way, but then you'd have to find similar scheme for jwm etc, so it would be nice if mod to menu.h would do.
Last edited by mcewanw on Sun 23 Feb 2014, 22:34, edited 2 times in total.
github mcewanw

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

Re: Alternative menu solution

#1486 Post by mcewanw »

saintless wrote: Hi, William.
See the result on the picture after changing false to true.
Is this what I should see or I have to make other changes?
Isn't less submenus what we are looking for or I do something wrong and the result is different for you?

Toni
Toni, it was because I had some other applications installed and debian menu system is semi-intelligent so reorganises menus best it can when hint_optimize=true.

However, when booting without a live-rw, in menu.h please try:

Code: Select all

#If you want menu to optimize the tree, set this to true:
hint_optimize=true
#for more info on the other variables, see /usr/share/doc/menu/
#hint_nentry=6
hint_topnentry=7
hint_mixedpenalty=64
Then update-menus again. The resulting menu should be very similar to what you achieved by modifying icewm-common but without having to alter that one.

The meaning of these hints is given in sections 7.3 and 7.4 here:

http://www.debian.org/doc/packaging-man ... l/ch7.html

You can play with these hint values for different results. Terry... it's not that I understand debian menu system - it is all a bit of black magic...

Advantage of using menu.h only is that changes there should reflect also when using other wm such as jwm, but the results, being dynamic and programmably achieved via 'hints', are not guaranteed. If you want to just cut out submenus in fixed way then your alternative method to modify icewm-common script might be best way, but then you'd have to find similar scheme for jwm etc, so it would be nice if mod to menu.h would do.
github mcewanw

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

#1487 Post by saintless »

Hi, William.
Experimented a little with menu.h hints and this is the best change I can make to the moment.

Code: Select all

sort=$sort ":" ifelse($command, "1", "0" ) ":" title()

hint_optimize=true
hint_nentry=5
hint_topnentry=7
hint_mixedpenalty=15
hint_max_ntry=3 # maybe not needed if hints_max_iter_hint=10 is on
hints_max_iter_hint=10 # may be not needed if hint_max_ntry=3 is on
The problem is mpaint stays program menu entry and there is no Graphics folder. To get it in Graphics folder we need to install xpaint first or another Graphic appication. It is like minimum 2 programs are needed for menu folder but I can't find the right combinantion. Every simple change in some hint breaks everything.
Please. test this combination and write if it is Ok for you. It gives almost the same (but not the same) menu for JWM and IceWM

Toni

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

#1488 Post by mcewanw »

saintless wrote: The problem is mpaint stays program menu entry and there is no Graphics folder. To get it in Graphics folder we need to install xpaint first or another Graphic appication. It is like minimum 2 programs are needed for menu folder but I can't find the right combinantion. Every simple change in some hint breaks everything.
Please. test this combination and write if it is Ok for you. It gives almost the same (but not the same) menu for JWM and IceWM
Hi Toni, Yes, I had previously also tried various hints to see if I could encourage mplayer into the Graphics folder but realised it wouldn't do it when only graphics program. The combination you suggest is fine as far as I am concerned though. Anyway, should anyone ever install another graphics program, the Graphics folder will automagically appear anyway, so no problem really! :-) Main thing is that the long sequence of submenus has gone. Very good I feel. I imagine Debian will eventually come up with some modification to menu system that uses .desktop files instead of /usr/share/menu items, but using hints like this saves needing to add the 5MB perl addition at least and with similar result. A machine-created menu can never be as aesthetically pleasing as one specially crafted by a human I feel. Nevertheless, it's not bad and saves a lot of human tinkering.
github mcewanw

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

#1489 Post by fredx181 »

saintless wrote:Hi, William.
Experimented a little with menu.h hints and this is the best change I can make to the moment.

Code: Select all

sort=$sort ":" ifelse($command, "1", "0" ) ":" title()

hint_optimize=true
hint_nentry=5
hint_topnentry=7
hint_mixedpenalty=15
hint_max_ntry=3 # maybe not needed if hints_max_iter_hint=10 is on
hints_max_iter_hint=10 # may be not needed if hint_max_ntry=3 is on
The problem is mpaint stays program menu entry and there is no Graphics folder. To get it in Graphics folder we need to install xpaint first or another Graphic appication. It is like minimum 2 programs are needed for menu folder but I can't find the right combinantion. Every simple change in some hint breaks everything.
Please. test this combination and write if it is Ok for you. It gives almost the same (but not the same) menu for JWM and IceWM

Toni
Hi Toni, William
I think Toni's previous solution with the edited icewm-common only was just about perfect.
Why change it with some problematic setup that could possibly also work with JWM.
After all DebianDog uses icewm, nothing else.
Maybe it's possible to make same sort of solution (simular to editing icewm-common) with JWM and include that in the JWM.deb.
Just some thoughts..

EDIT;
btw, I just noticed that gpicview appears not in the menu (because not present in /usr/share/menu but it is in /usr/share/applications)

Regards
Fred

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

#1490 Post by mcewanw »

fredx181 wrote:
saintless wrote:Hi, William.
Experimented a little with menu.h hints and this is the best change I can make to the moment.

Code: Select all

sort=$sort ":" ifelse($command, "1", "0" ) ":" title()

hint_optimize=true
hint_nentry=5
hint_topnentry=7
hint_mixedpenalty=15
hint_max_ntry=3 # maybe not needed if hints_max_iter_hint=10 is on
hints_max_iter_hint=10 # may be not needed if hint_max_ntry=3 is on
The problem is mpaint stays program menu entry and there is no Graphics folder. To get it in Graphics folder we need to install xpaint first or another Graphic appication. It is like minimum 2 programs are needed for menu folder but I can't find the right combinantion. Every simple change in some hint breaks everything.
Please. test this combination and write if it is Ok for you. It gives almost the same (but not the same) menu for JWM and IceWM

Toni
Hi Toni, William
I think Toni's previous solution with the edited icewm-common only was just about perfect.
Why change it with some problematic setup that could possibly also work with JWM.
After all DebianDog uses icewm, nothing else.
Maybe it's possible to make same sort of solution (simular to editing icewm-common) with JWM and include that in the JWM.deb.
Just some thoughts..

EDIT;
btw, I just noticed that gpicview appears not in the menu (because not present in /usr/share/menu but it is in /usr/share/applications)

Regards
Fred
I'm fine with either method Fred.
github mcewanw

Post Reply