Hello.
if you want to have the gnome menu in blackbox try this scritp.
Tell me if is all ok
#!/bin/bash
#This script Create a new menu based in Gnome Menu for to be used like BlackBox
#Menu.
#If you like tell me it.
#
############################################################################
# GnomeBB 
#                                 [EMAIL PROTECTED] Spain(Malaga)
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

#¡ATENCION!¡ATENCION!¡ATENCION!¡ATENCION!
#You only have to insert the good path here 
dir=$HOME/.gnome/apps-redhat

#Log File:
LOG=$HOME/Log_of_GnomeBB

#The new menu BB named:
NEW=GnomeMenu
MENU=$HOME/$NEW

#The next tree functions makes a ping-pong recursive
function CreateExec()
{
echo -ne "#"
echo -n "Creando ejecutable $1">>$LOG
name=`grep "^Name" $1 | tr "= " "/*"`
exec=`grep "^Exec" $1 | tr "= " "/*"`
name=`basename $name`
exec=`basename $exec`
name=`echo $name | tr "*" " "`
exec=`echo $exec | tr "*" " "`
echo "  [exec] ($name) {$exec}">>$MENU  
}

function CreateSub()
{
echo
echo "NEW SUBMENU" 
echo -n "Including folder : "
        echo "Creando subcarpeta" >>$LOG
        name=`basename $1`
        echo "[submenu] ($name)">>$MENU
        recursive $1
        echo "[end]">>$MENU
}

function recursive()
{
for f in `ls $1`; do
test -d $1/$f && CreateSub $1/$f
test -f $1/$f && CreateExec $1/$f
done
}
echo "[begin] (Gnome Menu)">$MENU
recursive $dir
echo "[exit] (Exit)">>$MENU
echo "[end]">>$MENU
echo
echo "It's OK;  This script created two file : "
echo "          $LOG"
echo "          $MENU"
echo "Copy $NEW in your blackbox menues path" 
echo "and change session.menuFile in .blackboxrc to this name."
echo "Tree days ago i sent a script to make this automatic and it had"
echo "seleccted inter menu."
echo "Sorry for my english :-)"         

Reply via email to