Глава 4. Настройка kdm

В этой главе предполагается, что kdm в вашей системе уже установлен, и вы просто хотите более полно настроить его.

When kdm starts up, it reads its configuration from the folder $KDEDIR/share/config/kdm/ (this may be /etc/kde4/kdm/ or something else on your system).

Основной конфигурационный файл - kdmrc, он содержит ссылки на остальные файлы, которые могут находиться где угодно в системе, причём обычно это не вызывает проблем. Единственное исключение - ссылки на конфигурационные файлы уже установленного xdm. При установке kdm использует их, если находит уже установленный xdm.

kdm запускается перед входом в систему любого пользователя, он не связан с каким-либо одним пользователем. Поэтому невозможно иметь отдельные конфигурационные файлы для каждого пользователя, для всех используется один общий файл kdmrc. Конфигурация kdm может быть изменена только пользователями, имеющими права записи в файл$KDEDIR/share/config/kdm/kdmrc (обычно это системные администраторы, входящие в систему под именем root).

You can view the kdmrc file currently in use on your system, and you can configure kdm by editing this file. Alternatively, you can use the graphical configuration tool provided by the Системные параметры (the Login Screen module in the System Administration category).

The remainder of this chapter describes configuration of kdm via the Системные параметры module, and the next chapter describes the options available in kdmrc itself. If you only need to configure for local users, the Системные параметры module should be sufficient for your needs. If you need to configure remote logins, or have multiple kdm sessions running, you will need to read on.

The Login Manager Системные параметры Module

Thomas Tanghus

Steffen Hansen

Mike McBride

В этом модуле вы можете настроить различные параметры kdm, диспетчера входа в систему KDE, а именно: его внешний вид, список пользователей, которым разрешается входить в систему, и пользователей, которым разрешается выключать компьютер.

Замечание

All settings will be written to the configuration file kdmrc, which in its original state has many comments to help you configure kdm. Using this Системные параметры module will strip these comments from the file. All available options in kdmrc are covered in Глава 5, Конфигурационные файлы kdm.

The options listed in this chapter are cross referenced with their equivalents in kdmrc. All options available in the Системные параметры module are also available directly in kdmrc but the reverse is not true.

In order to organize all of these options, this module is divided into several sections: General, Dialog, Background, Theme, Shutdown, Users and Convenience.

Вы можете переключаться между разделами, используя вкладки вверху окна.

Замечание

You can only make changes if you run this module with superuser rights.

General

First you have a drop down box to choose the language for your login box, corresponding to setting Language in kdmrc.

In the Appearance section you have an option to use kdm in themed mode. If Use themed greeter is checked, the settings on the Dialog and Background pages cannot be configured separately.

While KDE's style depends on the settings of the user logged in, the style used by kdm can be configured using the GUI style: and Color scheme: options. These correspond to the keys GUIStyle and ColorScheme in kdmrc respectively.

From the Fonts section of this page you can change the fonts used in the login window. Only fonts available to all users are available here, not fonts you have installed on a per user basis.

You can select three different font styles in this section (General:, Failure:, Greeting:). When you click on the Choose... button a dialog appears from which you can select the new characteristics for the font style.

  • Шрифт типа Текстиспользуется во всех случаях, кроме указанных ниже.

  • The Failure: font is used when a login fails.

  • Шрифт приглашения используется в заголовке окна (строка приглашения).

Установите флажок Использовать сглаживание шрифтов, если вы хотите, чтобы шрифты окна входа в систему имели более плавные очертания.

Dialog

Здесь вы можете настроить внешний вид kdm, диспетчера входа в систему из пакета KDE.

Строка приглашения - это заголовок окна входа в систему. Использование этой настройки особенно удобно, если пользователи могут входить в несколько систем. Вы можете употреблять различные метки-заполнители (комбинации символов, которые программа заменит некоторым значением). Они описаны в файле kdmrc, в комментариях к опции GreetString.

