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 Thu 23 Jan 2020, 14:18
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
MintPup (Trusty LTS)
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 8 of 23 [334 Posts]   Goto page: Previous 1, 2, 3, ..., 6, 7, 8, 9, 10, ..., 21, 22, 23 Next
Author Message
mcewanw

Joined: 16 Aug 2007
Posts: 3200

PostPosted: Wed 19 Aug 2015, 04:53    Post subject:  

EDIT: But I do think it is good to have a menu that can be generated from desktop files, rather than just the debian method. BaCon syntax looks relatively easy (compared to bash even).

I haven't tried this (yet), since I am no longer familiar with BASIC (like alone BaCon) but after a quick look at the syntax I think 'something' like the following modification to mk-jwm.main.bac should add the xterm -e only when specified in desktop file. The only change (2 or 3 lines of code) is the use of variable termi$ and an extra CASE followed by concatenation in exe$. Most of the following is identical to original lines 35 onwards in the source:

Code:
                                    '#####  LOOP:  Make raw menu.
FOR i = 0 TO DtSz-1
   name$ = "" : genname$ = ""
   exe$ = "" : ico$ = "" : cat$ = "" : termi$ = ""

   '###   This assumes the "Exec=" line has ONLY [/path/]file, no extra crap.
   OPEN DT$[i] FOR READING AS file_
      WHILE NOT(ENDFILE(file_)) DO
         IF ENDFILE(file_) THEN BREAK
         READLN txt$ FROM file_
         sep = INSTR(txt$, "=")
         Var$ = MID$(txt$, sep+1)

         SELECT LEFT$(txt$, sep)
            CASE "Name=" : name$ = Var$
            CASE "GenericName=" : genname$ = Var$
            CASE "Terminal=" : IF Var$ = "true" THEN termi$ = "xterm -e "
            CASE "Exec="
               exe$ = termi$ & Var$
               termi$ = ""
            CASE "Icon=" : ico$ = Var$


But at this exact moment I have never even tried compiling BaCon program...

Also, the hard-coded 'xterm -e' above wouldn't be the best either.

If I can get it working I'll let you know anyway.

William

EDIT2: I'm sure Terry could fix this in ten seconds...
EDIT3: I note that /usr/share/applications dir is hardcoded in existing implementation.
EDIT4: Instead of hardcoding xterm -e above should, if possible, use default terminal command really (in case some other terminal rather than xterm is installed). That may be tricky though since other terminals may use different option that -e to run executables.

_________________
github mcewanw

Last edited by mcewanw on Thu 20 Aug 2015, 20:14; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 3200

PostPosted: Wed 19 Aug 2015, 05:18    Post subject:  

Hi again Toni,

I see it is all pretty complicated and note that the program /usr/bin/mjwm is an executable for creating JWM menu from desktop files by Chirantan Mitra. Is there a problem with that method that made it better to invent a new wheel (method)?

EDIT: From what you said, I presume Terry's scripts end up being faster at generating a suitable menu? Might be worth trying to develop them if so (particularly since the core of it all seems to be that one script of only around 170 lines of code total - mk-jwm.main.bac).

William

_________________
github mcewanw
Back to top
View user's profile Send private message Visit poster's website 
saintless


Joined: 11 Jun 2011
Posts: 3882
Location: Bulgaria

PostPosted: Wed 19 Aug 2015, 06:12    Post subject:  

Hi William.
mcewanw wrote:
EDIT: But I do think it is good to have a menu that can be generated from desktop files, rather than just the debian method.

I don't see problem using the official debian update-menus method and it is the only working method if you change Jwm with IceWM. For example rox-filer package in ubuntu doesn't include .desktop file but only /usr/share/menu file.
BTW my vote was for the official debian method from the start and I don't care if it doesn't support main categories different icons or adds more sub-menus. It is well tested over the years and supports localization.

Quote:
Also, the hard-coded 'xterm -e' above wouldn't be the best either.

It is not solution in my opinion. we have one more script from Terry for converting /usr/share/menu files in /usr/share/applications desktop files and it was auto-running in first DD-Jwm versions but didn't work well using apt-get upgrade command and some desktop files were removed while updating the menus. I don't think adding option to auto-edit desktop files adding "xterm -e" is good idea. We have menumaker and desktop-file-editor for this.

mcewanw wrote:
I see it is all pretty complicated and note that the program /usr/bin/mjwm is an executable for creating JWM menu from desktop files by Chirantan Mitra. Is there a problem with that method that made it better to invent a new wheel (method)?

