Linux slim что это

ArchLinux — кратко о загрузчике SLiM

January 15, 2013

Установка загрузчика SLiM в ArchLinux

Краткий обзор конфигурационного файла. Команды включения, перезагрузки и выключения системы через SLim.

Установка в ArchLinux стандартная:

После успешной установки нужно отредактировать файл /etc/rc.conf. Если до этого в системе стоял GDM, можно удалить его, а можно закомментировать gdm и добавить slim в строку:

Поведение SLiM настраивается через конфигурационный файл /etc/slim.conf.

Наиболее полезные параметры

  • default_user simone — Если строка раскомментирована и выставлено имя пользователя в качестве ее значения, то поле username заполняется автоматически при входе в SLiM.
  • focus_password no — Параметр связан с параметром defaultuser. Активируется, если задействован параметр _default_user. В этом случае фокус автоматически устанавливается в поле password.
  • auto_login no — Автоматический вход в систему пользователя по умолчанию, указанного в параметре default_user. Для включения этой опции нужно выставить его значение на yes.
  • current_theme ArchLinux-simplyblack — Тема экрана приветствия SLiM. Все темы располагаются по адресу /usr/share/slim/themes/.
  • shutdown_msg The system is halting — Сообщение, выводимое на экран при выключении компьютера.
  • reboot_msg The system is rebooting — Сообщение, выводимое на экран при перезагрузке компьютера.
  • welcome_msg Welcome to %host — Сообщение-приветствие на экране.
  • screenshot_cmd import -window root /slim.png — Создание скриншота экрана SLiM. Действие команды привязано к клавише F11 клавиатуры.
  • sessions xfce4,icewm,wmaker,blackbox — Выбор сессии для запуска X-ов. То есть, если в системе стоят несколько WindowManager’ов или DE, как например — Xfce, KDE, GNOME, Openbox и т. д., все они указываются через запятую в качестве значения параметра sessions. Первый в списке является значением по-умолчанию. Для выбора нужного графического окружения при входе в SLiM нужно нажать клавишу F1. Параметр связан с командой login_cmd. Значение параметра sessions подставляется в качестве переменной %session.

После конфигурирования /etc/slim.conf нужно отредактировать файл

/.xinit следующим образом:

    login_cmd exec /bin/bash -login

