The time now is Fri 24 May 2013, 05:38
All times are UTC - 4 |
|
Page 1 of 2 [18 Posts] |
Goto page: 1, 2 Next |
| Author |
Message |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Wed 07 Jan 2009, 15:07 Post subject:
Tool to create new menu or desktop entries |
|
Screenshot: see bottom of this message.
A menu item in Puppy is defined by a file, for example abiword uses the file
/usr/share/applications/abiword.desktop.
As it is a bit uncomfortable to create such files with an editor, I wrote a tool for it.
USAGE:
You can drag an application or document on it, and also a picture used as icon.
The required fields then will be filled automatically.
You optionally can modify the values.
Then save it, and you have a new menu entry.
Backgroundinfo:
The new files are saved in /root/.local/share/applications/, so you easily can backup them, if you want to use them in another Puppy.
This location is intended for custom files by the freedesktop.org definitions.
If you use a desktop supporting .desktop icons (like pcmanfm or KDE), you also can save directly to the desktop to get a new icon.
Installation:
Requires GtkBasic/Puppybasic.
If you don't have that, the easiest way is to install Muppyfiler, that contains everything:
http://www.murga-linux.com/puppy/viewtopic.php?t=32575
Then install the attached pet.
Mark
 |
| Description |
|

Download |
| Filename |
Desktop-entry.pet |
| Filesize |
76.95 KB |
| Downloaded |
628 Time(s) |
| Description |
to use these icons, start "deskicons-demo" from the menu! |
| Filesize |
9.21 KB |
| Viewed |
1854 Time(s) |

|
| Description |
|
| Filesize |
70.26 KB |
| Viewed |
1890 Time(s) |

|
_________________ my recommended links
Last edited by MU on Thu 08 Jan 2009, 13:09; edited 8 times in total
|
|
Back to top
|
|
 |
bugman

