Author: jsrain Date: Tue Jan 8 10:42:31 2008 New Revision: 43315 URL: http://svn.opensuse.org/viewcvs/yast?rev=43315&view=rev Log: offer possibility to define UI via cmdline parameter (#348817) Modified: trunk/yast2/doc/yast2.8 trunk/yast2/package/yast2.changes trunk/yast2/scripts/yast2 Modified: trunk/yast2/doc/yast2.8 URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/doc/yast2.8?rev=43315&r1=43314&r2=43315&view=diff ============================================================================== --- trunk/yast2/doc/yast2.8 (original) +++ trunk/yast2/doc/yast2.8 Tue Jan 8 10:42:31 2008 @@ -62,6 +62,18 @@ .SH OPTIONS .\" .TP +.B --qt +Run YaST in the QT graphical frontend +.\" +.TP +.B --gtk +Run YaST in the GTK graphical frontend +.\" +.TP +.B --ncurses +Run YaST in the ncurses text-mode frontend +.\" +.TP .B -g, --geometry Default window size (QT frontend only). .\" Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=43315&r1=43314&r2=43315&view=diff ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Tue Jan 8 10:42:31 2008 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Tue Jan 8 10:42:05 CET 2008 - jsrain@suse.cz + +- offer possibility to define UI via cmdline parameter (#348817) + +------------------------------------------------------------------- Fri Jan 4 10:47:10 CET 2008 - lslezak@suse.cz - Progress:: do not replace the subprocess widget, try to reuse the Modified: trunk/yast2/scripts/yast2 URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/scripts/yast2?rev=43315&r1=43314&r2=43315&view=diff ============================================================================== --- trunk/yast2/scripts/yast2 (original) +++ trunk/yast2/scripts/yast2 Tue Jan 8 10:42:31 2008 @@ -68,6 +68,9 @@ echo "OPTIONS:" echo " -h, --help this message" echo " -l, --list list all available modules" + echo " --qt use the QT graphical user interface" + echo " --gtk use the GTK graphical user interface" + echo " --ncurses use the NCURSES text-mode user interface" echo " -g, --geometry default window size (qt only)" echo " --noborder no window manager border for main window" echo " --fullscreen use full screen" @@ -169,7 +172,7 @@ fi } -TEMP=`/usr/bin/getopt -o hlg:s:Si --long help,list,kcontrol,geometry:,style:,strings,install,update,remove,fullscreen,noborder \ +TEMP=`/usr/bin/getopt -o hlg:s:Si --long help,list,kcontrol,geometry:,style:,strings,install,update,remove,fullscreen,noborder,qt,gtk,ncurses \ -n 'yast2' -- "$@"` if [ $? != 0 ] ; then echo "Exit." >&2 ; exit 1 ; fi @@ -188,6 +191,9 @@ --fullscreen) Y2QT_ARGS="$Y2QT_ARGS --fullscreen"; shift ;; --noborder) Y2QT_ARGS="$Y2QT_ARGS --noborder" ; shift ;; --kcontrol) Y2QT_ARGS="$Y2QT_ARGS --kcontrol_id YaST" ; shift ;; + --qt) CMDLINE_UI="qt" ; shift ;; + --gtk) CMDLINE_UI="gtk" ; shift ;; + --ncurses) unset DISPLAY ; shift ;; --) shift ; break ;; *) echo "Unrecognized option $1" ; exit 1 ;; @@ -216,7 +222,9 @@ case "`/usr/bin/basename $0`" in YaST|yast|yast1|zast) - unset DISPLAY + if [ -z "$CMDLINE_UI" ]; then + unset DISPLAY; + fi ;; esac @@ -241,6 +249,11 @@ source "$HOME/.yast2/yast2" fi +if [ ! -z "$CMDLINE_UI" ]; then + WANTED_GUI="$CMDLINE_UI" + WANTED_SHELL="$CMDLINE_UI" +fi + # Fallback GUI SELECTED_GUI=ncurses # if we have a DISPLAY, select a preferred GUI -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org