Click System - Menu-MJWM and you have it as default menu.
I added this menu system because it reads the files in ~/.local/share/applications
It generates the menu much slower (test and you will see the difference).
I'm not sure if it reads "Terminal=true" line. Didn't make such test and I already had "xterm -e" in some desktop files.

Quote:
EDIT: From what you said, I presume Terry's scripts end up being faster at generating a suitable menu? Might be worth trying to develop them if so (particularly since the core of it all seems to be that one script of only around 170 lines of code total - mk-jwm.main.bac).

If you like to try you are welcome. But it will need much testing after any change to confirm the menu system works well.
Also both methods (Terry's and Mitra's) don't support changing localization for the main menu categories (as all special DD scripts don't support localization changes).

I prefer to keep the menu system as it is. If I have to test again the menu systems after making changes I prefer to restore the official debian update-menus method and remove all others.

If you or anyone else likes to change and improve Terry's script and test properly the changes (especially with apt-get upgrade and apt-get dist-upgrade) we can update the repository with new deb package anytime.

Toni

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send private message MSN Messenger 
mcewanw

Joined: 16 Aug 2007
Posts: 3200

PostPosted: Wed 19 Aug 2015, 06:40    Post subject:  

saintless wrote:
I don't think adding option to auto-edit desktop files adding "xterm -e" is good idea. We have menumaker and desktop-file-editor for this.


Hi Toni,

Actually, what I was proposing was to not modify the desktop files at all (then openbox menu should work properly) - by which I mean: not having the added xterm -e in the desktop file itself but instead having the menu generator script detecting "Terminal=true" and more correctly (I feel) having the jwm menu generating program adding xterm -e to the jwm menu itself. But I confess to not having studied the (Terry-version) menu system sufficiently to see if that part is as simple as it seems to me on first glance.

Anyway, I don't myself like debian standard menu, so I might give modification a go, since that change 'seems' to be a tiny one (yes, I understand how tricky the menu generating has been...).

Not so easy maybe to include search for desktop files in other locations (though, I'm hopeful, maybe just a couple of lines of extra code to include $HOME/.local/share/applications - I'm not sure). I'll let you know if I come up with anything that works but otherwise I'm also happy with how things are anyway.

William

_________________
github mcewanw
Back to top
View user's profile Send private message Visit poster's website 
saintless


Joined: 11 Jun 2011
Posts: 3882
Location: Bulgaria

PostPosted: Wed 19 Aug 2015, 06:49    Post subject:  

mcewanw wrote:
Actually, what I was proposing was to not modify the desktop files at all (then openbox menu should work properly) - by which I mean: not having the added xterm -e in the desktop file itself but instead having the menu generator script detecting "Terminal=true" and more correctly (I feel) having the jwm menu generating program adding xterm -e to the jwm menu itself.

Sorry, William, my mistake. Looks better this way.

If you decide to work on this here is the deb package with Terry's menu system:
http://www.smokey01.com/saintless/DebianDog/Packages/Included/mkjwmmenu_1.0.0-1_i386.deb
And depending on the above package here is Mitra's mjwm menu system:
http://www.smokey01.com/saintless/DebianDog/Packages/Included/mjwm_4.0.0-1_i386.deb
All DD-Jwm and MintPup have the same packages installed.
It will be easier to explore the content of the debs instead searching the files inside the system.

Toni

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send private message MSN Messenger 
mcewanw

Joined: 16 Aug 2007
Posts: 3200

PostPosted: Wed 19 Aug 2015, 21:04    Post subject:  

Hi Toni,

I went to the BaCon website and found that they now provide a deb installation package, which I've installed with dpkg -i. Tried compiling the mk-jwm.main.bac source code I found here:

http://www.smokey01.com/saintless/source-code/mk-menu.zip

and the compile seems to have worked. However, the resulting binary is smaller than the current one, which worries me a bit in case that source file isn't the most uptodate. I've therefore PM'd Terry to check and hope he will reply and maybe even do the job! since he could do this quickly I'm sure.

William

_________________
github mcewanw
Back to top
View user's profile Send private message Visit poster's website 
mcewanw

Joined: 16 Aug 2007
Posts: 3200

PostPosted: Wed 19 Aug 2015, 22:26    Post subject:  

Hi again Toni,

The USA may be asleep at this timezone time so it will probably be a while till I hear back from Terry. However, I do have the feeling that the source code you have stored for Terry's files are out of date (or at least mk-jwm.main.bac is...). I think the mk-jwm.main binary you are currently using is probably from this post since the size of the file matches:

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

