| Author |
Message |
L18L
Joined: 19 Jun 2010 Posts: 1715 Location: Burghaslach, Germany
|
Posted: Wed 14 Nov 2012, 06:19 Post subject:
Subject description: desktop files to a separate directory |
|
| technosaurus wrote: | | ...it isn't _that_ much to copy all of the desktop files to a separate directory... |
Yes, and thank you for undeb that does work
BTW, there are more packages in that list that do NOT have .desktop
example:
389-admin
389-admin-console
389-adminutil
389-console
389-ds-base
389-ds-console
389-dsgw
accountsservice
aewm++
afterstep
wait some minutes...hours
script is running....
edit
the list NOTfound continues:
amarok
amiwm
antiword
apparmor
apper
arbtt
ark
at-spi2-core
audex
awesome
bangarang
bash-completion
basket
biomaj-watcher
blackbox
blinken
bluedevil
anyhow, seems to be all exotic
--edit
here is a very bad (buntu ) example
| gamazons.desktop wrote: | [Desktop Entry]
Encoding=UTF-8
Name=Gamazons
Name[ca]=Gamazons
Name[cs]=Gamazons
Name[da]=Gamazons
Name[de]=Gamazons
Name[el]=Gamazons
Name[es]=Gamazons
Name[et]=Gamazons
Name[fi]=Gamazons
Name[ga]=Gamazons
Name[gl]=Gamazons
Name[ja]=
Name[ko]=
Name[lt]=Gamazons
Name[ms]=Gamazons
Name[nl]=Gamazons
Name[no]=Gamazons
Name[pl]=Gamazons
Name[pt]=Gamazons
Name[pt_BR]=Gamazons
Name[ru]=
Name[sk]=Gamazons
Name[sl]=Gamazons
Name[sv]=
Name[vi]=Gamazons
Name[wa]=Gamazons
Name[zh_TW]=Gamazons
Comment=Gamazons game
Exec=gamazons
Icon=gnome-gamazons.png
Terminal=false
Type=Application
Categories=GNOME;Application;Game;BoardGame;
X-Desktop-File-Install-Version=0.3
OnlyShowIn=GNOME; |
I will have to remove all translations in all .desktop files
----
...done
99 minutes
remove of translations (2 minutes) saved 785408 Bytes
directory containing 1902 desktop files is size 1983k
in attached archive 174k
| Description |
|

Download |
| Filename |
applications.tar.gz |
| Filesize |
173.82 KB |
| Downloaded |
186 Time(s) |
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1715 Location: Burghaslach, Germany
|
Posted: Wed 14 Nov 2012, 15:25 Post subject:
Package categories help wanted Subject description: 1765 decisions |
|
filtered packages that
- are already in categories.dat
- do not have an entry CATEGORIES= in .desktop (they exist!)
and sorted by category
remaining 1765 packages
The first one:
| Quote: | | Accessibility;Utility;Settings;X-GNOME-Settings-Panel;X-GNOME-PersonalSettings; myunity |
In /etc/xdg/menu/hierarchy we find Accessibility
| Quote: | | Desktop :settings X-DesktopCountry,Accessibility |
Thus this package myunity belongs to
Category Desktop
Subcategory Settings
Now myunity has to be inserted into the line containing Desktop settings in file categories.dat:
| Quote: | CONST PKG_CAT_Desktop_settings$=" jwmconfig2 myunity pupx xclock xkbconfigmanager "
|
Any volunteers?
Or split the work?
-multimedia
-games
-...
--
edit
... and the last one is:
| Quote: | | X-XFCE;Utility; xfprint-manager |
| Description |
remove extension .gz
|