При входе пользователя система может отображать в окне входа текущее время, логотип либо не отображать ничего. Сделайте выбор с помощью переключателей Область расположения логотипа. Это соответствует параметру LogoArea в kdmrc.

Если вы выбрали Показать логотип, вы можете указать изображение:

  • Перетащите файл изображения на кнопку логотипа.

  • Нажмите на кнопку и выберите изображение с помощью диалогового окна.

If you do not specify a logo, the default $KDEDIR/share/apps/kdm/pics/kdelogo.xpm will be displayed.

Normally the login box is centered on the screen. Drag the anchor to move the center of the dialog to the desired position. Keyboard control is possible as well: Use the arrow keys or Home to center. Note that the actual proportions of the dialog are probably different. These correspond to the key GreeterPos in kdmrc.

Background

Here you can change the desktop background which will be displayed before a user logs in. Selecting Enable background allows you to edit the options on this tab.

This tab is comprised of three areas:

  1. An area for selecting background images

  2. The background Preview Monitor

  3. An area for determining the background color

Preview Monitor

This is a preview window. It will give you a sense of what to expect with each change.

Background

This section allows you to load a wallpaper on top of the color gradient chosen in the section below.

There are three choices available here:

No Picture

No picture background will be shown. The color and pattern choices below will still take effect.

Picture

A single picture will be used as the background for the selected desktops.

How this picture is positioned and scaled can be fine tuned below.

Slide show

KDE allows you to have an automatic slide show of wallpaper images. To enable this option, press the Setup... button. In the resulting dialog you may choose any image or folder of images available on your computer, using the Add... button to navigate your file system. Remove will remove the currently selected entry from the list.

You may choose the length of time any image is displayed in the Change picture after: box, and you may choose Show pictures in random order if you don't want them displayed in the order they are listed.

Подсказка

Displaying wallpaper requires that the image be kept in memory. If you are low on memory, using a small, tiled image or none at all is recommended.

Scaling or centering a small image still requires an image the size of your display to be maintained in memory.

Options

Position:

В центре

The image will be centered on the screen without changing the size of the image. The background colors will be present anywhere the image does not cover.

Черепицей

Копии рисунка заполнят весь рабочий стол. Первый рисунок будет расположен в верхнем левом углу экрана.

Черепицей от центра

Копии рисунка заполнят весь рабочий стол. Первый рисунок будет расположен в центре экрана.

По центру с масштабированием

Рисунок будет помещён в центр экрана и увеличен под размер рабочего стола. Пропорции рисунка не изменятся, поэтому он не будет искажён.

Tiled Maxpect

The image will be placed in the corner of the screen. It will be scaled to fit the desktop, but it will not change the aspect ratio of the original image. This will provide you with an image that is not distorted. If there is any space over, the image will be duplicated to fill it.

На весь рабочий стол

The image will be scaled to fit the desktop. It will be stretched to fit to all four corners. This may distort the image.

Centered Auto fit

If the picture fits the desktop size, this mode works like the centered option. If the picture is larger than the desktop then it is scaled down to fit while keeping the aspect ratio.

Scale & Crop

Magnify the picture without distorting it until it fills both the width and height of the desktop (cropping the picture if necessary), and then center it on the desktop.

Colors:

The first drop down box allows you to choose the type of color, gradient, or pattern to display under (or in place of) wallpaper.

Подсказка

If you are going to be using a picture as a wallpaper, you can skip this section of the dialog box.

However, if your chosen wallpaper does not cover the entire desktop, the chosen colors will still show in the remaining space.

Single Color

By choosing this mode, you select one color using the first color bar, and the entire background is covered with this one color.

Горизонтальный градиент

By choosing this mode, you select two colors (using both color buttons). KDE will then start with the primary color selected with the left button on the left edge of the screen, and slowly transform into the blend color selected with the right button by the time it gets to the right edge of the screen.

