Script Running Pnd


meandu229

Zubeman
Joined
Mar 20, 2004
Messages
1,170
Age
37
Location
England(north east)
Website
www.zubeonline.com
Hi How hard would it be to make a small Zenity App which searches say /pandora/scripts for sh scripts shows a list and then runs them.
I can see this being useful for a few things for myself, e.g mounting my NAS (and unnmounting) setting up bluetooth PAN (N900)
and probably more things such as switching keymaps for dos box.
 
Running pnds from scripts, or running scripts to drive pnds in various ways, is not at all hard.

pnd_run is a convenience binary for running a pnd 'outright'; pnd_run /path/to/pndfile.pnd will run the app (or -1/-2/-3/etc to pick which subapp in a pnd to run.)

If you want to mount, do stuff, and unmount, then you need to use pnd_run.sh and direct its options ..

If I were you, I'd make .desktops to do it:

1) Create script to do what you want; "switch-m-dosbox-conf-to-EoB1.sh" or whatever
2) Create a .desktop file that in turn just has Exec=/path/to/switch-my-dosvbox-conf....sh"
3) If the .desktop is in your ~/Desktop directory, it'll show up in your menu for instance. (and libpnd will not remove it on you since it didn't create it.)

Use zenity if you want to ask the user something.

Piece of cake ..

jeff
 
skeezix said:
Running pnds from scripts, or running scripts to drive pnds in various ways, is not at all hard.

pnd_run is a convenience binary for running a pnd 'outright'; pnd_run /path/to/pndfile.pnd will run the app (or -1/-2/-3/etc to pick which subapp in a pnd to run.)

If you want to mount, do stuff, and unmount, then you need to use pnd_run.sh and direct its options ..

If I were you, I'd make .desktops to do it:

1) Create script to do what you want; "switch-m-dosbox-conf-to-EoB1.sh" or whatever
2) Create a .desktop file that in turn just has Exec=/path/to/switch-my-dosvbox-conf....sh"
3) If the .desktop is in your ~/Desktop directory, it'll show up in your menu for instance. (and libpnd will not remove it on you since it didn't create it.)

Use zenity if you want to ask the user something.

Piece of cake ..

jeff

That sounds better with the .desktop unless I get too many scripts to want in my menu.
just 1 thing,part 3 how would I choose where it goes in the Menu?
Thanks
 
Last edited by a moderator:
A .desktop file has a category (1 or more) in it, as per Freedesktop Category specification (google those two words :), and the environments map that category to the display; ie: in minimenu it shows valid categories more or less as is, and xfce does as well though ED has put some magic in .. so Audio + Video will both show up in a Multimedia combined section, or game subcategories will all show under Game -> Subcat, that sort of thing. If you have too many (creating 50 scripts or something), then you could add a zenity picker, or something. You could even group them into a folder on your desktop and then use double-click to launch them, or any number of things.

jeff
 
ok so i have made a pnd with a simple script which is a zenity list of .sh file from appdata which is great works great except i dont know how to make it run them as root
for now i have put /mnt/utmp/scipts/scipt.sh in the sudoers file and it works perfectly
how can i do it without sudoers file

i want to mount Network shares so need sudo
 
Back
Top