The above post including binary of mk-jwm.main is from March 2014 whereas the source file I downloaded from smokey01 source code (mkmenu.zip) for mk-jwm.main.bac is dated 6 April 2013...

Trouble is, it is vital to have up-to-date source code for any and all compiled programs as current situation demonstrates. I do know that the xhippo sources you have are current, but I think it is very very important to double check with the authors to make sure you have latest sources for everything else. I do know that puppy forum member amigo often stresses the importance of correctly archiving source and I thoroughly agree with him, else no further fixes or developments can occur to these utilities/systems.

I'm sure Terry will come through with the most current sources of everything though - always just a worry that even an author can lose such things (I know I often do lose my originals, and often have to rely on backups I've earlier uploaded online - I generally email copies to myself as a first safety measure).

Anyway, I'll wait on Terry coming back to me before proceeding with any further tests/developments on this menu-puppy matter.

William

EDIT: I'm a bit concerned because a search for 'sunburnt' on this forum suggests he hasn't been on here since April (2015). I certainly trust and hope Terry himself is fine and well, that is my first concern, since he is a very longtime Puppy forum contributor so a bit worried about him not being on here for so long this year.

_________________
github mcewanw
Back to top
View user's profile Send private message Visit poster's website 
sunburnt


Joined: 08 Jun 2005
Posts: 5087
Location: Arizona, U.S.A.

PostPosted: Thu 20 Aug 2015, 02:06    Post subject:  

Hi guys... It`s been awhile. I think of you often. I haven`t had much of change in my situation sadly.

The binary size diff. might be BaCon compile stripping I do. It`s been so long I can`t remember.
But if my binary is smaller, that may explain it.

I`ll get the latest BaCon release and post my tools again.


Having it search in /.local/... is easy enough to fix, I`ll look at it.

There`s probably many ways to fix the term. problem. The menu maker could test for Desk Man. and act accordingly.
Let me know what method you think will work the best.

Not modding the .desktop files would be nice, but maybe hard. I seem to recall we did it to fix other problems.
There`s probably a few fixes needed for the menu system. You guys list exactly what needs fixing and any additions.

# A thought I consider with every BaCon app. I write.
If back-end code is written in Bash, it`s easily modified. But BaCon code`s speed is needed for menu generation.
If a Bash file is run, then do as much as possible in it. For some things Bash is the only way to do it ( of course ).
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 3200

PostPosted: Thu 20 Aug 2015, 02:48    Post subject:  

Hello Terry,

Glad to see you are well, Terry! Yes, I compiled mk-jwm.main from the source code Toni supplies on smokey01 site:

http://smokey01.com/saintless/source-code/mk-menu.zip

and on the system I'm using, but no it doesn't work (some error about CHANGEDIR). I noted that the mk-jwm.main.bac source file is dated 6 April 2013 though, which seems like it is too old since you have posted a new binary in March 2014 (which is the binary that is currently used I think). So hopefully you can check if we have the correct source code and upload the revised version if we don't.

The version of BaCon I used was the 32bit deb provided on their download site and that worked fine in MintPup (as a test I compiled simple bacon calculator example, and that worked okay):

http://www.basic-converter.org/stable/bacon_3.1-1_i386.deb

Have you tried MintPup at all, Terry - it is a nice new spin on the DebianDog work.

Look forward to hearing more from you.

William

_________________
github mcewanw
Back to top
View user's profile Send private message Visit poster's website 
saintless


Joined: 11 Jun 2011
Posts: 3882
Location: Bulgaria

PostPosted: Thu 20 Aug 2015, 02:54    Post subject:  

Hi William.

Both DEVX modules for DD-Wheezy and Jessie include bacon provided from Terry (inside /opt/bin and /usre/share). I think it is also in MintPup devx but I have to check first.

I think the sources archive on the site is the only one with .bac file inside. I guess you are right the binary in the system is from that post but I can't say if it has changes from the source archive.

The other source archives are mostly bash scripts and the scripts from Fred are changing fast with huge difference from the base script (apt2sfs for example). We have most versions as deb packages and it is easy to extract the script from the debs:
http://smokey01.com/saintless/DebianDog/Packages/Included/
apt2sfs_1.0.2_i386.deb
apt2sfs_1.0.3_i386.deb
apt2sfs_1.0.4_i386.deb
apt2sfs_1.0.5_i386.deb
apt2sfs_1.0.6_i386.deb

Same for debdog-install:
debdoginstallscripts_1.0.0_i386.deb
debdoginstallscripts_1.0.1_i386.deb
debdoginstallscripts_1.0.2_i386.deb
debdoginstallscripts_1.0.3_i386.deb
debdoginstallscripts_1.0.4_i386.deb
debdoginstallscripts_1.0.5_i386.deb

