Xfce

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Xfce and the translation is 67% complete.
Outdated translations are marked like this.

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

Предварительные требования

Выбор профиля

Важно
Прочитайте соответствующую документацию перед выполнением любых изменений профиля

.

Using the basic desktop profile will provide a good set of defaults for Xfce. Other profiles can be used, but this gives a good balance between dependencies and usability, all else aside. To select the desktop profile:

root #eselect profile set default/linux/amd64/17.1/desktop

Исключение дополнительных зависимостей

app-text/poppler имеют +qt5 по умолчанию:

ФАЙЛ /etc/portage/package.use/xfceУдаление USE-флага qt5 для poppler
app-text/poppler -qt5

Конечно, -qt5 так же может быть установлен глобально в /etc/portage/make.conf.

xfce4-notifyd

This is an optional step to install xfce-extra/xfce4-notifyd in place of x11-misc/notification-daemon. Skip this section if the choice of notification daemon is unimportant.

Emerging xfce-base/xfce4-meta will pull in the virtual/notification-daemon dependency. This virtual dependency is designed to insure that Xfce will be provided with a notification-daemon, whatever suitable software the user chooses to fulfill this role.

By default, virtual/notification-daemon will satisfy this dependency by drawing in GNOME's x11-misc/notification-daemon package. Xfce users may prefer to use xfce-extra/xfce4-notifyd, if a notification-daemon has not already been installed.

By installing xfce-extra/xfce4-notifyd before emerging Xfce, the virtual package virtual/notification-daemon will use xfce4-notifyd, and pull in no other packages. Use the --oneshot option to avoid adding xfce4-notifyd to the world file:

root #emerge --ask --oneshot xfce-extra/xfce4-notifyd

Now proceed with the installation.

Установка

USE-флаги

USE flags for xfce-base/xfce4-meta The Xfce Desktop Environment (meta package)

minimal Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features)
pulseaudio Add support for PulseAudio sound server
svg Add support for SVG (Scalable Vector Graphics)
upower Enable power management support

Emerge

Emerge xfce-base/xfce4-meta for a default set of Xfce packages, to get a reasonably complete desktop environment:

root #emerge --ask xfce-base/xfce4-meta


The xfce-base/xfce4-meta package will provide the following user-facing applications, plus some libraries and system software:

Пакет Описание
x11-terms/xfce4-terminal Эмулятор терминала, хорошо сочетающийся с Xfce, гораздо более «дружественнее» стандартной программы xterm.
xfce-base/xfce4-panel Панель рабочего стола с пуском приложений, меню панелей, переключателем рабочего окружения и многим другим.
xfce-base/xfce4-settings Конфигурационная система для рабочего стола Xfce, предоставляющая инструменты настройки.
xfce-base/thunar Thunar — файловый менеджер Xfce.
xfce-base/xfce4-appfinder Поиск приложений.
xfce-base/thunar-volman Управляет переносными носителями и дисками.
xfce-base/tumbler Предпросмотр файлов в Thunar.
xfce-base/xfce4-power-manager Приложение для отображения и управления энергопотреблением (особенно важно для ноутбуков). Выберите режимы максимальной производительности или экономии заряда батареи. Отрегулируйте яркость экрана и настройте спящий режим, приостановку и действии при нажатии кнопки питания (то есть, когда крышка закрыта или нажата кнопка). Может предупреждать, когда батарея достигает определенного уровня или даже выключать машину. Включает в себя плагины панели для отображения состояния батареи/заряда и регулировки яркости.
xfce-extra/xfce4-pulseaudio-plugin Управление громкостью из панели. Для систем без pulseaudio возможна альтернатива в виде media-sound/volumeicon.

To see everything that is installed by xfce-base/xfce4-meta, see the dependency tab for that package on pgo.

Конечно, вместо meta-пакета можно устанавливать только необходимые компоненты, например:

Дополнительное программное обеспечение

Здесь приведены список дополнительных приложений, являющиеся частью Xfce.

Package Description
app-cdr/xfburn CD burning application.
app-editors/mousepad Lightweight text editor.
x11-themes/xfwm4-themes Several window-manager themes.
xfce-extra/thunar-archive-plugin Plugin for Thunar to work with archives; uses app-arch/file-roller.
xfce-extra/xfce4-battery-plugin Displays battery percentage, time remaining, power source (AC or battery), fan status, warnings, and can even be configured to execute commands at certain power levels, which can be used to put the laptop into hibernate mode when the battery is almost exhausted.
xfce-extra/xfce4-mount-plugin One-click mounting of devices listed in /etc/fstab.
xfce-extra/xfce4-sensors-plugin Monitor hardware sensors, such as CPU temperature, fan RPM, hard drive temp, motherboard voltage, and more.
xfce-extra/xfce4-verve-plugin A small command line embedded into the panel; quicker than opening up another terminal to run a command.

This is just a partial selection of packages available in the Gentoo repository, see p.g.o/categories/xfce-extra, or use eix (eix --category xfce-extra), to see packages from the xfce-extra category. See also https://www.xfce.org/projects/ for more information.

Следующие приложения хорошо работают в Xfce, довершая базовое окружение рабочего стола:

Пакет Описание
x11-misc/alacarte Редактор меню из GNOME хорошо работает в Xfce.
x11-terms/tilda Легковесный эмулятор терминала в стиле quake.

Использование

Запуск Xfce

Xfce can either be run from a terminal after login, launched automatically after login, or be started by a graphical display manager that will greet the user and ask for login details.

Запуск Xfce без менеджера дисплея

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

startx

Для startx создайте файл ~/.xinitrc и запишите в него:

ФАЙЛ ~/.xinitrcЗапуск xfce4 при запуске startx
exec startxfce4