Вертикальный градиент

By choosing this mode, you select two colors (using both color buttons). KDE will then start with the primary color selected with the left button on the top edge of the screen, and slowly transform into the blend color selected with the right button as it moves to the bottom of the screen.

Пирамидальный градиент

By choosing this mode, you select two colors (using both color buttons). KDE will then start with the primary color selected with the left button in each corner of the screen, and slowly transform into the blend color selected with the right button as it moves to the center of the screen.

Крестообразный градиент

By choosing this mode, you select two colors (using both color buttons). KDE will then start with the primary color selected with the left button in each corner of the screen, and slowly transform into the blend color selected with the right button as it moves to the center of the screen. The shape of this gradient is different than the pyramid gradient.

Эллиптический градиент

By choosing this mode, you select two colors (using both color buttons). KDE will then start with the blend color selected with the right button in the center of the screen, and slowly transform into the primary color selected by the left button as it moves to the edges, in an elliptical pattern.

Узор

The rest of the list are the names of various patterns or textures you can choose.

For more on patterns, see the section Adding, Removing and Modifying Patterns.

Select the primary color with the first color bar. If you have chosen a pattern that requires two colors to be set the secondary color can be set by pressing the appropriate button.

Blending:

The drop down box labeled Blending: contains the options to make a smooth transition (blend) from the wallpaper as it changes to the background.

  1. A drop down box allows you to select the blending mode. Many of the modes are similar to blending modes for background colors. Select your mode from the list, and the preview window shows you what it will look like.

  2. The Balance slider adjusts the blending. The results can be seen immediately in the preview window.

  3. The Reverse roles can reverse the role of the picture and the background for some types of blending.

Advanced options

Located below the preview monitor is a button labeled Advanced Options.

To use an external program to determine and change the background of KDE, simply select Use the following program for drawing the background. Available KDE programs are listed, select one to enable it.

Adding, Removing and Modifying Wallpapers and Patterns

There is a button under the preview monitor labeled Get New Wallpapers that helps you fetch new wallpaper images from a selection of popular images from the KDE-Look website. You can of course select any image you have available to use as wallpaper, and it may be stored in any location on your hard drive. To have a wallpaper show up in the list automatically for all users, you should save it to the $KDEDIR/share/wallpapers folder.

A pattern is a picture file which KDE uses as a template to draw your background. The picture file provides the shapes, but KDE provides the colors. KDE is packaged with several patterns, and you also can add new patterns.

To add a new pattern that is available to every user on your computer, simply place the file in $KDEDIR/share/apps/kdm/patterns/.

Copy a .desktop file from this folder, and name it the same as your new pattern image file. Modify the contents to suit your new pattern.

To add a new pattern for a single user, add the files to $KDEHOME/share/apps/kdm/patterns/.

For best results, the pattern should be a grayscale PNG file.

Theme

This page consists of three sections:

A list of installed themes, where you can select the one to be used.

A screenshot with a preview of the selected theme and additional information like Copyright and Description.

Three buttons to install or remove a theme and a button to launch the Get Hot New Stuff dialog where you can download new themes.

Замечание

The settings on this page are only available in themed mode.

Выключение компьютера

Разрешить выключать компьютер

Данный выпадающий список используется для выбора пользователей, имеющих право завершать работу системы:

  • Никому: никто не сможет выключить компьютер с помощью kdm, для этого необходимо будет войти в систему.

  • Каждому: любой пользователь может выключить компьютер с помощью kdm.

  • Только root: перед выключением компьютера kdm запросит пароль root.

Вы можете отдельно настроить, каким пользователям разрешено выключать компьютер с консоли и используя удалённый доступ.

Команды

Используйте эти поля, чтобы задать команды выключения.

The Halt: command defaults to /sbin/halt. The Reboot: command defaults to /sbin/reboot.

When Boot manager is set to Grub or Lilo, kdm will on reboot offer you options for these boot managers. Note that this option is not available on all operating systems.