Same for portablesfs:
portablesfs-loadsfs-fuse_1.0.1_i386.deb
portablesfs-loadsfs-fuse_1.0.2_i386.deb
portablesfs-loadsfs-fuse_1.0.3_i386.deb

I don't think the latest script is always better from the first base version. In DD-Squeeze I use old version for most scripts. But the latest version is always available as deb package.

Toni

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send private message MSN Messenger 
saintless


Joined: 11 Jun 2011
Posts: 3882
Location: Bulgaria

PostPosted: Thu 20 Aug 2015, 03:18    Post subject:  

Hi Terry.
Nice to see you again Smile
sunburnt wrote:
Not modding the .desktop files would be nice, but maybe hard. I seem to recall we did it to fix other problems.

The convertion from menu to desktop files was executed from /opt/bin/debmenu-changes, debmenu2desktop, debmenu2desktop.convert
The scripts are included but not running with the menu system anymore. After apt-get upgrade and dist-upgrade many desktop files were deleted for some reason. No need to look at this because I prefer to avoid auto-conversion menu to desktop files in the future. We have tools to create or edit desktop files manually when needed.

About mk-jwm.menu I like the way the menu setup works at the moment.
I don't know how the menu generated from desktop files should work but I remember Fred wrote in OpenBox the menu is generated with higher priority from the files in ~/.local/share/applications and after that from /usr/share/applications. I don't know if this will be easy to fix in mk-jwm.menu.
For me not supporting localization changes in mk-jwm.menu is the main disadvantage and it is not easy to fix with sure. It is main disadvantage because the only advice I can give for having main menu categories in different language is - restore the official Debian menu by typing menu-debian.

Toni

_________________
Farewell, Nooby, you will be missed...

Last edited by saintless on Thu 20 Aug 2015, 03:43; edited 3 times in total
Back to top
View user's profile Send private message MSN Messenger 
mcewanw

Joined: 16 Aug 2007
Posts: 3200

PostPosted: Thu 20 Aug 2015, 03:19    Post subject:  

Hi Toni,

Yes, I tried running bacon from MintPup DEVX but command 'bacon' wasn't recognised so I presumed it wasn't there and used the deb from BaCon site (and the DEVX for gcc). The mk-jwm.main seemed to compile successfully but gave CHANGEDIR error on trying to use it as substitute for the one in /opt/bin.

Maybe an old version of bacon is in the DEVX that needs to be run via bash - I don't know, but still, I am sure the mk-jwm.main binary you are using is from March 2014 whereas the mk-jwm.main.bac source file you supply is much older from April 2013.

Of course bash script sources aren't an issue, it is any C or BaCon source files (and any similar needing to be compiled sources) that need to be up to date to be useful (and in the opensource community more generally too).

William

_________________
github mcewanw
Back to top
View user's profile Send private message Visit poster's website 
saintless


Joined: 11 Jun 2011
Posts: 3882
Location: Bulgaria

PostPosted: Thu 20 Aug 2015, 03:27    Post subject:  

mcewanw wrote:
Yes, I tried running bacon from MintPup DEVX but command 'bacon' wasn't recognised so I presumed it wasn't there...

Yes, just checked. Sorry, it is not included in MintPup DEVX module. Only in both DD modules.

Toni

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send private message MSN Messenger 
saintless


Joined: 11 Jun 2011
Posts: 3882
Location: Bulgaria

PostPosted: Thu 20 Aug 2015, 06:14    Post subject:  

MintPup repository updated with Fred's progressbar fixes for remastering scripts and mintpup-full-installer and changed gsu-root.
Type (copy/paste) in terminal:
Code:
sudo apt-get update
sudo apt-get install remaster-scripts mintpupinstallscripts

Fixes post information updated.

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send private message MSN Messenger 
mcewanw

Joined: 16 Aug 2007
Posts: 3200

PostPosted: Thu 20 Aug 2015, 07:42    Post subject:  

Hi Fred,

I'm also curious how menus are generated from desktop files in openbox. Are they piped in somehow? And/or is there any openbox menu generator used? And in any case, can you list the programs that get run when a new menu needs generated? I want to compare that with how they are being created in jwm.

William

_________________
github mcewanw
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 8 of 23 [334 Posts]   Goto page: Previous 1, 2, 3, ..., 6, 7, 8, 9, 10, ..., 21, 22, 23 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
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.0851s ][ Queries: 12 (0.0223s) ][ GZIP on ]