Xfce (简体中文)
相关文章
From Xfce - About:
- Xfce 是类 UNIX 操作系统上的轻量级桌面环境。虽然它致力于快速与低资源消耗,但仍然具有视觉吸引力且易于使用。Xfce 遵循 UNIX 的模块化和复用性哲学传统。它包含大量组件,有您期待的现代桌面环境所应具有的完整功能。它们分别打包,您可以从中挑选可用的软件包去创建理想的个人工作环境。Xfce 的另一个优点是遵循标准,特别是那些在 http://www.freedesktop.org 中定义的标准。Xfce 可以安装在若干 UNIX 平台上。已知可以在 Linux、NetBSD、FreeBSD、OpenBSD、Solaris、Cygwin、MacOS X 上和 x86、PPC、Sparc、Alpha... 上编译。
Contents
- 1 什么是XFCE?
- 2 安装
- 3 启动Xfce
- 4 配置
- 5 提示和小技巧
- 6 常见问题与解答
- 7 相关文章
什么是XFCE?
类似于GNOME和KDE,XFCE是一个桌面环境。它包含一套应用程序,比如:根窗口程序、窗口管理器、文件管理器、面板,等等。XFCE用GTK2开发,同时,跟其它桌面环境一样,它也有自己的开发环境(库、守护进程等)。 不同于GNOME和KDE,XFCE是轻量级的,并且在设计上更接近CDE,而不是Windows或Mac。它的开发周期要长得多,但它非常稳定,速度极快。XFCE很适合在老一些的机器上使用。特性:
- 相较于其他主流DE,它更轻量,占用更少的资源。
- 几乎所有的设置都可以通过图形界面完成,xfce不会尝试向用户隐瞒任何东西。
- Xfwm允许用户使用混合特性,可以体验“真透明“以及GPU加速等。
- 它可以工作在多个监视器上。
- Xfce4是个稳健、成熟的桌面套件。
安装
安装 xfce4 包组。如果需要的话,还可以安装 xfce4-goodies 包组。此包组提供了一些额外的插件和一些有用的工具,如 mousepad 编辑器。
启动Xfce
从显示管理器(display manager)选择Xfce Session,或者添加 exec startxfce4
到 Xinitrc中。
配置
Xfce把配置的选项保存到Xfconf。有几个方式来修改这些选项:
- 在主菜单中,选择Settings,选择想要修改的选项。选项实际上是位于
/usr/bin/xfce4-*
和/usr/bin/xfdesktop-settings
中的程序。 -
xfce4-settings-editors
能看到和修改所有的设置。此处修改的选项会立即生效。使用xfconf-query
来通过命令行设置;文档中有更多的细节。 - 设置保存在XML文件中。此文件位于
~/.config/xfce4/xfconf/xfce-perchannel-xml/
,也可以手动修改文件。但是,此处的修改不会立即生效。
菜单
xfce4-whiskermenu-plugin 是一个可选应用启动器。它可以显示所有的已安装应用中最喜欢和经常被使用的应用。
编辑项
有一些工具可以用来实现此项需求
- XAME — 使用Gambas编写,用于Xfce编辑菜单项的图形工具,在其他环境中没有效果。
- MenuLibre — 一个高级的菜单编辑器,提供了一个纯粹,易用的界面。
- Alacarte — GNOME的菜单编辑器。
当然,也可以手动创建 ~/.config/menus/xfce-applications.menu
。下面给出一个示例的配置:
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
<Menu> <Name>Xfce</Name> <MergeFile type="parent">/etc/xdg/menus/xfce-applications.menu</MergeFile>
<Exclude> <Filename>xfce4-run.desktop</Filename> <Filename>exo-terminal-emulator.desktop</Filename> <Filename>exo-file-manager.desktop</Filename> <Filename>exo-mail-reader.desktop</Filename> <Filename>exo-web-browser.desktop</Filename> <Filename>xfce4-about.desktop</Filename> <Filename>xfhelp4.desktop</Filename> </Exclude>
<Layout> <Merge type="all"/> <Separator/> <Menuname>Settings</Menuname> <Separator/> <Filename>xfce4-session-logout.desktop</Filename> </Layout> </Menu>
<MergeFile>
标签包含了默认的Xfce菜单。
<Exclude>
标签剔除了你不想在菜单中出现的应用程序。尽管此处我们只剔除了一些Xfce的默认快捷方式,但是你也可以剔除 firefox.desktop
或其他任何的应用程序。
<Layout>
标签定义了菜单的布局。应用程序可以被放在文件夹中,或任何我们想要的组织方式。在 Xfce wiki 有更多的详细信息。
你可以通过编辑 .desktop
本身来改变Xfce的菜单。隐藏项,可以参见 Desktop entries#Hide desktop entries。你可以改变 Categories=
桌面项的行,以编辑应用程序的标签(category)。参见 Desktop entries#File example。
桌面
图标文字的背景透明
默认桌面图标的文字是白色背景,可以创建或者修改 ~/.gtkrc-2.0
来得到不一样的效果:
style "xfdesktop-icon-view" { XfdesktopIconView::label-alpha = 10 base[NORMAL] = "#000000" base[SELECTED] = "#71B9FF" base[ACTIVE] = "#71B9FF" fg[NORMAL] = "#fcfcfc" fg[SELECTED] = "#ffffff" fg[ACTIVE] = "#ffffff" } widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"
从右击菜单中剔除Thunar选项
使用如下的命令:
$ xfconf-query -c xfce4-desktop -v --create -p /desktop-icons/style -t int -s 0
杀死窗口的快捷键
Xfce没有杀死窗口的快捷键,当程序假死时,我们可能需要这样的快捷键。
通过包 xorg-xkill,使用 xkill
来交互时的杀掉一个窗口。对于当下的激活窗口,使用包 xdotool:
$ xdotool getwindowfocus windowkill
也可以:
$ xkill -id "$(xprop -root -notype | sed -n '/^_NET_ACTIVE_WINDOW/ s/^.*# *\|\,.*$//g p')"
添加快捷键,使用 设置 > 键盘 或者使用应用程序,如 xbindkeys。
会话
自启动程序
可以在 程序 > 设置 > 设置管理器 > 会话和自启动 中,设置与Xfce一起启动的自启动程序。 此处列出了所有自启动的程序。点击 添加 按钮后可以添加自定义的自启动任务。
当然,也可以选择命令行脚本来启动你需要的程序。包括给GUI运行时设置必须的变量。
- 复制文件
/etc/xdg/xfce4/xinitrc
到~/.config/xfce4/
- 编辑此文件。 比如,你可以添加一些如下的命令行到文件中:
source $HOME/.bashrc # start rxvt-unicode server urxvtd -q -o -f
延迟自启动应用程序
有时候,延迟某个应用程序的自启动是很有用的。特别是如 sleep 3 && command
这样的命令在自启动中是不起作用的。与之相对,你需要使用如下的语法来替代:
sh -c "sleep 3 && command"
锁定屏幕
锁定Xfce4对话(通过xflock4
),如下包中至少需要安装一个:xscreensaver, gnome-screensaver, slock 和 xlockmore。You may also make a local copy of xflock4, for example /usr/local/bin/xflock4
, which specifies another screen locker of choice.
为了改变屏保,或通过 Whisker Menu (Properties > Behavior > Lock Screen)这样的程序改变。可以在List of applications/Security#Screen lockers 看到其他的选项。
切换用户
只要 Display manager 有切换用户的功能,Xfce4都是可以支持的,比如 LightDM 和 GDM 。关于你所使用的DM的信息,需要参看其wiki页面。当你已经安装并配置好你的DM之后,你就可以通过'actions buttons'菜单项来切换用户。
禁用会话
Xfce kiosk 模式可以用来彻底禁用对话的保存。为了禁用对话,创建或者编辑 /etc/xdg/xfce4/kiosk/kioskrc
并加入如下的行:
[xfce4-session] SaveSession=NONE
如果kiosk模式不能工作,用户可以给对话目录设置 r/o 权限:
$ rm ~/.cache/sessions/* && chmod 500 ~/.cache/sessions
此操作会防止Xfce保存所有的会话,除了设置和配置。
默认窗口管理器
窗口管理器的全局设定保存在 /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml
。单独用户的配置,可以通过执行下面的命令获得:
$ cp /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml这些文件中,窗口管理器的配置只有在 Client0_Command下面的才会起作用。此行必须把
<value type="string" value="xfwm4"/>改为
<value type="string" value="window_manager_executable"/>
也可以运行命令 window_manager --replace
, 用你的窗口管理器的名字来替代其中的 window_manger,比如 metacity
。
如果使能了保存会话,在你登出时还在运行的窗口,在你下次登入是会自动打开运行。
如果你不想用保存会话,你也可以添加把需要的窗口管理器启动添加到Xfce的自启动列表。可以在主菜单中 Settings Manager > Session and Startup > Application Autostart然后点击 Add。在 Command 输入正确的命令启动需要的窗口管理器,然后可以起添加名字和描述。点击 Ok ,然后登出再登入,就能生效。(原谅这个翻译,我并不使用中文的Xfce界面,所以并不知道这些设置对应的翻译是怎么样的,请求别人翻译)
更换主题
在 xfce-look.org 上有不少XFCE的主题。 Xfwm 的主题保存在 /usr/share/themes/xfce4
, 在 Settings > Window Manager中可以更改主题。 而GTK+ 主题在 Settings > Appearance。
如果想要使所有的应用能有一个统一的外观, 参见 Uniform Look for Qt and GTK Applications获得更多的信息。
相关主题在 Cursor themes, Icons, 和 Font configuration 中。
声音
xfce4-mixer 是 Xfce 组开发的用户混音程序和面板插件,是 xfce4 组的一部分,所以应该已经安装。它使用 gstreamer 作为控制音量的后端,所以必须安装 xfce4-mixer 列出的可选依赖关系,否则点击时会出现如下错误:
GStreamer was unable to detect any sound devices. Some sound system specific GStreamer packages may be missing. It may also be a permissions problem.
需要的插件由硬件觉得,大部分用户需要 安装 软件包 gstreamer0.10-base-plugins. 如果面板已经启动,安装后需要重新登陆,或删除再加入。如果不能工作,可能还需要其他插件如gstreamer0.10-good-plugins 或 gstreamer0.10-bad-plugins.
更多关于默认声卡的设置请阅读 Advanced Linux Sound Architecture。此外还可以使用 PulseAudio 和 pavucontrol.
使用OSS驱动如何让xfce4-mixer来控制音量
新版的xfce4-mixer使用了gstreamer作为后端,这样就不用直接与驱动交流,更加统一。与驱动打交道的工作交给了gstreamer。因此如果你xfce4-mixer无法正常工作,就需要配置好gstreamer。首先当然你得安装xfce4-mixer。
pacman -S xfce4-mixer gstreamer0.10-base-plugins
你需要至少安装gstreamer0.10-good-plugins,考虑安装gstreamer0.10-bad-plugins
pacman -S gstreamer0.10-good-plugins gstreamer0.10-bad-plugins
然后删除面板上的mixer插件,然后重新添加一次,或者先登出然后再登录一次,对gstreamer做更改后必须这样做才能让操作生效。
也能够下载PKGBUILD 或者其他你需要的ABShere, 修改 PKGBUILD, 添加参数 --enable-oss.
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --enable-oss \ --disable-static --enable-experimental \ --disable-schemas-install \ --disable-hal \ --with-package-name="GStreamer Good Plugins (Archlinux)" \ --with-package-origin="https://www.archlinux.org/"
然后开始安装:
makepkg -i
如果仍然失败,就到论坛发贴求助,或者到OSS官方论坛查看[1]
使用快捷键改变音量
使用xbindkeys也可以达到相同的效果。
Settings --> Keyboard
单击"Application Shortcuts" 选项卡中 "Add" 按钮. 输入命令即可添加快捷键了。
ALSA
升高音量:
amixer set Master 5%+
降低音量:
amixer set Master 5%-
静音:
amixer set Master toggle
你如果使用的是标准的XF86Audio 快捷键,在在终端输入以下内容:
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioRaiseVolume -n -t string -s "amixer set Master 5%+ unmute" xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioLowerVolume -n -t string -s "amixer set Master 5%- unmute" xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioMute -n -t string -s "amixer set Master toggle"
若 amixer set Master toggle
不工作,尝试使用调节PCM直接调节音量(amixer set PCM toggle
) 。
这个频段必须使用 "mute" 参数工作。要检查计算机是否支持mute,运行 alsamixer
在终端查看Master条上是否有两个 M (MM) 。 若没有显示,则你的电脑可能不支持 mute 参数。假如你不得不切换使用 PCM 改变音量,那必须确保你的 xfce-mixer 也要调节 PCM 通道,而不是普通的 Master 通道。
OSS
使用脚本文件: [http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Using_multimedia_keys_with_OSS ]
如果你使用ossvol (推荐): 升高音量:
ossvol -i 1
降低音量:
ossvol -d 1
静音/取消静音:
ossvol -t
如果使用 pulseaudio 时 xfce4-volumed 无法静音,请尝试:
xfconf-query -c xfce4-mixer -p /active-card -s `xfconf-query -c xfce4-mixer -p /sound-card`
Xfce4-volumed
来自AUR 的 xfce4-volumedAUR daemon 能自动识别键盘的多媒体按键并映射到 Xfce-mixer。并能通过OSD通知音量变化的情况。Xfce4-volumed 不需要任何设置即可开始工作。
假如你使用pulseaudio 和 xfce4-volumed 取消静音不能正常使用,可以按照上面的 pulseaudio 部分修改 pactl 命令的键盘命令。
Volumeicon
volumeicon is an alternative to xfce4-volumed in the community repo also handling keybindings and notifications through xfce4-notifyd.
加入启动音效
Arch中并没有内置启动音效的设置页面, 但是您可以通过把下面的字段加入程序自启动设置来实现:
aplay /boot/startupsound.wav
音频文件的来源和名称可以随意指定, 但是在命名时请尽量简明并保证文件的小巧,把音频文件放入/boot
目录即可。
键盘快捷键
键盘快捷键在两个地方定义: Settings > Window Manager > Keyboard 和 Settings > Keyboard > Shortcuts。
Polkit 身法认证代理
在安装 xfce4-session 时,会一起安装 polkit-gnome 代理,并会随系统自动启动;并不主要用户的干预。更多信息,参见 Polkit#Authentication agents。
Xfce可用的第三方的 Polkit 身法认证代理,参见 xfce-polkit-gitAUR。
提示和小技巧
Xfconf 设置
Xfconf 是 XFCE 系统中负责保存配置选项的组件。大部分 XFCE 都是通过 Xfconf 完成。修改这些设置有多种方式:
- 最简单的方法是通过主菜单中的 "Settings",但是"Settings"没有包含所有选项
- 不太方便的方法是
Main menu -> Settings -> Settings Editor
,这里可以修改自定义选项,所有修改会立即生效。通过xfce4-settings-editor
命令也可以启动设置编辑器。 - 在命令行中通过程序
xfconf-query
可以进行完全设置。 XFCE 在线文档 提供了详细方法和示例,设置立即生效。 - 设置保存在 XML 文件
~/.config/xfce4/xfconf/xfce-perchannel-xml/
中,可以手动修改这个文件,但是修改不会立即生效。 - 更多信息请访问: Xfconf 文档
面板
如何自定义面板的背景
编辑~/.gtkrc-2.0。 图像文件得存放在~/中,不然面板不会正常显示。
style "panel-background" { bg_pixmap[NORMAL] = "foo.bar" bg_pixmap[PRELIGHT] = "foo.bar" bg_pixmap[ACTIVE] = "foo.bar" bg_pixmap[SELECTED] = "foo.bar" bg_pixmap[INSENSITIVE] = "foo.bar" } widget_class "*Panel*" style "panel-background"
替换Xfce默认的应用程序菜单
可以使用ubuntu的系统面板,利用Xfapplet将Gnome面板添加进Xfce。
参考这个the AUR
如何删除系统默认菜单
方法 1
在内建的菜单编辑器里,你并不能删掉系统默认的菜单按钮,这里有些隐藏他们的方法:
- 打开终端(Xfce开始菜单 > 系统 > Xfce终端)并且打开
/usr/share/applications
文件夹:$ cd /usr/share/applications
- 这个文件夹应该都是
.desktop
文件。可以用$ ls
命令查看。 - 添加
NoDisplay=true
到.desktop
文件中。例如,如果你想隐藏Firefox图标,键入以下命令让NoDisplay=true
添加到.desktop
文件末尾。
$ sudo sh -c 'echo "NoDisplay=true" >> firefox.desktop'
方法 2
另一种方法是将全局应用程序菜单目录(/usr/share/applications/
)复制到当前的程序目录下,然后添加或者修改你不想要的 .desktop 文件。这中改变能够在应用程序升级之后得以保存。
- 在终端下,复制
/usr/share/applications
下所有文件到~/.local/share/applications/
:$ cp /usr/share/applications/* ~/.local/share/applications/
- 在任何你想隐藏的菜单下,添加
NoDisplay=true
参数:$ echo "NoDisplay=true" >> ~/.local/share/applications/foo.desktop
你也能用文本编辑器直接编辑.desktop
应用程序的分类:Categories=
方法 3
第三种方法是官方推荐的比较干净的方案Xfce wiki。
创建~/.config/menus/xfce-applications.menu
文件,复制以下内容到文件中:
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> <Menu> <Name>Xfce</Name> <MergeFile type="parent">/etc/xdg/menus/xfce-applications.menu</MergeFile> <Exclude> <Filename>xfce4-run.desktop</Filename> <Filename>exo-terminal-emulator.desktop</Filename> <Filename>exo-file-manager.desktop</Filename> <Filename>exo-mail-reader.desktop</Filename> <Filename>exo-web-browser.desktop</Filename> <Filename>xfce4-about.desktop</Filename> <Filename>xfhelp4.desktop</Filename> </Exclude> <Layout> <Merge type="all"/> <Separator/> <Menuname>Settings</Menuname> <Separator/> <Filename>xfce4-session-logout.desktop</Filename> </Layout> </Menu>
<MergeFile>
标签在文件中包含默认的Xfce菜单。这是很必不可少的。
<Exclude>
标签能排除掉某些你不需要的应用程序,比如说firefox.desktop
或者其他任何程序。
<Layout>
标签定义了菜单的布局,应用程序能够按你所想组织文件夹。更多的细节请参见Xfce Wiki。
方法 4
lxmed 这个由Java写成的GUI工具,隶属于LXDE项目,但他也能在Xfce4上良好的工作,你可以在AUR找到 lxmedAUR。
如果上面位置找不到启动器怎么办(如wine安装的程序)
一般在~/.local/share/applications/wine/下可以找到。
面板自动隐藏有点延迟
添加以下内容到 ~/.gtkrc-2.0
。
style "xfce-panel-window-style" { # Time in miliseconds before the panel will unhide on an enter event XfcePanelWindow::popup-delay = 225 # Time in miliseconds before the panel will hide on a leave event XfcePanelWindow::popdown-delay = 350 } class "XfcePanelWindow" style "xfce-panel-window-style"
面板和桌面平级
如果你想面板与桌面平级(就是说让其他窗口叠在上面),你需要小小hack一下,首先确保安装了wmctrl软件包。
在~/.config/xfce4/xfce4-fix-panel
创建脚本,设定权限为可执行(chmod 755 xfce4-fix-panel
)。
#!/bin/bash set -e function getPanelIdImpl() { # get panel id PANEL="`wmctrl -l | sed -n -e '/ xfce4-panel$/ s_ .*$__ p' | sed -n -e $1' p'`" } function getPanelId() { # eventually await the panel to appear getPanelIdImpl $1 while [ x = x$PANEL ] ;do sleep 0.5s getPanelIdImpl $1 done } function putPanelDown() { PANEL="" getPanelId $1 wmctrl -i -r $PANEL -b add,below } # call the program with a list of panel numbers as arguments # for example, xfce4-fix-panel 1 2 3 # for the first three panels
for i in $* ;do putPanelDown $i done
保存脚本,测试运行一下,没问题的话你需要让脚本在开机时自动运行。简单的做法是在 会话和启动 -> 应用程序自启动
添加此脚本。
这是处理问题的一种方案,但是要是你的面板还是不能于窗口重叠。你就必须用下面的方法打开这种行为,只需要做一次就行了(改变$ID为你喜欢的值)
xfconf-query -c xfce4-panel -p /panels/panel-$ID/disable-struts -n -t bool -s true
XFWM4
如何开启Xfce 的混合特性
Xfce 4.8 内置了一个带有真透明在内的多种混合特性的窗口特效。 不需要对/etc/xorg.conf额外的设置就可以开启特效:
Menu --> Settings --> Window Manager Tweaks
禁用 roll-up
xfconf-query -c xfwm4 -p /general/mousewheel_rollup -s false
禁用窗口边缘自动缩放和平铺窗口
XFWM4 可以在窗口位于屏幕边缘时自动平铺窗口,并将窗口自动缩放到屏幕一半高度。可以通过如下方法禁用:
-
Window Manager Tweaks --> Accessibility --> Automatically tile windows when moving toward the screen edge
- 或者:
xfconf-query -c xfwm4 -p /general/tile_on_move -s false # To disable xfconf-query -c xfwm4 -p /general/tile_on_move -s true # To enable
用命令管理设置
这些都是非官方文档中的命令。 必须查阅 /usr/share/applications/ 文件夹中的.desktop 文件。如果人们想知道发生了什么,这个列表或许对你有一些帮助:
xfce-setting-show backdrop xfce-setting-show display xfce-setting-show keyboard xfce4-menueditor xfce-setting-show sound xfce-setting-show mouse xfce-setting-show session xfce-setting-show xfce-setting-show splash xfce-setting-show ui xfce-setting-show xfwm4 xfce-setting-show wmtweaks xfce-setting-show workspaces xfce-setting-show printing_system xfce4-appfinder xfce4-autostart-editor xfce4-panel -c
如果想要查阅更多的命令行设置,在终端运行下面的命令:
$ grep xfce-setting-show /usr/share/applications/xfce*settings*
可移除的设备
如果你想要在thunar文件管理器上显示刚插入的设备,首先应当安装gvfs.
也可能需要安装gvfs-afc (参考 this discussion):
还有一个好方法,可以安装thunar-volman (包含在xfce4组中):
如果你使用光驱或者其他外部设备,udisk也建议安装。
鼠标指针
默认情况下,X会使用一个二维的黑色指针。如过安装了新的鼠标主题,可以在如下地方设置指针:
Menu --> Settings --> Mouse --> Theme
想要安装新的指针主题,请参看xcursor-themes , 或者Cursor themes (简体中文).
字体
如果你的标准字体看起来不舒适,那么打开 Settings>Appearence 中的字体选项条,启用光滑字体打钩选择全部。
如果你明白可以适当的调整DPI的数值达到更好看的效果。
xdg-open integration (Preferred Applications)
Most applications rely on xdg-open for opening a preferred application for a given file or URL.
In order for xdg-open and xdg-settings to detect and integrate with the XFCE desktop environment correctly, you need to install the xorg-xprop package.
If you do not do that, your preferred applications preferences (set by exo-preferred-applications) will not be obeyed. Installing the package and allowing xdg-open to detect that you are running XFCE makes it forward all calls to exo-open instead, which correctly uses all your preferred applications preferences.
To make sure xdg-open integration is working correctly, ask xdg-settings for the default web browser and see what the result is:
# xdg-settings get default-web-browser
If it replies with:
xdg-settings: unknown desktop environment
it means that it has failed to detect XFCE as your desktop environment, which is likely due to a missing xorg-xprop package.
截屏
XFCE 自带了截图工具 xfce4-screenshooter,是 xfce4-goodies 的一部份,可以独立安装。
使用print-screen按键
XFCE Menu --> Settings --> Keyboard >>> Application Shortcuts
绑定 "xfce4-screenshooter -f" 到 "PrintScreen" 按键上;因此,当按下 "PrintScreen" 时,会全屏截图。 参见 xfce4-screenshooter 的 man-page 获得其他参数的用法。
此外,也可用其他独立的截图程式如 scrot 来绑定到 "PrintScreen" 而非 "xfce4-screenshooter"。
Terminal color themes or pallets
Terminal color themes or pallets can be changed in GUI under Appearance tab in Preferences. These are the colors that are available to most console applications like Emacs, Vi and so on. Their settings are stored individually for each system user in ~/.config/xfce4/terminal/terminalrc
file. There are also so many other themes to choose from. Check forums post [Colour Scheme Screenshots] for hundreds of available choices and themes.
修改默认颜色主题
XFCE的extra/terminal
包使用了较暗的颜色使得文字在默认的黑色背景下很难阅读并会使人感到不适,请把以下文字写入到terminalrc文件中来使用一个较明亮的颜色主题, 它会在一直在较暗的终端背景下可见.
~/.config/xfce4/terminal/terminalrc
ColorPalette5=#38d0fcaaf3a9 ColorPalette4=#e013a0a1612f ColorPalette2=#d456a81b7b42 ColorPalette6=#ffff7062ffff ColorPalette3=#7ffff7bd7fff ColorPalette13=#82108210ffff
终端之Tango主题
用你喜欢的编辑器打开~/.config/xfce4/terminal/terminalrc
加入:
ColorForeground=White ColorBackground=#323232323232 ColorPalette1=#2e2e34343636 ColorPalette2=#cccc00000000 ColorPalette3=#4e4e9a9a0606 ColorPalette4=#c4c4a0a00000 ColorPalette5=#34346565a4a4 ColorPalette6=#757550507b7b ColorPalette7=#060698989a9a ColorPalette8=#d3d3d7d7cfcf ColorPalette9=#555557575353 ColorPalette10=#efef29292929 ColorPalette11=#8a8ae2e23434 ColorPalette12=#fcfce9e94f4f ColorPalette13=#72729f9fcfcf ColorPalette14=#adad7f7fa8a8 ColorPalette15=#3434e2e2e2e2 ColorPalette16=#eeeeeeeeecec
Colour management
xfce4-settings-manager does not yet have any colour management / calibration settings, nor is there any specific XFCE program to characterise your monitor.
Loading a profile
If you wish to load an icc profile (that you have previously created or downloaded) to calibrate your display on startup, you can download xcalibAUR from AUR, then open the XFCE4 Settings Manager, click Session and Startup icon, the Autostart tab, and add a new entry where the command is /usr/bin/xcalib /path/to/your/profile.icc
. You still need to tell your applications, which display profile should be used to have the displayed images colour managed.
Another option is dispwin. Dispwin not only calibrates the display, but also sets the _ICC_PROFILE atom in X so that some applications can use a "system" display profile instead of requiring the user to set the display profile manually (GIMP, Inkscape, darktable, UFRaw, etc.).
See ICC profiles#Loading_ICC_Profiles for more information.
Creating a profile
If you wish to create an icc profile for your display (ie. characterising/profiling, e.g. with the ColorHug, or some other colorimeter, or a spectrophotometer, or "by eye"), the simplest option may be to install dispcalGUI from AUR.
Another option is gnome-control-center
(available in extra), which has a much simpler GUI, but less options and requires installing some Gnome dependencies. In order to start the calibration from the command line, first do colormgr get-devices
and look for the "Device ID" line of your monitor. If this is e.g. "xrandr-Lenovo Group Limited", you start calibration with the commabnd gcm-calibrate --device "xrandr-Lenovo Group Limited"
.
See ICC profiles for more information.
多重显示器
若你已经将X.org设定为可支援多重显示器,进入 XFCE 会话时,他会自动的设定次显示器为主显示器的画面映射。可用xrandr工具来调整萤幕之间的相对关系;不过若无先于载入前设定正确,可能会有部份显示器画面无法以滑鼠点击操作。
尽可能在桌面环境中调整显示设定比较好;然而,目前的 XFCE 设定工具(xfce-settings 4.10)并没有提供图形介面可以直接对多重显示器进行细微调整。
- Settings -> Display 工具能够调整个别显示器的解析度、旋转、映射、更新频率以及启用与否;警告: 使用此设定工具调整显示器,有可能重置或者失去手动调整但xfce-setting并未明确标示的显示特性。(见下方)。
- Settings -> Settings Editor 允许手动对所有设定值选项进行操作。关于显示设定的部份则储存在displays.xml这个档案中,位址是: ~/.config/xfce4/xfconf/xfce-perchannel-xml
- 此displays.xml亦可由使用者偏好的编辑器修改,无需透过设定值编辑器。
多显示器设定中最重要的是显示器之间的相对关系,在XFCE中可以透过 位置 这个数值对 (X and Y) 来设定,如位于显示器阵列中 上方,左侧 的显示器其 位置 应该写为 0, 0 。预设所有启动的显示器座标都是此数值对,因此,它们均成为主显示器的画面映射(复制)。
To extend the display area correctly across both monitors:
- for side-by-side monitors, set the X property of the rightmost monitor to equal the width of the left-most monitor
- for above-and-below monitors, set the Y property of the bottom monitor to equal the height of the upper monitor
- for other arrangements, set the X and Y properties of each monitor to correspond to your layout
Measurements are in pixels. As an example, a pair of monitors with nominal dimensions of 1920x1080 which are rotated by 90 and placed side-by-side can be configured with a displays.xml like this:
<channel name="displays" version="1.0"> <property name="Default" type="empty"> <property name="VGA-1" type="string" value="Idek Iiyama 23""> <property name="Active" type="bool" value="true"/> <property name="Resolution" type="string" value="1920x1080"/> <property name="RefreshRate" type="double" value="60.000000"/> <property name="Rotation" type="int" value="90"/> <property name="Reflection" type="string" value="0"/> <property name="Primary" type="bool" value="false"/> <property name="Position" type="empty"> <property name="X" type="int" value="0"/> <property name="Y" type="int" value="0"/> </property> </property> <property name="DVI-0" type="string" value="Digital display"> <property name="Active" type="bool" value="true"/> <property name="Resolution" type="string" value="1920x1080"/> <property name="RefreshRate" type="double" value="60.000000"/> <property name="Rotation" type="int" value="90"/> <property name="Reflection" type="string" value="0"/> <property name="Primary" type="bool" value="false"/> <property name="Position" type="empty"> <property name="X" type="int" value="1080"/> <property name="Y" type="int" value="0"/> </property> </property> </property> </channel>
Usually, editing settings in this way requires a logout/login to action them.
A new method for configuring multiple monitors will be available in the forthcoming xfce-settings 4.12 release.
XDG 用户目录
freedesktop.org specifies the "well known" user directories like the desktop folder and the music folder. See Xdg user directories for detailed info.
常见问题与解答
Xfce4-xkb-plugin settings issue
There is a bug in version 0.5.4.1-1 which causes xkb-plugin to lose keyboard, layout switching and compose key settings. As a workaround you may enable Use system defaults option in keyboard settings. To do so run
xfce4-keyboard-settings
Go to Layout tab and set the Use system defaults flag, then reconfigure xkb-plugin.
Thunar 不显示缩略图
Thunar 已经支持 Tumbler 选项,只要安装Tumbler:
pacman -S tumbler
更详细内容请参考 Thunar Wiki.
Locales 设置被GDM忽略
成为超级用户添加locales到 /var/lib/AccountsService/users/$USER:
su -c "nano /var/lib/AccountsService/users/$USER"
用你自己的locales代替 hu_HU.UTF-8 :
[User] Language=hu_HU.UTF-8 XSession=xfce
也可以利用sed程序。 注意在 .UTF-8前面加 "/":
su -c "sed -i 's/Language=.*/Language=hu_HU\.UTF-8/' /var/lib/AccountsService/users/$USER"
重启GDM。
恢复默认设置
若你折腾到想还原xfce4的默认设置,重命名 ~/.config/xfce4-session/
和 ~/.config/xfce4/
就可以了XD
$ mv ~/.config/xfce4-session/ ~/.config/xfce4-session-bak $ mv ~/.config/xfce4/ ~/.config/xfce4-bak
注销后生效。
NVIDIA 和 xfce4-sensors-plugin
要探测NVIDIA的gpu温度需要安装 libxnvctrl 并且重新编译 xfce4-sensors-plugin 软件包。
会话错误
如果窗口管理器不能正常运行(鼠标是一个X形,或者不能关闭窗口),不能正常还原,这时候说明会话出错。
删除掉session及其.cache
文件夹。
# rm -r ~/.cache/sessions/
在重启计算机之后会话应该就还原正常了。(只重启Xfce亦可)
升级Xfce 4.10以后window buttons不能自动扩展长度
这种情况导致类似windows布局的panel始终和通知区域来回移动,不能定位在右下方。 原因是新版的Window Buttons panel plugin不能自动适应面板长度。
为了回到之前的效果,可以在Window Buttons之后添加一个分隔符,属性选中"扩展"。
Preferred Applications preferences have no effect
If you have set your preferred applications with exo-preferred-applications, but they do not seem to be taken into consideration, see Xfce#xdg-open_integration_.28Preferred_Applications.29
Action Buttons in the panel are missing icons
This happens if icons for some actions (Suspend, Hibernate) are missing from the icon theme, or at least do not have the expected names. First, find out the currently used icon theme in the Settings Manager (→Appearance→Icons). Match this with a subdirectory of /usr/share/icons
. For example, if the icon theme is GNOME, make a note of the directory name /usr/share/icons/gnome
.
icontheme=/usr/share/icons/gnome
Make sure that the xfce4-power-manager is installed as this contains the needed icons. Now create symbolic links from the current icon theme into the hicolor
icon theme.
ln -s /usr/share/icons/hicolor/16x16/actions/xfpm-suspend.png ${icontheme}/16x16/actions/system-suspend.png ln -s /usr/share/icons/hicolor/16x16/actions/xfpm-hibernate.png ${icontheme}/16x16/actions/system-hibernate.png ln -s /usr/share/icons/hicolor/22x22/actions/xfpm-suspend.png ${icontheme}/22x22/actions/system-suspend.png ln -s /usr/share/icons/hicolor/22x22/actions/xfpm-hibernate.png ${icontheme}/22x22/actions/system-hibernate.png ln -s /usr/share/icons/hicolor/24x24/actions/xfpm-suspend.png ${icontheme}/24x24/actions/system-suspend.png ln -s /usr/share/icons/hicolor/24x24/actions/xfpm-hibernate.png ${icontheme}/24x24/actions/system-hibernate.png ln -s /usr/share/icons/hicolor/48x48/actions/xfpm-suspend.png ${icontheme}/48x48/actions/system-suspend.png ln -s /usr/share/icons/hicolor/48x48/actions/xfpm-hibernate.png ${icontheme}/48x48/actions/system-hibernate.png
Log out and in again, and you should see icons for all actions.
修改挂载参数
比较常见的问题是自动挂载USB设备后,其中FAT文件系统的编码总是探测失败,ñ, ß, etc. 默认用utf8的iocharset编码能够有效解决这个问题,添加以下内容至/etc/xdg/xfce4/mount.rc
:
[vfat] uid=<auto> shortname=winnt utf8=true # FreeBSD specific option longnames=true flush=true
当你使用utf-8时,文件系统小心的探测文件中的内容。
还有一个比较推荐添加的 flush参数 ,以免数据频繁更新导致拖慢thunar的复制进程。Adding async instead will speed up write ops, but make sure to use Eject option in Thunar to unmount the stick. Globally, mount options for storage devices present at boot can be set in fstab, and for other devices in udev rules.
相关文章
- http://docs.xfce.org/ - The complete documentation.
- Xfce-Look - Themes, wallpapers, and more.
- Xfce Wikia - How to edit the auto generated menu with the menu editor
- Xfce Wiki