Пользователи

Здесь вы можете выбрать способ представления пользователей в окне входа в систему.

Independently of the users you specify by name, you can use the System UIDs to specify a range of valid UIDs that are shown in the list. By default user id's under 1000, which are often system or daemon users, and user id's over 30000, are not shown.

You may disable the user list in kdm entirely in the Users section. You can choose from:

Show list

Only show users you have specifically not excluded in the list alongside

If you do not check this box, no list will be shown. This is the most secure setting, since an attacker would then have to guess a valid login name as well as a password. It is also the preferred option if you have more than a handful of users to list, or the list itself would become unwieldy.

Autocompletion

If this option is checked, kdm will automatically complete user names while they are typed in the line edit.

Обратное выделение

Allows you to instead select a list of users that should be shown, and all other users will not be listed.

Вы можете включить опцию Сортировать пользователей, чтобы сортировать пользователей в списке по алфавиту. Если опция отключена, пользователи будут выведены в порядке, в котором они перечислены в файле паролей. kdm будет также дополнять имя пользователя при вводе, если включить Автодополнение

Если ваш выбор - показывать пользователей, в окне входа в систему будет выведен список пользователей с выбранными рисунками. Перед входом пользователь выбирает имя/рисунок и вводит пароль.

If you permit a user image, then you can configure the User Image Source:

Here you can specify where kdm will obtain the images that represent users. System represents the global folder; these are the pictures you can set below. User means that kdm should read the user's $HOME/.face.icon file. The two selections in the middle define the order of preference if both sources are available.

Если вы решите не показывать изображения пользователей, окно входа в систему будет выглядеть более традиционно. Чтобы войти в систему, пользователям необходимо будет ввести имя и пароль. Этот выбор предпочтителен, если на вашем компьютере много пользователей.

Удобства

In the Convenience tab you can configure some options that make life easier for lazy people, like automatic login or disabling passwords.

Важно

Хорошо подумайте перед тем, как использовать эти параметры. Каждая из них нарушает безопасность вашей системы. Используйте их только в системе, полностью не нуждающейся в безопасности, например, на личном домашнем компьютере.

Автоматический вход в систему

Automatic login will give anyone access to a certain account on your system without doing any authentication. You can enable it using the option Enable Auto-Login.

Вы можете выбрать учётную запись, используемую для автоматического входа в систему, из списка Пользователь:.

With Lock session the automatically started session will be locked immediately (provided it is a KDE session). This can be used to obtain a super-fast login restricted to one user.

Automatic login can be suppressed by pressing the Shift key immediately after the X-Server switches to graphics mode and releasing it when kdm's hourglass cursor appears.

Preselected User

Вы также можете задать, какой пользователь будет «выбран» при запуске kdm. По умолчанию указан пункт Никого, но вы можете выбрать Предыдущий, чтобы kdm было выведено имя последнего пользователя, входившего в систему, также вы можете указать конкретного пользователя, который всегда будет выбран в списке. kdm может устанавливать фокус в поле ввода пароля, так что когда перед вами будет окно входа в систему kdm, вы сразу сможете вводить пароль.

Вход без пароля

Using this feature, you can allow certain users to login without having to provide their password. Enable this feature using the Enable Password-Less Logins option.

Под этим переключателем находится список пользователей системы. Чтобы включить беспарольный вход для отдельных пользователей, установите флажок рядом с их именами. По умолчанию эта опция отключена для всех пользователей.

Важно

Напомним, что эту опцию следует использовать только на компьютерах, не нуждающихся в безопасности. Если вашей машиной пользуются посторонние люди, позаботьтесь, чтобы этой возможностью обладали только пользователи с очень ограниченными правами, например, guest.

Автоматический вход в систему после сбоя Х-сервера позволит вам войти в систему, пропустив процедуру регистрации, после сбоя Х-сервера.