Siduction Forum

Siduction Forum => Scripting & Kernelhacking => Scripts & Kernelhacking (DE) => Topic started by: gorzka on 2020/04/17, 08:05:48

Title: [gelöst] Tilix starten und script ausführen
Post by: gorzka on 2020/04/17, 08:05:48
ich habe folgendes Script:
Code: [Select]
#!/bin/bash
show_menu(){
    NORMAL=`echo "\033[m"`
    MENU=`echo "\033[36m"` #Blue
    NUMBER=`echo "\033[33m"` #yellow
    FGRED=`echo "\033[41m"`
    RED_TEXT=`echo "\033[31m"`
    ENTER_LINE=`echo "\033[33m"`
    echo -e "${MENU}*********************************************${NORMAL}"
    echo -e "${MENU}**${NUMBER} 1)${MENU} Drachen von Laas ${NORMAL}"
    echo -e "${MENU}**${NUMBER} 2)${MENU} Hexuma ${NORMAL}"
    echo -e "${MENU}**${NUMBER} 3)${MENU} Jonathan ${NORMAL}"
    echo -e "${MENU}**${NUMBER} 4)${MENU} Die Kathedrale ${NORMAL}"
    echo -e "${MENU}**${NUMBER} 5)${MENU} Das Stundenglas ${NORMAL}"
    echo -e "${MENU}**${NUMBER} 6)${MENU} Soul Crystal ${NORMAL}"
    echo -e "${MENU}*********************************************${NORMAL}"
    echo -e "${ENTER_LINE}Nummer eingeben oder ${RED_TEXT}ENTER für Ende. ${NORMAL}"
    read opt
}
function option_picked() {
    COLOR='\033[01;31m' # bold red
    RESET='\033[00;00m' # normal white
    MESSAGE=${@:-"${RESET}Error: No message passed"}
    echo -e "${COLOR}${MESSAGE}${RESET}"
}

clear
show_menu
while [ opt != '' ]
    do
    if [[ $opt = "" ]]; then
            exit;
    else
        case $opt in
        1) clear;
        option_picked "Drachen von Laas";
        ./dosbox -conf ./1/dosbox.conf
        clear;
        exit;
        ;;

        2) clear;
        option_picked "Hexuma";
        ./dosbox -conf ./2/dosbox.conf
        clear;
        exit;
        ;;

        3) clear;
        option_picked "Jonathan";
        ./dosbox -conf ./3/dosbox.conf
        clear;
        exit;
        ;;

        4) clear;
        option_picked "Die Kathedrale";
        ./dosbox -conf ./4/dosbox.conf
        clear;
        exit;
        ;;

        5) clear;
        option_picked "Das Stundenglas";
        ./dosbox -conf ./5/dosbox.conf
        clear;
        exit;
        ;;

        6) clear;
        option_picked "Soul Crystal";
        ./dosbox -conf ./6/dosbox.conf
        clear;
        exit;
        ;;

        x)exit;
        ;;

        \n)exit;
        ;;

        *)clear;
        option_picked "Pick an option from the menu";
        show_menu;
        ;;
    esac
fi
done

Als DE habe ich Budgie installiert und möchte nun folgendes. Es soll sich tilix öffnen und dann das Script ausführen um meine Auswahl zu treffen. Wie kann ich das machen? Es gibt zwar die Möglichkeit im Hauptmenü "im Terminal ausführen" aber irgendwie greift das nicht, da ich gnome-terminal nicht installiert habe.
Title: Re: Tilix starten und script ausführen
Post by: gorzka on 2020/04/17, 10:08:38
ich habe es gefunden:
Code: [Select]
tilix -w '/opt/spiele' -e ./script.sh

Vielleicht braucht es ja mal jemand