SDB:YaST trucs

Ga naar: navigatie, zoeken

De installatie van een merk voorzien

Voor het testen van uw stijl gebruikt u het bestand Wizard2.ycp.

De stijl bestaat uit een cascade-stijlblad (css) bestand ( met .qss extensie ) en illustraties & afbeeldingen die u gebruikt in het stijlblad.

Standaard gebruikt YaST style.qss die zich bevindt in /usr/share/YaST2/theme/current/wizard . Voor de installatie wordt echter het bestand installation.qss gebruikt.

U kunt tijdens de uitvoering wijzigen welke stijl YaST gebruikt.

Y2STYLE=installation.qss /usr/lib/YaST2/bin/y2base ./Wizard2.ycp qt

Gebruik de bewerker van het stijlblad (Crtl-Shift-Alt-S) om het stijlblad tijdens uitvoeren te wijzigen.

Dit artikel is nog maar gedeeltelijk vertaald. Als u mee wilt helpen met vertalen lees dan Wiki vertalen naar het Nederlands.
branding only works with the Qt user interface backend. Currently the Gtk toolkit does not provide such capabilities. However, on the installation, Qt is always used.

Look at the installation.qss file, and you will figure out which sections of the installation screen are defined as classes and ids in the stylesheet.

To give each widget a theme, look at this tutorial or refer to the documentation.

YaST Hotkeys

The following hotkeys are enabled in the Qt/X11 GUI

Ctrl-Alt-Shift-X 
open a terminal window (xterm), useful for VNC installs
Shift-F7 
Debug level
Ctrl-Shift-D 
Debug module write
Print key 
Screenshot
Shift-F8 
Save logs to
Shift-F4 
Accesibility, Switch to vision impaired palette.
Ctrl-Shift-Alt-M 
Start/Stop macro recorder
Ctrl-Shift-Alt-P 
Play macro
Ctrl-Shift-Alt-T 
Dump widget tree
Ctrl-Shift-Alt-Y 
Dump widget tree
Ctrl-Shift-Alt-S 
Style Sheet Editor

Invoking terminal from YaST

Sometimes it is useful, or even necessary, to get a text console in the middle of the installation.

There are three ways to do this

non-remote text mode 
consoles can be normally switched with Ctrl+F1, Ctrl+F2, etc.
non-remote graphical mode 
use Ctrl+Alt+F1, Ctrl+Alt+F2 etc., and Ctrl+Alt+F7 to return to the graphical installer.
remote graphical installation 
where hardware console switching is not available, use Ctrl+Alt+Shift+X to open a text-mode terminal within the graphical installer

There is a root shell open on the consoles (except those that show system messages), and basic shell commands are available.

Color theme for YaST in text mode

Set your favorite color theme

The default setting of the YaST ncurses UI is that the init routine detects the terminal type and automatically chooses the appropriate color theme.

Since openSUSE 10.3 it's possible to set the color theme manually in /etc/sysconfig/yast2. E.g. if you want a black/white YaST set Y2NCURSES_COLOR_THEME to "mono".

## Type: string(linux,xterm,rxvt,mono,braille)
## Default: ""
# Color theme for YaST ncurses UI
# xterm: blue-white-red
# linux: blue-white-yellow
# rxvt: black-yellow-red
# mono: white-black
# braille: for visually impaired
Y2NCURSES_COLOR_THEME = "mono"

Additionally the braille style can be enabled by setting the environment variable Y2_BRAILLE.

Create a customized color theme

If you want to change an existing color theme there is the possibility to get a style edit popup. With it you are able to configure the color settings for a certain terminal type. After creating the new style (a new header file NCstyle.<style>.h), yast2-ncurses has to be recompiled. How to get and compile the YaST sources see YaST development.

First set the environment:

  export Y2NCDBG=1

Then set the color theme in /etc/sysconfig/yast2 accordingly to what you want to change (or use the appropriate terminal) and start YaST ncurses UI or a YaST module.

 yast			or
 yast <module>

Press keys:

 Ctrl d S    

The style edit popup will appear. Use keys below to configure your own textmode style:

 F1/F2    toggle styles    (default, info, warning, popup style)
 F3/F4    select widget
 F5       move pad mode    (move with cursor keys)
 F6       example dialog
 F7
 F8       restore style from /tmp/...
 F9       save style to /tmp/...
 F10      quit
 KEY_HOME/KEY_END         set foreground
 KEY_PPAGE/KEY_NPAGE      set background
 a ASCII chars
 b toggle bold
 n normal
 l blink
 s standout
 u underline
 r reverse
 d dim
 i invis
Save the style settings with F9

The header file is written to /tmp (e.g. NCstyle.xterm.h). Quit the edit dialog with F10.

Copy this file to your source directory and recompile yast2-ncurses with the new header file.

Using YaST in text mode

Starting

YaST in text mode is started if no X server is available on the system, it can be used remotely or is prefered by users who like simple look and key navigation more than graphical UI.

To start the YaST Control Center in text mode simply type 'yast' on command line e.g. in an xterm or in konsole. Make sure you are logged in as user root (like by typing 'su -').

   yast

Text-mode YaST uses the ncurses library to create the text user interface.

Navigation in text mode

The mostly used keys are TAB and Shift+TAB to move forward/backward in modules, the arrow keys to move up/down or left/right in lists, the shortcuts (press ALT+highlighted letter) and ENTER to execute the selected action or activate a menu item. For detailed description of the keys used for text mode navigation see: Navigation in Modules.

Also look at section Restriction of Key Combinations. Some keys or key combinations might be occupied by the window mangager. Because of that there are keys to use as a substitute, e.g. use Ctrl+F and Ctrl+B to move forward and backward or use ESC+letter for shortcuts.

Sorting of tables

Pressing Ctrl 'o' while the focus is on a table widget will open a popup containing the list of table headers. Choose the header of the column you want to use for sorting and press ENTER. The table contents will be sorted accordingly. From openSUSE 11.2 on it's possible to sort in reverse order by choosing same column again. The usage of the ncurses Package Selector is also improved, sorting by size works correctly now.

Other

There are some other key combinations mainly meant for testing and debugging.

Ctrl 'l'               Screen refresh
Ctrl 'd' Shift 'd'     Dump dialog to y2log file (screen shot)
Ctrl 'd' Shift 'y'     Show widget hierarchy (YDialogSpy) see  YDialogSpy

Articles

Links