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

For talk and support relating specifically to Puppy derivatives
Message
Author
mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#1461 Post by mcewanw »

In addition to my above post, I also wondering if the standard Debian menu structure can't be changed anyway? The following seems to suggest so, though I haven't tried it out myself yet:

http://debian-handbook.info/browse/whee ... rface.html
The administrator can also have a say in the process and in the resulting generated menus. First, they can delete a menu element even when the matching application is installed, by simply storing in /etc/menu/ an empty file named according to the package providing the entries to be disabled. Second, the menu can be reorganized and sections renamed or grouped. The /etc/menu-methods/translate_menus file is where this reorganization is defined and contains commented examples. Finally, new elements can be added to the menu, for example to start programs installed outside the packaging system, or to run a particular command such as starting a web browser on a particular page. These extra elements are specified in /etc/menu/local.element files, which have the same format as other menu files available under /usr/share/menu/.
The debian-handbook also states:
Debian provides its own menu system, but both GNOME and KDE developed their own menu management solutions as well. The two projects agreed on a format for these menus — more precisely, a common format for the .desktop files that represent menu elements — under the FreeDesktop.org umbrella project.
http://www.freedesktop.org/
The Debian developers have kept a close eye on this project and .desktop files can be generated from the Debian menu system (with the help of the menu-xdg package).
EDIT: I've been trying modifying /etc/menu-methods/translate_menus and then running update-menus (not the one from Fred, the original in /usr/bin). The file /etc/X11/icewm/programs gets rewritten, but there are no changes made to it. Does anyone know how to use translate_menus and can give a simple example? Very little about this when I googled, and though I can see that update-menus does read translate_menus, the latter doesn't seem to do anything at all with any substitutions or whatever I put in it.

Seems that Debian aren't too sure about whether to continue with Debian menu system:

https://bugs.debian.org/cgi-bin/bugrepo ... bug=707851
Last edited by mcewanw on Sat 22 Feb 2014, 03:57, edited 3 times in total.
github mcewanw

tigs
Posts: 39
Joined: Tue 05 Nov 2013, 23:47

#1462 Post by tigs »

fredx181 wrote: Perhaps you mean with pupmode=13 and click the Save icon.
Same thing can be done on porteus-wheezy, but only when using "changes=EXIT:/.." boot option.

Fred
Thanks Fred for your time answering. I did mean pupmode=13. I tried the "changes=EXIT:/.."
It didn't work the same way as pupmode=13. It does save changes as you choose to, but I gather it does not do the saving the same wayas puppy, which saves changes to a .4fs file, which bahaves like a sfs module, can be mounted as either read-only or read/write. i guess the ext4 file can not be mounted as read-only as in the case of write-protected SD Card or USB drive. This explains why once write -protection is on, the ext4 can not be mounted at boot, because it is meant to be R/W.

I do not want to distract you too much. I just wonder this feature can be implemented in the future.

Thanks

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

#1463 Post by saintless »

fredx181 wrote:Take your time and the last thing I want is to force things on you.
.....
I just like sometimes to explore/improve things :D
Thank you, Fred! :)

mcewanw wrote:Fred, Toni: re: DebianDog start menu, I feel that 5MB extra uncompressed just for flexibility in changing menu style is still a bit painful - unless somehow optional. I'm not sure. Shortly trying out xdg-menu package though, with your suggestions.
Hi, William. I will make small separate sfs with Fred's update-menus structure for now. Included or not it is good to have it as option for DebianDog.
I will explore the links you posted.

Toni

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

#1464 Post by mcewanw »

saintless wrote: Hi, William. I will make small separate sfs with Fred's update-menus structure for now. Included or not it is good to have it as option for DebianDog.
I think that is currently the best approach. Note that in addition to Fred's /opt/bin/update-menus there is the existing /usr/bin/update-menus, which is different of course. It would be good if Puppy user "Mobeus" was reading this thread, perhaps he could help with the menu. Unfortunately, I don't know if he is still actively using this forum since his last post here seems to have been around June last year.
github mcewanw

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

#1465 Post by mcewanw »

saintless wrote:
fredx181 wrote:Hi William
The newer version kernel apparently doesn't like the netbook;
OK, so that seems like disadvantage of the newer kernel.
Porteus-Wheezy2-deb-kernel.iso was for testing and isn't as complete as the last one.
William,
you can use 02-486-kernel.squashfs (rename to .xzm) + vmlinuz1 + initrd1.xz from DebianDog-PorteusDog.iso to boot tha latest Porteus-Wheezy with the old kernel if you like to use it this way for testing.