Download |
| Filename |
Categories_package.sorted.gz |
| Filesize |
55.88 KB |
| Downloaded |
173 Time(s) |
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Wed 14 Nov 2012, 17:47 Post subject:
|
|
@L18L does it look like we need to do something like:
echo Package=$PACKAGENAME >> package/.../*.desktop
so we have a basis for determining the package name, or are most fairly straight forward
I am stuck in windows mode until I finish my programming languages project, so I can only give guidance right now, but if you open up jwm_menu_create (from jwm_tools) all of the language is there to generate all subcategories, all that needs to be done is:
set the subcategories variable to true (i forget the exact var name)
change the directory path from /usr/share/applications to the appropriate dir. remove the unneeded jwm markup
change the output to just give the format that Barry needs, which is ???
(p.s. my sub-category names may slightly differ but that is easily fixed by humans pretty quickly)
I assume that output could be:
category|subcategory|packagea packageb
(note to self: may need tolower so we can use strstr instead of needing strcasestr which is slower)
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1715 Location: Burghaslach, Germany
|
Posted: Thu 15 Nov 2012, 07:50 Post subject:
Package categories help wanted Subject description: games -> Fun |
|
Let's start with Fun
| s5.sed wrote: | s/Game; /Fun_Sub /
s/Game;ActionGame; /Fun_adventure /
s/Game;Action; /Fun_adventure /
s/Game;BlocksGame; /Fun_Sub /
s/Game;Blocks; /Fun_Sub /
s/Game;AdventureGame; /Fun_adventure /
s/Game;Adventure; /Fun_adventure /
s/Game;ArcadeGame; /Fun_arcade /
s/Game;Arcade; /Fun_arcade /
s/Game;BoardGame; /Fun_boardgame /
s/Game;Board; /Fun_boardgame /
s/Game;CardGame; /Fun_cardgame /
s/Game;Card; /Fun_cardgame /
s/Game;KidsGame; /Fun_Sub /
s/Game;LogicGame; /Fun_puzzle /
s/Game;RolePlaying; /Fun_adventure /
s/Game;Simulation; /Fun_Sub /
s/Game;SportsGame; /Fun_Sub /
s/Game;StrategyGame; /Fun_puzzle /
s/Game;Strategy; /Fun_puzzle / |
| Code: | sed -f s5.sed Categories_package.sorted | sort > xxx
mv xxx Categories_package.sorted |
has given puppy category and subcategory to 330 Fun packages
The sad rest is:
| Quote: | Game;Emulator; bsnes
Game;Emulator; dosbox
Game;Emulator; kcemu
Game;Emulator; rlvm
Game;FileTools; snespurify
Game;GPE; gpe-julia
Game;Music;Education linthesia |
dosbox a game is not a joke. Is it?
So what now? Silently forget that rest?
@technosaurus, I think that I have now found one way to continue.
Inserting package names into categories.dat will be be the very last step....
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6860 Location: Perth, Western Australia
|
Posted: Thu 15 Nov 2012, 21:43 Post subject:
|
|
L18L,
Ha ha, 'dosbox' a game
Well, yesterday I did a test Precise build, and the 'debdb2pupdb' utility created this package database entry for dosbox:
| Code: | | dosbox_0.74-2|dosbox|0.74-2||Graphic|2468K|pool/universe/d/dosbox|dosbox_0.74-2_i386.deb|+libasound21.0.24.1,+libc6&ge2.7,+libgcc1&ge4.1.1,+libgl1-mesa-glx,+libpng12-0&ge1.2.13-4,+libsdl-net1.2,+libsdl-sound1.2&ge1.0.1,+libsdl1.2debian&ge1.2.10-1,+libstdc++6&ge4.6,+libx11-6,+zlib1g&ge1.1.4|x86 emulator with Tandy/Herc/CGA/EGA/VGA/SVGA graphics sound and DOS|ubuntu|precise|| |
...assigned it as "Graphic" category. It would have picked up on that keyword "graphics" in the description and assigned the category -- obviously it has done that before discovering "emulator".
That's one reason a more fleshed-out categories.dat will be very helpful. debdb2pupdb will check that first, failing that can then fall back to the somewhat-less-than-perfect method of checking description keywords.
Thanks for all the work you are doing on this, it is great!
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6860 Location: Perth, Western Australia
|
Posted: Thu 15 Nov 2012, 22:06 Post subject:
|
|
L18L,
while putting pkgs into categories.dat, or preparing to do so, if you think that there is a bunch of packages that really should have another sub-category, we can easily add that.
For example, maybe many of the top-level categories should have a "utility" sub-category. For example:
| Code: | CONST PKG_CAT_Business_Sub$=" "
CONST PKG_CAT_Business_spreadsheet$=" gnumeric "
CONST PKG_CAT_Business_planner$=" planner "
CONST PKG_CAT_Business_finance$=" acct expensetracker grisbi homebank moneymanagerx "
CONST PKG_CAT_Business_calc$=" calcoo cgtkcalc galculator gmeasures ycalc xcalc " |
There may be some utility-type business apps, for which we should have "PKG_CAT_Business_utility" variable.
Note, in the menu we don't have to have horizontal lines between all of the sub-categories. Some can be grouped. So, these variables are for organizational purposes, actual display in the menu is flexible.
In fact, in Precise there are no horizontal bars between "spreadsheet" and "finance".
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1715 Location: Burghaslach, Germany
|
Posted: Fri 16 Nov 2012, 06:24 Post subject:
|
|
| BarryK wrote: | | ... a more fleshed-out categories.dat will be very helpful. debdb2pupdb will check that first, failing that can then fall back to the somewhat-less-than-perfect method of checking description keywords... |
This dosbox example has made it very clear what to do:
Assign exactly 1 (puppy) category/subcategory to each package.
Existing Categories (in .desktop file) may have more than 1 category, example:
| dosbox.desktop wrote: | [Desktop Entry]
Type=Application
Name=DOSBox Emulator
Comment=Run old DOS applications
Icon=dosbox
Exec=dosbox
Terminal=false
Categories=Game;Emulator; |
What can be done automatically?
Everything that has just 1 (sub)category.
I have continued to use some sed snippets and came to about
750 which cannot be automatically processed.
But before I publish this I will repeat this process to make sure that it is reproducible.
Then we will see if | Quote: | | there is a bunch of packages that really should have another sub-category, |
|
|
Back to top
|
|
 |
sunburnt

Joined: 08 Jun 2005 Posts: 4006 Location: Arizona, U.S.A.
|
Posted: Fri 16 Nov 2012, 19:36 Post subject:
|
|
While you`re writing specialized scripts to parse the desktop files...
Why not generate an app. library dependency data base with ldd.?
I`ve said that statistics on library usage is a key item for O.S. design.
Puppy`s installed libraries are probably a good list of common ones.
But many apps. need more, so which libs. are only used 1 or 2 times?
Include the commonly used libs. in Puppy or make an add-on SFS file.
The rarely used odd libs. just include with the apps. It`s good design!
# Sorry for stepping on your thread Barry... The thought struck me.
|
|
Back to top
|
|
 |
pemasu

Joined: 08 Jul 2009 Posts: 5169 Location: Finland
|
Posted: Sat 17 Nov 2012, 10:51 Post subject:
|
|
Is this finding relevant to the packages categories work:
http://www.murga-linux.com/puppy/viewtopic.php?p=665179#665179
|
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 835
|
Posted: Sun 18 Nov 2012, 14:17 Post subject:
Inspecting desktop files |
|
While there are some perl and python programs to convert a deb file to a tar.gz file, I was surprised to find that just using linux tools was actually faster.
I found that the tar file starts at exactly 60 bytes offset from the header "data.tar.gz". (At least in the 6 deb files I tested). So here's an extractor for *.desktop files.
| Code: | #!/bin/sh
# extract *.desktop file from .deb file $1
# seaside November 18 2012
p=`grep --binary-files=text -m1 -b -o 'data.tar.gz' "$1"`
startp=$((${p%:*} + 60)) # add 60 to 'data.tar.gz'
dd if="$1" bs="$startp" skip=1 | tar -xz --strip 4 --wildcards --no-anchored '*.desktop' |
Some further processing, checking right from the download could also be possible.
Actually, I might as well make a right-click deb2tar program out of this.
EDIT: deb2tgz. pet here
http://murga-linux.com/puppy/viewtopic.php?p=665691#665691
Cheers,
s
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1715 Location: Burghaslach, Germany
|
Posted: Tue 20 Nov 2012, 16:03 Post subject:
Package categories help wanted Subject description: GUI for filling categories.dat |
|
All data and scripts are in one directory.
fill_categories.tgz came a little later than the pictures
| Code: | ./reset # (only if starting or restart)
./fill_categories_GUI
|
The inserted package names are merged with the existing package names and sorted.
---------------------------------
edit
Note please
| fill_categories_GUI line 154 wrote: | | comm="`grep Comment= ../bk/a/$packagename.desktop | cut -d '=' -f2`" |
this has to changed to link to the directory containing the .desktop files. These data have been uploaded here.
------
edit
above link here corrected (start=12, not 13)
| Description |
script and all necessary data in 1 directory
|

Download |
| Filename |
fill_categories.tar.gz |
| Filesize |
30.21 KB |
| Downloaded |
209 Time(s) |
| Description |
The easy way for 1208 packages: automatic assignment from original category has happened can be checked using comment
The more difficult work see downwards |
| Filesize |
41.36 KB |
| Viewed |
960 Time(s) |

|
| Description |
1- select input data file 2- select Puppy Subcategory and OK button or select Packages button |
| Filesize |
80.93 KB |
| Viewed |
716 Time(s) |

|
| Description |
Ex: 2 packages (gbirthday and globaltime) assigned to Puppy Category Business_Sub
OK button continues to a confirm dialog |
| Filesize |
79.54 KB |
| Viewed |
721 Time(s) |

|
| Description |
Ex: 2 packages (gbirthday and globaltime) assigned to Puppy Category Business_Sub |
| Filesize |
24.09 KB |
| Viewed |
718 Time(s) |

|
Last edited by L18L on Wed 21 Nov 2012, 07:06; edited 2 times in total
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1715 Location: Burghaslach, Germany
|
Posted: Tue 20 Nov 2012, 17:16 Post subject:
|
|
Yes, I think so.
|
|
Back to top
|
|
 |
pemasu

Joined: 08 Jul 2009 Posts: 5169 Location: Finland
|
Posted: Tue 20 Nov 2012, 17:17 Post subject:
|
|
It has been fixed with latest woof commits.
http://www.murga-linux.com/puppy/viewtopic.php?p=665483#665483
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1715 Location: Burghaslach, Germany
|
Posted: Wed 21 Nov 2012, 04:54 Post subject:
Re: Package categories help wanted Subject description: GUI for filling categories.dat, link to .desktop files |
|
| L18L wrote: | edit
Note please
| fill_categories_GUI line 154 wrote: | | comm="`grep Comment= ../bk/a/$packagename.desktop | cut -d '=' -f2`" |
this has to changed to link to the directory containing the .desktop files. These data have been uploaded here. |
Sorry, my fault, wrong link to .desktop files.
All needed .desktop files are in applications.tar.gz down loadable from
http://murga-linux.com/puppy/viewtopic.php?t=82186&start=12 (not ....13)
Getting these .desktop files was the bandwidth consuming part.
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Wed 21 Nov 2012, 17:01 Post subject:
|
|
I went through the desktop files looking for any gotchas and to see if it would be feasible to just include the icons but noticed that:
(41) apps use svg icons (not supported by jwm) ... need a wrapper to convert to png and modify desktop file on install
(15) specify no icon
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
|