- ArchLinux — кратко о загрузчике SLiM
- January 15, 2013
- Установка загрузчика SLiM в ArchLinux
- Наиболее полезные параметры
- Полезные команды SLiM
- TypeScript — размеченные объединения
- Linux slim что это
- Contents
- Installation
- Configuration
- Enabling SLiM
- Environments
- Set default username
- Enable Autologin
- Theming
- Custom background
- Dual screen setup
- Other options
- Changing the cursor
- Match SLiM and Desktop Wallpaper
- Shutdown, reboot, suspend, exit, launch terminal from SLiM
- Power-off error with Splashy
- Power-off tray icon fails
- Login information with SLiM
- Custom SLiM Login Commands
- Gnome Keyring
- Setting DPI with SLiM
- Use a random theme
- Move the whole session to another VT
- Automatically mount your encrypted /home on login
- Change Keyboard Layout
- Screen Lock
- All Slim Options
- Troubleshooting
- Shutdown or Reboot Stalled
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 при его старте.
hidecursor false — Скрыть-показать курсор при вводе логинапароля. Возможные значения параметра — _true | false_. |
Полезные команды SLiM
Для остановки, перезагрузки, перевода в спящий режим компьютера или запуска эмулятора терминала из SLiM используются команды, представленные ниже.
Правильный порядок ввода их следующий:
- в поле username вводим команду (например, halt)
- в поле password вводим пароль root‘а.
- Запуск эмулятора терминала — команда console;
- Выключение компьютера — команда halt;
- Перезагрузка компьютера — команда reboot;
- Перевод компьютера в спящий режим — команда susliend;
- Перейти в консоль — команда 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
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.
Источник