Joined: 20 Dec 2005 Posts: 2131 Location: buffalo commons
|
Posted: Wed 07 Jan 2009, 15:12 Post subject:
|
|
thanks mu, you've just saved me a lot of investigative footwork
[or however that old firesign theater line goes, it's been years]
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Thu 08 Jan 2009, 00:26 Post subject:
|
|
I updated the pet.
I added a utility, that adds two "icons" on the desktop (see new screenshot in the first message).
You now can drag a file on one icon, to run the desktopeditor with it.
It then will fill out the entries, just as if you would drag a file to the desktopeditor itself.
Not done yet: edit existing desktop icons, despite the tooltip says so.
The other icon launches rxvt, also with scripts that you drag on it.
I just added it, to demonstrate these new "Icon widgets".
They work independent from Rox or other desktops, so you also can use them to pimp up desktops without icons
Source is included (C/Gtk2) in /usr/local/deskicons/.
Mark
_________________ my recommended links
Last edited by MU on Thu 08 Jan 2009, 13:35; edited 1 time in total
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Thu 08 Jan 2009, 01:46 Post subject:
|
|
hm, the icons did not behave correct, they disappeared behind the pcmanfm background, when you clicked on it.
I modified now the windowmanagerhints.
Please let me know, if they don't behave correct in other desktops like JWM, I currently don't have it installed.
Mark
_________________ my recommended links
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Thu 08 Jan 2009, 10:14 Post subject:
|
|
updated the pet.
The icons should work better in different windowmanagers.
And the terminal-icon now will change the color, depending on how much your CPU load is.
Green: low usage, yellow: over 33% usage, red: over 66% usage.
This is scripted with a bash-script I found in the web, I just slighly modified it to copy the matching pictures instead of showing the percentage as text.
In the deskicons.rc you can enter a second picture, then the icon will check 5 times a second, if it was altered.
If yes, it is reloaded.
Like this you can set up simple monitors using pictures with bash scripts
Mark
_________________ my recommended links
Last edited by MU on Thu 08 Jan 2009, 13:40; edited 1 time in total
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Thu 08 Jan 2009, 11:13 Post subject:
|
|
updated again, fixed a memory leak.
The one who downloaded the last version: please download again to avoid longterm errors.
Mark
_________________ my recommended links
|
|
Back to top
|
|
 |
bugman

Joined: 20 Dec 2005 Posts: 2131 Location: buffalo commons
|
Posted: Thu 08 Jan 2009, 11:31 Post subject:
|
|
mark, i have tried it [first version] and it works great, many thanks to you!
[getting the update now]
EDIT - needs libgio-2.0.so.0
not finding this lib anywhere, but the app seems to run fine without it . . .
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Thu 08 Jan 2009, 13:14 Post subject:
|
|
ah thanks, very valuable feedback!
I uploaded it again, now compiled in Puppy 4.12.
Now it does not need this lib (it is part of the newer Gtk/Glib in Ultrapup).
By running Puppy 4.12 I also saw two other bugs I fixed.
It crashed, when there was no "Desktop" folder, but you tried to save there.
And it always added pcman as filer to run documents, even if that was not available.
Fixed all this.
One minor issue not fixed:
In jwm, the "icons" are shown in the taskbar. I have no idea, which WM-Hints I must use in JWM, to hide them. But this is not so important at moment.
Thanks for pointing me to the errors
Mark
_________________ my recommended links
|
|
Back to top
|
|
 |
bugman

Joined: 20 Dec 2005 Posts: 2131 Location: buffalo commons
|
Posted: Thu 08 Jan 2009, 15:09 Post subject:
|
|
There was an error expanding package Desktop-entry-2.tar.gz.
Either the file is corrupted, or has not expanded into its own directory with
name of Desktop-entry-2/ (which is how most packages expand).
You will have to go into /root/.packages/ directory and manually clean it up.
This script will now exit...
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Thu 08 Jan 2009, 15:18 Post subject:
|
|
downloaded and installed with success.
Maybe your downlod was broken, the forum is very slow sometimes.
You also can delete with the filemanager the "dead" files in /root/.packages/, that begin with "Desktop-entry".
Then download and install the pet again.
Does that work?
Mark
_________________ my recommended links
|
|
Back to top
|
|
 |
HairyWill

Joined: 26 May 2006 Posts: 2949 Location: Southampton, UK
|
Posted: Fri 09 Jan 2009, 01:52 Post subject:
|
|
Mark
This looks interesting. One of the things I am doing for roxrightclicks is building a database that can show the mimetypes associated with a particular program. This could be useful for generating the value for the MimeType key automatically.
_________________ Will
contribute: community website, screenshots, puplets, wiki, rss
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Fri 09 Jan 2009, 04:27 Post subject:
|
|
HairyWill,
I created the MIME editor once, but it is not for Rox, but for filers using the
freedesktop.org specifications, like pcmanfm or konqueror.
http://murga-linux.com/puppy/viewtopic.php?t=26216
This program needs a minute or so to find all associations, if I have KDE installed, so I did not add it to the Desktop-editor for speed reasons.
I might add it later using a button to launch it, so that you have a all in one package.
Rox uses an own system, so a tool from you will be great
Mark
_________________ my recommended links
Last edited by MU on Fri 09 Jan 2009, 06:55; edited 1 time in total
|
|
Back to top
|
|
 |
bugman

Joined: 20 Dec 2005 Posts: 2131 Location: buffalo commons
|
Posted: Fri 09 Jan 2009, 06:53 Post subject:
|
|
| MU wrote: | downloaded and installed with success.
Maybe your downlod was broken, the forum is very slow sometimes.
You also can delete with the filemanager the "dead" files in /root/.packages/, that begin with "Desktop-entry".
Then download and install the pet again.
Does that work?
Mark |
yeah, i tried twice yesterday, but today no problems!
thanks again for the excellent app, fills a small but VITAL niche!
|
|
Back to top
|
|
 |
HairyWill

Joined: 26 May 2006 Posts: 2949 Location: Southampton, UK
|
Posted: Fri 09 Jan 2009, 08:05 Post subject:
|
|
I was half asleep when I posted earlier so I didn't really make myself clear. What I was proposing was using what I have done already to automatically populate the MimeType field in the .desktop files which usually seem to come without this completed. Have you done this automatically already? Do you have a big list of mimetypes associated with applications? I have a lookup that examines about 50 popular applications and 200 mimetypes and creates associations between them.
Doing this would then help freedesktop.org compliant filers and I could also rewrite roxrightclicks so that it could create the roxrightclick options by reading the mimetype associations from the .desktop files. This would seem to be more the right way round to do things. My system is slow as well but the lookup could be done only once for each application.
_________________ Will
contribute: community website, screenshots, puplets, wiki, rss
|
|
Back to top
|
|
 |
renlac
Joined: 19 Oct 2008 Posts: 46
|
Posted: Fri 09 Jan 2009, 15:17 Post subject:
|
|
Hello MU and All,
As a newcomer to linux (thru puppy), I was looking for some way to put new installed pet's icons on the desktop, in order to load them from there, instead of having to go for the menu, or the console...
So, this Desktop-entry.pet must be great, thank you so much, but I couldn't make it work for now. Sorry, but probably it's because I'm not used to obvious linux terms.
I'm using puppy 4.12 and downloaded/installed first that GtkBasic/Puppybasic package and then the Desktop-entry.pet. Then I rebooted the computer just for giving them better chance to arrange all the bits as needed (windows jerk...).
The pet opens nicely as shown in Desktop-entry.jpg, but I see no desktop double icons as you tell - maybe they would appear only when dragging something to the pet - but as I dragged some (searched and found) *.desktop icons to it, nothing happened, having the test.desktop icon not changed, as none of the other fields also.
Of course I may be working it wrongly and need help, but if not, I hope this feedback may be useful to you.
Thank you very much.
renlac
|
|
Back to top
|
|
 |
|
|
Page 1 of 2 [18 Posts] |
Goto page: 1, 2 Next |
|
|
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
|