Toni
Thanks Toni, that worked (well, I've tried it on this other machine, so expect it will be fine on the emachines netbook too). Posting from the combination you suggested right now.
github mcewanw

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

#1466 Post by fredx181 »

Hi tigs
It didn't work the same way as pupmode=13. It does save changes as you choose to, but I gather it does not do the saving the same wayas puppy, which saves changes to a .4fs file, which bahaves like a sfs module, can be mounted as either read-only or read/write. i guess the ext4 file can not be mounted as read-only as in the case of write-protected SD Card or USB drive. This explains why once write -protection is on, the ext4 can not be mounted at boot, because it is meant to be R/W.
It's not clear to me if you use a directory for changes or a file (e.g. changes.dat)
Did you try "changes=EXIT:/<path/to>/changes.dat" ?(changes.dat needs to be created first of course)
AFAIK the save file changes.dat is in fact the same as e.g. pupsave.4fs (behaves like a sfs module also)
But I don't know if it can be mounted read-only when write-protection is on.

Fred

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

#1467 Post by tony »

Hi,

my EeePC 1015PEM would not boot Porteus Wheezy2-2-deb-kern-3.12.iso

First hangs on loading my swap partition. Booting with noswap option then hangs

at :- dhcpcd[2458]:Version 5.64 starting ... Booting with nonetwork option gives no change.

Why is it trying to connect to router on first boot without a password?

It might not be a kernel problem but an initrd problem.

So far Debian light has worked well for me. apt-get is a big advantage paid for by a bit of bloat.

Anyone reading this, give it a go. We need more testers.

Thanks for all the hard work.

Regards Tony.

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

#1468 Post by mcewanw »

tony wrote: my EeePC 1015PEM would not boot Porteus Wheezy2-2-deb-kern-3.12.iso

First hangs on loading my swap partition. Booting with noswap option then hangs

at :- dhcpcd[2458]:Version 5.64 starting ... Booting with nonetwork option gives no change.
That was the same boot hang I was getting on my emachines netbook as I posted here:

http://www.murga-linux.com/puppy/viewto ... 051#760051

Downgrading the kernel via the method saintless (Toni) suggested in following post worked for me:

http://www.murga-linux.com/puppy/viewto ... 167#760167
github mcewanw

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

#1469 Post by saintless »

mcewanw wrote:
tony wrote: my EeePC 1015PEM would not boot Porteus Wheezy2-2-deb-kern-3.12.iso

First hangs on loading my swap partition. Booting with noswap option then hangs

at :- dhcpcd[2458]:Version 5.64 starting ... Booting with nonetwork option gives no change.
That was the same boot hang I was getting on my emachines netbook as I posted here:

http://www.murga-linux.com/puppy/viewto ... 051#760051

Downgrading the kernel via the method saintless (Toni) suggested in following post worked for me:

http://www.murga-linux.com/puppy/viewto ... 167#760167
Hi, William, Tony

If you like to have Porteus Wheezy2-2-deb-kern-3.12.iso with the previous kernel you can easy do a remaster.

Just use 02-486-kernel.squashfs (rename to .xzm) + vmlinuz1 + initrd1.xz from DebianDog-PorteusDog.iso to boot:
http://www.smokey01.com/saintless/Light ... g-test.iso
In /opt/bin you will find script 00-update-kernel-486 (or similar name but it starts with 00-...). Click on this script and it will update dpkg database with information for kernel 486. The script will be deleted in 2 seconds, This means the update is OK.
Then remove kernel 3.12 with (this command should work but the name of linux-image-3.12 may be different):

Code: Select all

apt-get purge linux-image-3.12*
Then use remaster-porteus script to remaster.

Toni

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

#1470 Post by fredx181 »

Hi Tony, William
To make sure the booting problem is because of the newer backports kernel:
Can you please test: Porteus-Wheezy2-deb-kern-3.2.0-4-486.iso ?
https://drive.google.com/file/d/0ByBgCD ... sp=sharing
It's exactly the same as Porteus-Wheezy2-deb-kern-3.12.iso except for the kernel which is the stable kernel.

Toni, after I made new iso I just see your last message now, thanks for the help :)

@Tony
dhcpcd[2458]:Version 5.64 starting ... Booting with nonetwork option gives no change.
Sorry, the nonetwork option doesn't work, it's now on my TODO list.
EDIT:
Why is it trying to connect to router on first boot without a password?
It isn't, it's trying to start the frisbee daemon, which starts dhcpcd (this way wireless will connect when configured, on every reboot)

Fred

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

Post Reply