[openbox] How to display an openbox <prompt> box laucnh from batch

MangezDesChips mangezdeschips at gmail.com
Thu Sep 9 03:43:09 EDT 2010


xmessage fits to my needs. Thank you for the hint.

I would prefer use xmessage-like builtin Openbox for theme / skin
consistency.

Thank you again

On 9 September 2010 08:23, Cedric Sodhi <manday at gmx.net> wrote:

> I think he meant how to use this very function which is included in
> openbox, not what other programs exist to achieve the same.
>
>
> On 09/09/2010 07:15 AM, Anthony Thyssen wrote:
>
>>
>> On Wed, 8 Sep 2010 20:53:23 +0200
>> MangezDesChips<mangezdeschips at gmail.com>  wrote:
>> | Hello,
>> |
>> | I love the<prompt>  openbox Global action. I have a script that checks
>> if
>> | some devices are mounted before launching audio calculations. If the
>> devices
>> | are not mounted I want to display a YES/NO prompt box like openbox one.
>> Do
>> | you know if openbox permit to launch that event from batch ?
>> |
>> | Thanks for help !!
>> |
>> | Kheraud
>>
>> You can pop up prompt requests like that (and more) using quite a number
>> of X window utilities.
>>
>>    Zenity  is a gnome tool that is very common.
>>
>>          zenity --question --title "Question" --text 'To be of not to be?'
>>          echo "the result was $?"
>>
>>    The return status tell you what was selected.
>>    Has LOTS more features.
>>
>>
>>    xprompt       String input entry program
>>
>>
>>    xmenu         popup a menu of choices
>>
>>
>>    XMessage  is another (older) one that also can be used to display files
>>    or have multiply answers. I use it for a multi-question logout...
>>
>>    buttons='Poweroff:14,Reboot:13,Restart:12,Logout:11,Cancle:0'
>>
>>    xmessage -name xlogout -title xlogout \
>>       -geometry $logout_geometry -fg Gold -bg Navy  -buttons "$buttons" \
>>       -xrm '*message.borderWidth: 0' \
>>       -xrm '*message.scrollVertical: Never' \
>>       -xrm '*Font: -*-new cent*-bold-r-normal--18-*' \
>>       'Are You Sure?'
>>
>>    case $result in
>>     0) # ---- Cancel the Action ----
>>        ;;                     # just loop -- do nothing
>>    11) # User specifically asked to logout
>>        LOGOUT=true
>>        break
>>        ;;
>>    12) # ---- Restart all Clients ----
>>        xclosedown             # close all client windows
>>        killall -q gnome-panel # just in case.
>>        killall -q gconfd-2    # gnome fails to start if this is running
>>        # If a client was killed without removing the motif drag property
>> then
>>        # motif clients on the rerun will Bus Error as property does not
>> point
>>        # to a vaild window.  Ensure it is removed, so this does not
>> happen.
>>        xprop -root -remove _MOTIF_DRAG_WINDOW 2>/dev/null
>>        # Now re-start clients and loop
>>        clients
>>        ;;
>>    13) # logout and reboot machine
>>        REBOOT=true
>>        break
>>        ;;
>>    14) # logout and poweroff
>>        POWEROFF=true
>>        break
>>        ;;
>>     *) # ---- ErrorExit (1) ----
>>        break   # Window or Display was killed
>>        ;;
>>    esac
>>
>>
>> Their are many many many such programs out their!!!
>> Most I have tried out at some point in time.
>>
>>
>>
>>   Anthony Thyssen ( System Programmer )<A.Thyssen at griffith.edu.au>
>>
>>  --------------------------------------------------------------------------
>>      The human race will never know happiness, as long as the words
>>      "If only..." can still be spoken.       -- Unknown
>>
>>  --------------------------------------------------------------------------
>>    Anthony's Castle     http://www.cit.griffith.edu.au/~anthony/<http://www.cit.griffith.edu.au/%7Eanthony/>
>> _______________________________________________
>> openbox mailing list
>> openbox at icculus.org
>> http://icculus.org/mailman/listinfo/openbox
>>
>>
> _______________________________________________
> openbox mailing list
> openbox at icculus.org
> http://icculus.org/mailman/listinfo/openbox
>



-- 
K. Heraud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/openbox/attachments/20100909/5d8b28fa/attachment.htm>


More information about the openbox mailing list