/.xinitrc %session — Команда, выполняемая при успешном входе в систему (правильного ввода пары логинпароль). Стоит обратить внимание, что если в системе не установлен bash в качестве shell‘а, то следует заменить значение /bin/bash на тот shell, который используется в системе. Например, в FreeBSD нужно выставить /bin/sh вместо /bin/bash. Также можно добавить в строку переменную %theme для задания определенной темы SLiM при его старте.

  • halt_cmd /sbin/shutdown -h now — Команда выключения компьютера из SLiM.
  • reboot_cmd /sbin/shutdown -r now — Команда перезагрузки компьютера из SLiM.
  • console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T “Console login” -e /bin/sh -c “/bin/cat /etc/issue; exec /bin/login” — Запуск терминала консоли прямо из SLiM. Можно задать предпочитаемый эмулятор терминала, заменив xterm на свое, например, gnome-terminal, rxvt, aterm, mrxvt, materm, wterm, gnome-multi-terminal, eterm, rxvt-unicode (urxvt), mlterm, mliterm.
  • susliend_cmd /usr/sbin/susliend — Команда перевода компьютера в спящий режим из SLiM.
  • numlock on — Включение-отключение NumLock клавиатуры при запуске SLiM. Возможные значения параметра — on (включена), off (выключена).
  • hidecursor false — Скрыть-показать курсор при вводе логинапароля. Возможные значения параметра — _true false_.
  • Полезные команды SLiM

    Для остановки, перезагрузки, перевода в спящий режим компьютера или запуска эмулятора терминала из SLiM используются команды, представленные ниже.

    Правильный порядок ввода их следующий:

    • в поле username вводим команду (например, halt)
    • в поле password вводим пароль root‘а.
    1. Запуск эмулятора терминала — команда console;
    2. Выключение компьютера — команда halt;
    3. Перезагрузка компьютера — команда reboot;
    4. Перевод компьютера в спящий режим — команда susliend;
    5. Перейти в консоль — команда exit.

    archlinuxslim

    TypeScript — размеченные объединения

    > Пользовательское объединение типов — что это и как можно использоватьПомимо объединения **примитивных** типов данных (например):<% high. … Continue reading

    Источник

    Linux slim что это

    SLiM is an acronym for Simple Login Manager. Lightweight and easily configurable, SLiM requires minimal dependencies, and none from the GNOME or KDE desktop environments. It therefore contributes towards a lightweight system for users that also like to use lightweight desktops such as Xfce, Openbox, and Fluxbox.

    Contents

    Installation

    Configuration

    SLiM can automatically detect installed desktop environments and window managers through the use of sessiondir /usr/share/xsessions/ in /etc/slim.conf . Those upgrading from a version before 1.3.6-2 must amend /etc/slim.conf and xinitrc, accordingly. See below.

    Enabling SLiM

    Enable the SLiM service slim.service . This assumes a previously enabled display manager was disabled first. Otherwise, change the default target.

    Environments

    The factual accuracy of this article or section is disputed.

    To configure SLiM 1.3.6-2 (or later) to load a particular environment, it will be necessary to edit both /etc/slim.conf and

    First, edit /etc/slim.conf in order to hash out sessiondir /usr/share/xsessions/ . This will consequently disable automatic detection of installed environments:

    Users who installed a prior version of SLiM will have to replace sessions with the new command.

    Users who installed a prior version of SLiM will have to replace case $1 in [. ] esac , where used. To clarify, below is an example of the deprecated method to select multiple sessions. The entire code provided below would simply be replaced with exec $1 :

    Set default username

    SLiM can be configured to automatically set a desired username, which will therefore already be completed. The password field will also already be focused by default. Change the following line in /etc/slim.conf :

    Uncomment this line, and change «simone» to the username of choice:

    Enable Autologin

    Edit /etc/slim.conf to uncomment the auto_login command and replace no with yes :

    Theming

    Install the slim-themes package. The archlinux-themes-slim packages contains several different themes (slimthemes.png). Look in the directory of /usr/share/slim/themes to see the themes available. Enter the theme name on the current_theme line in /etc/slim.conf :

    You can preview a theme while Xorg is running with:

    To close, type «exit» in the Login line and press Enter.

    Additional theme packages can be found in the AUR. See the theme documentation for how to customize your theme or make your own. SLiM does not support alternative theme directories, so it is recommended to create a package for your custom theme so that pacman is aware of it.

    Custom background

    SLiM is hard-coded to load background.png or background.jpg (in that order) from your theme directory. Simply overwrite the appropriate file

    Dual screen setup

    You can customize the slim theme in /usr/share/slim/themes/ /slim.theme to turn these percents values. The box itself is 450 pixels by 250 pixels:

    into pixels values:

    If your theme has a background picture you should use the background_style setting (stretch, tile, center or color) to get it correctly displayed.

    Other options

    Changing the cursor

    After installing, edit /etc/slim.conf and uncomment the line:

    This will give you a normal arrow instead. This setting is forwarded to xsetroot -cursor_name . You can look up the possible cursor names here or in /usr/share/icons/ /cursors/ .

    To change the cursor theme being used at the login screen, see Cursor themes#XDG specification.

    Match SLiM and Desktop Wallpaper

    To share a wallpaper between SLiM and your desktop, rename the used theme background, then create a link from your desktop wallpaper file to the default SLiM theme:

    Shutdown, reboot, suspend, exit, launch terminal from SLiM

    You may shutdown, reboot, suspend, exit or even launch a terminal from the SLiM login screen. To do so, use the values in the username field, and the root password in the password field:

    • To launch a terminal, enter console as the username (defaults to xterm which must be installed separately. edit /etc/slim.conf to change terminal preference)
    • For shutdown, enter halt as the username
    • For reboot, enter reboot as the username
    • To exit to bash, enter exit as the username
    • For suspend, enter suspend as the username. Suspend is disabled by default, edit /etc/slim.conf as root to uncomment the suspend_cmd line and, if necessary, modify the suspend command itself (by e.g. changing /usr/sbin/suspend to sudo /usr/sbin/pm-suspend ).

    Power-off error with Splashy

    If you use Splashy and SLiM, sometimes you cannot power-off or reboot from menu in GNOME, Xfce, LXDE or others. Check your /etc/slim.conf and /etc/splash.conf ; set the DEFAULT_TTY=7 same as xserver_arguments vt07 .

    Power-off tray icon fails

    If your power off tray icon fails, it could be due to not having root privileges. To start a tray icon with root privileges, be sure to have SLiM start the program. Edit /etc/slim.conf as follows:

    Login information with SLiM

    By default, SLiM fails to log logins to utmp and wtmp which causes who, last, etc. to misreport login information. To fix this edit your slim.conf as follows:

    Custom SLiM Login Commands

    You can also use the sessionstart_cmd/sessionstop_cmd in /etc/slim.conf to log specific infomation, such as the session, user, or theme used by slim:

    Or if you want to play a song when slim loads (and you have the beep program installed)

    Gnome Keyring

    See GNOME Keyring#Using the keyring outside of GNOME [broken link: invalid section] to use GNOME Keyring in a custom session.

    Setting DPI with SLiM

    The Xorg server generally picks up the DPI but if it does not you can specify it to SLiM. If you set the DPI with the argument -dpi 96 in /etc/X11/xinit/xserverrc it will not work with SLiM. To fix this change your slim.conf from:

    Use a random theme

    Use the current_theme variable as a comma separated list to specify a set from which to choose. Selection is random.

    Move the whole session to another VT

    If tty terminals 3-6 are not used and commented out (You may use screen and therefore only need one terminal), change /etc/slim.conf to move the X server:

    Simply change the vt07 to for example vt03 as no agetty is started there.

    Automatically mount your encrypted /home on login

    Change Keyboard Layout

    Edit /etc/X11/xorg.conf.d/10-evdev.conf , find the following section, add the two bolded lines, and replace dvorak with your preferred keymap:

    Screen Lock

    Slim includes slimlock, a screen lock feature. To use it, just run slimlock.

    Slimlock reads some configuration from /etc/slim.conf and its own configuration file /etc/slimlock.conf.

    To prevent VT switching whilst locked, set tty_lock to 1 in slimlock.conf. This also requires that that you have write access to /dev/console and that slimlock has the sys_sys_tty_config capability. One way to achieve this is set slimlock to suid root:

    An alternative is to setcap and permit your uid to write to /dev/console.

    You can use xss-lock to lock the screen automatically:

    All Slim Options

    Here is a list of all the slim configuration options and their default values.

    sessionstart_cmd allows %user (executed right before login_cmd) and it is also allowed in sessionstop_cmd

    login_cmd allows %session and %theme

    Option Name Default Value
    default_path /bin:/usr/bin:/usr/local/bin
    default_xserver /usr/bin/X
    xserver_arguments vt07 -auth /var/run/slim.auth
    numlock
    daemon yes
    xauth_path /usr/bin/xauth
    login_cmd exec /bin/bash -login

    /.xinitrc %session halt_cmd /sbin/shutdown -h now reboot_cmd /sbin/shutdown -r now suspend_cmd sessionstart_cmd sessionstop_cmd console_cmd /usr/bin/xterm -C -fg white -bg black +sb -g %dx%d+%d+%d -fn %dx%d -T screenshot_cmd import -window root /slim.png welcome_msg Welcome to %host session_msg Session: default_user focus_password no auto_login no current_theme default lockfile /var/run/slim.lock logfile /var/log/slim.log authfile /var/run/slim.auth shutdown_msg The system is halting. reboot_msg The system is rebooting. sessiondir /usr/share/xsessions/ hidecursor false input_panel_x 50% input_panel_y 40% input_name_x 200 input_name_y 154 input_pass_x -1 input_pass_y -1 input_font Verdana:size=11 input_color #000000 input_cursor_height 20 input_maxlength_name 20 input_maxlength_passwd 20 input_shadow_xoffset 0 input_shadow_yoffset 0 input_shadow_color #FFFFFF welcome_font Verdana:size=14 welcome_color #FFFFFF welcome_x -1 welcome_y -1 welcome_shadow_xoffset 0 welcome_shadow_yoffset 0 welcome_shadow_color #FFFFFF intro_msg intro_font Verdana:size=14 intro_color #FFFFFF intro_x -1 intro_y -1 background_style stretch background_color #CCCCCC username_font Verdana:size=12 username_color #FFFFFF username_x -1 username_y -1 username_msg Please enter your username username_shadow_xoffset 0 username_shadow_yoffset 0 username_shadow_color #FFFFFF password_x -1 password_y -1 password_msg Please enter your password msg_color #FFFFFF msg_font Verdana:size=16:bold msg_x 40 msg_y 40 msg_shadow_xoffset 0 msg_shadow_yoffset 0 msg_shadow_color #FFFFFF session_color #FFFFFF session_font Verdana:size=16:bold session_x 50% session_y 90% session_shadow_xoffset 0 session_shadow_yoffset 0 session_shadow_color #FFFFFF

    Troubleshooting

    Shutdown or Reboot Stalled

    There is a bug or known issue with the combination of SLiM, Xfce and systemd that does not let the system to properly shutdown and systemd waits for the SLiM service to end, but eventually is terminated.

    Источник

    Читайте также:  Как запустить aimp с windows
    Оцените статью