How to add a menu entry for a Pupget package
How to add a menu entry for a Pupget package
I've been poring over the pupget packaging instructions and i think i've got most of it covered now. The only thing i need now is to find out how to add an entry/entries in the wm menu? Also, can i add multiple menu entries for a package?
You can install multiple entries and register under different window managers:
You will have to include a section like this in your dotpup.sh
Just replace with your application name and the execution command for each of the window managers.
I think that someone was working on a generic way of doing it for all window managers. I have some ideas but I haven't had the time to explore them.
So, there you have it.
You will have to include a section like this in your dotpup.sh
Code: Select all
# Register with iceWM menu
if [ -f /root/.icewm/menu ]
then
egrep -i vncviewer /root/.icewm/menu >/dev/null 2>&1
if [ $? -ne 0 ]
then
cp -f /root/.icewm/menu /root/.icewm/menu.bak
awk '{if (/network24/) {print $0;print " prog \"TightVNC viewer\" pc-2x vncviewer"} else {print $0};} ' /root/.icewm/menu.bak > /root/.icewm/menu
fi
fi
# Register with fvwm95 menu
if [ -f /root/.fvwm95rc ]
then
egrep -i vncviewer /root/.fvwm95rc >/dev/null 2>&1
if [ $? -ne 0 ]
then
cp -f /root/.fvwm95rc /root/.fvwm95rc.bak
awk '{if (/AddToMenu "Network"/) {print $0;print "+ \"TightVNC viewer%pc-2x.xpm%\" Exec vncviewer"} else {print $0};} ' /root/.fvwm95rc.bak > /root/.fvwm95rc
fi
fi
# Register with JWM menu
if [ -f /root/.jwmrc ]
then
egrep -i vncviewer /root/.jwmrc >/dev/null 2>&1
if [ $? -ne 0 ]
then
cp -f /root/.jwmrc /root/.jwmrc.bak
awk '{if (/Menu label="Network"/) {print $0;print "<Program label=\"TightVNC viewer\" icon=\"pc-2x.xpm\">vncviewer</Program>"} else {print $0};} ' /root/.jwmrc.bak > /root/.jwmrc
fi
fi
I think that someone was working on a generic way of doing it for all window managers. I have some ideas but I haven't had the time to explore them.
So, there you have it.
Code: Select all
rxvt -e [i]program[/i]
- klhrevolutionist
- Posts: 1121
- Joined: Wed 08 Jun 2005, 10:09
great!!!
when you get one with this post it so others can use it for a template if you don't mind!!! great work!!!
Heaven is on the way, until then let's get the truth out!
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
would this be correct?
What about fluxbox?
What do I do about this section - did not understand the 24?
awk '{if (/network24/) {print $0;print " prog \"Welcome\" pc-2x
What about fluxbox?
Code: Select all
#!/bin/sh
mkdir /root/my-applications/welcome
cp welcome /root/my-applications/welcome/
cp communication.txt /root/my-applications/welcome/
cp imagewiki.txt /root/my-applications/welcome/
cp info.txt /root/my-applications/welcome/
xmessage -center "Welcome is installed"
exec /root/my-applications/welcome/welcome
# Register with iceWM menu
if [ -f /root/.icewm/menu ]
then
egrep -i vncviewer /root/.icewm/menu >/dev/null 2>&1
if [ $? -ne 0 ]
then
cp -f /root/.icewm/menu /root/.icewm/menu.bak
awk '{if (/network24/) {print $0;print " prog \"Welcome\" pc-2x vncviewer"} else {print $0};} ' /root/.icewm/menu.bak > /root/.icewm/menu
fi
fi
# Register with fvwm95 menu
if [ -f /root/.fvwm95rc ]
then
egrep -i vncviewer /root/.fvwm95rc >/dev/null 2>&1
if [ $? -ne 0 ]
then
cp -f /root/.fvwm95rc /root/.fvwm95rc.bak
awk '{if (/AddToMenu "Information Managers"/) {print $0;print "+ \"Welcome%pc-2x.xpm%\" Exec vncviewer"} else {print $0};} ' /root/.fvwm95rc.bak > /root/.fvwm95rc
fi
fi
# Register with JWM menu
if [ -f /root/.jwmrc ]
then
egrep -i vncviewer /root/.jwmrc >/dev/null 2>&1
if [ $? -ne 0 ]
then
cp -f /root/.jwmrc /root/.jwmrc.bak
awk '{if (/Menu label="Information Managers"/) {print $0;print "<Program label=\"Welcome\" icon=\"pc-2x.xpm\">vncviewer</Program>"} else {print $0};} ' /root/.jwmrc.bak > /root/.jwmrc
fi
fi
What do I do about this section - did not understand the 24?
awk '{if (/network24/) {print $0;print " prog \"Welcome\" pc-2x
- klhrevolutionist
- Posts: 1121
- Joined: Wed 08 Jun 2005, 10:09
easy breezy
A light bulb appears from the top of the Revolutionist head!
Is there not a simpler way to minimize the menu structure
so that it is not as complicated? Or am I just complaining, and it seems easy to everyone else? I look at the menu structure of themes throughtout the lands of
megabytes, and see simpler solutions, or so it appears. I have glanced among the structures, and puppy's wm's are very good, very good, in that it wants everything to be structered. So that everything coincides with each other.
And notifies the menu so that it is easier to get to. Now, is there a way, has anybody looked since we have last posted aboot this subject. Take a look above this post, that is a hefty line, would'nt you agree?
So I challenge everyone interested to make a solution to simplify this procedure.
Yes we all, want everything to work together, pupgget, dotpup, and extensions
and so on. what is the simplest way is all I ask, a wikki for templates?
Something, Anything, let's work together!!! And be diverse at the same time!!!
Also, check my wikki this weeks and make suggestions to make it better!!
http://www.goosee.com/puppy/wikka/KlhRevolutionist
This week rc.local, the unknown
Is there not a simpler way to minimize the menu structure
so that it is not as complicated? Or am I just complaining, and it seems easy to everyone else? I look at the menu structure of themes throughtout the lands of
megabytes, and see simpler solutions, or so it appears. I have glanced among the structures, and puppy's wm's are very good, very good, in that it wants everything to be structered. So that everything coincides with each other.
And notifies the menu so that it is easier to get to. Now, is there a way, has anybody looked since we have last posted aboot this subject. Take a look above this post, that is a hefty line, would'nt you agree?
So I challenge everyone interested to make a solution to simplify this procedure.
Yes we all, want everything to work together, pupgget, dotpup, and extensions
and so on. what is the simplest way is all I ask, a wikki for templates?
Something, Anything, let's work together!!! And be diverse at the same time!!!
Also, check my wikki this weeks and make suggestions to make it better!!
http://www.goosee.com/puppy/wikka/KlhRevolutionist
This week rc.local, the unknown
Heaven is on the way, until then let's get the truth out!
See my message in "Cutting edge". The solution should not be inside the packages themselves, there has to be a "standard" way to add (and delete!) a menu entry. Otherwise we will run into big troubles in the long term:
- inconsistent menu structures.
- When a new wm comes up, EACH DotPup has to be updated to include new code.
- Puppy or WM updates are very hard to do without destroying the old things.
I am strongly in favour of a more centralized solution. I have revisited some possible solution and waiting for feedback (esp. how much space do we need for such a strcture ? Custom or already build Solutions? )
- inconsistent menu structures.
- When a new wm comes up, EACH DotPup has to be updated to include new code.
- Puppy or WM updates are very hard to do without destroying the old things.
I am strongly in favour of a more centralized solution. I have revisited some possible solution and waiting for feedback (esp. how much space do we need for such a strcture ? Custom or already build Solutions? )
Lobster asked:
The semantic translation for that line of code is the following:
Under the line that contains text A Insert text B.
In this case:
- under the line that contains the workd network24
- insert the text prog "tightVNC viewer" pc-2x vncviewer
The line you insert, adds the menu entry with the text thightVNC Viewer, shows the icon pc-2x and executes the program vncviewer
This is, the word network24 is used only as a marker. If someone changes the icon, this script would stop working. That's why on one of the threads someone suggest to allways use as a marker a menu entry that is likelly to be present in Puppy (one of the preinstalled applications)..
As you can see this is not fool proof, but the alternative would be a much more complex algorithm.
Altough I working in a solution for this problem, I will ask for feedback once I have it clearer.
network24 is the icon that shows in the network menu.What do I do about this section - did not understand the 24?
The semantic translation for that line of code is the following:
Under the line that contains text A Insert text B.
In this case:
- under the line that contains the workd network24
- insert the text prog "tightVNC viewer" pc-2x vncviewer
The line you insert, adds the menu entry with the text thightVNC Viewer, shows the icon pc-2x and executes the program vncviewer
This is, the word network24 is used only as a marker. If someone changes the icon, this script would stop working. That's why on one of the threads someone suggest to allways use as a marker a menu entry that is likelly to be present in Puppy (one of the preinstalled applications)..
As you can see this is not fool proof, but the alternative would be a much more complex algorithm.
Altough I working in a solution for this problem, I will ask for feedback once I have it clearer.