If experiencing authorization or permissions issues, see the troubleshooting section.

startxfce4

Для запуска рабочего стола Xfce4 просто наберите startxfce4 в командной строке и нажмите enter:

user $startxfce4

Менеджер экрана

Для запуска Xfce можно использовать менеджер экрана. Обратитесь к статье display manager для его конфигурации.

Большинство менеджеров экрана используют файлы .desktop для настройки доступных сессий. Пример такого файла:

ФАЙЛ xfce4.desktop.desktop файл Xfce4 для менеджеров экрана
[Desktop Entry]
Encoding=UTF-8
Name=Xfce4
Comment=Use this session to run Xfce 4 as desktop environment
Exec=/usr/bin/startxfce4
Icon=/usr/share/pixmaps/xfce4_xicon1.png
Type=Application

Файл desktop может быть помещен в каталог дисплей менеджера.

Конфигурация

Xfce - это окружения рабочего стола и оно может быть настроено с учетом нужд каждого пользователя. В этом разделе раскрываются популярные аспекты.

Клавиши регулировки громкости

Установите xfce-extra/xfce4-volumed-pulse для управления клавишами регулировки громкости:

root #emerge --ask xfce-extra/xfce4-volumed-pulse

Для систем без pulseaudio возможна альтернатива в виде media-sound/tudor-volumed.

Запустите xfce4-keyboard-settings для привязки следующих клавиш:

  • volume up button: amixer set Master 5%+
  • volume down button: amixer set Master 5%-
  • mute button: amixer set Master toggle

Совместимые GTK 3 темы

Другой вариант заключается в использовании темы Greybird, которая поддерживает GTK 2, GTK 3, xfwm4, emerald и metacity:

root #emerge --ask x11-themes/greybird

Откройте Xfce menu -> Settings -> Appearance. Или запустите xfce4-appearance-settings. Выберите «Greybird» из списка «Стиль».

Теперь приложения GTK 2 и GTK 3 должны иметь совместимый вид.

Другие темы

Другие темы, доступные в Portage и совместимые с XFCE, могут быть установлены из следующего списка:

root #emerge --ask x11-themes/clearlooks-phenix x11-themes/gnome-themes-standard x11-themes/light-themes x11-themes/murrine-themes x11-themes/shiki-colors x11-themes/tactile3 x11-themes/zukini

Устранение проблем

Включение вертикального подгона окна

Большинство современных настольных сред имеют вертикальную подгонку окон включенную по умолчанию. Это также возможно в Xfce, но не по умолчанию. Чтобы включить, перейдите к: НастройкиОконный менеджервкладка Дополнительно.

  • Убедитесь, чтобы был выбран флажок «Прикрепить окно к границе экрана».
  • Убедитесь, чтобы флажки под заголовком «Заворачивать рабочие области при достижении края экрана» были сняты. Они мешают вертикальному прикреплению окон.

После того, как флажки установлены можно перетащить окно к правой или левой стороне экрана, которое должно изменить размер окна до 50% от ширины экрана.

Клавиши быстрого доступа могут быть установлены для того, чтобы сделать это с помощью типичного Super+ или Super+ поведения. Перейдите к НастройкиОконный менеджерКлавиатура.

Установите «Расположить окно слева» и «Расположить окно справа». Действия с комбинациями клавиш Super+ и Super+ соответственно.

Звуковой микшер жалуется на отсутствующий pavucontrol

При нажатии на значок динамика (аудио) на панели, а затем выбрав Звуковой микшер... возвращает сообщение о том, что "pavucontrol не найден".

Решение состоит в том, чтобы установить media-sound/pavucontrol:

root #emerge --ask media-sound/pavucontrol

Xfce4-screensaver unable to unlock

Xfce-screensaver uses gnome-keyring by default to authenticate. By applying the installation method above, gnome-keyring will not be pulled and pam will be unable to service the default configuration installed in /etc/pam.d/xfce4-screensaver. Either pull gnome-keyring, otherwise the file should be modified to allow system-auth to be used on passwords:

ФАЙЛ /etc/pam.d/xfce4-screensaver
auth include system-auth
password include system-auth

Authorization or permissions issues

When experiencing authorization or permissions issues within xfce4 in an OpenRC profile (symptoms include being unable to open power manager and unable to suspend/hibernate) make sure that sys-auth/elogind is installed and properly configured, and that the elogind USE flag is globally enabled.

If launching with startx, replace the appropriate line in ~/.xinitrc with the following:

ФАЙЛ ~/.xinitrcПравильный способ запуска xfce4 при вызове startx
exec dbus-launch --exit-with-session xfce4-session

Dual-monitors get mirrored after monitor suspend

There are (at least) three ways to solve this issue. First is to save the display settings as the default monitor layout profile, then enable that profile as "new monitors connect". There's also the option to show a dialog whenever new monitors are detected, which will default to the profile instead of mirroring, when one is available. Navigate to Settings -> Display -> Advanced to find these options. Remember to configure the display settings before saving the first profile.

2nd way is to kill xfsettingsd after logging to the Xfce session. However this will also make some functionality unavailable, such as global hotkeys. A custom script can be created that kills the service, and add that to the autostarting applications list.

3rd is to have a custom script that can be executed via a .desktop icon on the desktop, panel, or ran manually each time the monitors are turned on.

Review the monitor IDs using the xrandr command.

The custom script could look something like the following:

ФАЙЛ ~/bin/configuremonitors.shconfiguremonitors.sh
xrandr --output HDMI-A-0 --right-of DisplayPort-0 --auto

Смотрите также

  • Xfce/Guide — представляет обширное введение в Xfce, быстрое, легковесное, полнофункциональное окружение рабочего стола