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 18 Sep 2014, 01:56
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
How to add a menu entry for a Pupget package
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [9 Posts]  
Author Message
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Mon 01 Aug 2005, 07:55    Post subject:  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?
Back to top
View user's profile Send private message 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Mon 01 Aug 2005, 08:15    Post subject:  

You can install multiple entries and register under different window managers:

You will have to include a section like this in your dotpup.sh
Code:

# 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


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.
Back to top
View user's profile Send private message Visit poster's website 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Wed 03 Aug 2005, 15:47    Post subject:  

Thanks. I've gotten the menus sorted out.

The only other issue is --how can I have my menu entry load a script in a new xterm or rvxt console so its progress can be monitored?

I've tried 'exec sriptname' and 'exec sh scriptname' neither worked.

TIA
Back to top
View user's profile Send private message 
doopdoop

Joined: 28 Jul 2005
Posts: 48
Location: Magdeburg, Germany

PostPosted: Wed 03 Aug 2005, 15:49    Post subject:  

Code:

rxvt -e [i]program[/i]
Back to top
View user's profile Send private message 
klhrevolutionist


Joined: 08 Jun 2005
Posts: 1124

PostPosted: Wed 03 Aug 2005, 16:00    Post subject: 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!
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Wed 03 Aug 2005, 17:17    Post subject:  

would this be correct?
What about fluxbox?

Code:
#!/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

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
klhrevolutionist


Joined: 08 Jun 2005
Posts: 1124

PostPosted: Fri 05 Aug 2005, 04:01    Post subject: 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

_________________
Heaven is on the way, until then let's get the truth out!
Back to top
View user's profile Send private message 
doopdoop

Joined: 28 Jul 2005
Posts: 48
Location: Magdeburg, Germany

PostPosted: Fri 05 Aug 2005, 04:58    Post subject:  

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? )
Back to top
View user's profile Send private message 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Fri 05 Aug 2005, 12:42    Post subject:  

Lobster asked:
Quote:
What do I do about this section - did not understand the 24?


network24 is the icon that shows in the network menu.

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.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [9 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
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.0816s ][ Queries: 12 (0.0100s) ][ GZIP on ]