I'm trying to write a very simple executable script and have a question.
I need to call up defaultmediaplayer and also viewnior viewer in the same script. The problem is that as soon as the first app is brought up, the script apparently has to wait until the first one is exited before the second one is run and the program can go on. I imagine this is a simple problem, but can you help me with this? I call them up just by their names and file to run.
Thanks
Ron
Script writing question
Code: Select all
defaultmediaplayer & viewnior &
trapster
Maine, USA
Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog
Maine, USA
Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog
Great, thanks!
This works, but now no matter in which order I put the two commands, the mediaplayer dialog box is always on top of Viewnior. I would like for Viewnior to be on top. Any way to force which app's window is on top? Also, is there any way to force the windows to be minimized or maximized, and to set the displayed window size? All of this stuff has to be done in the script with no user involvement.
This works, but now no matter in which order I put the two commands, the mediaplayer dialog box is always on top of Viewnior. I would like for Viewnior to be on top. Any way to force which app's window is on top? Also, is there any way to force the windows to be minimized or maximized, and to set the displayed window size? All of this stuff has to be done in the script with no user involvement.
the geometry is where you change the sizes
having the "$@" lets you do this as a dragNdrop thingy also
a quick example
using the program called top as an example I dont have viewnior installed the 3000 is 3 seconds to auto close the box
there is a programming section in the forum where more people could help out with ideas
Joe
having the "$@" lets you do this as a dragNdrop thingy also
Code: Select all
xterm -geometry 40x30+150+40 -e viewnior"$@"
Xdialog --title "Complete" \
--infobox "\nInstalling $@ has finished.\n" 0 0 3000
a quick example
using the program called top as an example I dont have viewnior installed the 3000 is 3 seconds to auto close the box
Code: Select all
xterm -geometry 40x30+150+40 -e top"$@"
Xdialog --title "Complete" \
--infobox "\nInstalling $@ has finished.\n" 0 0 3000
there is a programming section in the forum where more people could help out with ideas
Joe
This is crude, but effective:Ron wrote:This works, but now no matter in which order I put the two commands, the mediaplayer dialog box is always on top of Viewnior. I would like for Viewnior to be on top.
Code: Select all
defaultmediaplayer & sleep 1 ; viewnior &
If you are using JWM, try adding this to your /root/.jwm/jwmrc-personal file, the restarting JWM:Ron wrote:Any way to force which app's window is on top?
Code: Select all
<Group>
<Name>viewnior</Name>
<Option>layer:5</Option>
</Group>
Another consideration is that if this window opens before the other, it won't have the keyboard focus even though it is on top. The user would need to click in the window first. Of course, if the user's first action in the window involves using the mouse, this shouldn't be a problem. But if the first thing the user does is, for instance, use Alt-f to access the file menu, it would be confusing to see a menu for a lower window appear -- or nothing appear if that part of the other window is covered. Using the sleep 1 command, as shown above, would eliminate this concern (and might eliminate the need for adding this Group tag to jwmrc-personal, depending upon your needs).
Try adding this option within the Group tag show above, in addition to or in place of the layer option, depending upon your needs:Ron wrote:Also, is there any way to force the windows to be minimized or maximized, . . .
Code: Select all
<Option>maximized</Option>
http://www.joewing.net/programs/jwm/config.shtml#groups)
The -geometry option mentioned by big_bass has been the recommended standard way of configuring the window geometry since before The GIMP was old enough to carry a tool kit. And there was a time when many, probably most, X applications supported it. Unfortunately, fewer and fewer applications support this option nowadays.Ron wrote:. . . and to set the displayed window size?
I've experimented with viewnior 0.6, and it does not seem to support it.
I don't know what you have for your defaultmediaplayer, but I have gxine 0.5.9, which doesn't exactly support the -geometry option either. It does, however, support a --geometry option. (Note the double-dash.) This is not documented by gxine --help or in the gxine man page, although it is documented in the xine man page. This uses the same format for describing the size and position as documented for -geometry in the X man page, and shown in the example given by big_bass: WIDTHxHEIGHT+XOFF+YOFF.
Be aware that, although gxine may initially appear at the size requested, it soon chooses to resize itself to whatever it thinks appropriate. At least that is what happens with the gxine 0.5.9 on Puppy 4.3.1. This also happens when using the maximized option in jwmrc-personal. Perhaps there is a way to change this behavior, but I do not know how. For what it's worth, you can gain some control by setting gxine's default window size in File -> Configure -> Preferences -> gui.
Have fun.