https://wiki.archlinux.org/api.php?action=feedcontributions&user=Cinch&feedformat=atomArchWiki - User contributions [en]2024-03-28T08:52:24ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Xfce&diff=260324Xfce2013-06-01T22:20:20Z<p>Cinch: /* Via the Settings Menu */</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[cs:Xfce]]<br />
[[de:Xfce]]<br />
[[es:Xfce]]<br />
[[fr:Xfce]]<br />
[[it:Xfce]]<br />
[[ja:Xfce]]<br />
[[pl:Xfce]]<br />
[[ru:Xfce]]<br />
[[tr:Xfce_Masaüstü_Ortamı]]<br />
[[uk:Xfce]]<br />
[[zh-CN:Xfce]]<br />
{{Article summary start}}<br />
{{Article summary text|Xfce is a lightweight desktop environment for Unix-like operating systems. It aims to be fast and lightweight, while still being visually appealing and user friendly. This article covers its installation, configuration, and troubleshooting.}}<br />
{{Article summary text|Xfce uses the [[GTK+]] toolkit.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Graphical user interface overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Thunar}}<br />
{{Article summary wiki|Improve GTK Application Looks}}<br />
{{Article summary wiki|Autostart applications#Graphical}}<br />
{{Article summary end}}<br />
<br />
From [http://www.xfce.org/about/ Xfce - About]:<br />
<br />
:''Xfce embodies the traditional UNIX philosophy of modularity and re-usability. It consists of a number of components that provide the full functionality one can expect of a modern desktop environment. They are packaged separately and you can pick among the available packages to create the optimal personal working environment.''<br />
<br />
Xfce is a Desktop Environment, like [[GNOME]] or [[KDE]]. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit, and contains its own development environment (libraries, daemons, etc), similar to other big DEs. Features:<br />
*Lighter on resources than the other major DEs (KDE, GNOME).<br />
*Most settings are exposed via a GUI, Xfce does not try to hide stuff from the user.<br />
*Xfwm has an optional built-in compositor which allows for true transparency and all the benefits of GPU acceleration (minimizes tearing, etc.).<br />
*It works great with multiple monitors.<br />
<br />
==Installation==<br />
<br />
Before starting, make sure you have the [[Xorg|X server]] installed and configured correctly.<br />
<br />
{{Note|Xfce is somewhat modular. That means there is no need for you to run every part, you can pick and choose some of them.}}<br />
<br />
The base Xfce system can be [[pacman|installed]] with the group {{Grp|xfce4}}, available in the [[Official Repositories]]. Pacman will ask you to select the packages to install, but you probably want to get them all by simply pressing {{Keypress|Enter}}. Additional packages, like panel plugins, notifications, and system tools are available in the {{Grp|xfce4-goodies}} group.<br />
<br />
{{Tip|Installing [[Gamin]] (the successor of [[FAM]]) is highly recommended.}}<br />
{{Tip|Common tasks such as mounting removable drives and extracting archives can be accomplished with Thunar. If you do not install {{Grp|xfce4-goodies}} but still want these niceties, read the [[Thunar]] page.}}<br />
<br />
== Starting Xfce ==<br />
=== Automatically ===<br />
There are two methods to start Xfce (and in fact, any desktop or window manager) at boot time:<br />
<br />
* Run Xfce through a [[Display Manager]]<br />
* Run Xfce automatically using the {{pkg|xorg-xinit}} method at [[Start X at Login]] combining with [[Automatic login to virtual console ]]<br />
<br />
=== Manually ===<br />
{{Note|See [[xinitrc]] for details, such as preserving the logind session.}}<br />
<br />
You can execute:<br />
$ startxfce4<br />
from the console, or configure [[xinitrc]] and use xinit or startx.<br />
<br />
If you have not created a {{ic|~/.xinitrc}} yet, do so with:<br />
<br />
$ cp /etc/skel/.xinitrc ~/.xinitrc<br />
<br />
and add the following line:<br />
<br />
exec startxfce4<br />
<br />
Example:<br />
{{hc|~/.xinitrc|2=#!/bin/sh<br />
<br />
if [ -d /etc/X11/xinit/xinitrc.d ]; then<br />
for f in /etc/X11/xinit/xinitrc.d/*; do<br />
[ -x "$f" ] && . "$f"<br />
done<br />
unset f<br />
fi<br />
<br />
exec startxfce4<br />
}}<br />
<br />
{{Note|<br />
*In case you are wondering, {{ic|dbus-launch}} will be launched by the {{ic|xinitrc.d}} code at the beginning of the file. {{ic|dbus-launch}} starts a dbus-daemon instance to provide communication with PolicyKit.<br />
*The proper command for launching Xfce is {{ic|startxfce4}}: do not start {{ic|xfce4-session}} directly, since it is already run by {{ic|startxfce4}} itself.<br />
}}<br />
<br />
=== Automounting ===<br />
See [[General Troubleshooting#Session permissions]].<br />
<br />
If you have no problems shutting down and rebooting but cannot automount external media and disks, you may need to install {{pkg|gvfs}}. See the [[#Removable Devices|Removable Devices]] section.<br />
<br />
==Tips and tricks==<br />
===Xfconf settings===<br />
Xfconf is XFCE's system for storing configuration options, and most XFCE configuration is done by editing settings in Xfconf (one way or another). There are several ways to modify these settings:<br />
* The most obvious and easiest way is to go to "Settings" in the main menu and select the category you want to customize. However, not all customization options are available this way. <br />
* A less user-friendly but more general way is to go to {{bc|Main menu -> Settings -> Settings Editor}} where you can see and modify all the customization options. Any settings modified here will take effect immediately. The Settings Editor can also be launched from the command line by invoking {{ic|xfce4-settings-editor}}.<br />
* Customization can be done completely from the command line using the program {{ic|xfconf-query}}. See [http://docs.xfce.org/xfce/xfconf/xfconf-query the XFCE online documentation] for more information and examples and the rest of this wiki page for more examples. Settings changed here will take effect immediately.<br />
* The settings are stored in XML files in {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/}} which can be edited by hand. However, changes made here will not take effect immediately.<br />
* For more information: [http://docs.xfce.org/xfce/xfconf/start Xfconf documentation]<br />
===Panel===<br />
====xfce panel background====<br />
Edit {{ic|~/.gtkrc-2.0}}.<br />
Note that you must place the image in the same directory as the configuration, which is {{ic|~/}}. You can not specify the path to the image, or it will not work.<br />
style "panel-background" {<br />
bg_pixmap[NORMAL] = "foo.bar"<br />
bg_pixmap[PRELIGHT] = "foo.bar"<br />
bg_pixmap[ACTIVE] = "foo.bar"<br />
bg_pixmap[SELECTED] = "foo.bar"<br />
bg_pixmap[INSENSITIVE] = "foo.bar"<br />
}<br />
widget_class "*Panel*" style "panel-background"<br />
<br />
==== 'menu' panel replacement ====<br />
The "Ubuntu System Panel" (GNOME) panel applet has similar features to those found in its KDE v4.2 equivalent. It can be added to an Xfce panel via the 'XfApplet' panel applet, which allows GNOME applets to be used in Xfce.<br />
<br />
It is available in the [[Arch User Repository|AUR]] as the {{AUR|usp2}} package.<br />
<br />
==== Removing entries from the System menu====<br />
===== Method 1 =====<br />
With the built-in menu editor, you cannot remove menu entries from the System menu. Here’s how to hide them:<br />
# Open Terminal (Xfce menu > System > Terminal) and go to the {{ic|/usr/share/applications}} folder: {{bc|$ cd /usr/share/applications}}<br />
# This folder should be full of {{ic|.desktop}} files. To see a list type: {{bc|$ ls}}<br />
# Add {{ic|1=NoDisplay=true}} to the {{ic|.desktop}} file. For example, if you want to hide Firefox, type in the terminal: {{bc|1=# echo "NoDisplay=true" >> firefox.desktop}} This command appends the text {{ic|1=NoDisplay=true}} to the end of the {{ic|.desktop}} file.<br />
<br />
===== Method 2 =====<br />
Another method is to copy the entire contents of the global applications directory over to your local applications directory, and then proceed to modify and/or disable unwanted .desktop entries. This will survive application updates that overwrite changes under {{ic|/usr/share/applications/}}.<br />
# In a terminal, copy everything from {{ic|/usr/share/applications}} to {{ic|~/.local/share/applications/}}: {{bc|$ cp /usr/share/applications/* ~/.local/share/applications/}}<br />
# For any entry you wish to hide from the menu, add the {{ic|1=NoDisplay=true}} option: {{bc|1=$ echo "NoDisplay=true" >> ~/.local/share/applications/foo.desktop}}<br />
<br />
You can also edit the application's category by editing the {{ic|.desktop}} file with a text editor and modifying the {{ic|1=Categories=}} line.<br />
<br />
===== Method 3 =====<br />
The third method is the '''cleanest''' and recommended in the [http://wiki.xfce.org/howto/customize-menu Xfce wiki].<br />
<br />
Create the file {{ic|~/.config/menus/xfce-applications.menu}} and copy the following in it:<br />
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"<br />
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"><br />
<br />
<Menu><br />
<Name>Xfce</Name><br />
<MergeFile type="parent">/etc/xdg/menus/xfce-applications.menu</MergeFile><br />
<br />
<Exclude><br />
<Filename>xfce4-run.desktop</Filename><br />
<br />
<Filename>exo-terminal-emulator.desktop</Filename><br />
<Filename>exo-file-manager.desktop</Filename><br />
<Filename>exo-mail-reader.desktop</Filename><br />
<Filename>exo-web-browser.desktop</Filename><br />
<br />
<Filename>xfce4-about.desktop</Filename><br />
<Filename>xfhelp4.desktop</Filename><br />
</Exclude><br />
<br />
<Layout><br />
<Merge type="all"/><br />
<Separator/><br />
<br />
<Menuname>Settings</Menuname><br />
<Separator/><br />
<br />
<Filename>xfce4-session-logout.desktop</Filename><br />
</Layout><br />
<br />
</Menu><br />
<br />
The {{ic|<MergeFile>}} tag includes the default Xfce menu in our file. This is important.<br />
<br />
The {{ic|<Exclude>}} tag excludes applications which we do not want to appear in the menu. Here we excluded some Xfce default shortcuts, but you can exclude {{ic|firefox.desktop}} or any other application.<br />
<br />
The {{ic|<Layout>}} tag defines the layout of the menu. The applications can be organized in folders or however we wish. For more details see the aforementioned Xfce wiki page.<br />
<br />
===== Method 4 =====<br />
Alternatively a tool called [http://www.redsquirrel87.com/XAME.html xame] can be used. XAME is a GUI tool written in Gambas designed specifically for editing menu entires in XFCE, it will NOT work in other DEs. XAME is available in the {{AUR|xame}} package from the [[AUR]].<br />
<br />
==== Missing applications ====<br />
When some applications are installed (for example via [[WINE]]), they may not be listed in {{ic|/usr/share/applications}}. Shortcuts ''might'' be found in the category “Other” in this directory:<br />
{{ic|~/.local/share/applications/wine/}}.<br />
<br />
====Panel autohide delay====<br />
Add this to {{ic|~/.gtkrc-2.0}}.<br />
style "xfce-panel-window-style"<br />
{<br />
# Time in miliseconds before the panel will unhide on an enter event<br />
XfcePanelWindow::popup-delay = 225<br />
<br />
# Time in miliseconds before the panel will hide on a leave event<br />
XfcePanelWindow::popdown-delay = 350<br />
}<br />
class "XfcePanelWindow" style "xfce-panel-window-style"<br />
<br />
====Panel at desktop level====<br />
<br />
If you want a panel at desktop level (i.e., other windows will stack over it) you need a little hack, ensure you have installed the {{pkg|wmctrl}} package from the [[Official Repositories]].<br />
<br />
Create a script in {{ic|~/.config/xfce4/xfce4-fix-panel}} with this content and make it executable (you can use {{ic|chmod 755 xfce4-fix-panel}}).<br />
<br />
#!/bin/bash<br />
set -e<br />
<br />
function getPanelIdImpl() {<br />
# get panel id<br />
PANEL="`wmctrl -l | sed -n -e '/ xfce4-panel$/ s_ .*$__ p' | sed -n -e $1' p'`"<br />
}<br />
<br />
function getPanelId() {<br />
# eventually await the panel to appear<br />
getPanelIdImpl $1<br />
while [ x = x$PANEL ] ;do<br />
sleep 0.5s<br />
getPanelIdImpl $1<br />
done<br />
}<br />
<br />
function putPanelDown() {<br />
PANEL=""<br />
getPanelId $1<br />
wmctrl -i -r $PANEL -b add,below<br />
}<br />
<br />
# call the program with a list of panel numbers as arguments<br />
# for example, xfce4-fix-panel 1 2 3<br />
# for the first three panels<br />
for i in $* ;do<br />
putPanelDown $i<br />
done<br />
<br />
<br />
Once wrote the script, and tested it, you need to auto-execute it at each login. You can use the {{ic|Session and StartUp -> Application Autostart}} gui.<br />
<br />
This passage will put your panels at desktop level, but if your panel is sticking to a border the maximized windows will not stack over it. You can enable this behavior with the following command, fortunately you need to do this only once. (change the $ID with the panel number of interest)<br />
<br />
xfconf-query -c xfce4-panel -p /panels/panel-$ID/disable-struts -n -t bool -s true<br />
<br />
=== Desktop ===<br />
<br />
==== Transparent Background for Icon Titles ====<br />
To change the default white background of desktop icon titles to something more suitable, edit the {{ic|.gtkrc-2.0}} file in your home directory (or create the file if needed) and add the following:<br />
style "xfdesktop-icon-view" {<br />
XfdesktopIconView::label-alpha = 10<br />
base[NORMAL] = "#000000"<br />
base[SELECTED] = "#71B9FF"<br />
base[ACTIVE] = "#71FFAD"<br />
fg[NORMAL] = "#ffffff"<br />
fg[SELECTED] = "#71B9FF"<br />
fg[ACTIVE] = "#71FFAD" }<br />
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"<br />
<br />
==== Hide Selected Partitions ====<br />
If you wish to prevent certain partitions or drives appearing on the desktop, you can create a udev rule, for example {{ic|/etc/udev/rules.d/10-local.rules}}:<br />
<br />
KERNEL=="sda1", ENV{UDISKS_PRESENTATION_HIDE}="1"<br />
KERNEL=="sda2", ENV{UDISKS_PRESENTATION_HIDE}="1"<br />
<br />
Would show all partitions with the exception of sda1 and sda2 on your desktop. Notice, if you are using udisk2 the above will not work, due to the UDISKS_PRESENTATION_HIDE no longer being supported, instead you must use UDISKS_IGNORE as follows<br />
<br />
KERNEL=="sda1", ENV{UDISKS_IGNORE}="1"<br />
KERNEL=="sda2", ENV{UDISKS_IGNORE}="1"<br />
<br />
==== Remove Thunar Options from Right-click ====<br />
xfconf-query -c xfce4-desktop -v --create -p /desktop-icons/style -t int -s 0<br />
<br />
==== Kill Window Shortcut ====<br />
Xfce does not support the ''kill window'' shortcut directly, but you can add one with a simple script. Ensure you have the '''xorg-xkill''' package installed.<br />
<br />
Create a script in {{ic|~/.config/xfce4/killwindow.sh}} with this content and make it executable (you can use {{ic|chmod 755 killwindow.sh}}).<br />
<br />
xkill -id "`xprop -root -notype | sed -n '/^_NET_ACTIVE_WINDOW/ s/^.*# *\|\,.*$//g p'`"<br />
<br />
Now associate a shortcut using {{ic|Settings -> Keyboard}} to that script.<br />
<br />
=== XFWM4 ===<br />
==== Enabling the Compositor ====<br />
Xfce comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on. It can be enabled in the Window Manager Tweaks and works on the fly. No additional settings are needed in your {{ic|/etc/xorg.conf}}. To enable and adjust settings, go to:<br />
<br />
Menu --> Settings --> Window Manager Tweaks<br />
<br />
==== Disable window roll-up ====<br />
xfconf-query -c xfwm4 -p /general/mousewheel_rollup -s false<br />
<br />
==== Toggle Automatic Tiling of Windows at Edge of Screen ====<br />
XFWM4 has the ability to "tile" a window automatically when it is moved to the edge of the screen by resizing it to fill the top half of the screen. (The official XFCE website says this feature is disabled by default in XFCE 4.10, but it seems to be enabled by default on Arch Linux.) This behavior can be enabled or disabled in {{ic|Window Manager Tweaks --> Accessibility --> Automatically tile windows when moving toward the screen edge}}, or:<br />
<br />
xfconf-query -c xfwm4 -p /general/tile_on_move -s false # To disable<br />
xfconf-query -c xfwm4 -p /general/tile_on_move -s true # To enable<br />
<br />
=== Settings Manager Commands ===<br />
There is no official documentation for the commands executed. One must look at {{ic|.desktop}} files {{ic|/usr/share/applications/}} folder. For the people who like to know exactly what is happening, here is a handy list to save the effort:<br />
<br />
xfce4-accessibility-settings<br />
xfce4-power-manager-settings<br />
xfce4-settings-editor<br />
xfdesktop-settings<br />
xfce4-display-settings<br />
xfce4-keyboard-settings<br />
xfce4-mouse-settings<br />
xfce4-session-settings<br />
xfce4-settings-manager<br />
xfce4-appearance-settings<br />
xfwm4-settings<br />
xfwm4-tweaks-settings<br />
xfwm4-workspace-settings<br />
orage -p<br />
<br />
To review all the available setting manager commands run the following in a terminal:<br />
<br />
$ grep '^Exec=' /usr/share/applications/xfce*settings* | sed -e 's_^.*=_ _'<br />
<br />
===Session===<br />
====Custom Startup Applications====<br />
<br />
=====Via the Settings Menu=====<br />
<br />
To launch custom applications when Xfce starts up, click the Applications Menu -> Settings -> Settings Manager and then choose the "Session and Startup" option and click the tab "Application Autostart".<br />
You'll see a list of programs that get launched on startup. To add an entry, click the "Add" button and fill out the form, specifying the path to an executable you want to run.<br />
<br />
=====Startup Script=====<br />
<br />
Alternatively you can use this method, to run a command line script to launch your applications. This includes getting necessary environment variables into the GUI runtime.<br />
<br />
* Copy the file {{ic|/etc/xdg/xfce4/xinitrc}} to {{ic|~/.config/xfce4/}}<br />
* Edit this file. For example, you can add something like this somehwere in the middle:<br />
source $HOME/.bashrc<br />
# start rxvt-unicode server<br />
urxvtd -q -o -f<br />
<br />
====Lock the screen====<br />
To lock an Xfce4 session (through {{ic|xflock4}}) one of {{Pkg|xscreensaver}}, {{Pkg|gnome-screensaver}} or {{Pkg|xlockmore}} packages needs to be installed.<br />
<br />
====Switch between users====<br />
Xfce4 allows this behavior under the 'action buttons' menu item. Currently, both [[gdm]] and [[Lightdm#User switching under xfce4|lightdm]] provide this functionality.<br />
<br />
==== Manually Modifying XML settings ====<br />
It may be useful, especially when upgrading, to manually edit .xml files in the {{ic|~/.config/xfce4/xfconf/}} folder. For application keyboard shortcuts for example, the file is {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml}}. It is faster to copy and paste the XML keys that you want rather than using the GUI.<br />
<br />
===Removable Devices===<br />
If you want an icon appearing on your desktop and in Thunar when you plug in external devices, make sure {{Pkg|gvfs}} is installed. You could also need to install {{Pkg|gvfs-afc}} (read [https://bbs.archlinux.org/viewtopic.php?pid=889018 this discussion]). It is also a good idea to install {{Pkg|thunar-volman}} (already included in the {{Grp|xfce4}} base group). Additionally, [[udisks]] and a udisks wrapper are recommended if you want to automount optical and external drives easily.<br />
<br />
===Look and Feel===<br />
====Add themes to XFCE====<br />
1. Go to [http://www.xfce-look.org www.xfce-look.org] and click "Themes" in the left navbar. Look around for a theme you want and click "Download".<br />
<br />
2. Go to the directory where you downloaded the tarball/file and extract it using Squeeze/Xarchiver/CLI.<br />
<br />
3. Move the extracted folder to {{ic|/usr/share/themes}} (for all users) or {{ic|~/.themes}} (for just you). Inside {{ic|/usr/share/themes/abc}}, there is a folder that you create called xfwm4 that will contain whatever files that is included with that theme.<br />
<br />
4. GTK theme is available here:<br />
Menu --> Settings --> Appearance<br />
You select your xfwm theme in:<br />
Menu --> Settings --> Window Manager<br />
<br />
==== Cursors ====<br />
Main article: [[X11 Cursors]]<br />
<br />
If you have alternative X cursor themes installed, Xfce can find them with:<br />
Menu --> Settings --> Mouse --> Theme<br />
<br />
==== Icons ====<br />
# First find and download your desired icon pack. Recommended places to download icons from are [http://www.customize.org Customize.org], [http://opendesktop.org Opendesktop.org] and [http://xfce-look.org/ Xfce-look.org]; the [[AUR]] provides several PKGBUILDs for icon packs.<br />
# Go to the directory where you downloaded the icon pack and extract it. Example {{ic|tar -xzf /home/user/downloads/icon-pack.tar.gz}}.<br />
# Move the extracted folder containing the icons to {{ic|~/.icons}} (if only you want to use the icons) or to {{ic|/usr/share/icons}} (if you want all users on the system to make use of the icons), and in the lattter case consider creating a [[PKGBUILD]] for that.<br />
# Optional: run {{ic|gtk-update-icon-cache -f -t ~/.icons/<theme_name>}} to update icon cache<br />
# Switch your icons by going to:<br />
Menu --> Settings --> Appearance --> Icons<br />
<br />
When you have icon theme problems, it is also recommended to install the {{Pkg|hicolor-icon-theme}} package if it was not already installed.<br />
<br />
==== Fonts ====<br />
If you find the standard fonts rather thick and or slightly out of focus open Settings>Appearence click on the Fonts tab and under Hinting: change to Full<br />
<br />
You could also try using a custom DPI setting.<br />
<br />
=== Sound ===<br />
<br />
==== Configuring xfce4-mixer ====<br />
<br />
{{Pkg|xfce4-mixer}} is the GUI mixer app / panel plugin made by the Xfce team. It is part of the xfce4 group, so you probably already have it installed. Xfce 4.6 uses {{Pkg|gstreamer}} as the backend to control volume, so first you have to make gstreamer cooperate with xfce4-mixer. One or more of the gstreamer plugin packages listed as optional dependencies to xfce4-mixer must be installed. Without one of these required plugins packages, the following error arises when clicking on the mixer panel item.<br />
<br />
GStreamer was unable to detect any sound devices. Some sound system specific GStreamer packages may be missing. It may also be a permissions problem.<br />
<br />
(It is probably not a permissions problem. It is no longer required to add audio users to the "audio" group.) Which plugins are needed depends on the hardware. Most people should be fine with {{Pkg|gstreamer0.10-base-plugins}} which can be [[pacman|installed]] from [[Official Repositories]]. <br />
<br />
If the xfce4-mixer panel item was already running before one of the plugins packages was installed, logout and login to see if it worked, or just remove the mixer plugin from the panel and add it again. If that does not work, you might need more or different gstreamer plugins. Try to [[pacman|install]] package {{pkg|gstreamer0.10-good-plugins}} or {{pkg|gstreamer0.10-bad-plugins}}.<br />
<br />
For further details, for example how to set the default sound card, see [[Advanced Linux Sound Architecture]]. Alternatively you can use [[PulseAudio]] together with {{Pkg|pavucontrol}}.<br />
<br />
==== Xfce4-mixer and OSS4 ====<br />
<br />
If you tried the above section to get {{Pkg|xfce4-mixer}} to work and it does not work at all, then you may have to compile {{pkg|gstreamer0.10-good-plugins}} yourself. Download the PKGBUILD and other files needed from ABS or [https://projects.archlinux.org/svntogit/packages.git/tree/gstreamer0.10-good/repos here], edit the PKGBUILD, add --enable-oss. <br />
<br />
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \<br />
'''--enable-oss \'''<br />
--disable-static --enable-experimental \<br />
--disable-schemas-install \<br />
--disable-hal \<br />
--with-package-name="GStreamer Good Plugins (Archlinux)" \<br />
--with-package-origin="https://www.archlinux.org/"<br />
<br />
and then run makepkg -i. <br />
<br />
makepkg -i<br />
<br />
Still not working? Try this package in AUR {{AUR|gstreamer0.10-good-plugins-ossv4}}, modify the pkgver to the newest in the PKGBUILD, and it should work.<br />
<br />
Other LINKS: [http://www.4front-tech.com/forum/ OSS forum]<br />
<br />
==== Keyboard Volume Buttons ====<br />
<br />
Go to <br />
Settings --> Keyboard<br />
Click the "Application Shortcuts" tab and add click the "Add" button. Add the following by entering the command, then pressing the corresponding button at the next window:<br />
<br />
===== ALSA =====<br />
For the raise volume button:<br />
amixer set Master 5%+<br />
For the lower volume button:<br />
amixer set Master 5%-<br />
For the mute button:<br />
amixer set Master toggle<br />
<br />
You can also run these commands to set the above commands to the standard XF86Audio keys:<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioRaiseVolume -n -t string -s "amixer set Master 5%+ unmute"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioLowerVolume -n -t string -s "amixer set Master 5%- unmute"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioMute -n -t string -s "amixer set Master toggle"<br />
<br />
If {{ic|amixer set Master toggle}} does not work, try the PCM channel ({{ic|amixer set PCM toggle}}) instead.<br />
<br />
The channel must have a "mute" option for the toggle command to work. To check whether or not your Master channel supports toggling mute, run {{ic|alsamixer}} in a terminal and look for the double M's (MM) under the Master channel. If they are not present, then it does not support the mute option. If, for example, you had to change the toggle button to use the PCM channel, make sure to also set the PCM channel as the Mixer Track under Xfce Mixer properties.<br />
<br />
===== OSS =====<br />
Use one of these scripts: http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Using_multimedia_keys_with_OSS<br />
<br />
If using ossvol (recommended), add:<br />
ossvol -i 1<br />
for the volume up button<br />
ossvol -d 1<br />
for the volume down button<br />
ossvol -t<br />
for the mute/unmute button<br />
<br />
===== PulseAudio =====<br />
For the raise volume button:<br />
pactl set-sink-mute 0 false ; pactl set-sink-volume 0 +1%<br />
For the lower volume button:<br />
pactl set-sink-mute 0 false ; pactl -- set-sink-volume 0 -1%<br />
For the mute button:<br />
pactl set-sink-mute 0 toggle<br />
<br />
These settings assume the device you want to control has index 0.<br />
Use {{ic|pactl list sinks short}} to list sinks.<br />
<br />
===== Xfce4-volumed =====<br />
<br />
[https://aur.archlinux.org/packages.php?ID=31693 xfce4-volumed] daemon from the [[AUR]] automatically maps volume keys of your keyboard to Xfce-mixer. Additionally you get OSD through Xfce4-notifyd when changing volume. Xfce4-volumed does not need any configuration and is started automatically with Xfce.<br />
<br />
{{accuracy|reason=There should be a short explanation of what this does and why it fixes the problem (bug?).}}<br />
<br />
If you use pulseaudio and xfce4-volumed unmute does not work, try this:<br />
<br />
$ xfconf-query -c xfce4-mixer -p /active-card -s `xfconf-query -c xfce4-mixer -p /sound-card`<br />
<br />
===== Volumeicon =====<br />
<br />
{{pkg|volumeicon}} is an alternative to xfce4-volumed in the community repo also handling keybindings and notifications through {{pkg|xfce4-notifyd}}.<br />
<br />
==== Adding startup/boot sound ====<br />
<br />
Arch does not have a built-in startup sound configuration tool, but there is a workaround by adding the following command to your Application Autostart settings:<br />
<br />
aplay /boot/startupsound.wav<br />
<br />
The file location and filename can be whatever you want, but naming it descriptively and putting it in /boot keeps things tidy.<br />
<br />
=== xdg-open integration (Preferred Applications) ===<br />
<br />
Most applications rely on [[xdg-open]] for opening a preferred application for a given file or URL.<br />
<br />
In order for xdg-open and xdg-settings to detect and integrate with the XFCE desktop environment correctly, you need to [[pacman|install]] the {{Pkg|xorg-xprop}} package.<br />
<br />
If you do not do that, your preferred applications preferences (set by exo-preferred-applications) will not be obeyed.<br />
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.<br />
<br />
To make sure xdg-open integration is working correctly, ask ''xdg-settings'' for the default web browser and see what the result is:<br />
<br />
# xdg-settings get default-web-browser<br />
<br />
If it replies with:<br />
<br />
xdg-settings: unknown desktop environment<br />
<br />
it means that it has failed to detect XFCE as your desktop environment, which is likely due to a missing {{Pkg|xorg-xprop}} package.<br />
<br />
=== Screenshots ===<br />
<br />
XFCE has its own screenshot tool, {{pkg|xfce4-screenshooter}}. It is part of the {{grp|xfce4-goodies}} group.<br />
<br />
==== Print Screen key ====<br />
<br />
Go to:<br />
<br />
XFCE Menu --> Settings --> Keyboard >>> Application Shortcuts.<br />
<br />
Add the "xfce4-screenshooter -f" command to use the "PrintScreen" key in order to take fullscreen screenshots. See screenshooter's man page for other optional arguments.<br />
<br />
Alternatively, an independent screenshot program like [[Taking a Screenshot#scrot|scrot]] can be used.<br />
<br />
===Terminal color themes or pallets===<br />
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 {{ic|~/.config/xfce4/terminal/terminalrc}} file. There are also so many other themes to choose from. Check forums post [[https://bbs.archlinux.org/viewtopic.php?pid=1194644|Terminal Colour Scheme Screenshots]] for hundreds of available choices and themes.<br />
<br />
====Changing default color theme====<br />
XFCE's {{ic|extra/terminal}} package comes with a darker color palette and colored text looks pretty horrid in default black background impeding user readability. Append the following in your terminalrc file for a lighter color theme, that is always visible in darker Terminal backgrounds.<br />
<br />
~/.config/xfce4/terminal/terminalrc<br />
<br />
ColorPalette5=#38d0fcaaf3a9<br />
ColorPalette4=#e013a0a1612f<br />
ColorPalette2=#d456a81b7b42<br />
ColorPalette6=#ffff7062ffff<br />
ColorPalette3=#7ffff7bd7fff<br />
ColorPalette13=#82108210ffff<br />
<br />
====Terminal tango color theme====<br />
To switch to tango color theme, open with your favorite editor<br />
<br />
~/.config/xfce4/terminal/terminalrc<br />
<br />
And add(replace) these lines:<br />
<br />
ColorForeground=White<br />
ColorBackground=#323232323232<br />
ColorPalette1=#2e2e34343636<br />
ColorPalette2=#cccc00000000<br />
ColorPalette3=#4e4e9a9a0606<br />
ColorPalette4=#c4c4a0a00000<br />
ColorPalette5=#34346565a4a4<br />
ColorPalette6=#757550507b7b<br />
ColorPalette7=#060698989a9a<br />
ColorPalette8=#d3d3d7d7cfcf<br />
ColorPalette9=#555557575353<br />
ColorPalette10=#efef29292929<br />
ColorPalette11=#8a8ae2e23434<br />
ColorPalette12=#fcfce9e94f4f<br />
ColorPalette13=#72729f9fcfcf<br />
ColorPalette14=#adad7f7fa8a8<br />
ColorPalette15=#3434e2e2e2e2<br />
ColorPalette16=#eeeeeeeeecec<br />
<br />
=== Colour management ===<br />
xfce4-settings-manager does not yet have any colour management / calibration settings, nor is there any specific XFCE program to characterise your monitor.<br />
<br />
==== Loading a profile ====<br />
If you wish to '''load an icc profile''' (that you have previously created or downloaded) to calibrate your display on startup, you can download {{AUR|xcalib}} 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 {{ic|/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.<br />
<br />
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.).<br />
<br />
See [[ICC Profiles#Loading ICC Profiles]] for more information.<br />
<br />
==== Creating a profile ====<br />
<br />
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 [https://aur.archlinux.org/packages.php?ID=25883 dispcalGUI] from [[AUR]]. <br />
<br />
Another option is to install {{ic|gnome-settings-daemon}} and {{ic|gnome-color-manager}} (available in extra). In order to start the calibration from the command line, first do {{ic|/usr/lib/gnome-settings-daemon/gnome-settings-daemon &}} (note: this might change your keyboard layout and who knows what else, so probably good to do it on a throwaway account), then {{ic|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 command {{ic|gcm-calibrate --device "xrandr-Lenovo Group Limited"}}.<br />
{{Note|1=The reason you need gnome-settings-daemon running is because XFCE does not yet have a session component for colord: https://bugzilla.xfce.org/show_bug.cgi?id=8559}}<br />
<br />
See [[ICC Profiles]] for more information.<br />
<br />
=== Multiple Monitors ===<br />
If you have configured X.org so that your display spans multiple monitors, usually when you login to an '''XFCE''' session, it will appear as if your monitors are simple clones of one another. You can use an '''xrandr''' tool to tweak your setup but if this is not called at an appropriate time in the startup sequence, some functionality may be lost with parts of your display being inaccessible to the mouse pointer.<br />
<br />
A better way is to configure XFCE to match your desired display arrangement. However, at present (xfce-settings 4.10), there is no tool available to assist with configuring multiple monitors directly. <br />
<br />
* The ''Settings -> Display'' tool does allow configuration of screen resolution, rotation and enabling individual monitors; '''warning''': ''using this tool to adjust display settings will reset or lose settings made manually for properties not explicitly offered as buttons in the tool (see below)''.<br />
* The ''Settings -> Settings Editor'' allows manipulation of all configuration items in particular the ''displays'' settings which are saved in the file '''displays.xml''' below<br />
~/.config/xfce4/xfconf/xfce-perchannel-xml<br />
* Alternatively, the ''displays.xml'' can be edited using your favourite editor.<br />
<br />
The main requirement for multiple monitors is their arrangement relative to one another. This can be controlled by setting the '''Position''' properties ('''X''' and '''Y''') to suit; an ''(x,y)'' position of ''0,0'' corresponds to the ''top, left'' position of the monitor array. This is the default position for all monitors and if several monitors are enabled they will appear as a cloned display area extending from this point. <br />
<br />
To extend the display area correctly across both monitors:<br />
<br />
* for side-by-side monitors, set the '''X''' property of the rightmost monitor to equal the width of the left-most monitor<br />
* for above-and-below monitors, set the '''Y''' property of the bottom monitor to equal the height of the upper monitor<br />
* for other arrangements, set the '''X''' and '''Y''' properties of each monitor to correspond to your layout<br />
<br />
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:<br />
<br />
<channel name="displays" version="1.0"><br />
<property name="Default" type="empty"><br />
<property name="VGA-1" type="string" value="Idek Iiyama 23&quot;"><br />
<property name="Active" type="bool" value="true"/><br />
<property name="Resolution" type="string" value="1920x1080"/><br />
<property name="RefreshRate" type="double" value="60.000000"/><br />
<property name="Rotation" type="int" value="90"/><br />
<property name="Reflection" type="string" value="0"/><br />
<property name="Primary" type="bool" value="false"/><br />
<property name="Position" type="empty"><br />
<property name="X" type="int" value="0"/><br />
<property name="Y" type="int" value="0"/><br />
</property><br />
</property><br />
<property name="DVI-0" type="string" value="Digital display"><br />
<property name="Active" type="bool" value="true"/><br />
<property name="Resolution" type="string" value="1920x1080"/><br />
<property name="RefreshRate" type="double" value="60.000000"/><br />
<property name="Rotation" type="int" value="90"/><br />
<property name="Reflection" type="string" value="0"/><br />
<property name="Primary" type="bool" value="false"/><br />
<property name="Position" type="empty"><br />
<property name="X" type="int" value="1080"/><br />
<property name="Y" type="int" value="0"/><br />
</property><br />
</property><br />
</property><br />
</channel><br />
<br />
Usually, editing settings in this way requires a logout/login to action them.<br />
<br />
A new method for configuring multiple monitors will be available in the forthcoming xfce-settings 4.12 release.<br />
<br />
=== XDG User Directories ===<br />
freedesktop.org specifies the "well known" user directories like the desktop folder and the music folder. See [[Xdg user directories]] for detailed info.<br />
<br />
=== SSH Agents ===<br />
By default Xfce 4.10 will try to load gpg-agent or ssh-agent in that order during session initialization. To disable this, create an xfconf key using the following command:<br />
<br />
xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false<br />
<br />
To force using ssh-agent even if gpg-agent is installed, run the following instead:<br />
<br />
xfconf-query -c xfce4-session -p /startup/ssh-agent/type -n -t string -s ssh-agent<br />
<br />
To use [[GNOME Keyring]], simply tick the checkbox ''Launch GNOME services on startup'' in the ''Advanced'' tab of ''Session Manager'' in Xfce's settings. This will also disable gpg-agent and ssh-agent.<br />
<br />
Source: http://docs.xfce.org/xfce/xfce4-session/advanced<br />
<br />
== Troubleshooting ==<br />
=== xfce4-power-manager ===<br />
Power-related [[Wikipedia:Advanced Configuration and Power Interface|ACPI]] events can be configured using [[systemd]] via options from {{ic|/etc/systemd/logind.conf}} to give control to xfce4-power-manager.<br />
<br />
{{hc|/etc/systemd/logind.conf|2=<br />
HandlePowerKey=ignore<br />
HandleSuspendKey=ignore<br />
HandleHibernateKey=ignore<br />
HandleLidSwitch=ignore}}<br />
<br />
This also solves the issue when the computer registers multiple suspend events.<br />
<br />
=== xfce4-xkb-plugin ===<br />
There is a bug in version {{Pkg|xkb-plugin}} ''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<br />
xfce4-keyboard-settings<br />
Go to ''Layout'' tab and set the ''Use system defaults'' flag, then reconfigure xkb-plugin.<br />
<br />
=== Locales ignored with GDM ===<br />
Add your locale to {{ic|/var/lib/AccountsService/users/$USER}} (replace {{ic|hu_HU.UTF-8}} with your own locale):<br />
[User]<br />
Language=hu_HU.UTF-8<br />
XSession=xfce<br />
You may also do it with sed. Note the backslash before .UTF-8:<br />
# sed -i 's/Language=.*/Language=hu_HU\.UTF-8/' /var/lib/AccountsService/users/$USER<br />
Restart GDM to take effect.<br />
<br />
=== Restore default settings ===<br />
If for any reason you need to revert back to the default settings, try renaming {{ic|~/.config/xfce4-session/}} and {{ic|~/.config/xfce4/}}<br />
<br />
$ mv ~/.config/xfce4-session/ ~/.config/xfce4-session-bak<br />
$ mv ~/.config/xfce4/ ~/.config/xfce4-bak<br />
<br />
Logout and login for changes to take effect. If upon logging in you get an error window with the heading "Unable to load a failsafe session," see the [[Xfce#Session_failure|Session Failure]] section on this page.<br />
<br />
=== NVIDIA and xfce4-sensors-plugin ===<br />
To detect and use sensors of nvidia gpu you need to install {{AUR|libxnvctrl}} and then recompile {{Pkg|xfce4-sensors-plugin}} package.<br />
<br />
=== Session failure ===<br />
If the window manager does not load correctly, you maybe got a session error. Typical symptoms of this can include:<br />
<br />
* the mouse is an X and/or does not appear at all<br />
* window decorations have disappeared and windows cannot be closed<br />
* "Window Manager" settings tool ({{ic|xfwm4-settings}}) will not start, reporting <br />
These settings cannot work with your current window manager (unknown)<br />
* errors being reported by {{ic|slim}} or your login manager like<br />
No window manager registered on screen 0<br />
<br />
Restarting xfce or rebooting your system may resolve the problem but more likely the problem is a corrupt session. Delete the session folder below the {{ic|.cache}} folder:<br />
$ rm -r ~/.cache/sessions/<br />
<br />
=== Preferred Applications preferences have no effect ===<br />
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 (Preferred Applications)]]<br />
<br />
=== Action Buttons/Missing Icons ===<br />
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 {{ic|/usr/share/icons}}. For example, if the icon theme is GNOME, make a note of the directory name {{ic|/usr/share/icons/gnome}}.<br />
<br />
icontheme=/usr/share/icons/gnome<br />
<br />
Make sure that the {{Pkg|xfce4-power-manager}} is installed as this contains the needed icons. Now create symbolic links from the current icon theme into the {{ic|hicolor}} icon theme.<br />
<br />
ln -s /usr/share/icons/hicolor/16x16/actions/xfpm-suspend.png ${icontheme}/16x16/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/16x16/actions/xfpm-hibernate.png ${icontheme}/16x16/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/22x22/actions/xfpm-suspend.png ${icontheme}/22x22/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/22x22/actions/xfpm-hibernate.png ${icontheme}/22x22/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/24x24/actions/xfpm-suspend.png ${icontheme}/24x24/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/24x24/actions/xfpm-hibernate.png ${icontheme}/24x24/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/48x48/actions/xfpm-suspend.png ${icontheme}/48x48/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/48x48/actions/xfpm-hibernate.png ${icontheme}/48x48/actions/system-hibernate.png<br />
<br />
Log out and in again, and you should see icons for all actions.<br />
<br />
=== Enable cedilla ç/Ç instead of ć/Ć ===<br />
When you select the keyboard layout "U.S., alternative international" in Settings --> Keyboard --> Layout to enable accents, the typical combination for the cedilla ' + c results in ć instead of ç.To change this suffice edit files gtk.immodules for gtk-2.0 and immodules.cache for gtk-3.0 in line that contains "cedilla" adding both "en" in the list "az:ca:co:fr:gv:oc:pt:sq:tr:wa" but in alphabetical order, staying that way in /etc/gtk-2.0/gtk.immodules<br />
<br />
"/usr/lib/gtk-2.0/2.10.0/immodules/im-cedilla.so" <br />
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:en:fr:gv:oc:pt:sq:tr:wa"<br />
<br />
and this in /usr/lib/gtk-3.0/3.0.0/immodules.cache<br />
<br />
"/usr/lib/gtk-3.0/3.0.0/immodules/im-cedilla.so" <br />
"cedilla" "Cedilla" "gtk30" "/usr/share/locale" "az:ca:co:en:fr:gv:oc:pt:sq:tr:wa"<br />
<br />
Then, do<br />
# echo "export GTK_IM_MODULE=cedilla" >> /etc/environment<br />
<br />
Done. Simply just close and reopen the gtk programs like gedit.<br />
<br />
=== Non ASCII characters when mounting USB sticks ===<br />
A common problem when automounting USB sticks formatted with fat filesystem is the inability to properly show characters as umlauts, ñ, ß, etc. This may be solved by changing the default iocharset to UTF-8, which is easily done adding a line to {{ic|/etc/xdg/xfce4/mount.rc}}:<br />
<br />
[vfat]<br />
uid=<auto><br />
shortname=winnt<br />
'''utf8=true'''<br />
# FreeBSD specific option<br />
longnames=true<br />
flush=true<br />
<br />
Note that when using utf-8, the system will distinct between upper- and lowercases, potentially corrupting your files, so be careful.<br />
<br />
It is possible to mount vfat devices with ''flush'' option, so that when copying to USB sticks data flushes more often, thus making thunar's progress bar to stays up until finished. 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.<br />
<br />
==See also==<br />
* http://docs.xfce.org/ - The complete documentation.<br />
* [http://www.xfce-look.org/ Xfce-Look] - Themes, wallpapers, and more.<br />
* [http://xfce.wikia.com/wiki/Frequently_Asked_Questions Xfce Wikia] - How to edit the auto generated menu with the menu editor<br />
* [http://wiki.xfce.org Xfce Wiki]</div>Cinchhttps://wiki.archlinux.org/index.php?title=Xfce&diff=260323Xfce2013-06-01T22:19:49Z<p>Cinch: /* Session and Startup Settings */</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[cs:Xfce]]<br />
[[de:Xfce]]<br />
[[es:Xfce]]<br />
[[fr:Xfce]]<br />
[[it:Xfce]]<br />
[[ja:Xfce]]<br />
[[pl:Xfce]]<br />
[[ru:Xfce]]<br />
[[tr:Xfce_Masaüstü_Ortamı]]<br />
[[uk:Xfce]]<br />
[[zh-CN:Xfce]]<br />
{{Article summary start}}<br />
{{Article summary text|Xfce is a lightweight desktop environment for Unix-like operating systems. It aims to be fast and lightweight, while still being visually appealing and user friendly. This article covers its installation, configuration, and troubleshooting.}}<br />
{{Article summary text|Xfce uses the [[GTK+]] toolkit.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Graphical user interface overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Thunar}}<br />
{{Article summary wiki|Improve GTK Application Looks}}<br />
{{Article summary wiki|Autostart applications#Graphical}}<br />
{{Article summary end}}<br />
<br />
From [http://www.xfce.org/about/ Xfce - About]:<br />
<br />
:''Xfce embodies the traditional UNIX philosophy of modularity and re-usability. It consists of a number of components that provide the full functionality one can expect of a modern desktop environment. They are packaged separately and you can pick among the available packages to create the optimal personal working environment.''<br />
<br />
Xfce is a Desktop Environment, like [[GNOME]] or [[KDE]]. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit, and contains its own development environment (libraries, daemons, etc), similar to other big DEs. Features:<br />
*Lighter on resources than the other major DEs (KDE, GNOME).<br />
*Most settings are exposed via a GUI, Xfce does not try to hide stuff from the user.<br />
*Xfwm has an optional built-in compositor which allows for true transparency and all the benefits of GPU acceleration (minimizes tearing, etc.).<br />
*It works great with multiple monitors.<br />
<br />
==Installation==<br />
<br />
Before starting, make sure you have the [[Xorg|X server]] installed and configured correctly.<br />
<br />
{{Note|Xfce is somewhat modular. That means there is no need for you to run every part, you can pick and choose some of them.}}<br />
<br />
The base Xfce system can be [[pacman|installed]] with the group {{Grp|xfce4}}, available in the [[Official Repositories]]. Pacman will ask you to select the packages to install, but you probably want to get them all by simply pressing {{Keypress|Enter}}. Additional packages, like panel plugins, notifications, and system tools are available in the {{Grp|xfce4-goodies}} group.<br />
<br />
{{Tip|Installing [[Gamin]] (the successor of [[FAM]]) is highly recommended.}}<br />
{{Tip|Common tasks such as mounting removable drives and extracting archives can be accomplished with Thunar. If you do not install {{Grp|xfce4-goodies}} but still want these niceties, read the [[Thunar]] page.}}<br />
<br />
== Starting Xfce ==<br />
=== Automatically ===<br />
There are two methods to start Xfce (and in fact, any desktop or window manager) at boot time:<br />
<br />
* Run Xfce through a [[Display Manager]]<br />
* Run Xfce automatically using the {{pkg|xorg-xinit}} method at [[Start X at Login]] combining with [[Automatic login to virtual console ]]<br />
<br />
=== Manually ===<br />
{{Note|See [[xinitrc]] for details, such as preserving the logind session.}}<br />
<br />
You can execute:<br />
$ startxfce4<br />
from the console, or configure [[xinitrc]] and use xinit or startx.<br />
<br />
If you have not created a {{ic|~/.xinitrc}} yet, do so with:<br />
<br />
$ cp /etc/skel/.xinitrc ~/.xinitrc<br />
<br />
and add the following line:<br />
<br />
exec startxfce4<br />
<br />
Example:<br />
{{hc|~/.xinitrc|2=#!/bin/sh<br />
<br />
if [ -d /etc/X11/xinit/xinitrc.d ]; then<br />
for f in /etc/X11/xinit/xinitrc.d/*; do<br />
[ -x "$f" ] && . "$f"<br />
done<br />
unset f<br />
fi<br />
<br />
exec startxfce4<br />
}}<br />
<br />
{{Note|<br />
*In case you are wondering, {{ic|dbus-launch}} will be launched by the {{ic|xinitrc.d}} code at the beginning of the file. {{ic|dbus-launch}} starts a dbus-daemon instance to provide communication with PolicyKit.<br />
*The proper command for launching Xfce is {{ic|startxfce4}}: do not start {{ic|xfce4-session}} directly, since it is already run by {{ic|startxfce4}} itself.<br />
}}<br />
<br />
=== Automounting ===<br />
See [[General Troubleshooting#Session permissions]].<br />
<br />
If you have no problems shutting down and rebooting but cannot automount external media and disks, you may need to install {{pkg|gvfs}}. See the [[#Removable Devices|Removable Devices]] section.<br />
<br />
==Tips and tricks==<br />
===Xfconf settings===<br />
Xfconf is XFCE's system for storing configuration options, and most XFCE configuration is done by editing settings in Xfconf (one way or another). There are several ways to modify these settings:<br />
* The most obvious and easiest way is to go to "Settings" in the main menu and select the category you want to customize. However, not all customization options are available this way. <br />
* A less user-friendly but more general way is to go to {{bc|Main menu -> Settings -> Settings Editor}} where you can see and modify all the customization options. Any settings modified here will take effect immediately. The Settings Editor can also be launched from the command line by invoking {{ic|xfce4-settings-editor}}.<br />
* Customization can be done completely from the command line using the program {{ic|xfconf-query}}. See [http://docs.xfce.org/xfce/xfconf/xfconf-query the XFCE online documentation] for more information and examples and the rest of this wiki page for more examples. Settings changed here will take effect immediately.<br />
* The settings are stored in XML files in {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/}} which can be edited by hand. However, changes made here will not take effect immediately.<br />
* For more information: [http://docs.xfce.org/xfce/xfconf/start Xfconf documentation]<br />
===Panel===<br />
====xfce panel background====<br />
Edit {{ic|~/.gtkrc-2.0}}.<br />
Note that you must place the image in the same directory as the configuration, which is {{ic|~/}}. You can not specify the path to the image, or it will not work.<br />
style "panel-background" {<br />
bg_pixmap[NORMAL] = "foo.bar"<br />
bg_pixmap[PRELIGHT] = "foo.bar"<br />
bg_pixmap[ACTIVE] = "foo.bar"<br />
bg_pixmap[SELECTED] = "foo.bar"<br />
bg_pixmap[INSENSITIVE] = "foo.bar"<br />
}<br />
widget_class "*Panel*" style "panel-background"<br />
<br />
==== 'menu' panel replacement ====<br />
The "Ubuntu System Panel" (GNOME) panel applet has similar features to those found in its KDE v4.2 equivalent. It can be added to an Xfce panel via the 'XfApplet' panel applet, which allows GNOME applets to be used in Xfce.<br />
<br />
It is available in the [[Arch User Repository|AUR]] as the {{AUR|usp2}} package.<br />
<br />
==== Removing entries from the System menu====<br />
===== Method 1 =====<br />
With the built-in menu editor, you cannot remove menu entries from the System menu. Here’s how to hide them:<br />
# Open Terminal (Xfce menu > System > Terminal) and go to the {{ic|/usr/share/applications}} folder: {{bc|$ cd /usr/share/applications}}<br />
# This folder should be full of {{ic|.desktop}} files. To see a list type: {{bc|$ ls}}<br />
# Add {{ic|1=NoDisplay=true}} to the {{ic|.desktop}} file. For example, if you want to hide Firefox, type in the terminal: {{bc|1=# echo "NoDisplay=true" >> firefox.desktop}} This command appends the text {{ic|1=NoDisplay=true}} to the end of the {{ic|.desktop}} file.<br />
<br />
===== Method 2 =====<br />
Another method is to copy the entire contents of the global applications directory over to your local applications directory, and then proceed to modify and/or disable unwanted .desktop entries. This will survive application updates that overwrite changes under {{ic|/usr/share/applications/}}.<br />
# In a terminal, copy everything from {{ic|/usr/share/applications}} to {{ic|~/.local/share/applications/}}: {{bc|$ cp /usr/share/applications/* ~/.local/share/applications/}}<br />
# For any entry you wish to hide from the menu, add the {{ic|1=NoDisplay=true}} option: {{bc|1=$ echo "NoDisplay=true" >> ~/.local/share/applications/foo.desktop}}<br />
<br />
You can also edit the application's category by editing the {{ic|.desktop}} file with a text editor and modifying the {{ic|1=Categories=}} line.<br />
<br />
===== Method 3 =====<br />
The third method is the '''cleanest''' and recommended in the [http://wiki.xfce.org/howto/customize-menu Xfce wiki].<br />
<br />
Create the file {{ic|~/.config/menus/xfce-applications.menu}} and copy the following in it:<br />
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"<br />
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"><br />
<br />
<Menu><br />
<Name>Xfce</Name><br />
<MergeFile type="parent">/etc/xdg/menus/xfce-applications.menu</MergeFile><br />
<br />
<Exclude><br />
<Filename>xfce4-run.desktop</Filename><br />
<br />
<Filename>exo-terminal-emulator.desktop</Filename><br />
<Filename>exo-file-manager.desktop</Filename><br />
<Filename>exo-mail-reader.desktop</Filename><br />
<Filename>exo-web-browser.desktop</Filename><br />
<br />
<Filename>xfce4-about.desktop</Filename><br />
<Filename>xfhelp4.desktop</Filename><br />
</Exclude><br />
<br />
<Layout><br />
<Merge type="all"/><br />
<Separator/><br />
<br />
<Menuname>Settings</Menuname><br />
<Separator/><br />
<br />
<Filename>xfce4-session-logout.desktop</Filename><br />
</Layout><br />
<br />
</Menu><br />
<br />
The {{ic|<MergeFile>}} tag includes the default Xfce menu in our file. This is important.<br />
<br />
The {{ic|<Exclude>}} tag excludes applications which we do not want to appear in the menu. Here we excluded some Xfce default shortcuts, but you can exclude {{ic|firefox.desktop}} or any other application.<br />
<br />
The {{ic|<Layout>}} tag defines the layout of the menu. The applications can be organized in folders or however we wish. For more details see the aforementioned Xfce wiki page.<br />
<br />
===== Method 4 =====<br />
Alternatively a tool called [http://www.redsquirrel87.com/XAME.html xame] can be used. XAME is a GUI tool written in Gambas designed specifically for editing menu entires in XFCE, it will NOT work in other DEs. XAME is available in the {{AUR|xame}} package from the [[AUR]].<br />
<br />
==== Missing applications ====<br />
When some applications are installed (for example via [[WINE]]), they may not be listed in {{ic|/usr/share/applications}}. Shortcuts ''might'' be found in the category “Other” in this directory:<br />
{{ic|~/.local/share/applications/wine/}}.<br />
<br />
====Panel autohide delay====<br />
Add this to {{ic|~/.gtkrc-2.0}}.<br />
style "xfce-panel-window-style"<br />
{<br />
# Time in miliseconds before the panel will unhide on an enter event<br />
XfcePanelWindow::popup-delay = 225<br />
<br />
# Time in miliseconds before the panel will hide on a leave event<br />
XfcePanelWindow::popdown-delay = 350<br />
}<br />
class "XfcePanelWindow" style "xfce-panel-window-style"<br />
<br />
====Panel at desktop level====<br />
<br />
If you want a panel at desktop level (i.e., other windows will stack over it) you need a little hack, ensure you have installed the {{pkg|wmctrl}} package from the [[Official Repositories]].<br />
<br />
Create a script in {{ic|~/.config/xfce4/xfce4-fix-panel}} with this content and make it executable (you can use {{ic|chmod 755 xfce4-fix-panel}}).<br />
<br />
#!/bin/bash<br />
set -e<br />
<br />
function getPanelIdImpl() {<br />
# get panel id<br />
PANEL="`wmctrl -l | sed -n -e '/ xfce4-panel$/ s_ .*$__ p' | sed -n -e $1' p'`"<br />
}<br />
<br />
function getPanelId() {<br />
# eventually await the panel to appear<br />
getPanelIdImpl $1<br />
while [ x = x$PANEL ] ;do<br />
sleep 0.5s<br />
getPanelIdImpl $1<br />
done<br />
}<br />
<br />
function putPanelDown() {<br />
PANEL=""<br />
getPanelId $1<br />
wmctrl -i -r $PANEL -b add,below<br />
}<br />
<br />
# call the program with a list of panel numbers as arguments<br />
# for example, xfce4-fix-panel 1 2 3<br />
# for the first three panels<br />
for i in $* ;do<br />
putPanelDown $i<br />
done<br />
<br />
<br />
Once wrote the script, and tested it, you need to auto-execute it at each login. You can use the {{ic|Session and StartUp -> Application Autostart}} gui.<br />
<br />
This passage will put your panels at desktop level, but if your panel is sticking to a border the maximized windows will not stack over it. You can enable this behavior with the following command, fortunately you need to do this only once. (change the $ID with the panel number of interest)<br />
<br />
xfconf-query -c xfce4-panel -p /panels/panel-$ID/disable-struts -n -t bool -s true<br />
<br />
=== Desktop ===<br />
<br />
==== Transparent Background for Icon Titles ====<br />
To change the default white background of desktop icon titles to something more suitable, edit the {{ic|.gtkrc-2.0}} file in your home directory (or create the file if needed) and add the following:<br />
style "xfdesktop-icon-view" {<br />
XfdesktopIconView::label-alpha = 10<br />
base[NORMAL] = "#000000"<br />
base[SELECTED] = "#71B9FF"<br />
base[ACTIVE] = "#71FFAD"<br />
fg[NORMAL] = "#ffffff"<br />
fg[SELECTED] = "#71B9FF"<br />
fg[ACTIVE] = "#71FFAD" }<br />
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"<br />
<br />
==== Hide Selected Partitions ====<br />
If you wish to prevent certain partitions or drives appearing on the desktop, you can create a udev rule, for example {{ic|/etc/udev/rules.d/10-local.rules}}:<br />
<br />
KERNEL=="sda1", ENV{UDISKS_PRESENTATION_HIDE}="1"<br />
KERNEL=="sda2", ENV{UDISKS_PRESENTATION_HIDE}="1"<br />
<br />
Would show all partitions with the exception of sda1 and sda2 on your desktop. Notice, if you are using udisk2 the above will not work, due to the UDISKS_PRESENTATION_HIDE no longer being supported, instead you must use UDISKS_IGNORE as follows<br />
<br />
KERNEL=="sda1", ENV{UDISKS_IGNORE}="1"<br />
KERNEL=="sda2", ENV{UDISKS_IGNORE}="1"<br />
<br />
==== Remove Thunar Options from Right-click ====<br />
xfconf-query -c xfce4-desktop -v --create -p /desktop-icons/style -t int -s 0<br />
<br />
==== Kill Window Shortcut ====<br />
Xfce does not support the ''kill window'' shortcut directly, but you can add one with a simple script. Ensure you have the '''xorg-xkill''' package installed.<br />
<br />
Create a script in {{ic|~/.config/xfce4/killwindow.sh}} with this content and make it executable (you can use {{ic|chmod 755 killwindow.sh}}).<br />
<br />
xkill -id "`xprop -root -notype | sed -n '/^_NET_ACTIVE_WINDOW/ s/^.*# *\|\,.*$//g p'`"<br />
<br />
Now associate a shortcut using {{ic|Settings -> Keyboard}} to that script.<br />
<br />
=== XFWM4 ===<br />
==== Enabling the Compositor ====<br />
Xfce comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on. It can be enabled in the Window Manager Tweaks and works on the fly. No additional settings are needed in your {{ic|/etc/xorg.conf}}. To enable and adjust settings, go to:<br />
<br />
Menu --> Settings --> Window Manager Tweaks<br />
<br />
==== Disable window roll-up ====<br />
xfconf-query -c xfwm4 -p /general/mousewheel_rollup -s false<br />
<br />
==== Toggle Automatic Tiling of Windows at Edge of Screen ====<br />
XFWM4 has the ability to "tile" a window automatically when it is moved to the edge of the screen by resizing it to fill the top half of the screen. (The official XFCE website says this feature is disabled by default in XFCE 4.10, but it seems to be enabled by default on Arch Linux.) This behavior can be enabled or disabled in {{ic|Window Manager Tweaks --> Accessibility --> Automatically tile windows when moving toward the screen edge}}, or:<br />
<br />
xfconf-query -c xfwm4 -p /general/tile_on_move -s false # To disable<br />
xfconf-query -c xfwm4 -p /general/tile_on_move -s true # To enable<br />
<br />
=== Settings Manager Commands ===<br />
There is no official documentation for the commands executed. One must look at {{ic|.desktop}} files {{ic|/usr/share/applications/}} folder. For the people who like to know exactly what is happening, here is a handy list to save the effort:<br />
<br />
xfce4-accessibility-settings<br />
xfce4-power-manager-settings<br />
xfce4-settings-editor<br />
xfdesktop-settings<br />
xfce4-display-settings<br />
xfce4-keyboard-settings<br />
xfce4-mouse-settings<br />
xfce4-session-settings<br />
xfce4-settings-manager<br />
xfce4-appearance-settings<br />
xfwm4-settings<br />
xfwm4-tweaks-settings<br />
xfwm4-workspace-settings<br />
orage -p<br />
<br />
To review all the available setting manager commands run the following in a terminal:<br />
<br />
$ grep '^Exec=' /usr/share/applications/xfce*settings* | sed -e 's_^.*=_ _'<br />
<br />
===Session===<br />
====Custom Startup Applications====<br />
<br />
=====Via the Settings Menu=====<br />
<br />
To launch custom applications when Xfce starts up, click the Applications Menu -> Settings -> Settings Manager and then choose the "Session and Startup" option and click the tab "Application Autostart".<br />
You'll see a list of programs that get launch on startup. To add an entry, click the "Add" button and fill out the form, specifying the path to an executable you want to run.<br />
<br />
=====Startup Script=====<br />
<br />
Alternatively you can use this method, to run a command line script to launch your applications. This includes getting necessary environment variables into the GUI runtime.<br />
<br />
* Copy the file {{ic|/etc/xdg/xfce4/xinitrc}} to {{ic|~/.config/xfce4/}}<br />
* Edit this file. For example, you can add something like this somehwere in the middle:<br />
source $HOME/.bashrc<br />
# start rxvt-unicode server<br />
urxvtd -q -o -f<br />
<br />
====Lock the screen====<br />
To lock an Xfce4 session (through {{ic|xflock4}}) one of {{Pkg|xscreensaver}}, {{Pkg|gnome-screensaver}} or {{Pkg|xlockmore}} packages needs to be installed.<br />
<br />
====Switch between users====<br />
Xfce4 allows this behavior under the 'action buttons' menu item. Currently, both [[gdm]] and [[Lightdm#User switching under xfce4|lightdm]] provide this functionality.<br />
<br />
==== Manually Modifying XML settings ====<br />
It may be useful, especially when upgrading, to manually edit .xml files in the {{ic|~/.config/xfce4/xfconf/}} folder. For application keyboard shortcuts for example, the file is {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml}}. It is faster to copy and paste the XML keys that you want rather than using the GUI.<br />
<br />
===Removable Devices===<br />
If you want an icon appearing on your desktop and in Thunar when you plug in external devices, make sure {{Pkg|gvfs}} is installed. You could also need to install {{Pkg|gvfs-afc}} (read [https://bbs.archlinux.org/viewtopic.php?pid=889018 this discussion]). It is also a good idea to install {{Pkg|thunar-volman}} (already included in the {{Grp|xfce4}} base group). Additionally, [[udisks]] and a udisks wrapper are recommended if you want to automount optical and external drives easily.<br />
<br />
===Look and Feel===<br />
====Add themes to XFCE====<br />
1. Go to [http://www.xfce-look.org www.xfce-look.org] and click "Themes" in the left navbar. Look around for a theme you want and click "Download".<br />
<br />
2. Go to the directory where you downloaded the tarball/file and extract it using Squeeze/Xarchiver/CLI.<br />
<br />
3. Move the extracted folder to {{ic|/usr/share/themes}} (for all users) or {{ic|~/.themes}} (for just you). Inside {{ic|/usr/share/themes/abc}}, there is a folder that you create called xfwm4 that will contain whatever files that is included with that theme.<br />
<br />
4. GTK theme is available here:<br />
Menu --> Settings --> Appearance<br />
You select your xfwm theme in:<br />
Menu --> Settings --> Window Manager<br />
<br />
==== Cursors ====<br />
Main article: [[X11 Cursors]]<br />
<br />
If you have alternative X cursor themes installed, Xfce can find them with:<br />
Menu --> Settings --> Mouse --> Theme<br />
<br />
==== Icons ====<br />
# First find and download your desired icon pack. Recommended places to download icons from are [http://www.customize.org Customize.org], [http://opendesktop.org Opendesktop.org] and [http://xfce-look.org/ Xfce-look.org]; the [[AUR]] provides several PKGBUILDs for icon packs.<br />
# Go to the directory where you downloaded the icon pack and extract it. Example {{ic|tar -xzf /home/user/downloads/icon-pack.tar.gz}}.<br />
# Move the extracted folder containing the icons to {{ic|~/.icons}} (if only you want to use the icons) or to {{ic|/usr/share/icons}} (if you want all users on the system to make use of the icons), and in the lattter case consider creating a [[PKGBUILD]] for that.<br />
# Optional: run {{ic|gtk-update-icon-cache -f -t ~/.icons/<theme_name>}} to update icon cache<br />
# Switch your icons by going to:<br />
Menu --> Settings --> Appearance --> Icons<br />
<br />
When you have icon theme problems, it is also recommended to install the {{Pkg|hicolor-icon-theme}} package if it was not already installed.<br />
<br />
==== Fonts ====<br />
If you find the standard fonts rather thick and or slightly out of focus open Settings>Appearence click on the Fonts tab and under Hinting: change to Full<br />
<br />
You could also try using a custom DPI setting.<br />
<br />
=== Sound ===<br />
<br />
==== Configuring xfce4-mixer ====<br />
<br />
{{Pkg|xfce4-mixer}} is the GUI mixer app / panel plugin made by the Xfce team. It is part of the xfce4 group, so you probably already have it installed. Xfce 4.6 uses {{Pkg|gstreamer}} as the backend to control volume, so first you have to make gstreamer cooperate with xfce4-mixer. One or more of the gstreamer plugin packages listed as optional dependencies to xfce4-mixer must be installed. Without one of these required plugins packages, the following error arises when clicking on the mixer panel item.<br />
<br />
GStreamer was unable to detect any sound devices. Some sound system specific GStreamer packages may be missing. It may also be a permissions problem.<br />
<br />
(It is probably not a permissions problem. It is no longer required to add audio users to the "audio" group.) Which plugins are needed depends on the hardware. Most people should be fine with {{Pkg|gstreamer0.10-base-plugins}} which can be [[pacman|installed]] from [[Official Repositories]]. <br />
<br />
If the xfce4-mixer panel item was already running before one of the plugins packages was installed, logout and login to see if it worked, or just remove the mixer plugin from the panel and add it again. If that does not work, you might need more or different gstreamer plugins. Try to [[pacman|install]] package {{pkg|gstreamer0.10-good-plugins}} or {{pkg|gstreamer0.10-bad-plugins}}.<br />
<br />
For further details, for example how to set the default sound card, see [[Advanced Linux Sound Architecture]]. Alternatively you can use [[PulseAudio]] together with {{Pkg|pavucontrol}}.<br />
<br />
==== Xfce4-mixer and OSS4 ====<br />
<br />
If you tried the above section to get {{Pkg|xfce4-mixer}} to work and it does not work at all, then you may have to compile {{pkg|gstreamer0.10-good-plugins}} yourself. Download the PKGBUILD and other files needed from ABS or [https://projects.archlinux.org/svntogit/packages.git/tree/gstreamer0.10-good/repos here], edit the PKGBUILD, add --enable-oss. <br />
<br />
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \<br />
'''--enable-oss \'''<br />
--disable-static --enable-experimental \<br />
--disable-schemas-install \<br />
--disable-hal \<br />
--with-package-name="GStreamer Good Plugins (Archlinux)" \<br />
--with-package-origin="https://www.archlinux.org/"<br />
<br />
and then run makepkg -i. <br />
<br />
makepkg -i<br />
<br />
Still not working? Try this package in AUR {{AUR|gstreamer0.10-good-plugins-ossv4}}, modify the pkgver to the newest in the PKGBUILD, and it should work.<br />
<br />
Other LINKS: [http://www.4front-tech.com/forum/ OSS forum]<br />
<br />
==== Keyboard Volume Buttons ====<br />
<br />
Go to <br />
Settings --> Keyboard<br />
Click the "Application Shortcuts" tab and add click the "Add" button. Add the following by entering the command, then pressing the corresponding button at the next window:<br />
<br />
===== ALSA =====<br />
For the raise volume button:<br />
amixer set Master 5%+<br />
For the lower volume button:<br />
amixer set Master 5%-<br />
For the mute button:<br />
amixer set Master toggle<br />
<br />
You can also run these commands to set the above commands to the standard XF86Audio keys:<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioRaiseVolume -n -t string -s "amixer set Master 5%+ unmute"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioLowerVolume -n -t string -s "amixer set Master 5%- unmute"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioMute -n -t string -s "amixer set Master toggle"<br />
<br />
If {{ic|amixer set Master toggle}} does not work, try the PCM channel ({{ic|amixer set PCM toggle}}) instead.<br />
<br />
The channel must have a "mute" option for the toggle command to work. To check whether or not your Master channel supports toggling mute, run {{ic|alsamixer}} in a terminal and look for the double M's (MM) under the Master channel. If they are not present, then it does not support the mute option. If, for example, you had to change the toggle button to use the PCM channel, make sure to also set the PCM channel as the Mixer Track under Xfce Mixer properties.<br />
<br />
===== OSS =====<br />
Use one of these scripts: http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Using_multimedia_keys_with_OSS<br />
<br />
If using ossvol (recommended), add:<br />
ossvol -i 1<br />
for the volume up button<br />
ossvol -d 1<br />
for the volume down button<br />
ossvol -t<br />
for the mute/unmute button<br />
<br />
===== PulseAudio =====<br />
For the raise volume button:<br />
pactl set-sink-mute 0 false ; pactl set-sink-volume 0 +1%<br />
For the lower volume button:<br />
pactl set-sink-mute 0 false ; pactl -- set-sink-volume 0 -1%<br />
For the mute button:<br />
pactl set-sink-mute 0 toggle<br />
<br />
These settings assume the device you want to control has index 0.<br />
Use {{ic|pactl list sinks short}} to list sinks.<br />
<br />
===== Xfce4-volumed =====<br />
<br />
[https://aur.archlinux.org/packages.php?ID=31693 xfce4-volumed] daemon from the [[AUR]] automatically maps volume keys of your keyboard to Xfce-mixer. Additionally you get OSD through Xfce4-notifyd when changing volume. Xfce4-volumed does not need any configuration and is started automatically with Xfce.<br />
<br />
{{accuracy|reason=There should be a short explanation of what this does and why it fixes the problem (bug?).}}<br />
<br />
If you use pulseaudio and xfce4-volumed unmute does not work, try this:<br />
<br />
$ xfconf-query -c xfce4-mixer -p /active-card -s `xfconf-query -c xfce4-mixer -p /sound-card`<br />
<br />
===== Volumeicon =====<br />
<br />
{{pkg|volumeicon}} is an alternative to xfce4-volumed in the community repo also handling keybindings and notifications through {{pkg|xfce4-notifyd}}.<br />
<br />
==== Adding startup/boot sound ====<br />
<br />
Arch does not have a built-in startup sound configuration tool, but there is a workaround by adding the following command to your Application Autostart settings:<br />
<br />
aplay /boot/startupsound.wav<br />
<br />
The file location and filename can be whatever you want, but naming it descriptively and putting it in /boot keeps things tidy.<br />
<br />
=== xdg-open integration (Preferred Applications) ===<br />
<br />
Most applications rely on [[xdg-open]] for opening a preferred application for a given file or URL.<br />
<br />
In order for xdg-open and xdg-settings to detect and integrate with the XFCE desktop environment correctly, you need to [[pacman|install]] the {{Pkg|xorg-xprop}} package.<br />
<br />
If you do not do that, your preferred applications preferences (set by exo-preferred-applications) will not be obeyed.<br />
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.<br />
<br />
To make sure xdg-open integration is working correctly, ask ''xdg-settings'' for the default web browser and see what the result is:<br />
<br />
# xdg-settings get default-web-browser<br />
<br />
If it replies with:<br />
<br />
xdg-settings: unknown desktop environment<br />
<br />
it means that it has failed to detect XFCE as your desktop environment, which is likely due to a missing {{Pkg|xorg-xprop}} package.<br />
<br />
=== Screenshots ===<br />
<br />
XFCE has its own screenshot tool, {{pkg|xfce4-screenshooter}}. It is part of the {{grp|xfce4-goodies}} group.<br />
<br />
==== Print Screen key ====<br />
<br />
Go to:<br />
<br />
XFCE Menu --> Settings --> Keyboard >>> Application Shortcuts.<br />
<br />
Add the "xfce4-screenshooter -f" command to use the "PrintScreen" key in order to take fullscreen screenshots. See screenshooter's man page for other optional arguments.<br />
<br />
Alternatively, an independent screenshot program like [[Taking a Screenshot#scrot|scrot]] can be used.<br />
<br />
===Terminal color themes or pallets===<br />
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 {{ic|~/.config/xfce4/terminal/terminalrc}} file. There are also so many other themes to choose from. Check forums post [[https://bbs.archlinux.org/viewtopic.php?pid=1194644|Terminal Colour Scheme Screenshots]] for hundreds of available choices and themes.<br />
<br />
====Changing default color theme====<br />
XFCE's {{ic|extra/terminal}} package comes with a darker color palette and colored text looks pretty horrid in default black background impeding user readability. Append the following in your terminalrc file for a lighter color theme, that is always visible in darker Terminal backgrounds.<br />
<br />
~/.config/xfce4/terminal/terminalrc<br />
<br />
ColorPalette5=#38d0fcaaf3a9<br />
ColorPalette4=#e013a0a1612f<br />
ColorPalette2=#d456a81b7b42<br />
ColorPalette6=#ffff7062ffff<br />
ColorPalette3=#7ffff7bd7fff<br />
ColorPalette13=#82108210ffff<br />
<br />
====Terminal tango color theme====<br />
To switch to tango color theme, open with your favorite editor<br />
<br />
~/.config/xfce4/terminal/terminalrc<br />
<br />
And add(replace) these lines:<br />
<br />
ColorForeground=White<br />
ColorBackground=#323232323232<br />
ColorPalette1=#2e2e34343636<br />
ColorPalette2=#cccc00000000<br />
ColorPalette3=#4e4e9a9a0606<br />
ColorPalette4=#c4c4a0a00000<br />
ColorPalette5=#34346565a4a4<br />
ColorPalette6=#757550507b7b<br />
ColorPalette7=#060698989a9a<br />
ColorPalette8=#d3d3d7d7cfcf<br />
ColorPalette9=#555557575353<br />
ColorPalette10=#efef29292929<br />
ColorPalette11=#8a8ae2e23434<br />
ColorPalette12=#fcfce9e94f4f<br />
ColorPalette13=#72729f9fcfcf<br />
ColorPalette14=#adad7f7fa8a8<br />
ColorPalette15=#3434e2e2e2e2<br />
ColorPalette16=#eeeeeeeeecec<br />
<br />
=== Colour management ===<br />
xfce4-settings-manager does not yet have any colour management / calibration settings, nor is there any specific XFCE program to characterise your monitor.<br />
<br />
==== Loading a profile ====<br />
If you wish to '''load an icc profile''' (that you have previously created or downloaded) to calibrate your display on startup, you can download {{AUR|xcalib}} 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 {{ic|/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.<br />
<br />
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.).<br />
<br />
See [[ICC Profiles#Loading ICC Profiles]] for more information.<br />
<br />
==== Creating a profile ====<br />
<br />
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 [https://aur.archlinux.org/packages.php?ID=25883 dispcalGUI] from [[AUR]]. <br />
<br />
Another option is to install {{ic|gnome-settings-daemon}} and {{ic|gnome-color-manager}} (available in extra). In order to start the calibration from the command line, first do {{ic|/usr/lib/gnome-settings-daemon/gnome-settings-daemon &}} (note: this might change your keyboard layout and who knows what else, so probably good to do it on a throwaway account), then {{ic|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 command {{ic|gcm-calibrate --device "xrandr-Lenovo Group Limited"}}.<br />
{{Note|1=The reason you need gnome-settings-daemon running is because XFCE does not yet have a session component for colord: https://bugzilla.xfce.org/show_bug.cgi?id=8559}}<br />
<br />
See [[ICC Profiles]] for more information.<br />
<br />
=== Multiple Monitors ===<br />
If you have configured X.org so that your display spans multiple monitors, usually when you login to an '''XFCE''' session, it will appear as if your monitors are simple clones of one another. You can use an '''xrandr''' tool to tweak your setup but if this is not called at an appropriate time in the startup sequence, some functionality may be lost with parts of your display being inaccessible to the mouse pointer.<br />
<br />
A better way is to configure XFCE to match your desired display arrangement. However, at present (xfce-settings 4.10), there is no tool available to assist with configuring multiple monitors directly. <br />
<br />
* The ''Settings -> Display'' tool does allow configuration of screen resolution, rotation and enabling individual monitors; '''warning''': ''using this tool to adjust display settings will reset or lose settings made manually for properties not explicitly offered as buttons in the tool (see below)''.<br />
* The ''Settings -> Settings Editor'' allows manipulation of all configuration items in particular the ''displays'' settings which are saved in the file '''displays.xml''' below<br />
~/.config/xfce4/xfconf/xfce-perchannel-xml<br />
* Alternatively, the ''displays.xml'' can be edited using your favourite editor.<br />
<br />
The main requirement for multiple monitors is their arrangement relative to one another. This can be controlled by setting the '''Position''' properties ('''X''' and '''Y''') to suit; an ''(x,y)'' position of ''0,0'' corresponds to the ''top, left'' position of the monitor array. This is the default position for all monitors and if several monitors are enabled they will appear as a cloned display area extending from this point. <br />
<br />
To extend the display area correctly across both monitors:<br />
<br />
* for side-by-side monitors, set the '''X''' property of the rightmost monitor to equal the width of the left-most monitor<br />
* for above-and-below monitors, set the '''Y''' property of the bottom monitor to equal the height of the upper monitor<br />
* for other arrangements, set the '''X''' and '''Y''' properties of each monitor to correspond to your layout<br />
<br />
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:<br />
<br />
<channel name="displays" version="1.0"><br />
<property name="Default" type="empty"><br />
<property name="VGA-1" type="string" value="Idek Iiyama 23&quot;"><br />
<property name="Active" type="bool" value="true"/><br />
<property name="Resolution" type="string" value="1920x1080"/><br />
<property name="RefreshRate" type="double" value="60.000000"/><br />
<property name="Rotation" type="int" value="90"/><br />
<property name="Reflection" type="string" value="0"/><br />
<property name="Primary" type="bool" value="false"/><br />
<property name="Position" type="empty"><br />
<property name="X" type="int" value="0"/><br />
<property name="Y" type="int" value="0"/><br />
</property><br />
</property><br />
<property name="DVI-0" type="string" value="Digital display"><br />
<property name="Active" type="bool" value="true"/><br />
<property name="Resolution" type="string" value="1920x1080"/><br />
<property name="RefreshRate" type="double" value="60.000000"/><br />
<property name="Rotation" type="int" value="90"/><br />
<property name="Reflection" type="string" value="0"/><br />
<property name="Primary" type="bool" value="false"/><br />
<property name="Position" type="empty"><br />
<property name="X" type="int" value="1080"/><br />
<property name="Y" type="int" value="0"/><br />
</property><br />
</property><br />
</property><br />
</channel><br />
<br />
Usually, editing settings in this way requires a logout/login to action them.<br />
<br />
A new method for configuring multiple monitors will be available in the forthcoming xfce-settings 4.12 release.<br />
<br />
=== XDG User Directories ===<br />
freedesktop.org specifies the "well known" user directories like the desktop folder and the music folder. See [[Xdg user directories]] for detailed info.<br />
<br />
=== SSH Agents ===<br />
By default Xfce 4.10 will try to load gpg-agent or ssh-agent in that order during session initialization. To disable this, create an xfconf key using the following command:<br />
<br />
xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false<br />
<br />
To force using ssh-agent even if gpg-agent is installed, run the following instead:<br />
<br />
xfconf-query -c xfce4-session -p /startup/ssh-agent/type -n -t string -s ssh-agent<br />
<br />
To use [[GNOME Keyring]], simply tick the checkbox ''Launch GNOME services on startup'' in the ''Advanced'' tab of ''Session Manager'' in Xfce's settings. This will also disable gpg-agent and ssh-agent.<br />
<br />
Source: http://docs.xfce.org/xfce/xfce4-session/advanced<br />
<br />
== Troubleshooting ==<br />
=== xfce4-power-manager ===<br />
Power-related [[Wikipedia:Advanced Configuration and Power Interface|ACPI]] events can be configured using [[systemd]] via options from {{ic|/etc/systemd/logind.conf}} to give control to xfce4-power-manager.<br />
<br />
{{hc|/etc/systemd/logind.conf|2=<br />
HandlePowerKey=ignore<br />
HandleSuspendKey=ignore<br />
HandleHibernateKey=ignore<br />
HandleLidSwitch=ignore}}<br />
<br />
This also solves the issue when the computer registers multiple suspend events.<br />
<br />
=== xfce4-xkb-plugin ===<br />
There is a bug in version {{Pkg|xkb-plugin}} ''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<br />
xfce4-keyboard-settings<br />
Go to ''Layout'' tab and set the ''Use system defaults'' flag, then reconfigure xkb-plugin.<br />
<br />
=== Locales ignored with GDM ===<br />
Add your locale to {{ic|/var/lib/AccountsService/users/$USER}} (replace {{ic|hu_HU.UTF-8}} with your own locale):<br />
[User]<br />
Language=hu_HU.UTF-8<br />
XSession=xfce<br />
You may also do it with sed. Note the backslash before .UTF-8:<br />
# sed -i 's/Language=.*/Language=hu_HU\.UTF-8/' /var/lib/AccountsService/users/$USER<br />
Restart GDM to take effect.<br />
<br />
=== Restore default settings ===<br />
If for any reason you need to revert back to the default settings, try renaming {{ic|~/.config/xfce4-session/}} and {{ic|~/.config/xfce4/}}<br />
<br />
$ mv ~/.config/xfce4-session/ ~/.config/xfce4-session-bak<br />
$ mv ~/.config/xfce4/ ~/.config/xfce4-bak<br />
<br />
Logout and login for changes to take effect. If upon logging in you get an error window with the heading "Unable to load a failsafe session," see the [[Xfce#Session_failure|Session Failure]] section on this page.<br />
<br />
=== NVIDIA and xfce4-sensors-plugin ===<br />
To detect and use sensors of nvidia gpu you need to install {{AUR|libxnvctrl}} and then recompile {{Pkg|xfce4-sensors-plugin}} package.<br />
<br />
=== Session failure ===<br />
If the window manager does not load correctly, you maybe got a session error. Typical symptoms of this can include:<br />
<br />
* the mouse is an X and/or does not appear at all<br />
* window decorations have disappeared and windows cannot be closed<br />
* "Window Manager" settings tool ({{ic|xfwm4-settings}}) will not start, reporting <br />
These settings cannot work with your current window manager (unknown)<br />
* errors being reported by {{ic|slim}} or your login manager like<br />
No window manager registered on screen 0<br />
<br />
Restarting xfce or rebooting your system may resolve the problem but more likely the problem is a corrupt session. Delete the session folder below the {{ic|.cache}} folder:<br />
$ rm -r ~/.cache/sessions/<br />
<br />
=== Preferred Applications preferences have no effect ===<br />
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 (Preferred Applications)]]<br />
<br />
=== Action Buttons/Missing Icons ===<br />
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 {{ic|/usr/share/icons}}. For example, if the icon theme is GNOME, make a note of the directory name {{ic|/usr/share/icons/gnome}}.<br />
<br />
icontheme=/usr/share/icons/gnome<br />
<br />
Make sure that the {{Pkg|xfce4-power-manager}} is installed as this contains the needed icons. Now create symbolic links from the current icon theme into the {{ic|hicolor}} icon theme.<br />
<br />
ln -s /usr/share/icons/hicolor/16x16/actions/xfpm-suspend.png ${icontheme}/16x16/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/16x16/actions/xfpm-hibernate.png ${icontheme}/16x16/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/22x22/actions/xfpm-suspend.png ${icontheme}/22x22/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/22x22/actions/xfpm-hibernate.png ${icontheme}/22x22/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/24x24/actions/xfpm-suspend.png ${icontheme}/24x24/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/24x24/actions/xfpm-hibernate.png ${icontheme}/24x24/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/48x48/actions/xfpm-suspend.png ${icontheme}/48x48/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/48x48/actions/xfpm-hibernate.png ${icontheme}/48x48/actions/system-hibernate.png<br />
<br />
Log out and in again, and you should see icons for all actions.<br />
<br />
=== Enable cedilla ç/Ç instead of ć/Ć ===<br />
When you select the keyboard layout "U.S., alternative international" in Settings --> Keyboard --> Layout to enable accents, the typical combination for the cedilla ' + c results in ć instead of ç.To change this suffice edit files gtk.immodules for gtk-2.0 and immodules.cache for gtk-3.0 in line that contains "cedilla" adding both "en" in the list "az:ca:co:fr:gv:oc:pt:sq:tr:wa" but in alphabetical order, staying that way in /etc/gtk-2.0/gtk.immodules<br />
<br />
"/usr/lib/gtk-2.0/2.10.0/immodules/im-cedilla.so" <br />
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:en:fr:gv:oc:pt:sq:tr:wa"<br />
<br />
and this in /usr/lib/gtk-3.0/3.0.0/immodules.cache<br />
<br />
"/usr/lib/gtk-3.0/3.0.0/immodules/im-cedilla.so" <br />
"cedilla" "Cedilla" "gtk30" "/usr/share/locale" "az:ca:co:en:fr:gv:oc:pt:sq:tr:wa"<br />
<br />
Then, do<br />
# echo "export GTK_IM_MODULE=cedilla" >> /etc/environment<br />
<br />
Done. Simply just close and reopen the gtk programs like gedit.<br />
<br />
=== Non ASCII characters when mounting USB sticks ===<br />
A common problem when automounting USB sticks formatted with fat filesystem is the inability to properly show characters as umlauts, ñ, ß, etc. This may be solved by changing the default iocharset to UTF-8, which is easily done adding a line to {{ic|/etc/xdg/xfce4/mount.rc}}:<br />
<br />
[vfat]<br />
uid=<auto><br />
shortname=winnt<br />
'''utf8=true'''<br />
# FreeBSD specific option<br />
longnames=true<br />
flush=true<br />
<br />
Note that when using utf-8, the system will distinct between upper- and lowercases, potentially corrupting your files, so be careful.<br />
<br />
It is possible to mount vfat devices with ''flush'' option, so that when copying to USB sticks data flushes more often, thus making thunar's progress bar to stays up until finished. 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.<br />
<br />
==See also==<br />
* http://docs.xfce.org/ - The complete documentation.<br />
* [http://www.xfce-look.org/ Xfce-Look] - Themes, wallpapers, and more.<br />
* [http://xfce.wikia.com/wiki/Frequently_Asked_Questions Xfce Wikia] - How to edit the auto generated menu with the menu editor<br />
* [http://wiki.xfce.org Xfce Wiki]</div>Cinchhttps://wiki.archlinux.org/index.php?title=Xfce&diff=260322Xfce2013-06-01T22:17:43Z<p>Cinch: /* Custom Startup Applications */</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[cs:Xfce]]<br />
[[de:Xfce]]<br />
[[es:Xfce]]<br />
[[fr:Xfce]]<br />
[[it:Xfce]]<br />
[[ja:Xfce]]<br />
[[pl:Xfce]]<br />
[[ru:Xfce]]<br />
[[tr:Xfce_Masaüstü_Ortamı]]<br />
[[uk:Xfce]]<br />
[[zh-CN:Xfce]]<br />
{{Article summary start}}<br />
{{Article summary text|Xfce is a lightweight desktop environment for Unix-like operating systems. It aims to be fast and lightweight, while still being visually appealing and user friendly. This article covers its installation, configuration, and troubleshooting.}}<br />
{{Article summary text|Xfce uses the [[GTK+]] toolkit.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Graphical user interface overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Thunar}}<br />
{{Article summary wiki|Improve GTK Application Looks}}<br />
{{Article summary wiki|Autostart applications#Graphical}}<br />
{{Article summary end}}<br />
<br />
From [http://www.xfce.org/about/ Xfce - About]:<br />
<br />
:''Xfce embodies the traditional UNIX philosophy of modularity and re-usability. It consists of a number of components that provide the full functionality one can expect of a modern desktop environment. They are packaged separately and you can pick among the available packages to create the optimal personal working environment.''<br />
<br />
Xfce is a Desktop Environment, like [[GNOME]] or [[KDE]]. It contains a suite of apps like a root window app, window manager, file manager, panel, etc. Xfce is written using the GTK2 toolkit, and contains its own development environment (libraries, daemons, etc), similar to other big DEs. Features:<br />
*Lighter on resources than the other major DEs (KDE, GNOME).<br />
*Most settings are exposed via a GUI, Xfce does not try to hide stuff from the user.<br />
*Xfwm has an optional built-in compositor which allows for true transparency and all the benefits of GPU acceleration (minimizes tearing, etc.).<br />
*It works great with multiple monitors.<br />
<br />
==Installation==<br />
<br />
Before starting, make sure you have the [[Xorg|X server]] installed and configured correctly.<br />
<br />
{{Note|Xfce is somewhat modular. That means there is no need for you to run every part, you can pick and choose some of them.}}<br />
<br />
The base Xfce system can be [[pacman|installed]] with the group {{Grp|xfce4}}, available in the [[Official Repositories]]. Pacman will ask you to select the packages to install, but you probably want to get them all by simply pressing {{Keypress|Enter}}. Additional packages, like panel plugins, notifications, and system tools are available in the {{Grp|xfce4-goodies}} group.<br />
<br />
{{Tip|Installing [[Gamin]] (the successor of [[FAM]]) is highly recommended.}}<br />
{{Tip|Common tasks such as mounting removable drives and extracting archives can be accomplished with Thunar. If you do not install {{Grp|xfce4-goodies}} but still want these niceties, read the [[Thunar]] page.}}<br />
<br />
== Starting Xfce ==<br />
=== Automatically ===<br />
There are two methods to start Xfce (and in fact, any desktop or window manager) at boot time:<br />
<br />
* Run Xfce through a [[Display Manager]]<br />
* Run Xfce automatically using the {{pkg|xorg-xinit}} method at [[Start X at Login]] combining with [[Automatic login to virtual console ]]<br />
<br />
=== Manually ===<br />
{{Note|See [[xinitrc]] for details, such as preserving the logind session.}}<br />
<br />
You can execute:<br />
$ startxfce4<br />
from the console, or configure [[xinitrc]] and use xinit or startx.<br />
<br />
If you have not created a {{ic|~/.xinitrc}} yet, do so with:<br />
<br />
$ cp /etc/skel/.xinitrc ~/.xinitrc<br />
<br />
and add the following line:<br />
<br />
exec startxfce4<br />
<br />
Example:<br />
{{hc|~/.xinitrc|2=#!/bin/sh<br />
<br />
if [ -d /etc/X11/xinit/xinitrc.d ]; then<br />
for f in /etc/X11/xinit/xinitrc.d/*; do<br />
[ -x "$f" ] && . "$f"<br />
done<br />
unset f<br />
fi<br />
<br />
exec startxfce4<br />
}}<br />
<br />
{{Note|<br />
*In case you are wondering, {{ic|dbus-launch}} will be launched by the {{ic|xinitrc.d}} code at the beginning of the file. {{ic|dbus-launch}} starts a dbus-daemon instance to provide communication with PolicyKit.<br />
*The proper command for launching Xfce is {{ic|startxfce4}}: do not start {{ic|xfce4-session}} directly, since it is already run by {{ic|startxfce4}} itself.<br />
}}<br />
<br />
=== Automounting ===<br />
See [[General Troubleshooting#Session permissions]].<br />
<br />
If you have no problems shutting down and rebooting but cannot automount external media and disks, you may need to install {{pkg|gvfs}}. See the [[#Removable Devices|Removable Devices]] section.<br />
<br />
==Tips and tricks==<br />
===Xfconf settings===<br />
Xfconf is XFCE's system for storing configuration options, and most XFCE configuration is done by editing settings in Xfconf (one way or another). There are several ways to modify these settings:<br />
* The most obvious and easiest way is to go to "Settings" in the main menu and select the category you want to customize. However, not all customization options are available this way. <br />
* A less user-friendly but more general way is to go to {{bc|Main menu -> Settings -> Settings Editor}} where you can see and modify all the customization options. Any settings modified here will take effect immediately. The Settings Editor can also be launched from the command line by invoking {{ic|xfce4-settings-editor}}.<br />
* Customization can be done completely from the command line using the program {{ic|xfconf-query}}. See [http://docs.xfce.org/xfce/xfconf/xfconf-query the XFCE online documentation] for more information and examples and the rest of this wiki page for more examples. Settings changed here will take effect immediately.<br />
* The settings are stored in XML files in {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/}} which can be edited by hand. However, changes made here will not take effect immediately.<br />
* For more information: [http://docs.xfce.org/xfce/xfconf/start Xfconf documentation]<br />
===Panel===<br />
====xfce panel background====<br />
Edit {{ic|~/.gtkrc-2.0}}.<br />
Note that you must place the image in the same directory as the configuration, which is {{ic|~/}}. You can not specify the path to the image, or it will not work.<br />
style "panel-background" {<br />
bg_pixmap[NORMAL] = "foo.bar"<br />
bg_pixmap[PRELIGHT] = "foo.bar"<br />
bg_pixmap[ACTIVE] = "foo.bar"<br />
bg_pixmap[SELECTED] = "foo.bar"<br />
bg_pixmap[INSENSITIVE] = "foo.bar"<br />
}<br />
widget_class "*Panel*" style "panel-background"<br />
<br />
==== 'menu' panel replacement ====<br />
The "Ubuntu System Panel" (GNOME) panel applet has similar features to those found in its KDE v4.2 equivalent. It can be added to an Xfce panel via the 'XfApplet' panel applet, which allows GNOME applets to be used in Xfce.<br />
<br />
It is available in the [[Arch User Repository|AUR]] as the {{AUR|usp2}} package.<br />
<br />
==== Removing entries from the System menu====<br />
===== Method 1 =====<br />
With the built-in menu editor, you cannot remove menu entries from the System menu. Here’s how to hide them:<br />
# Open Terminal (Xfce menu > System > Terminal) and go to the {{ic|/usr/share/applications}} folder: {{bc|$ cd /usr/share/applications}}<br />
# This folder should be full of {{ic|.desktop}} files. To see a list type: {{bc|$ ls}}<br />
# Add {{ic|1=NoDisplay=true}} to the {{ic|.desktop}} file. For example, if you want to hide Firefox, type in the terminal: {{bc|1=# echo "NoDisplay=true" >> firefox.desktop}} This command appends the text {{ic|1=NoDisplay=true}} to the end of the {{ic|.desktop}} file.<br />
<br />
===== Method 2 =====<br />
Another method is to copy the entire contents of the global applications directory over to your local applications directory, and then proceed to modify and/or disable unwanted .desktop entries. This will survive application updates that overwrite changes under {{ic|/usr/share/applications/}}.<br />
# In a terminal, copy everything from {{ic|/usr/share/applications}} to {{ic|~/.local/share/applications/}}: {{bc|$ cp /usr/share/applications/* ~/.local/share/applications/}}<br />
# For any entry you wish to hide from the menu, add the {{ic|1=NoDisplay=true}} option: {{bc|1=$ echo "NoDisplay=true" >> ~/.local/share/applications/foo.desktop}}<br />
<br />
You can also edit the application's category by editing the {{ic|.desktop}} file with a text editor and modifying the {{ic|1=Categories=}} line.<br />
<br />
===== Method 3 =====<br />
The third method is the '''cleanest''' and recommended in the [http://wiki.xfce.org/howto/customize-menu Xfce wiki].<br />
<br />
Create the file {{ic|~/.config/menus/xfce-applications.menu}} and copy the following in it:<br />
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"<br />
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"><br />
<br />
<Menu><br />
<Name>Xfce</Name><br />
<MergeFile type="parent">/etc/xdg/menus/xfce-applications.menu</MergeFile><br />
<br />
<Exclude><br />
<Filename>xfce4-run.desktop</Filename><br />
<br />
<Filename>exo-terminal-emulator.desktop</Filename><br />
<Filename>exo-file-manager.desktop</Filename><br />
<Filename>exo-mail-reader.desktop</Filename><br />
<Filename>exo-web-browser.desktop</Filename><br />
<br />
<Filename>xfce4-about.desktop</Filename><br />
<Filename>xfhelp4.desktop</Filename><br />
</Exclude><br />
<br />
<Layout><br />
<Merge type="all"/><br />
<Separator/><br />
<br />
<Menuname>Settings</Menuname><br />
<Separator/><br />
<br />
<Filename>xfce4-session-logout.desktop</Filename><br />
</Layout><br />
<br />
</Menu><br />
<br />
The {{ic|<MergeFile>}} tag includes the default Xfce menu in our file. This is important.<br />
<br />
The {{ic|<Exclude>}} tag excludes applications which we do not want to appear in the menu. Here we excluded some Xfce default shortcuts, but you can exclude {{ic|firefox.desktop}} or any other application.<br />
<br />
The {{ic|<Layout>}} tag defines the layout of the menu. The applications can be organized in folders or however we wish. For more details see the aforementioned Xfce wiki page.<br />
<br />
===== Method 4 =====<br />
Alternatively a tool called [http://www.redsquirrel87.com/XAME.html xame] can be used. XAME is a GUI tool written in Gambas designed specifically for editing menu entires in XFCE, it will NOT work in other DEs. XAME is available in the {{AUR|xame}} package from the [[AUR]].<br />
<br />
==== Missing applications ====<br />
When some applications are installed (for example via [[WINE]]), they may not be listed in {{ic|/usr/share/applications}}. Shortcuts ''might'' be found in the category “Other” in this directory:<br />
{{ic|~/.local/share/applications/wine/}}.<br />
<br />
====Panel autohide delay====<br />
Add this to {{ic|~/.gtkrc-2.0}}.<br />
style "xfce-panel-window-style"<br />
{<br />
# Time in miliseconds before the panel will unhide on an enter event<br />
XfcePanelWindow::popup-delay = 225<br />
<br />
# Time in miliseconds before the panel will hide on a leave event<br />
XfcePanelWindow::popdown-delay = 350<br />
}<br />
class "XfcePanelWindow" style "xfce-panel-window-style"<br />
<br />
====Panel at desktop level====<br />
<br />
If you want a panel at desktop level (i.e., other windows will stack over it) you need a little hack, ensure you have installed the {{pkg|wmctrl}} package from the [[Official Repositories]].<br />
<br />
Create a script in {{ic|~/.config/xfce4/xfce4-fix-panel}} with this content and make it executable (you can use {{ic|chmod 755 xfce4-fix-panel}}).<br />
<br />
#!/bin/bash<br />
set -e<br />
<br />
function getPanelIdImpl() {<br />
# get panel id<br />
PANEL="`wmctrl -l | sed -n -e '/ xfce4-panel$/ s_ .*$__ p' | sed -n -e $1' p'`"<br />
}<br />
<br />
function getPanelId() {<br />
# eventually await the panel to appear<br />
getPanelIdImpl $1<br />
while [ x = x$PANEL ] ;do<br />
sleep 0.5s<br />
getPanelIdImpl $1<br />
done<br />
}<br />
<br />
function putPanelDown() {<br />
PANEL=""<br />
getPanelId $1<br />
wmctrl -i -r $PANEL -b add,below<br />
}<br />
<br />
# call the program with a list of panel numbers as arguments<br />
# for example, xfce4-fix-panel 1 2 3<br />
# for the first three panels<br />
for i in $* ;do<br />
putPanelDown $i<br />
done<br />
<br />
<br />
Once wrote the script, and tested it, you need to auto-execute it at each login. You can use the {{ic|Session and StartUp -> Application Autostart}} gui.<br />
<br />
This passage will put your panels at desktop level, but if your panel is sticking to a border the maximized windows will not stack over it. You can enable this behavior with the following command, fortunately you need to do this only once. (change the $ID with the panel number of interest)<br />
<br />
xfconf-query -c xfce4-panel -p /panels/panel-$ID/disable-struts -n -t bool -s true<br />
<br />
=== Desktop ===<br />
<br />
==== Transparent Background for Icon Titles ====<br />
To change the default white background of desktop icon titles to something more suitable, edit the {{ic|.gtkrc-2.0}} file in your home directory (or create the file if needed) and add the following:<br />
style "xfdesktop-icon-view" {<br />
XfdesktopIconView::label-alpha = 10<br />
base[NORMAL] = "#000000"<br />
base[SELECTED] = "#71B9FF"<br />
base[ACTIVE] = "#71FFAD"<br />
fg[NORMAL] = "#ffffff"<br />
fg[SELECTED] = "#71B9FF"<br />
fg[ACTIVE] = "#71FFAD" }<br />
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"<br />
<br />
==== Hide Selected Partitions ====<br />
If you wish to prevent certain partitions or drives appearing on the desktop, you can create a udev rule, for example {{ic|/etc/udev/rules.d/10-local.rules}}:<br />
<br />
KERNEL=="sda1", ENV{UDISKS_PRESENTATION_HIDE}="1"<br />
KERNEL=="sda2", ENV{UDISKS_PRESENTATION_HIDE}="1"<br />
<br />
Would show all partitions with the exception of sda1 and sda2 on your desktop. Notice, if you are using udisk2 the above will not work, due to the UDISKS_PRESENTATION_HIDE no longer being supported, instead you must use UDISKS_IGNORE as follows<br />
<br />
KERNEL=="sda1", ENV{UDISKS_IGNORE}="1"<br />
KERNEL=="sda2", ENV{UDISKS_IGNORE}="1"<br />
<br />
==== Remove Thunar Options from Right-click ====<br />
xfconf-query -c xfce4-desktop -v --create -p /desktop-icons/style -t int -s 0<br />
<br />
==== Kill Window Shortcut ====<br />
Xfce does not support the ''kill window'' shortcut directly, but you can add one with a simple script. Ensure you have the '''xorg-xkill''' package installed.<br />
<br />
Create a script in {{ic|~/.config/xfce4/killwindow.sh}} with this content and make it executable (you can use {{ic|chmod 755 killwindow.sh}}).<br />
<br />
xkill -id "`xprop -root -notype | sed -n '/^_NET_ACTIVE_WINDOW/ s/^.*# *\|\,.*$//g p'`"<br />
<br />
Now associate a shortcut using {{ic|Settings -> Keyboard}} to that script.<br />
<br />
=== XFWM4 ===<br />
==== Enabling the Compositor ====<br />
Xfce comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on. It can be enabled in the Window Manager Tweaks and works on the fly. No additional settings are needed in your {{ic|/etc/xorg.conf}}. To enable and adjust settings, go to:<br />
<br />
Menu --> Settings --> Window Manager Tweaks<br />
<br />
==== Disable window roll-up ====<br />
xfconf-query -c xfwm4 -p /general/mousewheel_rollup -s false<br />
<br />
==== Toggle Automatic Tiling of Windows at Edge of Screen ====<br />
XFWM4 has the ability to "tile" a window automatically when it is moved to the edge of the screen by resizing it to fill the top half of the screen. (The official XFCE website says this feature is disabled by default in XFCE 4.10, but it seems to be enabled by default on Arch Linux.) This behavior can be enabled or disabled in {{ic|Window Manager Tweaks --> Accessibility --> Automatically tile windows when moving toward the screen edge}}, or:<br />
<br />
xfconf-query -c xfwm4 -p /general/tile_on_move -s false # To disable<br />
xfconf-query -c xfwm4 -p /general/tile_on_move -s true # To enable<br />
<br />
=== Settings Manager Commands ===<br />
There is no official documentation for the commands executed. One must look at {{ic|.desktop}} files {{ic|/usr/share/applications/}} folder. For the people who like to know exactly what is happening, here is a handy list to save the effort:<br />
<br />
xfce4-accessibility-settings<br />
xfce4-power-manager-settings<br />
xfce4-settings-editor<br />
xfdesktop-settings<br />
xfce4-display-settings<br />
xfce4-keyboard-settings<br />
xfce4-mouse-settings<br />
xfce4-session-settings<br />
xfce4-settings-manager<br />
xfce4-appearance-settings<br />
xfwm4-settings<br />
xfwm4-tweaks-settings<br />
xfwm4-workspace-settings<br />
orage -p<br />
<br />
To review all the available setting manager commands run the following in a terminal:<br />
<br />
$ grep '^Exec=' /usr/share/applications/xfce*settings* | sed -e 's_^.*=_ _'<br />
<br />
===Session===<br />
====Custom Startup Applications====<br />
<br />
=====Session and Startup Settings=====<br />
<br />
Click the Applications Menu -> Settings -> Settings Manager and then choose the "Session and Startup" option.<br />
Click the tab "Application Autostart" and you can configure what get's started automatically when you login to Xfce.<br />
To add a custom program, click the "Add" button and fill out the form, specifying the path to an executable you want to run.<br />
=====Startup Script=====<br />
<br />
Alternatively you can use this method, to run a command line script to launch your applications. This includes getting necessary environment variables into the GUI runtime.<br />
<br />
* Copy the file {{ic|/etc/xdg/xfce4/xinitrc}} to {{ic|~/.config/xfce4/}}<br />
* Edit this file. For example, you can add something like this somehwere in the middle:<br />
source $HOME/.bashrc<br />
# start rxvt-unicode server<br />
urxvtd -q -o -f<br />
<br />
====Lock the screen====<br />
To lock an Xfce4 session (through {{ic|xflock4}}) one of {{Pkg|xscreensaver}}, {{Pkg|gnome-screensaver}} or {{Pkg|xlockmore}} packages needs to be installed.<br />
<br />
====Switch between users====<br />
Xfce4 allows this behavior under the 'action buttons' menu item. Currently, both [[gdm]] and [[Lightdm#User switching under xfce4|lightdm]] provide this functionality.<br />
<br />
==== Manually Modifying XML settings ====<br />
It may be useful, especially when upgrading, to manually edit .xml files in the {{ic|~/.config/xfce4/xfconf/}} folder. For application keyboard shortcuts for example, the file is {{ic|~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml}}. It is faster to copy and paste the XML keys that you want rather than using the GUI.<br />
<br />
===Removable Devices===<br />
If you want an icon appearing on your desktop and in Thunar when you plug in external devices, make sure {{Pkg|gvfs}} is installed. You could also need to install {{Pkg|gvfs-afc}} (read [https://bbs.archlinux.org/viewtopic.php?pid=889018 this discussion]). It is also a good idea to install {{Pkg|thunar-volman}} (already included in the {{Grp|xfce4}} base group). Additionally, [[udisks]] and a udisks wrapper are recommended if you want to automount optical and external drives easily.<br />
<br />
===Look and Feel===<br />
====Add themes to XFCE====<br />
1. Go to [http://www.xfce-look.org www.xfce-look.org] and click "Themes" in the left navbar. Look around for a theme you want and click "Download".<br />
<br />
2. Go to the directory where you downloaded the tarball/file and extract it using Squeeze/Xarchiver/CLI.<br />
<br />
3. Move the extracted folder to {{ic|/usr/share/themes}} (for all users) or {{ic|~/.themes}} (for just you). Inside {{ic|/usr/share/themes/abc}}, there is a folder that you create called xfwm4 that will contain whatever files that is included with that theme.<br />
<br />
4. GTK theme is available here:<br />
Menu --> Settings --> Appearance<br />
You select your xfwm theme in:<br />
Menu --> Settings --> Window Manager<br />
<br />
==== Cursors ====<br />
Main article: [[X11 Cursors]]<br />
<br />
If you have alternative X cursor themes installed, Xfce can find them with:<br />
Menu --> Settings --> Mouse --> Theme<br />
<br />
==== Icons ====<br />
# First find and download your desired icon pack. Recommended places to download icons from are [http://www.customize.org Customize.org], [http://opendesktop.org Opendesktop.org] and [http://xfce-look.org/ Xfce-look.org]; the [[AUR]] provides several PKGBUILDs for icon packs.<br />
# Go to the directory where you downloaded the icon pack and extract it. Example {{ic|tar -xzf /home/user/downloads/icon-pack.tar.gz}}.<br />
# Move the extracted folder containing the icons to {{ic|~/.icons}} (if only you want to use the icons) or to {{ic|/usr/share/icons}} (if you want all users on the system to make use of the icons), and in the lattter case consider creating a [[PKGBUILD]] for that.<br />
# Optional: run {{ic|gtk-update-icon-cache -f -t ~/.icons/<theme_name>}} to update icon cache<br />
# Switch your icons by going to:<br />
Menu --> Settings --> Appearance --> Icons<br />
<br />
When you have icon theme problems, it is also recommended to install the {{Pkg|hicolor-icon-theme}} package if it was not already installed.<br />
<br />
==== Fonts ====<br />
If you find the standard fonts rather thick and or slightly out of focus open Settings>Appearence click on the Fonts tab and under Hinting: change to Full<br />
<br />
You could also try using a custom DPI setting.<br />
<br />
=== Sound ===<br />
<br />
==== Configuring xfce4-mixer ====<br />
<br />
{{Pkg|xfce4-mixer}} is the GUI mixer app / panel plugin made by the Xfce team. It is part of the xfce4 group, so you probably already have it installed. Xfce 4.6 uses {{Pkg|gstreamer}} as the backend to control volume, so first you have to make gstreamer cooperate with xfce4-mixer. One or more of the gstreamer plugin packages listed as optional dependencies to xfce4-mixer must be installed. Without one of these required plugins packages, the following error arises when clicking on the mixer panel item.<br />
<br />
GStreamer was unable to detect any sound devices. Some sound system specific GStreamer packages may be missing. It may also be a permissions problem.<br />
<br />
(It is probably not a permissions problem. It is no longer required to add audio users to the "audio" group.) Which plugins are needed depends on the hardware. Most people should be fine with {{Pkg|gstreamer0.10-base-plugins}} which can be [[pacman|installed]] from [[Official Repositories]]. <br />
<br />
If the xfce4-mixer panel item was already running before one of the plugins packages was installed, logout and login to see if it worked, or just remove the mixer plugin from the panel and add it again. If that does not work, you might need more or different gstreamer plugins. Try to [[pacman|install]] package {{pkg|gstreamer0.10-good-plugins}} or {{pkg|gstreamer0.10-bad-plugins}}.<br />
<br />
For further details, for example how to set the default sound card, see [[Advanced Linux Sound Architecture]]. Alternatively you can use [[PulseAudio]] together with {{Pkg|pavucontrol}}.<br />
<br />
==== Xfce4-mixer and OSS4 ====<br />
<br />
If you tried the above section to get {{Pkg|xfce4-mixer}} to work and it does not work at all, then you may have to compile {{pkg|gstreamer0.10-good-plugins}} yourself. Download the PKGBUILD and other files needed from ABS or [https://projects.archlinux.org/svntogit/packages.git/tree/gstreamer0.10-good/repos here], edit the PKGBUILD, add --enable-oss. <br />
<br />
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \<br />
'''--enable-oss \'''<br />
--disable-static --enable-experimental \<br />
--disable-schemas-install \<br />
--disable-hal \<br />
--with-package-name="GStreamer Good Plugins (Archlinux)" \<br />
--with-package-origin="https://www.archlinux.org/"<br />
<br />
and then run makepkg -i. <br />
<br />
makepkg -i<br />
<br />
Still not working? Try this package in AUR {{AUR|gstreamer0.10-good-plugins-ossv4}}, modify the pkgver to the newest in the PKGBUILD, and it should work.<br />
<br />
Other LINKS: [http://www.4front-tech.com/forum/ OSS forum]<br />
<br />
==== Keyboard Volume Buttons ====<br />
<br />
Go to <br />
Settings --> Keyboard<br />
Click the "Application Shortcuts" tab and add click the "Add" button. Add the following by entering the command, then pressing the corresponding button at the next window:<br />
<br />
===== ALSA =====<br />
For the raise volume button:<br />
amixer set Master 5%+<br />
For the lower volume button:<br />
amixer set Master 5%-<br />
For the mute button:<br />
amixer set Master toggle<br />
<br />
You can also run these commands to set the above commands to the standard XF86Audio keys:<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioRaiseVolume -n -t string -s "amixer set Master 5%+ unmute"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioLowerVolume -n -t string -s "amixer set Master 5%- unmute"<br />
xfconf-query -c xfce4-keyboard-shortcuts -p /commands/custom/XF86AudioMute -n -t string -s "amixer set Master toggle"<br />
<br />
If {{ic|amixer set Master toggle}} does not work, try the PCM channel ({{ic|amixer set PCM toggle}}) instead.<br />
<br />
The channel must have a "mute" option for the toggle command to work. To check whether or not your Master channel supports toggling mute, run {{ic|alsamixer}} in a terminal and look for the double M's (MM) under the Master channel. If they are not present, then it does not support the mute option. If, for example, you had to change the toggle button to use the PCM channel, make sure to also set the PCM channel as the Mixer Track under Xfce Mixer properties.<br />
<br />
===== OSS =====<br />
Use one of these scripts: http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Using_multimedia_keys_with_OSS<br />
<br />
If using ossvol (recommended), add:<br />
ossvol -i 1<br />
for the volume up button<br />
ossvol -d 1<br />
for the volume down button<br />
ossvol -t<br />
for the mute/unmute button<br />
<br />
===== PulseAudio =====<br />
For the raise volume button:<br />
pactl set-sink-mute 0 false ; pactl set-sink-volume 0 +1%<br />
For the lower volume button:<br />
pactl set-sink-mute 0 false ; pactl -- set-sink-volume 0 -1%<br />
For the mute button:<br />
pactl set-sink-mute 0 toggle<br />
<br />
These settings assume the device you want to control has index 0.<br />
Use {{ic|pactl list sinks short}} to list sinks.<br />
<br />
===== Xfce4-volumed =====<br />
<br />
[https://aur.archlinux.org/packages.php?ID=31693 xfce4-volumed] daemon from the [[AUR]] automatically maps volume keys of your keyboard to Xfce-mixer. Additionally you get OSD through Xfce4-notifyd when changing volume. Xfce4-volumed does not need any configuration and is started automatically with Xfce.<br />
<br />
{{accuracy|reason=There should be a short explanation of what this does and why it fixes the problem (bug?).}}<br />
<br />
If you use pulseaudio and xfce4-volumed unmute does not work, try this:<br />
<br />
$ xfconf-query -c xfce4-mixer -p /active-card -s `xfconf-query -c xfce4-mixer -p /sound-card`<br />
<br />
===== Volumeicon =====<br />
<br />
{{pkg|volumeicon}} is an alternative to xfce4-volumed in the community repo also handling keybindings and notifications through {{pkg|xfce4-notifyd}}.<br />
<br />
==== Adding startup/boot sound ====<br />
<br />
Arch does not have a built-in startup sound configuration tool, but there is a workaround by adding the following command to your Application Autostart settings:<br />
<br />
aplay /boot/startupsound.wav<br />
<br />
The file location and filename can be whatever you want, but naming it descriptively and putting it in /boot keeps things tidy.<br />
<br />
=== xdg-open integration (Preferred Applications) ===<br />
<br />
Most applications rely on [[xdg-open]] for opening a preferred application for a given file or URL.<br />
<br />
In order for xdg-open and xdg-settings to detect and integrate with the XFCE desktop environment correctly, you need to [[pacman|install]] the {{Pkg|xorg-xprop}} package.<br />
<br />
If you do not do that, your preferred applications preferences (set by exo-preferred-applications) will not be obeyed.<br />
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.<br />
<br />
To make sure xdg-open integration is working correctly, ask ''xdg-settings'' for the default web browser and see what the result is:<br />
<br />
# xdg-settings get default-web-browser<br />
<br />
If it replies with:<br />
<br />
xdg-settings: unknown desktop environment<br />
<br />
it means that it has failed to detect XFCE as your desktop environment, which is likely due to a missing {{Pkg|xorg-xprop}} package.<br />
<br />
=== Screenshots ===<br />
<br />
XFCE has its own screenshot tool, {{pkg|xfce4-screenshooter}}. It is part of the {{grp|xfce4-goodies}} group.<br />
<br />
==== Print Screen key ====<br />
<br />
Go to:<br />
<br />
XFCE Menu --> Settings --> Keyboard >>> Application Shortcuts.<br />
<br />
Add the "xfce4-screenshooter -f" command to use the "PrintScreen" key in order to take fullscreen screenshots. See screenshooter's man page for other optional arguments.<br />
<br />
Alternatively, an independent screenshot program like [[Taking a Screenshot#scrot|scrot]] can be used.<br />
<br />
===Terminal color themes or pallets===<br />
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 {{ic|~/.config/xfce4/terminal/terminalrc}} file. There are also so many other themes to choose from. Check forums post [[https://bbs.archlinux.org/viewtopic.php?pid=1194644|Terminal Colour Scheme Screenshots]] for hundreds of available choices and themes.<br />
<br />
====Changing default color theme====<br />
XFCE's {{ic|extra/terminal}} package comes with a darker color palette and colored text looks pretty horrid in default black background impeding user readability. Append the following in your terminalrc file for a lighter color theme, that is always visible in darker Terminal backgrounds.<br />
<br />
~/.config/xfce4/terminal/terminalrc<br />
<br />
ColorPalette5=#38d0fcaaf3a9<br />
ColorPalette4=#e013a0a1612f<br />
ColorPalette2=#d456a81b7b42<br />
ColorPalette6=#ffff7062ffff<br />
ColorPalette3=#7ffff7bd7fff<br />
ColorPalette13=#82108210ffff<br />
<br />
====Terminal tango color theme====<br />
To switch to tango color theme, open with your favorite editor<br />
<br />
~/.config/xfce4/terminal/terminalrc<br />
<br />
And add(replace) these lines:<br />
<br />
ColorForeground=White<br />
ColorBackground=#323232323232<br />
ColorPalette1=#2e2e34343636<br />
ColorPalette2=#cccc00000000<br />
ColorPalette3=#4e4e9a9a0606<br />
ColorPalette4=#c4c4a0a00000<br />
ColorPalette5=#34346565a4a4<br />
ColorPalette6=#757550507b7b<br />
ColorPalette7=#060698989a9a<br />
ColorPalette8=#d3d3d7d7cfcf<br />
ColorPalette9=#555557575353<br />
ColorPalette10=#efef29292929<br />
ColorPalette11=#8a8ae2e23434<br />
ColorPalette12=#fcfce9e94f4f<br />
ColorPalette13=#72729f9fcfcf<br />
ColorPalette14=#adad7f7fa8a8<br />
ColorPalette15=#3434e2e2e2e2<br />
ColorPalette16=#eeeeeeeeecec<br />
<br />
=== Colour management ===<br />
xfce4-settings-manager does not yet have any colour management / calibration settings, nor is there any specific XFCE program to characterise your monitor.<br />
<br />
==== Loading a profile ====<br />
If you wish to '''load an icc profile''' (that you have previously created or downloaded) to calibrate your display on startup, you can download {{AUR|xcalib}} 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 {{ic|/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.<br />
<br />
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.).<br />
<br />
See [[ICC Profiles#Loading ICC Profiles]] for more information.<br />
<br />
==== Creating a profile ====<br />
<br />
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 [https://aur.archlinux.org/packages.php?ID=25883 dispcalGUI] from [[AUR]]. <br />
<br />
Another option is to install {{ic|gnome-settings-daemon}} and {{ic|gnome-color-manager}} (available in extra). In order to start the calibration from the command line, first do {{ic|/usr/lib/gnome-settings-daemon/gnome-settings-daemon &}} (note: this might change your keyboard layout and who knows what else, so probably good to do it on a throwaway account), then {{ic|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 command {{ic|gcm-calibrate --device "xrandr-Lenovo Group Limited"}}.<br />
{{Note|1=The reason you need gnome-settings-daemon running is because XFCE does not yet have a session component for colord: https://bugzilla.xfce.org/show_bug.cgi?id=8559}}<br />
<br />
See [[ICC Profiles]] for more information.<br />
<br />
=== Multiple Monitors ===<br />
If you have configured X.org so that your display spans multiple monitors, usually when you login to an '''XFCE''' session, it will appear as if your monitors are simple clones of one another. You can use an '''xrandr''' tool to tweak your setup but if this is not called at an appropriate time in the startup sequence, some functionality may be lost with parts of your display being inaccessible to the mouse pointer.<br />
<br />
A better way is to configure XFCE to match your desired display arrangement. However, at present (xfce-settings 4.10), there is no tool available to assist with configuring multiple monitors directly. <br />
<br />
* The ''Settings -> Display'' tool does allow configuration of screen resolution, rotation and enabling individual monitors; '''warning''': ''using this tool to adjust display settings will reset or lose settings made manually for properties not explicitly offered as buttons in the tool (see below)''.<br />
* The ''Settings -> Settings Editor'' allows manipulation of all configuration items in particular the ''displays'' settings which are saved in the file '''displays.xml''' below<br />
~/.config/xfce4/xfconf/xfce-perchannel-xml<br />
* Alternatively, the ''displays.xml'' can be edited using your favourite editor.<br />
<br />
The main requirement for multiple monitors is their arrangement relative to one another. This can be controlled by setting the '''Position''' properties ('''X''' and '''Y''') to suit; an ''(x,y)'' position of ''0,0'' corresponds to the ''top, left'' position of the monitor array. This is the default position for all monitors and if several monitors are enabled they will appear as a cloned display area extending from this point. <br />
<br />
To extend the display area correctly across both monitors:<br />
<br />
* for side-by-side monitors, set the '''X''' property of the rightmost monitor to equal the width of the left-most monitor<br />
* for above-and-below monitors, set the '''Y''' property of the bottom monitor to equal the height of the upper monitor<br />
* for other arrangements, set the '''X''' and '''Y''' properties of each monitor to correspond to your layout<br />
<br />
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:<br />
<br />
<channel name="displays" version="1.0"><br />
<property name="Default" type="empty"><br />
<property name="VGA-1" type="string" value="Idek Iiyama 23&quot;"><br />
<property name="Active" type="bool" value="true"/><br />
<property name="Resolution" type="string" value="1920x1080"/><br />
<property name="RefreshRate" type="double" value="60.000000"/><br />
<property name="Rotation" type="int" value="90"/><br />
<property name="Reflection" type="string" value="0"/><br />
<property name="Primary" type="bool" value="false"/><br />
<property name="Position" type="empty"><br />
<property name="X" type="int" value="0"/><br />
<property name="Y" type="int" value="0"/><br />
</property><br />
</property><br />
<property name="DVI-0" type="string" value="Digital display"><br />
<property name="Active" type="bool" value="true"/><br />
<property name="Resolution" type="string" value="1920x1080"/><br />
<property name="RefreshRate" type="double" value="60.000000"/><br />
<property name="Rotation" type="int" value="90"/><br />
<property name="Reflection" type="string" value="0"/><br />
<property name="Primary" type="bool" value="false"/><br />
<property name="Position" type="empty"><br />
<property name="X" type="int" value="1080"/><br />
<property name="Y" type="int" value="0"/><br />
</property><br />
</property><br />
</property><br />
</channel><br />
<br />
Usually, editing settings in this way requires a logout/login to action them.<br />
<br />
A new method for configuring multiple monitors will be available in the forthcoming xfce-settings 4.12 release.<br />
<br />
=== XDG User Directories ===<br />
freedesktop.org specifies the "well known" user directories like the desktop folder and the music folder. See [[Xdg user directories]] for detailed info.<br />
<br />
=== SSH Agents ===<br />
By default Xfce 4.10 will try to load gpg-agent or ssh-agent in that order during session initialization. To disable this, create an xfconf key using the following command:<br />
<br />
xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false<br />
<br />
To force using ssh-agent even if gpg-agent is installed, run the following instead:<br />
<br />
xfconf-query -c xfce4-session -p /startup/ssh-agent/type -n -t string -s ssh-agent<br />
<br />
To use [[GNOME Keyring]], simply tick the checkbox ''Launch GNOME services on startup'' in the ''Advanced'' tab of ''Session Manager'' in Xfce's settings. This will also disable gpg-agent and ssh-agent.<br />
<br />
Source: http://docs.xfce.org/xfce/xfce4-session/advanced<br />
<br />
== Troubleshooting ==<br />
=== xfce4-power-manager ===<br />
Power-related [[Wikipedia:Advanced Configuration and Power Interface|ACPI]] events can be configured using [[systemd]] via options from {{ic|/etc/systemd/logind.conf}} to give control to xfce4-power-manager.<br />
<br />
{{hc|/etc/systemd/logind.conf|2=<br />
HandlePowerKey=ignore<br />
HandleSuspendKey=ignore<br />
HandleHibernateKey=ignore<br />
HandleLidSwitch=ignore}}<br />
<br />
This also solves the issue when the computer registers multiple suspend events.<br />
<br />
=== xfce4-xkb-plugin ===<br />
There is a bug in version {{Pkg|xkb-plugin}} ''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<br />
xfce4-keyboard-settings<br />
Go to ''Layout'' tab and set the ''Use system defaults'' flag, then reconfigure xkb-plugin.<br />
<br />
=== Locales ignored with GDM ===<br />
Add your locale to {{ic|/var/lib/AccountsService/users/$USER}} (replace {{ic|hu_HU.UTF-8}} with your own locale):<br />
[User]<br />
Language=hu_HU.UTF-8<br />
XSession=xfce<br />
You may also do it with sed. Note the backslash before .UTF-8:<br />
# sed -i 's/Language=.*/Language=hu_HU\.UTF-8/' /var/lib/AccountsService/users/$USER<br />
Restart GDM to take effect.<br />
<br />
=== Restore default settings ===<br />
If for any reason you need to revert back to the default settings, try renaming {{ic|~/.config/xfce4-session/}} and {{ic|~/.config/xfce4/}}<br />
<br />
$ mv ~/.config/xfce4-session/ ~/.config/xfce4-session-bak<br />
$ mv ~/.config/xfce4/ ~/.config/xfce4-bak<br />
<br />
Logout and login for changes to take effect. If upon logging in you get an error window with the heading "Unable to load a failsafe session," see the [[Xfce#Session_failure|Session Failure]] section on this page.<br />
<br />
=== NVIDIA and xfce4-sensors-plugin ===<br />
To detect and use sensors of nvidia gpu you need to install {{AUR|libxnvctrl}} and then recompile {{Pkg|xfce4-sensors-plugin}} package.<br />
<br />
=== Session failure ===<br />
If the window manager does not load correctly, you maybe got a session error. Typical symptoms of this can include:<br />
<br />
* the mouse is an X and/or does not appear at all<br />
* window decorations have disappeared and windows cannot be closed<br />
* "Window Manager" settings tool ({{ic|xfwm4-settings}}) will not start, reporting <br />
These settings cannot work with your current window manager (unknown)<br />
* errors being reported by {{ic|slim}} or your login manager like<br />
No window manager registered on screen 0<br />
<br />
Restarting xfce or rebooting your system may resolve the problem but more likely the problem is a corrupt session. Delete the session folder below the {{ic|.cache}} folder:<br />
$ rm -r ~/.cache/sessions/<br />
<br />
=== Preferred Applications preferences have no effect ===<br />
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 (Preferred Applications)]]<br />
<br />
=== Action Buttons/Missing Icons ===<br />
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 {{ic|/usr/share/icons}}. For example, if the icon theme is GNOME, make a note of the directory name {{ic|/usr/share/icons/gnome}}.<br />
<br />
icontheme=/usr/share/icons/gnome<br />
<br />
Make sure that the {{Pkg|xfce4-power-manager}} is installed as this contains the needed icons. Now create symbolic links from the current icon theme into the {{ic|hicolor}} icon theme.<br />
<br />
ln -s /usr/share/icons/hicolor/16x16/actions/xfpm-suspend.png ${icontheme}/16x16/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/16x16/actions/xfpm-hibernate.png ${icontheme}/16x16/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/22x22/actions/xfpm-suspend.png ${icontheme}/22x22/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/22x22/actions/xfpm-hibernate.png ${icontheme}/22x22/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/24x24/actions/xfpm-suspend.png ${icontheme}/24x24/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/24x24/actions/xfpm-hibernate.png ${icontheme}/24x24/actions/system-hibernate.png<br />
ln -s /usr/share/icons/hicolor/48x48/actions/xfpm-suspend.png ${icontheme}/48x48/actions/system-suspend.png<br />
ln -s /usr/share/icons/hicolor/48x48/actions/xfpm-hibernate.png ${icontheme}/48x48/actions/system-hibernate.png<br />
<br />
Log out and in again, and you should see icons for all actions.<br />
<br />
=== Enable cedilla ç/Ç instead of ć/Ć ===<br />
When you select the keyboard layout "U.S., alternative international" in Settings --> Keyboard --> Layout to enable accents, the typical combination for the cedilla ' + c results in ć instead of ç.To change this suffice edit files gtk.immodules for gtk-2.0 and immodules.cache for gtk-3.0 in line that contains "cedilla" adding both "en" in the list "az:ca:co:fr:gv:oc:pt:sq:tr:wa" but in alphabetical order, staying that way in /etc/gtk-2.0/gtk.immodules<br />
<br />
"/usr/lib/gtk-2.0/2.10.0/immodules/im-cedilla.so" <br />
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:en:fr:gv:oc:pt:sq:tr:wa"<br />
<br />
and this in /usr/lib/gtk-3.0/3.0.0/immodules.cache<br />
<br />
"/usr/lib/gtk-3.0/3.0.0/immodules/im-cedilla.so" <br />
"cedilla" "Cedilla" "gtk30" "/usr/share/locale" "az:ca:co:en:fr:gv:oc:pt:sq:tr:wa"<br />
<br />
Then, do<br />
# echo "export GTK_IM_MODULE=cedilla" >> /etc/environment<br />
<br />
Done. Simply just close and reopen the gtk programs like gedit.<br />
<br />
=== Non ASCII characters when mounting USB sticks ===<br />
A common problem when automounting USB sticks formatted with fat filesystem is the inability to properly show characters as umlauts, ñ, ß, etc. This may be solved by changing the default iocharset to UTF-8, which is easily done adding a line to {{ic|/etc/xdg/xfce4/mount.rc}}:<br />
<br />
[vfat]<br />
uid=<auto><br />
shortname=winnt<br />
'''utf8=true'''<br />
# FreeBSD specific option<br />
longnames=true<br />
flush=true<br />
<br />
Note that when using utf-8, the system will distinct between upper- and lowercases, potentially corrupting your files, so be careful.<br />
<br />
It is possible to mount vfat devices with ''flush'' option, so that when copying to USB sticks data flushes more often, thus making thunar's progress bar to stays up until finished. 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.<br />
<br />
==See also==<br />
* http://docs.xfce.org/ - The complete documentation.<br />
* [http://www.xfce-look.org/ Xfce-Look] - Themes, wallpapers, and more.<br />
* [http://xfce.wikia.com/wiki/Frequently_Asked_Questions Xfce Wikia] - How to edit the auto generated menu with the menu editor<br />
* [http://wiki.xfce.org Xfce Wiki]</div>Cinchhttps://wiki.archlinux.org/index.php?title=Improving_performance&diff=257308Improving performance2013-05-16T16:21:48Z<p>Cinch: /* GPU Overclocking */</p>
<hr />
<div>[[Category:Hardware]]<br />
[[Category:System administration]]<br />
[[es:Maximizing Performance]]<br />
[[ja:Maximizing Performance]]<br />
[[ru:Maximizing Performance]]<br />
[[zh-CN:Maximizing Performance]]<br />
This article is a retrospective analysis and basic rundown about gaining performance in Arch Linux.<br />
<br />
==The basics==<br />
<br />
===Know your system===<br />
The best way to tune a system is to target the bottlenecks, that is the subsystems that limit the overall speed. They usually can be identified by knowing the specifications of the system, but there are some basic indications:<br />
* If the computer becomes slow when big applications, like OpenOffice.org and Firefox, are running at the same time, then there is a good chance the amount of RAM is insufficient. To verify available RAM, use this command, and check for the line beginning with -/+buffers:<br />
$ free -m<br />
* If boot time is really slow, and if applications take a lot of time to load the first time they are launched, but run fine afterwards, then the hard drive is probably too slow. The speed of a hard drive can be measured using the hdparm command:<br />
$ hdparm -t /dev/sdx<br />
This is only the pure read speed of the hard drive, and is not a valid benchmark, but a value superior to 40MB/s (assuming drive tested while idle) can be considered decent on an average system. hdparm can be found in the [[Official Repositories]].<br />
* If the CPU load is consistently high even when RAM is available, then lowering CPU usage should be a priority. CPU load can be monitored in many ways, like using the top command:<br />
$ top<br />
* If the only applications lagging are the ones using direct rendering, meaning they use the graphic card, like video players and games, then improving the graphic performance should help. First step would be to verify if direct rendering simply is not enabled. This is indicated by the glxinfo command:<br />
$ glxinfo | grep direct<br />
glxinfo is part of mesa-demos package.<br />
<br />
===The first thing to do===<br />
The simplest and most efficient way of improving overall performance is to run lightweight environments and applications.<br />
* Use a [[Window Manager|window manager]] instead of a [[Desktop Environment]]. Choices include [[dwm]], [[wmii]], [[Awesome]], [[Openbox]], [[Fluxbox]] and [[JWM]].<br />
* Choose a minimal Desktop Environment over a heavier one like [[GNOME]] or [[KDE]]. Something like [[LXDE]] or [[Xfce]].<br />
* Using lightweight applications. Search [[Common Applications]] for console applications and the Light and Fast Applications Awards threads in the forum: [https://bbs.archlinux.org/viewtopic.php?id=41168 2007], [https://bbs.archlinux.org/viewtopic.php?id=67951 2008], [https://bbs.archlinux.org/viewtopic.php?id=78490 2009], [https://bbs.archlinux.org/viewtopic.php?id=88515 2010], [https://bbs.archlinux.org/viewtopic.php?id=111878 2011], and [https://bbs.archlinux.org/viewtopic.php?id=138281 2012]<br />
* Remove unnecessary [[daemons]].<br />
<br />
===Compromise===<br />
Almost all tuning brings drawbacks. Lighter applications usually come with less features and some tweaks may make a system unstable, or simply require time to implement and maintain. This page tries to highlight those drawbacks, but the final judgment rests on the user.<br />
<br />
===Benchmarking===<br />
The effects of optimization are often difficult to judge. They can however be measured by [[benchmarking]] tools<br />
<br />
==Storage devices==<br />
===Device Layout===<br />
One of the biggest performance gains comes from having multiple storage devices in a layout that spreads the operating system work around. Having {{ic|/}} {{ic|/home}} {{ic|/var}} and {{ic|/usr}} on separate disks is dramatically faster than a single disk layout where they are all on the same hard drive.<br />
<br />
====Swap Files====<br />
Creating your swap files on a separate disk can also help quite a bit, especially if your machine swaps frequently. It happens if you do not have enough RAM for your environment. Using KDE with all the features and applications that come along may require several GiB of memory, whereas a tiny window manager with console applications will perfectly fit in less than 512 MiB of memory.<br />
<br />
====RAID Benefits====<br />
If you have multiple disks (2 or more) available, you can set them up as a software [[RAID]] for serious speed improvements. In a RAID 0 array there is no redundancy in case of drive failure, but for each additional disk you add to the array, the speed of the disk becomes that much faster. The smart choice is to use RAID 5 which offers both speed and data protection.<br />
<br />
====Multiple Hardware Paths====<br />
An internal hardware path is how the storage device is connected to your motherboard. There are different ways to connect to the motherboard such as TCP/IP through a NIC, plugged in directly using PCIe/PCI, Firewire, Raid Card, USB, etc. By spreading your storage devices across these multiple connection points you maximize the capabilities of your motherboard, for example 6 hard-drives connected via USB would be much much slower than 3 over USB and 3 over Firewire. The reason is that each entry path into the motherboard is like a pipe, and there is a set limit to how much can go through that pipe at any one time. The good news is that the motherboard usually has several pipes.<br />
<br />
More Examples<br />
# Directly to the motherboard using pci/PCIe/ata<br />
# Using an external enclosure to house the disk over USB/Firewire<br />
# Turn the device into a network storage device by connecting over tcp/ip<br />
<br />
Note also that if you have a 2 USB ports on the front of your machine, and 4 USB ports on the back, and you have 4 disks, it would probably be fastest to put 2 on front/2 on back or 3 on back/1 on front. This is because internally the front ports are likely a separate Root Hub than the back, meaning you can send twice as much data by using both than just 1. Use the following commands to determine the various paths on your machine.<br />
<br />
{{hc|USB Device Tree|$ lsusb -tv}}<br />
<br />
{{hc|PCI Device Tree|$ lspci -tv}}<br />
<br />
===Partitioning===<br />
The partition layout can influence the system's performance. Sectors at the beginning of the drive (closer to the center of the disk) are faster than those at the end. Also, a smaller partition requires less movements from the drive's head, and so speed up disk operations. Therefore, it is advised to create a small partition (10gb, more or less depending on your needs) only for your system, as near to the beginning of the drive as possible. Other data (pictures, videos) should be kept on a separate partition, and this is usually achieved by separating the home directory (/home/user) from the system (/).<br />
<br />
===Choosing and tuning your filesystem===<br />
Choosing the best filesystem for a specific system is very important because each has its own strengths. The [[Beginner%27s_Guide#Filesystem_types|beginner's guide]] provides a short summary of the most popular ones. You can also find relevant articles [[:Category:File systems|here]].<br />
<br />
====Summary====<br />
*XFS: Excellent performance with large files. Low speed with small files. A good choice for /home.<br />
*Ext3: Average performance, reliable.<br />
*Ext4: Great overall performance, reliable, has performance issues with sqlite and some other databases.<br />
*JFS: Good overall performance, very low CPU usage, extremely fast resume after power failure.<br />
*Btrfs: Probably best overall performance (with compression) and lots of features. Still in heavy development and fully supported, but considered as unstable. Do not use this filesystem yet unless you know what you are doing and are prepared for potential data loss.<br />
<br />
====Mount options====<br />
Mount options offer an easy way to improve speed without reformatting. They can be set using the mount command:<br />
$ mount -o option1,option2 /dev/partition /mnt/partition<br />
To set them permanently, you can modify /etc/fstab to make the relevant line look like this:<br />
/dev/partition /mnt/partition partitiontype option1,option2 0 0<br />
The mount options {{Ic|noatime,nodiratime}} are known for improving performance on almost all file-systems. The former is a superset of the latter (which applies to directories only -- {{Ic|noatime}} applies to both files and directories). In rare cases, for example if you use mutt, it can cause minor problems. You can instead use the {{Ic|relatime}} option (NB relatime is the default in >2.6.30)<br />
<br />
====Ext3====<br />
See [[Ext3]].<br />
<br />
====Ext4====<br />
See [[Ext4#Tips_and_tricks | Ext4]].<br />
<br />
====JFS====<br />
See [[JFS Filesystem#Optimizations| JFS Filesystem]].<br />
<br />
====XFS====<br />
For optimal speed, just create an XFS file-system with:<br />
$ mkfs.xfs /dev/thetargetpartition<br />
Yep, so simple — since all of the [http://xfs.org/index.php/XFS_FAQ#Q:_I_want_to_tune_my_XFS_filesystems_for_.3Csomething.3E "boost knobs" are already "on" by default].<br />
<br />
==== Reiserfs ====<br />
<br />
The {{Ic|<nowiki>data=writeback</nowiki>}} mount option improves speed, but may corrupt data during power loss. The {{Ic|notail}} mount option increases the space used by the filesystem by about 5%, but also improves overall speed. You can also reduce disk load by putting the journal and data on separate drives. This is done when creating the filesystem: <br />
<br />
$ mkreiserfs –j /dev/hda1 /dev/hdb1<br />
<br />
Replace /dev/hda1 with the partition reserved for the journal, and /dev/hdb1 with the partition for data. You can learn more about reiserfs with this [http://www.funtoo.org/en/articles/linux/ffg/2/ article].<br />
<br />
====Btrfs====<br />
See [[Btrfs#Defragmentation|defragmentation]] and [[Btrfs#Compression|compression]].<br />
<br />
===Compressing /usr===<br />
{{Note|As of version 3.0 of the Linux kernel, aufs2 is no longer supported.}}<br />
{{out of date|aufs is no longer in the official repos. Also, read the Note box above.}}<br />
A way to speed up reading from the hard drive is to compress the data, because there is less data to be read. It must however be decompressed, which means a greater CPU load. Some file systems support transparent compression, most notably Btrfs and reiserfs4, but their compression ratio is limited by the 4k block size. A good alternative is to compress {{ic|/usr}} in a squashfs file, with a 64k(128k) block size, as instructed in this [http://forums.gentoo.org/viewtopic-t-646289.html Gentoo forums thread]. What this tutorial does is basically to compress the {{ic|/usr}} folder into a compressed squashfs file-system, then mounts it with aufs. A lot of space is saved, usually two thirds of the original size of {{ic|/usr}}, and applications load faster. However, each time an application is installed or reinstalled, it is written uncompressed, so {{ic|/usr}} must be re-compressed periodically. Squashfs is already in the kernel, and aufs2 is in the official repositories, so no kernel compilation is needed if using the stock kernel.<br />
Since the linked guide is for Gentoo, the next commands outline the steps specifically for Arch. To get it working, [[pacman|install]] the packages {{pkg|aufs2}} and {{pkg|squashfs-tools}}. These packages provide the aufs-modules and some userspace-tools for the squash-filesystem.<br />
<br />
Now we need some extra directories where we can store the archive of {{ic|/usr}} as read-only and another folder where we can store the data changed after the last compression as writeable:<br />
# mkdir -p /squashed/usr/{ro,rw}<br />
Now that we got a rough setup you should perform a complete system-upgrade since every change of content in {{ic|/usr}} after the compression will be excluded from this speedup. If you use prelink you should also perform a complete prelink before creating the archive. Now it is time to invoke the command to compress {{ic|/usr}}:<br />
# mksquashfs /usr /squashed/usr/usr.sfs -b 65536<br />
These parameters/options are the ones suggested by the Gentoo link but there might be some room for improvement using some of the options described [http://www.tldp.org/HOWTO/SquashFS-HOWTO/mksqoverview.html#mksqusing here].<br />
Now to get the archive mounted together with the writeable folder it is necessary to edit {{ic|/etc/fstab}} and add the following lines:<br />
/squashed/usr/usr.sfs /squashed/usr/ro squashfs loop,ro 0 0 <br />
usr /usr aufs udba=reval,br:/squashed/usr/rw:/squashed/usr/ro 0 0<br />
Now you should be done and able to reboot. The original author suggests to delete all the old content of {{ic|/usr}}, but this might cause some problems if anything goes wrong during some later re-compression. It is safer to leave the old files in place.<br />
<br />
A [https://bbs.archlinux.org/viewtopic.php?pid=714052 Bash script] has been created that will automate the process of re-compressing (read updating) the archive since the tutorial is meant for Gentoo and some options do not correlate to what they should be in Arch.<br />
<br />
===Tuning for an SSD===<br />
[[SSD#Tips_for_Maximizing_SSD_Performance]]<br />
<br />
===RAM disks / tuning for really slow disks===<br />
* [http://cs.joensuu.fi/~mmeri/usbraid/ USB stick RAID]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=493773#p493773 Combine RAM disk with disk in RAID]<br />
<br />
==CPU==<br />
The only way to directly improve CPU speed is overclocking. As it is a complicated and risky task, it is not recommended for anyone except experts. The best way to overclock is through the BIOS. When purchasing your system, keep in mind that most Intel motherboards are notorious for disabling the capacity to overclock.<br />
<br />
Many Intel i5 and i7 chips, even when overclocked properly through the BIOS or UEFI interface, will not report the correct clock frequency to acpi_cpufreq and most other utilities. This will result in excessive messages in dmesg about delays unless the module acpi_cpufreq is unloaded and blacklisted. The only tool known to correctly read the clock speed of these overclocked chips under Linux is i7z. The i7z package is available in the community repo and i7z-svn is available in the AUR.<br />
<br />
A way to modify performance ([http://lkml.org/lkml/2009/9/6/136 ref]) is to use Con Kolivas' desktop-centric kernel patchset, which, among other things, replaces the Completely Fair Scheduler (CFS) with the Brain Fuck Scheduler (BFS).<br />
<br />
Kernel PKGBUILDs that include the BFS patch can be installed from the [[AUR]] or [[Unofficial User Repositories]]. See the respective pages for {{AUR|linux-ck}} and [[Linux-ck]] wiki page, {{AUR|linux-bfs}} or {{AUR|linux-pf}} for more information on their additional patches.<br />
<br />
{{Note|BFS/CK are designed for desktop/laptop use and not servers. They provide low latency and work well for 16 CPUs or less. Also, Con Kolivas suggests setting HZ to 1000. For more information, see the [http://ck.kolivas.org/patches/bfs/bfs-faq.txt BFS FAQ] and [http://users.on.net/~ckolivas/kernel/ Kernel patch homepage of Con Kolivas].}}<br />
<br />
===Verynice===<br />
[[Verynice]] is a daemon, available in the [[AUR]] as {{AUR|verynice}}, for dynamically adjusting the nice levels of executables. The nice level represents the priority of the executable when allocating CPU resources. Simply define executables for which responsiveness is important, like X or multimedia applications, as ''goodexe'' in {{ic|/etc/verynice.conf}}. Similarly, CPU-hungry executables running in the background, like make, can be defined as ''badexe''. This prioritization greatly improves system responsiveness under heavy load.<br />
<br />
===Ulatencyd===<br />
[[Ulatencyd]] is a daemon that controls how the Linux kernel will spend its resources on the running processes. It uses dynamic cgroups to give the kernel hints and limitations on processes. It supports prioritizing processes for disk I/O as well as CPU shares, and uses more clever heuristics than Verynice. In addition, it comes with a good set of configs out of the box.<br />
<br />
One note of warning, by default it changes the default scheduler of all block devices to cfq, to disable behavior see [[Ulatencyd]].<br />
<br />
==Graphics==<br />
<br />
===Xorg.conf configuration===<br />
Graphic performance heavily depends on the settings in {{ic|/etc/X11/xorg.conf}}. There are tutorials for [[Nvidia]], [[ATI]] and [[Intel]] cards. Improper settings may stop Xorg from working, so caution is advised.<br />
<br />
===Driconf===<br />
Driconf is a small utility that can be found in the [[official repositories]] that allows you to change the direct rendering settings for open source drivers. Enabling HyperZ can drastically improve performance.<br />
<br />
===GPU Overclocking===<br />
Overclocking a graphics card is typically more expedient than with a CPU, since there are readily accessible software packages which allow for on-the-fly GPU clock adjustments. For ATI users, get {{AUR|rovclock}} or {{AUR|amdoverdrivectrl}}, and Nvidia users should get nvclock in the extra repository. Intel chipsets users can install [http://www.gmabooster.com/ GMABooster] from with the {{AUR|gmabooster}} AUR package.<br />
<br />
The changes can be made permanent by running the appropriate command after X boots, for example by adding it to {{ic|~/.xinitrc}}. A safer approach would be to only apply the overclocked settings when needed.<br />
<br />
==RAM and swap==<br />
=== Relocate files to tmpfs ===<br />
Relocate files, such as your browser profile, to a [[Wikipedia:tmpfs|tmpfs]] file system, including {{ic|/tmp}}, or {{ic|/dev/shm}} for improvements in application response as all the files are now stored in RAM.<br />
<br />
Use an active management script for maximal reliability and ease of use. <br />
<br />
Refer to the [[Profile-sync-daemon]] wiki article for more information on syncing browser profiles.<br />
<br />
Refer to the [[Anything-sync-daemon]] wiki article for more information on syncing any specified folder.<br />
<br />
=== Swappiness ===<br />
<br />
The swappiness represent how much the kernel prefers swap to RAM. Setting it to a very low value, meaning the kernel will almost always use RAM, is known to improve responsiveness on many systems. To do that, simply add these lines to {{ic|/etc/sysctl.conf}}:<br />
<br />
vm.swappiness=20<br />
vm.vfs_cache_pressure=50<br />
<br />
To test and more on why this may work, take a look at this [http://rudd-o.com/en/linux-and-free-software/tales-from-responsivenessland-why-linux-feels-slow-and-how-to-fix-that article].<br />
<br />
===Compcache / Zram ===<br />
[https://code.google.com/p/compcache/ Compcache], nowadays replaced by the '''zram''' kernel module, creates a device in RAM and compresses it. If you use for swap means that part of the RAM can hold much more information but uses more CPU. Still, it is much quicker than swapping to a hard drive. If a system often falls back to swap, this could improve responsiveness. Zram is in mainline staging (therefore its not stable yet, use with caution).<br />
<br />
The AUR package {{aur|zramswap}} provides an automated script fot setting up such swap devices with optimal settings for your system (such as RAM size and CPU core number). The script creates one zram device per CPU core with a total space equivalent to the RAM available. To do this automatically on every boot:<br />
<br />
* If you use [[rc.conf|initscripts]], add {{ic|zramswap}} to the DAEMONS array in {{ic|/etc/rc.conf}}.<br />
* If you use [[systemd]], enable {{ic|zramswap.service}} via systemctl. <br />
<br />
You will have a compressed swap with higher priority than your regular swap which will utilize multiple CPU cores for compessing data.<br />
<br />
{{Tip|Using zram is also a good way to reduce disk read/write cycles due to swap on SSDs.}}<br />
{{Note|The service file (and rc.d script) have been moved to a separate package in the AUR called [https://aur.archlinux.org/packages/zramswap/ zramswap].}}<br />
<br />
===Using the graphic card's RAM===<br />
In the unlikely case that you have very little RAM and a surplus of video RAM, you can use the latter as swap. See [[Swap on video ram]].<br />
<br />
=== Preloading ===<br />
Preloading is the action of putting and keeping target files into the RAM. The benefit is that preloaded applications start more quickly because reading from the RAM is always quicker than from the hard drive. However, part of your RAM will be dedicated to this task, but no more than if you kept the application open. Therefore preloading is best used with large and often-used applications like Firefox and OpenOffice.<br />
==== Go-preload ====<br />
[https://aur.archlinux.org/packages.php?ID=34207 Go-preload] is a small daemon created in the [http://forums.gentoo.org/viewtopic-t-789818-view-next.html?sid=5457cff93039fc7d4a3e445ef90f9821 Gentoo forum]. To use it, first run this command in a terminal for each program you want to preload at boot:<br />
# gopreload-prepare program<br />
Then, as instructed, press Enter when the program is fully loaded. This will add a list of files needed by the program in {{ic|/usr/share/gopreload/enabled}}. To load all lists at boot, add {{ic|gopreload}} to your DAEMONS array in {{ic|/etc/rc.conf}}. To disable the loading of a program, remove the appropriate list in {{ic|/usr/share/gopreload/enabled}} or move it to {{ic|/usr/share/gopreload/disabled}}.<br />
<br />
====Preload====<br />
A more automated approach is used by [[Preload]]. All you have to do is enable it with this command:<br />
# systemctl enable preload<br />
It will monitor the most used files on your system, and with time build its own list of files to preload at boot.<br />
<br />
====Readahead====<br />
[[Readahead]] is a tool that can cache files before they are needed and help accelerate program loading.<br />
<br />
==Boot time==<br />
You can find tutorials with good tips in the article [[Improve Boot Performance]].<br />
<br />
===Suspend to RAM===<br />
The best way to reduce boot time is not booting at all. Consider [[Suspend to RAM|suspending your system to RAM]] instead.<br />
<br />
==Application-specific tips==<br />
===Firefox===<br />
The [[Firefox Tweaks]] article offers good tips; notably [[Firefox Tweaks#Turning off anti-phishing|turning off anti-phishing]] and [[Firefox Tweaks#Defragment the profile's SQLite databases|cleaning the SQlite database]]. See also: [[Firefox Ramdisk|Firefox in Ramdisk]].<br />
<br />
Firefox in the official repositories is built with the profile guided optimization flag enabled. You may want to use it in your custom build.<br />
To do this append<br />
ac_add_options --enable-profile-guided-optimization<br />
to your mozconfig.<br />
<br />
===Gcc/Makepkg===<br />
See [[Ccache]].<br />
<br />
===LibreOffice===<br />
See [[LibreOffice#Speed up LibreOffice|Speed up LibreOffice]].<br />
<br />
===Pacman===<br />
See [[Improve Pacman Performance]].<br />
<br />
===SSH===<br />
See [[SSH#Speeding up SSH|Speed up SSH]].<br />
<br />
==Laptops==<br />
See [[Laptop]].</div>Cinchhttps://wiki.archlinux.org/index.php?title=CUPS&diff=256638CUPS2013-05-11T14:50:08Z<p>Cinch: /* Can't load /etc/samba/smb.conf */</p>
<hr />
<div>[[Category:Printers]]<br />
[[cs:CUPS]]<br />
[[es:CUPS]]<br />
[[fr:CUPS]]<br />
[[it:CUPS]]<br />
[[pl:CUPS]]<br />
[[ru:CUPS]]<br />
[[th:CUPS]]<br />
[[tr:CUPS]]<br />
[[zh-CN:CUPS]]<br />
[[zh-TW:CUPS]]<br />
{{Article summary start|Summary}}<br />
{{Article summary text|Installing and configuring CUPS}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|CUPS printer sharing}}<br />
{{Article summary wiki|CUPS printer-specific problems}}<br />
{{Article summary wiki|Samba}}<br />
{{Article summary end}}<br />
<br />
From [http://www.cups.org/index.php CUPS' site]:<br />
:"''[[Wikipedia:CUPS|CUPS]] is the standards-based, open source printing system developed by Apple Inc. for OS® X and other UNIX®-like operating systems''".<br />
<br />
Although there are other printing packages such as LPRNG, the Common Unix Printing System is the most popular choice because of its relative ease of use.<br />
<br />
==CUPS Linux Printing workflow==<br />
As of {{Pkg|cups}} version 1.5.3-3, Arch Linux makes use of the new full pdf-based printing workflow. For<br />
further reading check [http://www.linuxfoundation.org/collaborate/workgroups/openprinting/pdfasstandardprintjobformat PDF standard printing job format] and an old [https://wiki.linuxfoundation.org/en/OpenPrinting/Database/CUPS-Filter-Chart CUPS filtering chart] for history and fun.<br />
A good starting point for general Linux printing questions is [http://www.linuxfoundation.org/collaborate/workgroups/openprinting here].<br />
<br />
There are two ways to setup a printer.<br />
* If there's a CUPS server running in your network and sharing a printer you only need to install the client package.<br />
* If the printer is connected directly to your system or you have access to an IPP network printer then setup a local CUPS server.<br />
<br />
==Installing the client package==<br />
The package {{Pkg|libcups}} is the only required package. [[pacman|Install]] it from the [[Official repositories]].<br />
<br />
Then add your CUPS server's IP address or hostname into {{ic|/etc/cups/client.conf}}. That is all you need. Every application should quickly find the printer(s) shared by that CUPS server.<br />
<br />
===Optional advanced network setup===<br />
It is also possible to run a entire cupsd+cups-browsed instance on your client with Avahi browsing enabled to discover unknown shared printers in your network. This can be useful in large setups where the server is unknown.<br />
{{Note|This behavior did not change with cups 1.6.x - the difference is that until 1.5.x cupsd was able to do printer browsing alone and now it can only browse its own shared printers.<br />
To get the local cupsd recognise other shared printers offered by a remote cupsd server you need a running local cups-browserd (supported since cups-filters 1.0.26) instance using Avahi to discover unknown printers. <br />
There is [https://bbs.archlinux.org/viewtopic.php?id&#61;161440 good news] in April 2013 (still has to be incorporated above).}}<br />
<br />
==Installing the server packages==<br />
The following packages and some printer drivers are needed. [[pacman|Install]] them from the [[Official repositories]].<br />
<br />
* {{Pkg|cups}} - the actual CUPS daemon<br />
* {{Pkg|cups-filters}} - essential filters<br />
* {{Pkg|ghostscript}} - (optional) PostScript interpreter<br />
* {{Pkg|gsfonts}} - GhostScript standard Type1 fonts<br />
<br />
If you want to enable printer browsing through your network, also install {{Pkg|avahi}}. Make sure '''avahi-daemon''' is started before '''cupsd'''.<br />
<br />
If the system is connected to a networked printer using the [[Samba]] protocol or if the system is to be a print server for Windows clients, also install {{Pkg|samba}}.<br />
<br />
===Printer driver===<br />
Here are some of the driver packages. Choosing the right driver depends on the printer:<br />
<br />
* '''{{Pkg|gutenprint}}''' - A collection of high quality drivers for Canon, Epson, Lexmark, Sony, Olympus, and PCL printers for use with GhostScript, CUPS, Foomatic, and the [[GIMP]]<br />
* '''{{Pkg|foomatic-db}}, {{Pkg|foomatic-db-engine}}, {{Pkg|foomatic-db-nonfree}}, and {{Pkg|foomatic-filters}}''' - Foomatic is a database-driven system for integrating free software printer drivers with common spoolers under Unix. Installing foomatic-filters should solve problems if the cups error_log is reporting "stopped with status 22!".<br />
* '''{{Pkg|hplip}}''' - HP drivers for DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet printer models, as well as a number of Brother printers.<br />
* '''{{Pkg|splix}}''' - Samsung drivers for SPL (Samsung Printer Language) printers.<br />
<br />
* '''{{AUR|foo2zjs}}''' - Drivers for ZjStream protocol printers such as the HP Laserjet 1018. More info [http://foo2zjs.rkkda.com here]. Package is available in the [[AUR]].<br />
* '''{{AUR|hpoj}}''' - If you are using an HP Officejet, you should also install this package and follow the instructions to avoid problems as in [https://answers.launchpad.net/hplip/+question/133425 this thread]. Package is available in the [[AUR]].<br />
* '''{{AUR|samsung-unified-driver}}''' - Unified Linux Driver for Samsung printers and scanners. Required for new printers such as the ML-2160. Package is available in the [[AUR]].<br />
* '''{{AUR|ufr2}}''' or '''{{AUR|cndrvcups-lb}}''' - Canon UFR2 driver with support for LBP, iR and MF series printers. Package is available in the [[AUR]].<br />
<br />
* '''{{Pkg|cups-pdf}}''' - A package that allows one to setup a virtual PDF Printer that generates a PDF out of jobs sent to it<br />
<br />
If you are not sure of what driver package to install or if the current driver is not working, it may be easiest to just install all of the drivers. Some of the package names are misleading because printers of other makes may rely on them. For example, the Brother HL-2140 needs the hplip driver installed.<br />
<br />
====Download printer PPD====<br />
Depending on the printer, this step is optional and may not be needed, as the standard CUPS installation already comes with quite a few PPD (Postscript Printer Description) files. Moreover, the ''foomatic-filters'', ''gimp-print'' and ''hplip'' packages already include quite a few PPD files which will automatically be detected by CUPS.<br />
<br />
Here is an explanation of what a PPD file is from the Linux Printing website:<br />
:"''For every PostScript printer the manufacturers provide a PPD file which contains all printer-specific information about the particular printer model: Basic printer capabilities as whether the printer is a color printer, fonts, PostScript level, etc., and especially the user-adjustable options, as paper size, resolution, etc.''"<br />
<br />
If the PPD for the printer is ''not'' already in CUPS, then:<br />
*check [[AUR]] to see if there are packages for the printer/manufacturer<br />
*visit the [http://www.openprinting.org/printers OpenPrinting database] and select the manufacturer and model of the printer<br />
*visit the manufacturer's site and search for GNU/Linux drivers<br />
<br />
{{Note|PPD files go in {{ic|/usr/share/cups/model/}}}}<br />
<br />
====Another source for printer drivers====<br />
[http://www.turboprint.de/english.html Turboprint] is a proprietary driver for many printers not yet supported by GNU/Linux (Canon i*, for example). Unlike CUPS, however, high quality prints are either marked with a watermark or are a pay-only service.<br />
<br />
==Hardware support and configuration==<br />
===USB printers===<br />
{{Tip|Most USB printers should work out of the box, you can skip this section and come back if you can not get your printer to work.}}<br />
<br />
USB printers can get accessed with two methods: The usblp kernel module and libusb. The former is the classic way. It is simple: data is sent to the printer by writing it to a device file as a simple serial data stream. Reading the same device file allows bi-di access, at least for things like reading out ink levels, status, or printer capability information (PJL). It works very well for simple printers, but for multi-function devices (printer/scanner) it is not suitable and manufacturers like HP supply their own backends. Source: [http://lists.linuxfoundation.org/pipermail/printing-architecture/2012/002412.html here].<br />
<br />
====Blacklisting usblp====<br />
{{Warning|As of {{pkg|cups}} version 1.6.0, you no longer need to [[Kernel modules#Blacklisting|blacklist]] the {{ic|usblp}} kernel module.<br /><br />
If you find out this is the only way to fix a remaining issue please report this upstream to the CUPS bug tracker and maybe also get in contact with Till Kamppeter (Debian CUPS maintainer). See [http://cups.org/str.php?L4128 upstream bug] for more.}}<br />
<br />
If you have problems getting your USB printer to work, you can try blacklisting the {{ic|usblp}} [[kernel module]]:<br />
<br />
{{hc|/etc/modprobe.d/blacklistusblp.conf|blacklist usblp}}<br />
<br />
Custom kernel users may need to manually load the {{ic|usbcore}} [[kernel module]] before proceeding.<br />
<br />
Once the modules are installed, plug in the printer and check if the kernel detected it by running the following:<br />
# tail /var/log/messages.log<br />
or<br />
# dmesg<br />
<br />
If you're using {{ic|usblp}}, the output should indicate that the printer has been detected like so:<br />
Feb 19 20:17:11 kernel: printer.c: usblp0: USB Bidirectional<br />
printer dev 2 if 0 alt 0 proto 2 vid 0x04E8 pid 0x300E<br />
Feb 19 20:17:11 kernel: usb.c: usblp driver claimed interface cfef3920<br />
Feb 19 20:17:11 kernel: printer.c: v0.13: USB Printer Device Class driver<br />
<br />
If you blacklisted {{ic|usblp}}, you will see something like:<br />
usb 3-2: new full speed USB device using uhci_hcd and address 3<br />
usb 3-2: configuration #1 chosen from 1 choice<br />
<br />
===Parallel port printers===<br />
To use a parallel port printer, you will need to load the {{ic|lp}}, {{ic|parport}} and {{ic|parport_pc}} [[kernel modules]].<br />
<br />
Check the setup by running:<br />
# tail /var/log/messages.log<br />
It should display something like this:<br />
lp0: using parport0 (polling).<br />
<br />
If you are using a USB to parallel port adapter, CUPS will not be able to detect the printer. As a workaround, add the printer using a different connection type and then change DeviceID in {{ic|/etc/cups/printers.conf}}:<br />
DeviceID = parallel:/dev/usb/lp0<br />
<br />
=== HP Printer ===<br />
HP printers can also be installed via HP's Linux setup tool. Install it by installing {{Pkg|hplip}} from the [[official repositories]].<br />
<br />
To run with qt frontend:<br />
# hp-setup -u<br />
<br />
To run with command line:<br />
# hp-setup -i<br />
<br />
PPD files are in {{ic|/usr/share/ppd/HP/}}.<br />
<br />
For printers that require the proprietary HP plugin (like the Laserjet Pro P1102w), install the {{AUR|hplip-plugin}} package from [[AUR]].<br />
<br />
==Configuring==<br />
Now that CUPS is installed, there are a variety of options on how to set up printing solutions. As always, the tried and true command line method is at your disposal. CUPS also embeds a full-featured web interface. Likewise, various desktop environments such as GNOME and KDE have useful programs that can help manage printers. Depending on your needs, you may choose one method or the other.<br />
<br />
If you are planning on connecting to a network printer, rather than one that is directly connected to the computer, you might want to read the [[CUPS printer sharing]] page first. Printer sharing between GNU/Linux systems is quite easy and involves very little configuration, whereas sharing between a Windows and GNU/Linux host requires a little bit more effort.<br />
<br />
===CUPS daemon===<br />
With the kernel modules installed, you can now start the '''cups''' and optionally, the '''cups-browsed''' [[daemons]].<br />
<br />
=== Web interface and tool-kit ===<br />
<br />
Once the daemon is running, open a browser and go to: http://localhost:631 (''The '''localhost''' string may need to be replaced with the hostname found in'' {{ic|/etc/hostname}}).<br />
<br />
From here, follow the various wizards to add the printer. A usual procedure is to start by clicking on ''Adding Printers and Classes'' and then ''Add Printer''. When prompted for a username and password, log in as root. The name assigned to the printer does not matter, the same applies for 'location' and 'description'. Next, a list of devices to select from will be presented. The actual name of the printer shows up next to the label (e.g., next to ''USB Printer #1'' for USB printers). Finally, choose the appropriate drivers and the configuration is complete.<br />
<br />
Now test the configuration by pressing the ''Maintenance'' drop-down menu then ''Print Test Page''. If it does not print and there is certainty regarding the correctness of applied settings, then the problem is most likely due to missing a proper printer driver.<br />
<br />
{{Tip|See: [[#Alternative CUPS interfaces]] for other other front-ends.}}<br />
{{Note|When setting up a USB printer, you should see your printer listed on ''Add Printer'' page. If you can only see a "SCSI printer" option, it probably means that CUPS has failed to recognize <br />
your printer.}}<br />
<br />
{{Note|To enable wireless scanning on certain HP multi-function devices using the {{pkg|hplip}} package, you may need to add the printer as a Network Printer using the http:// protocol. To determine the proper URI to use, run the {{ic|hp-makeuri}} command.}}<br />
<br />
==== CUPS administration ====<br />
<br />
A username and password will be required when administering the printer in the web interface, such as: adding or removing printers, stopping print tasks, etc. The default username is the one assigned in the ''sys'' group, or root. Other admin groups (e.g. lpadmin or printadmin) may be added to the {{ic|SystemGroup}} line in {{ic|/etc/cups/cups-files.conf}} (you might have to add this line). See [http://www.cups.org/articles.php?L237+T+Qprintadmin these instructions at cups.org]. You might also want to read [https://bbs.archlinux.org/viewtopic.php?id=35567 this post]. Create the group[s] ({{ic|man groupadd}}) and add the group[s] to users ({{ic|man usermod}}). cupsd must be restarted and the user must re-login for these changes to take affect.<br />
<br />
If the root account has been locked (i.e. when using sudo), it is not possible to log in the CUPS administration interface with the default username (root) and password. Follow the instructions above to add other users as cups administrators.<br />
<br />
====Remote access to web interface====<br />
By default, the CUPS web interface can only be accessed by the ''localhost''; i.e. the computer that it is installed on. To remotely access the interface, make the following changes to the {{ic|/etc/cups/cupsd.conf}} file. Replace the line:<br />
Listen localhost:631<br />
with<br />
Port 631<br />
so that CUPS listens to incoming requests.<br />
<br />
Three levels of access can be granted:<br />
<Location /> #access to the server<br />
<Location /admin> #access to the admin pages<br />
<Location /admin/conf> #access to configuration files<br />
<br />
To give remote hosts access to one of these levels, add an {{ic|Allow}} statement to that level's section. An {{ic|Allow}} statement can take one or more of the forms listed below:<br />
Allow from all<br />
Allow from host.domain.com<br />
Allow from *.domain.com<br />
Allow from ip-address<br />
Allow from ip-address/netmask<br />
<br />
Deny statements can also be used. For example, if wanting to give all hosts on the 192.168.1.0/255.255.255.0 subnet full access, file {{ic|/etc/cups/cupsd.conf}} would include this:<br />
# Restrict access to the server...<br />
# By default only localhost connections are possible<br />
<Location /><br />
Order allow,deny<br />
Allow from localhost<br />
'''Allow from 192.168.1.0/255.255.255.0'''<br />
</Location><br />
<br />
# Restrict access to the admin pages...<br />
<Location /admin><br />
# Encryption disabled by default<br />
#Encryption Required<br />
Order allow,deny<br />
Allow from localhost<br />
'''Allow from 192.168.1.0/255.255.255.0'''<br />
</Location><br />
<br />
# Restrict access to configuration files...<br />
<Location /admin/conf><br />
AuthType Basic<br />
Require user @SYSTEM<br />
Order allow,deny<br />
Allow From localhost<br />
'''Allow From 192.168.1.0/255.255.255.0'''<br />
</Location><br />
<br />
You might also need to add:<br />
<br />
DefaultEncryption Never<br />
<br />
This should avoid the error: 426 - Upgrade Required when using the CUPS web interface from a remote machine.<br />
<br />
===Command-line configuration===<br />
<br />
CUPS can be fully controlled from command-line with nice tools, ''i.e.'' the lp* and the cups* command families.<br />
<br />
On Arch Linux, most commands support auto-completion with common shells.<br />
Also note that command-line switches cannot be grouped.<br />
<br />
;List the devices<br />
# lpinfo -v<br />
<br />
;List the drivers<br />
# lpinfo -m<br />
<br />
;Add a new printer<br />
# lpadmin -p <printer> -E -v <device> -P <ppd><br />
<br />
The <printer> is up to you. The device can be retrieved from the 'lpinfo -i' command.<br />
Example:<br />
# lpadmin -p HP_DESKJET_940C -E -v "usb://HP/DESKJET%20940C?serial=CN16E6C364BH" -P /usr/share/ppd/HP/hp-deskjet_940c.ppd.gz<br />
<br />
In the following, the <printer> references the name you have used here to set up the printer.<br />
<br />
;Set the default printer<br />
$ lpoptions -d <printer><br />
<br />
;Check the status<br />
$ lpstat -s<br />
$ lpstat -p <printer><br />
<br />
;Deactivate a printer<br />
# cupsdisable <printer><br />
<br />
;Activate a printer<br />
# cupsenable <printer><br />
<br />
;Remove a printer<br />
First set it to reject all incoming entries:<br />
# cupsreject <printer><br />
Then disable it.<br />
# cupsdisable <printer><br />
Finally remove it.<br />
# lpadmin -x <printer><br />
<br />
;Print a file<br />
$ lpr <file><br />
$ lpr -# 17 <file> # print the file 17 times<br />
$ echo "Hello, world!" | lpr -p # print the result of a command. The -p switch adds a header.<br />
<br />
;Check the printing queue<br />
$ lpq<br />
$ lpq -a # on all printers<br />
<br />
;Clear the printing queue<br />
# lprm # remove last entry only<br />
# lprm - # remove all entries<br />
<br />
===Alternative CUPS interfaces===<br />
====GNOME====<br />
If using [[GNOME]], a possibility is to manage and configure the printer by [[pacman|installing]] {{Pkg|system-config-printer}}.<br />
<br />
For system-config-printer to work as it should, running as root may be required, or alternatively set up a "normal" user to administer CUPS (if so '''follow steps 1-3''').<br />
<br />
1. Create group, and add a user to it<br />
# groupadd lpadmin<br />
# usermod -aG lpadmin <username><br />
<br />
2. Add {{ic|lpadmin}} to this line in {{ic|/etc/cups/cups-files.conf}}<br />
SystemGroup sys root <insert here><br />
<br />
3. Restart cups, log out and in again (or restart computer)<br />
<br />
====KDE====<br />
[[KDE]] users can modify their printers from the Control Center. Both should refer to those desktop environments' documentation for more information on how to use the interfaces.<br />
<br />
====Other====<br />
There is also {{AUR|gtklp}} in the [[AUR]].<br />
<br />
==PDF virtual printer==<br />
CUPS-PDF is a nice package that allows one to setup a virtual printer that will generate a PDF from anything sent to it. This package is not necessary, but it can be quite useful. It can be installed using the following command:<br />
# pacman -S cups-pdf<br />
<br />
After installing the package, set it up as if it were for any other printer by using the web interface. Access the cups print manager: http://localhost:631 and select:<br />
Administration -> Add Printer<br />
Select CUPS-PDF (Virtual PDF), choose for the make and driver:<br />
Make: Generic<br />
Driver: Generic CUPS-PDF Printer<br />
<br />
Find generated PDF documents in a sub-directory located at {{ic|/var/spool/cups-pdf}}. Normally, the subdirectory is named after the user who performed the job. A little tweak helps you to find your printed PDF documents more easily. Edit {{ic|/etc/cups/cups-pdf.conf}} by changing the line<br />
#Out /var/spool/cups-pdf/${USER}<br />
<br />
to<br />
<br />
Out ${HOME}<br />
<br />
=== Print to PostScript ===<br />
The CUPS-PDF (Virtual PDF Printer) actually creates a PostScript file and then creates the PDF using the ps2pdf utility. To print to PostScript, just print as usual, in the print dialog choose "CUPS-PDF" as the printer, then select the checkbox for "print to file", hit print, enter the filename.ps and click save. This is handy for faxes, etc...<br />
<br />
==Troubleshooting==<br />
The best way to get printing working is to set 'LogLevel' in {{ic|/etc/cups/cupsd.conf}} to:<br />
LogLevel debug<br />
<br />
And then viewing the output from {{ic|/var/log/cups/error_log}} like this:<br />
# tail -n 100 -f /var/log/cups/error_log<br />
<br />
The characters at the left of the output stand for:<br />
*D=Debug<br />
*E=Error<br />
*I=Information<br />
*And so on<br />
<br />
These files may also prove useful:<br />
*{{ic|/var/log/cups/page_log}} - Echoes a new entry each time a print is successful<br />
*{{ic|/var/log/cups/access_log}} - Lists all cupsd http1.1 server activity<br />
<br />
Of course, it is important to know how CUPS works if wanting to solve related issues:<br />
# An application sends a .ps file (PostScript, a script language that details how the page will look) to CUPS when 'print' has been selected (this is the case with most programs).<br />
# CUPS then looks at the printer's PPD file (printer description file) and figures out what filters it needs to use to convert the .ps file to a language that the printer understands (like PJL, PCL), usually GhostScript.<br />
# GhostScript takes the input and figures out which filters it should use, then applies them and converts the .ps file to a format understood by the printer.<br />
# Then it is sent to the back-end. For example, if the printer is connected to a USB port, it uses the USB back-end.<br />
<br />
Print a document and watch {{ic|error_log}} to get a more detailed and correct image of the printing process.<br />
<br />
===Problems resulting from upgrades===<br />
''Issues that appeared after CUPS and related program packages underwent a version increment''<br />
<br />
====CUPS stops working====<br />
The chances are that a new configuration file is needed for the new version to work properly. Messages such as "404 - page not found" may result from trying to manage CUPS via localhost:631, for example.<br />
<br />
To use the new configuration, copy {{ic|/etc/cups/cupsd.conf.default}} to {{ic|/etc/cups/cupsd.conf}} (backup the old configuration if needed) and restart CUPS to employ the new settings.<br />
<br />
====All jobs are "stopped"====<br />
If all jobs sent to the printer become "stopped", delete the printer and add it again.<br />
Using the [http://localhost:631 CUPS web interface], go to Printers > Delete Printer.<br />
<br />
To check the printer's settings go to ''Printers'', then ''Modify Printer''. Copy down the information displayed, click 'Modify Printer' to proceed to the next page(s), and so on.<br />
<br />
====All jobs are "The printer is not responding"====<br />
On networked printers, you should check that the name that CUPS uses as its connection URI resolves to the printer's IP via DNS, e.g.<br />
If your printer's connection looks like this:<br />
lpd://BRN_020554/BINARY_P1<br />
<br />
then the hostname 'BRN_020554' needs to resolve to the printer's IP from the server running CUPS<br />
<br />
====The PPD version is not compatible with gutenprint====<br />
Run:<br />
# /usr/sbin/cups-genppdupdate<br />
<br />
And restart CUPS (as pointed out in gutenprint's post-install message)<br />
<br />
===Other===<br />
<br />
=====CUPS permission errors=====<br />
*Some users fixed 'NT_STATUS_ACCESS_DENIED' (Windows clients) errors by using a slightly different syntax:<br />
smb://workgroup/username:password@hostname/printer_name<br />
<br />
*Sometimes, the block device has wrong permissions:<br />
# ls /dev/usb/<br />
lp0<br />
# chgrp lp /dev/usb/lp0<br />
<br />
====HPLIP printer sends "/usr/lib/cups/backend/hp failed" error====<br />
Make sure dbus is installed and running. If the error persists, try starting avahi-daemon.<br />
<br />
Try adding the printer as a Network Printer using the http:// protocol. Generate the printer URI with {{ic|hp-makeuri}}.<br />
<br />
{{Note|There might need to set permissions issues right. Follow indications here: [[CUPS#Device node permissions]].}}<br />
<br />
====HPLIP printer claims job is complete but printer does nothing====<br />
This happens on HP printers when you select the (old) hpijs driver (e.g. the Deskjet D1600 series). Instead, use the hpcups driver when adding the printer.<br />
<br />
Some HP printers (e.g HP LaserJet) require their firmware to be downloaded from the computer every time the printer is switched on. If there is an issue with udev (or equivalent) and the firmware download rule is never fired, you may experience this issue.<br />
As a workaround, you can manually download the firmware to the printer. Ensure the printer is plugged in and switched on, then enter<br />
hp-firmware -n<br />
<br />
====hp-toolbox sends an error, "Unable to communicate with device"====<br />
If running hp-toolbox as a regular user results in:<br />
# hp-toolbox<br />
# error: Unable to communicate with device (code=12): hp:/usb/<printer id><br />
or, "{{ic|Unable to communicate with device"}}", then it may be needed to [[Groups#Group management|add the user to the lp and sys groups]].<br />
<br />
This can also be caused by printers such as the P1102 that provide a virtual cd-rom drive for MS-Windows drivers. The lp dev appears and then disappears. In that case try the '''usb-modeswitch''' and '''usb-modeswitch-data''' packages, that lets one switch off the "Smart Drive" (udev rules included in said packages).<br />
<br />
This can also occur with network attached printers if the [[Avahi|avahi-daemon]] is not running.<br />
<br />
====CUPS returns '"foomatic-rip" not available/stopped with status 3' with a HP printer====<br />
If receiving any of the following error messages in {{ic|/var/log/cups/error_log}} while using a HP printer, with jobs appearing to be processed while they all end up not being completed with their status set to 'stopped':<br />
Filter "foomatic-rip" for printer "<printer_name>" not available: No such file or director<br />
or:<br />
PID 5771 (/usr/lib/cups/filter/foomatic-rip) stopped with status 3!<br />
make sure {{pkg|hplip}} has been [[pacman|installed]], in addition to [[#Packages|the packages mentioned above]]. See [https://bbs.archlinux.org/viewtopic.php?id=65615 this forum post] for more information.<br />
<br />
====Printing fails with unauthorised error====<br />
If the user has been added to the lp group, and allowed to print (set in {{ic|cupsd.conf}}), then the problem lies in {{ic|/etc/cups/printers.conf}}. This line could be the culprit:<br />
AuthInfoRequired negotiate<br />
<br />
Comment it out and restart CUPS.<br />
<br />
====Print button greyed-out in GNOME print dialogs====<br />
:''<small>Source: [https://bbs.archlinux.org/viewtopic.php?id=70418 I can't print from gnome applications. - Arch Forums]</small>''<br />
<br />
Be sure the package: '''libgnomeprint''' is installed<br />
<br />
Edit {{ic|/etc/cups/cupsd.conf}} and add<br />
# HostNameLookups Double<br />
<br />
Restart CUPS:<br />
# systemctl restart cups<br />
<br />
====Unknown supported format: application/postscript====<br />
Comment the lines:<br />
application/octet-stream application/vnd.cups-raw 0 -<br />
from {{ic|/etc/cups/mime.convs}}, and:<br />
application/octet-stream<br />
in {{ic|/etc/cups/mime.types}}.<br />
<br />
====Finding URIs for Windows Print Servers====<br />
<br />
Sometimes Windows is a little less than forthcoming about exact device URIs (device locations). If having trouble specifying the correct device location in CUPS, run the following command to list all shares available to a certain windows username:<br />
$ smbtree -U ''windowsusername''<br />
This will list every share available to a certain Windows username on the local area network subnet, as long as Samba is set up and running properly. It should return something like this:<br />
{{bc| WORKGROUP<br />
\\REGULATOR-PC <br />
\\REGULATOR-PC\Z <br />
\\REGULATOR-PC\Public <br />
\\REGULATOR-PC\print$ Printer Drivers<br />
\\REGULATOR-PC\G <br />
\\REGULATOR-PC\EPSON Stylus CX8400 Series EPSON Stylus CX8400 Series}}<br />
What is needed here is first part of the last line, the resource matching the printer description. So to print to the EPSON Stylus printer, one would enter:<br />
smb://username.password@REGULATOR-PC/EPSON Stylus CX8400 Series<br />
as the URI into CUPS. Notice that whitespaces are allowed in URIs, whereas backslashes get replaced with forward slashes.<br />
If it won't work try '%20' instead of spaces.<br />
<br />
====Print-Job client-error-document-format-not-supported====<br />
Try installing the foomatic packages and use a foomatic driver.<br />
<br />
====/usr/lib/cups/backend/hp failed====<br />
Change<br />
SystemGroup sys root<br />
to<br />
SystemGroup lp root<br />
in {{ic|/etc/cups/cupsd.conf}}<br />
<br />
<br />
Following steps 1-3 in the Alternative CUPS interfaces below may be a better solution, since newer versions of cups will not allow the same group for both normal and admin operation.<br />
<br />
==== Unable to get list of printer drivers ====<br />
* Check your ServerName in /etc/cups/client.conf is written without http://<br />
ServerName localhost:631<br />
* Try to remove Foomatic drivers.<br />
<br />
====lp: Error - Scheduler Not Responding====<br />
If you get this error when printing a document using:<br />
<br />
$ lp document-to-print<br />
<br />
Try setting the CUPS_SERVER environment variable:<br />
<br />
$ export CUPS_SERVER=localhost<br />
<br />
If this solves your problem, make the solution permanent by adding the export line above to ~/.bash_profile.<br />
<br />
====CUPS prints only an empty and an error-message page on HP LaserJet====<br />
<br />
There is a bug that causes CUPS to fail when printing images on HP LaserJet (in my case 3380). The bug has been reported and fixed by [https://bugs.launchpad.net/ubuntu/+source/cups-filters/+bug/998087 Ubuntu].<br />
The first page is empty, the second page contains the following error message:<br />
ERROR:<br />
invalidaccess<br />
OFFENDING COMMAND:<br />
filter<br />
STACK:<br />
/SubFileDecode<br />
endstream<br />
...<br />
<br />
In order to fix the issue, use the following command (as superuser):<br />
lpadmin -p <printer> -o pdftops-renderer-default=pdftops<br />
<br />
===="Using invalid Host" error message====<br />
<br />
Try to add "ServerAlias *" into cupsd.conf<br />
<br />
====Printer doesn't print with an "Filter failed" message on CUPS web interface (HP printer)====<br />
<br />
Change the permissions of the printer USB port:<br />
<br />
Get the bus and device number from lsusb, then set the permission using:<br />
<br />
{{ic|chmod 0666 /dev/bus/usb/<bus number>/<device number>}}<br />
<br />
To make the persistent permission change that will be triggered automatically each time the computer is rebooted, add the following line.<br />
<br />
{{hc|/etc/udev/rules.d/10-local.rules|<nowiki>SUBSYSTEM=="usb", ATTRS{idVendor}=="Printer_idVendor", ATTRS{idProduct}=="Printer_idProduct", GROUP="lp", MODE:="666"</nowiki>}}<br />
<br />
Obtain the right information by using {{ic|lsusb}} command, and don't forget to substitute {{ic|Printer_idVendor}} & {{ic|Printer_idProduct}} with the relevant ones.<br />
<br />
Each system may vary, so consult [[udev#List_attributes_of_a_device]] wiki page.<br />
<br />
====HPLIP 3.13: Plugin is installed, but HP Device Manager complains it is not====<br />
<br />
The issue might have to do with the file permission change that had been made to {{ic|/var/lib/hp/hplip.state}}. To correct the issue, a simple {{ic|chmod 644 /var/lib/hp/hplip.state}} and {{ic|chmod 755 /var/lib/hp}} should be sufficient. For further information, please read this [https://bugs.launchpad.net/hplip/+bug/1131596 link].<br />
<br />
====Printer is not recognized by CUPS====<br />
<br />
If your printer is not listed in the "Add Printers" page of the CUPS web interface, nor by lpinfo -v, try the following (suggested in [https://bbs.archlinux.org/viewtopic.php?pid=1037279#p1037279 this thread]):<br />
<br />
# Remove {{ic|usblp}} from blacklist<br />
# Load {{ic|usblp}} module<br />
modprobe usblp<br />
# Stop cups (sudo systemctl stop cups)<br />
# Add the following udev rule in the following new rule /etc/udev/rules.d/10-cups_device_link.rules<br />
KERNEL=="lp[0-9]", SYMLINK+="%k", GROUP="lp"<br />
# Reload udev rules<br />
sudo udevadm control --reload-rules<br />
# Unplug and re-plug the printer <br />
# Wait a few seconds and then start cups again (sudo systemctl start cups)<br />
<br />
====Can't load /etc/samba/smb.conf====<br />
<br />
If you're printing to a remote printer over SMB and get this error message: "Can't load /etc/samba/smb.conf - run testparm to debug it", then create an empty smb.conf:<br />
<br />
# mkdir /etc/samba<br />
# touch /etc/samba/smb.conf<br />
<br />
and restart cupsd:<br />
<br />
# systemctl restart cupsd<br />
<br />
==See also==<br />
* [http://localhost:631/documentation.html Official CUPS documentation], ''locally installed''<br />
* [http://www.cups.org/ Official CUPS Website]<br />
* [http://www.linuxprinting.org/ Linux Printing], ''[http://www.linuxfoundation.org The Linux Foundation]''<br />
* [http://www.gentoo.org/doc/en/printing-howto.xml Gentoo's Printing Guide], ''[http://www.gentoo.org/doc/en Gentoo Documentation Resources]''<br />
* [https://bbs.archlinux.org/ Arch Linux User Forums]<br />
* [http://wiki.gotux.net/tutorials/software/hp-printer Install HP Printers Easy Way]</div>Cinchhttps://wiki.archlinux.org/index.php?title=CUPS&diff=256637CUPS2013-05-11T14:49:13Z<p>Cinch: solution for error "Can't load /etc/samba/smb.conf - run testparm to debug it"</p>
<hr />
<div>[[Category:Printers]]<br />
[[cs:CUPS]]<br />
[[es:CUPS]]<br />
[[fr:CUPS]]<br />
[[it:CUPS]]<br />
[[pl:CUPS]]<br />
[[ru:CUPS]]<br />
[[th:CUPS]]<br />
[[tr:CUPS]]<br />
[[zh-CN:CUPS]]<br />
[[zh-TW:CUPS]]<br />
{{Article summary start|Summary}}<br />
{{Article summary text|Installing and configuring CUPS}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|CUPS printer sharing}}<br />
{{Article summary wiki|CUPS printer-specific problems}}<br />
{{Article summary wiki|Samba}}<br />
{{Article summary end}}<br />
<br />
From [http://www.cups.org/index.php CUPS' site]:<br />
:"''[[Wikipedia:CUPS|CUPS]] is the standards-based, open source printing system developed by Apple Inc. for OS® X and other UNIX®-like operating systems''".<br />
<br />
Although there are other printing packages such as LPRNG, the Common Unix Printing System is the most popular choice because of its relative ease of use.<br />
<br />
==CUPS Linux Printing workflow==<br />
As of {{Pkg|cups}} version 1.5.3-3, Arch Linux makes use of the new full pdf-based printing workflow. For<br />
further reading check [http://www.linuxfoundation.org/collaborate/workgroups/openprinting/pdfasstandardprintjobformat PDF standard printing job format] and an old [https://wiki.linuxfoundation.org/en/OpenPrinting/Database/CUPS-Filter-Chart CUPS filtering chart] for history and fun.<br />
A good starting point for general Linux printing questions is [http://www.linuxfoundation.org/collaborate/workgroups/openprinting here].<br />
<br />
There are two ways to setup a printer.<br />
* If there's a CUPS server running in your network and sharing a printer you only need to install the client package.<br />
* If the printer is connected directly to your system or you have access to an IPP network printer then setup a local CUPS server.<br />
<br />
==Installing the client package==<br />
The package {{Pkg|libcups}} is the only required package. [[pacman|Install]] it from the [[Official repositories]].<br />
<br />
Then add your CUPS server's IP address or hostname into {{ic|/etc/cups/client.conf}}. That is all you need. Every application should quickly find the printer(s) shared by that CUPS server.<br />
<br />
===Optional advanced network setup===<br />
It is also possible to run a entire cupsd+cups-browsed instance on your client with Avahi browsing enabled to discover unknown shared printers in your network. This can be useful in large setups where the server is unknown.<br />
{{Note|This behavior did not change with cups 1.6.x - the difference is that until 1.5.x cupsd was able to do printer browsing alone and now it can only browse its own shared printers.<br />
To get the local cupsd recognise other shared printers offered by a remote cupsd server you need a running local cups-browserd (supported since cups-filters 1.0.26) instance using Avahi to discover unknown printers. <br />
There is [https://bbs.archlinux.org/viewtopic.php?id&#61;161440 good news] in April 2013 (still has to be incorporated above).}}<br />
<br />
==Installing the server packages==<br />
The following packages and some printer drivers are needed. [[pacman|Install]] them from the [[Official repositories]].<br />
<br />
* {{Pkg|cups}} - the actual CUPS daemon<br />
* {{Pkg|cups-filters}} - essential filters<br />
* {{Pkg|ghostscript}} - (optional) PostScript interpreter<br />
* {{Pkg|gsfonts}} - GhostScript standard Type1 fonts<br />
<br />
If you want to enable printer browsing through your network, also install {{Pkg|avahi}}. Make sure '''avahi-daemon''' is started before '''cupsd'''.<br />
<br />
If the system is connected to a networked printer using the [[Samba]] protocol or if the system is to be a print server for Windows clients, also install {{Pkg|samba}}.<br />
<br />
===Printer driver===<br />
Here are some of the driver packages. Choosing the right driver depends on the printer:<br />
<br />
* '''{{Pkg|gutenprint}}''' - A collection of high quality drivers for Canon, Epson, Lexmark, Sony, Olympus, and PCL printers for use with GhostScript, CUPS, Foomatic, and the [[GIMP]]<br />
* '''{{Pkg|foomatic-db}}, {{Pkg|foomatic-db-engine}}, {{Pkg|foomatic-db-nonfree}}, and {{Pkg|foomatic-filters}}''' - Foomatic is a database-driven system for integrating free software printer drivers with common spoolers under Unix. Installing foomatic-filters should solve problems if the cups error_log is reporting "stopped with status 22!".<br />
* '''{{Pkg|hplip}}''' - HP drivers for DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet printer models, as well as a number of Brother printers.<br />
* '''{{Pkg|splix}}''' - Samsung drivers for SPL (Samsung Printer Language) printers.<br />
<br />
* '''{{AUR|foo2zjs}}''' - Drivers for ZjStream protocol printers such as the HP Laserjet 1018. More info [http://foo2zjs.rkkda.com here]. Package is available in the [[AUR]].<br />
* '''{{AUR|hpoj}}''' - If you are using an HP Officejet, you should also install this package and follow the instructions to avoid problems as in [https://answers.launchpad.net/hplip/+question/133425 this thread]. Package is available in the [[AUR]].<br />
* '''{{AUR|samsung-unified-driver}}''' - Unified Linux Driver for Samsung printers and scanners. Required for new printers such as the ML-2160. Package is available in the [[AUR]].<br />
* '''{{AUR|ufr2}}''' or '''{{AUR|cndrvcups-lb}}''' - Canon UFR2 driver with support for LBP, iR and MF series printers. Package is available in the [[AUR]].<br />
<br />
* '''{{Pkg|cups-pdf}}''' - A package that allows one to setup a virtual PDF Printer that generates a PDF out of jobs sent to it<br />
<br />
If you are not sure of what driver package to install or if the current driver is not working, it may be easiest to just install all of the drivers. Some of the package names are misleading because printers of other makes may rely on them. For example, the Brother HL-2140 needs the hplip driver installed.<br />
<br />
====Download printer PPD====<br />
Depending on the printer, this step is optional and may not be needed, as the standard CUPS installation already comes with quite a few PPD (Postscript Printer Description) files. Moreover, the ''foomatic-filters'', ''gimp-print'' and ''hplip'' packages already include quite a few PPD files which will automatically be detected by CUPS.<br />
<br />
Here is an explanation of what a PPD file is from the Linux Printing website:<br />
:"''For every PostScript printer the manufacturers provide a PPD file which contains all printer-specific information about the particular printer model: Basic printer capabilities as whether the printer is a color printer, fonts, PostScript level, etc., and especially the user-adjustable options, as paper size, resolution, etc.''"<br />
<br />
If the PPD for the printer is ''not'' already in CUPS, then:<br />
*check [[AUR]] to see if there are packages for the printer/manufacturer<br />
*visit the [http://www.openprinting.org/printers OpenPrinting database] and select the manufacturer and model of the printer<br />
*visit the manufacturer's site and search for GNU/Linux drivers<br />
<br />
{{Note|PPD files go in {{ic|/usr/share/cups/model/}}}}<br />
<br />
====Another source for printer drivers====<br />
[http://www.turboprint.de/english.html Turboprint] is a proprietary driver for many printers not yet supported by GNU/Linux (Canon i*, for example). Unlike CUPS, however, high quality prints are either marked with a watermark or are a pay-only service.<br />
<br />
==Hardware support and configuration==<br />
===USB printers===<br />
{{Tip|Most USB printers should work out of the box, you can skip this section and come back if you can not get your printer to work.}}<br />
<br />
USB printers can get accessed with two methods: The usblp kernel module and libusb. The former is the classic way. It is simple: data is sent to the printer by writing it to a device file as a simple serial data stream. Reading the same device file allows bi-di access, at least for things like reading out ink levels, status, or printer capability information (PJL). It works very well for simple printers, but for multi-function devices (printer/scanner) it is not suitable and manufacturers like HP supply their own backends. Source: [http://lists.linuxfoundation.org/pipermail/printing-architecture/2012/002412.html here].<br />
<br />
====Blacklisting usblp====<br />
{{Warning|As of {{pkg|cups}} version 1.6.0, you no longer need to [[Kernel modules#Blacklisting|blacklist]] the {{ic|usblp}} kernel module.<br /><br />
If you find out this is the only way to fix a remaining issue please report this upstream to the CUPS bug tracker and maybe also get in contact with Till Kamppeter (Debian CUPS maintainer). See [http://cups.org/str.php?L4128 upstream bug] for more.}}<br />
<br />
If you have problems getting your USB printer to work, you can try blacklisting the {{ic|usblp}} [[kernel module]]:<br />
<br />
{{hc|/etc/modprobe.d/blacklistusblp.conf|blacklist usblp}}<br />
<br />
Custom kernel users may need to manually load the {{ic|usbcore}} [[kernel module]] before proceeding.<br />
<br />
Once the modules are installed, plug in the printer and check if the kernel detected it by running the following:<br />
# tail /var/log/messages.log<br />
or<br />
# dmesg<br />
<br />
If you're using {{ic|usblp}}, the output should indicate that the printer has been detected like so:<br />
Feb 19 20:17:11 kernel: printer.c: usblp0: USB Bidirectional<br />
printer dev 2 if 0 alt 0 proto 2 vid 0x04E8 pid 0x300E<br />
Feb 19 20:17:11 kernel: usb.c: usblp driver claimed interface cfef3920<br />
Feb 19 20:17:11 kernel: printer.c: v0.13: USB Printer Device Class driver<br />
<br />
If you blacklisted {{ic|usblp}}, you will see something like:<br />
usb 3-2: new full speed USB device using uhci_hcd and address 3<br />
usb 3-2: configuration #1 chosen from 1 choice<br />
<br />
===Parallel port printers===<br />
To use a parallel port printer, you will need to load the {{ic|lp}}, {{ic|parport}} and {{ic|parport_pc}} [[kernel modules]].<br />
<br />
Check the setup by running:<br />
# tail /var/log/messages.log<br />
It should display something like this:<br />
lp0: using parport0 (polling).<br />
<br />
If you are using a USB to parallel port adapter, CUPS will not be able to detect the printer. As a workaround, add the printer using a different connection type and then change DeviceID in {{ic|/etc/cups/printers.conf}}:<br />
DeviceID = parallel:/dev/usb/lp0<br />
<br />
=== HP Printer ===<br />
HP printers can also be installed via HP's Linux setup tool. Install it by installing {{Pkg|hplip}} from the [[official repositories]].<br />
<br />
To run with qt frontend:<br />
# hp-setup -u<br />
<br />
To run with command line:<br />
# hp-setup -i<br />
<br />
PPD files are in {{ic|/usr/share/ppd/HP/}}.<br />
<br />
For printers that require the proprietary HP plugin (like the Laserjet Pro P1102w), install the {{AUR|hplip-plugin}} package from [[AUR]].<br />
<br />
==Configuring==<br />
Now that CUPS is installed, there are a variety of options on how to set up printing solutions. As always, the tried and true command line method is at your disposal. CUPS also embeds a full-featured web interface. Likewise, various desktop environments such as GNOME and KDE have useful programs that can help manage printers. Depending on your needs, you may choose one method or the other.<br />
<br />
If you are planning on connecting to a network printer, rather than one that is directly connected to the computer, you might want to read the [[CUPS printer sharing]] page first. Printer sharing between GNU/Linux systems is quite easy and involves very little configuration, whereas sharing between a Windows and GNU/Linux host requires a little bit more effort.<br />
<br />
===CUPS daemon===<br />
With the kernel modules installed, you can now start the '''cups''' and optionally, the '''cups-browsed''' [[daemons]].<br />
<br />
=== Web interface and tool-kit ===<br />
<br />
Once the daemon is running, open a browser and go to: http://localhost:631 (''The '''localhost''' string may need to be replaced with the hostname found in'' {{ic|/etc/hostname}}).<br />
<br />
From here, follow the various wizards to add the printer. A usual procedure is to start by clicking on ''Adding Printers and Classes'' and then ''Add Printer''. When prompted for a username and password, log in as root. The name assigned to the printer does not matter, the same applies for 'location' and 'description'. Next, a list of devices to select from will be presented. The actual name of the printer shows up next to the label (e.g., next to ''USB Printer #1'' for USB printers). Finally, choose the appropriate drivers and the configuration is complete.<br />
<br />
Now test the configuration by pressing the ''Maintenance'' drop-down menu then ''Print Test Page''. If it does not print and there is certainty regarding the correctness of applied settings, then the problem is most likely due to missing a proper printer driver.<br />
<br />
{{Tip|See: [[#Alternative CUPS interfaces]] for other other front-ends.}}<br />
{{Note|When setting up a USB printer, you should see your printer listed on ''Add Printer'' page. If you can only see a "SCSI printer" option, it probably means that CUPS has failed to recognize <br />
your printer.}}<br />
<br />
{{Note|To enable wireless scanning on certain HP multi-function devices using the {{pkg|hplip}} package, you may need to add the printer as a Network Printer using the http:// protocol. To determine the proper URI to use, run the {{ic|hp-makeuri}} command.}}<br />
<br />
==== CUPS administration ====<br />
<br />
A username and password will be required when administering the printer in the web interface, such as: adding or removing printers, stopping print tasks, etc. The default username is the one assigned in the ''sys'' group, or root. Other admin groups (e.g. lpadmin or printadmin) may be added to the {{ic|SystemGroup}} line in {{ic|/etc/cups/cups-files.conf}} (you might have to add this line). See [http://www.cups.org/articles.php?L237+T+Qprintadmin these instructions at cups.org]. You might also want to read [https://bbs.archlinux.org/viewtopic.php?id=35567 this post]. Create the group[s] ({{ic|man groupadd}}) and add the group[s] to users ({{ic|man usermod}}). cupsd must be restarted and the user must re-login for these changes to take affect.<br />
<br />
If the root account has been locked (i.e. when using sudo), it is not possible to log in the CUPS administration interface with the default username (root) and password. Follow the instructions above to add other users as cups administrators.<br />
<br />
====Remote access to web interface====<br />
By default, the CUPS web interface can only be accessed by the ''localhost''; i.e. the computer that it is installed on. To remotely access the interface, make the following changes to the {{ic|/etc/cups/cupsd.conf}} file. Replace the line:<br />
Listen localhost:631<br />
with<br />
Port 631<br />
so that CUPS listens to incoming requests.<br />
<br />
Three levels of access can be granted:<br />
<Location /> #access to the server<br />
<Location /admin> #access to the admin pages<br />
<Location /admin/conf> #access to configuration files<br />
<br />
To give remote hosts access to one of these levels, add an {{ic|Allow}} statement to that level's section. An {{ic|Allow}} statement can take one or more of the forms listed below:<br />
Allow from all<br />
Allow from host.domain.com<br />
Allow from *.domain.com<br />
Allow from ip-address<br />
Allow from ip-address/netmask<br />
<br />
Deny statements can also be used. For example, if wanting to give all hosts on the 192.168.1.0/255.255.255.0 subnet full access, file {{ic|/etc/cups/cupsd.conf}} would include this:<br />
# Restrict access to the server...<br />
# By default only localhost connections are possible<br />
<Location /><br />
Order allow,deny<br />
Allow from localhost<br />
'''Allow from 192.168.1.0/255.255.255.0'''<br />
</Location><br />
<br />
# Restrict access to the admin pages...<br />
<Location /admin><br />
# Encryption disabled by default<br />
#Encryption Required<br />
Order allow,deny<br />
Allow from localhost<br />
'''Allow from 192.168.1.0/255.255.255.0'''<br />
</Location><br />
<br />
# Restrict access to configuration files...<br />
<Location /admin/conf><br />
AuthType Basic<br />
Require user @SYSTEM<br />
Order allow,deny<br />
Allow From localhost<br />
'''Allow From 192.168.1.0/255.255.255.0'''<br />
</Location><br />
<br />
You might also need to add:<br />
<br />
DefaultEncryption Never<br />
<br />
This should avoid the error: 426 - Upgrade Required when using the CUPS web interface from a remote machine.<br />
<br />
===Command-line configuration===<br />
<br />
CUPS can be fully controlled from command-line with nice tools, ''i.e.'' the lp* and the cups* command families.<br />
<br />
On Arch Linux, most commands support auto-completion with common shells.<br />
Also note that command-line switches cannot be grouped.<br />
<br />
;List the devices<br />
# lpinfo -v<br />
<br />
;List the drivers<br />
# lpinfo -m<br />
<br />
;Add a new printer<br />
# lpadmin -p <printer> -E -v <device> -P <ppd><br />
<br />
The <printer> is up to you. The device can be retrieved from the 'lpinfo -i' command.<br />
Example:<br />
# lpadmin -p HP_DESKJET_940C -E -v "usb://HP/DESKJET%20940C?serial=CN16E6C364BH" -P /usr/share/ppd/HP/hp-deskjet_940c.ppd.gz<br />
<br />
In the following, the <printer> references the name you have used here to set up the printer.<br />
<br />
;Set the default printer<br />
$ lpoptions -d <printer><br />
<br />
;Check the status<br />
$ lpstat -s<br />
$ lpstat -p <printer><br />
<br />
;Deactivate a printer<br />
# cupsdisable <printer><br />
<br />
;Activate a printer<br />
# cupsenable <printer><br />
<br />
;Remove a printer<br />
First set it to reject all incoming entries:<br />
# cupsreject <printer><br />
Then disable it.<br />
# cupsdisable <printer><br />
Finally remove it.<br />
# lpadmin -x <printer><br />
<br />
;Print a file<br />
$ lpr <file><br />
$ lpr -# 17 <file> # print the file 17 times<br />
$ echo "Hello, world!" | lpr -p # print the result of a command. The -p switch adds a header.<br />
<br />
;Check the printing queue<br />
$ lpq<br />
$ lpq -a # on all printers<br />
<br />
;Clear the printing queue<br />
# lprm # remove last entry only<br />
# lprm - # remove all entries<br />
<br />
===Alternative CUPS interfaces===<br />
====GNOME====<br />
If using [[GNOME]], a possibility is to manage and configure the printer by [[pacman|installing]] {{Pkg|system-config-printer}}.<br />
<br />
For system-config-printer to work as it should, running as root may be required, or alternatively set up a "normal" user to administer CUPS (if so '''follow steps 1-3''').<br />
<br />
1. Create group, and add a user to it<br />
# groupadd lpadmin<br />
# usermod -aG lpadmin <username><br />
<br />
2. Add {{ic|lpadmin}} to this line in {{ic|/etc/cups/cups-files.conf}}<br />
SystemGroup sys root <insert here><br />
<br />
3. Restart cups, log out and in again (or restart computer)<br />
<br />
====KDE====<br />
[[KDE]] users can modify their printers from the Control Center. Both should refer to those desktop environments' documentation for more information on how to use the interfaces.<br />
<br />
====Other====<br />
There is also {{AUR|gtklp}} in the [[AUR]].<br />
<br />
==PDF virtual printer==<br />
CUPS-PDF is a nice package that allows one to setup a virtual printer that will generate a PDF from anything sent to it. This package is not necessary, but it can be quite useful. It can be installed using the following command:<br />
# pacman -S cups-pdf<br />
<br />
After installing the package, set it up as if it were for any other printer by using the web interface. Access the cups print manager: http://localhost:631 and select:<br />
Administration -> Add Printer<br />
Select CUPS-PDF (Virtual PDF), choose for the make and driver:<br />
Make: Generic<br />
Driver: Generic CUPS-PDF Printer<br />
<br />
Find generated PDF documents in a sub-directory located at {{ic|/var/spool/cups-pdf}}. Normally, the subdirectory is named after the user who performed the job. A little tweak helps you to find your printed PDF documents more easily. Edit {{ic|/etc/cups/cups-pdf.conf}} by changing the line<br />
#Out /var/spool/cups-pdf/${USER}<br />
<br />
to<br />
<br />
Out ${HOME}<br />
<br />
=== Print to PostScript ===<br />
The CUPS-PDF (Virtual PDF Printer) actually creates a PostScript file and then creates the PDF using the ps2pdf utility. To print to PostScript, just print as usual, in the print dialog choose "CUPS-PDF" as the printer, then select the checkbox for "print to file", hit print, enter the filename.ps and click save. This is handy for faxes, etc...<br />
<br />
==Troubleshooting==<br />
The best way to get printing working is to set 'LogLevel' in {{ic|/etc/cups/cupsd.conf}} to:<br />
LogLevel debug<br />
<br />
And then viewing the output from {{ic|/var/log/cups/error_log}} like this:<br />
# tail -n 100 -f /var/log/cups/error_log<br />
<br />
The characters at the left of the output stand for:<br />
*D=Debug<br />
*E=Error<br />
*I=Information<br />
*And so on<br />
<br />
These files may also prove useful:<br />
*{{ic|/var/log/cups/page_log}} - Echoes a new entry each time a print is successful<br />
*{{ic|/var/log/cups/access_log}} - Lists all cupsd http1.1 server activity<br />
<br />
Of course, it is important to know how CUPS works if wanting to solve related issues:<br />
# An application sends a .ps file (PostScript, a script language that details how the page will look) to CUPS when 'print' has been selected (this is the case with most programs).<br />
# CUPS then looks at the printer's PPD file (printer description file) and figures out what filters it needs to use to convert the .ps file to a language that the printer understands (like PJL, PCL), usually GhostScript.<br />
# GhostScript takes the input and figures out which filters it should use, then applies them and converts the .ps file to a format understood by the printer.<br />
# Then it is sent to the back-end. For example, if the printer is connected to a USB port, it uses the USB back-end.<br />
<br />
Print a document and watch {{ic|error_log}} to get a more detailed and correct image of the printing process.<br />
<br />
===Problems resulting from upgrades===<br />
''Issues that appeared after CUPS and related program packages underwent a version increment''<br />
<br />
====CUPS stops working====<br />
The chances are that a new configuration file is needed for the new version to work properly. Messages such as "404 - page not found" may result from trying to manage CUPS via localhost:631, for example.<br />
<br />
To use the new configuration, copy {{ic|/etc/cups/cupsd.conf.default}} to {{ic|/etc/cups/cupsd.conf}} (backup the old configuration if needed) and restart CUPS to employ the new settings.<br />
<br />
====All jobs are "stopped"====<br />
If all jobs sent to the printer become "stopped", delete the printer and add it again.<br />
Using the [http://localhost:631 CUPS web interface], go to Printers > Delete Printer.<br />
<br />
To check the printer's settings go to ''Printers'', then ''Modify Printer''. Copy down the information displayed, click 'Modify Printer' to proceed to the next page(s), and so on.<br />
<br />
====All jobs are "The printer is not responding"====<br />
On networked printers, you should check that the name that CUPS uses as its connection URI resolves to the printer's IP via DNS, e.g.<br />
If your printer's connection looks like this:<br />
lpd://BRN_020554/BINARY_P1<br />
<br />
then the hostname 'BRN_020554' needs to resolve to the printer's IP from the server running CUPS<br />
<br />
====The PPD version is not compatible with gutenprint====<br />
Run:<br />
# /usr/sbin/cups-genppdupdate<br />
<br />
And restart CUPS (as pointed out in gutenprint's post-install message)<br />
<br />
===Other===<br />
<br />
=====CUPS permission errors=====<br />
*Some users fixed 'NT_STATUS_ACCESS_DENIED' (Windows clients) errors by using a slightly different syntax:<br />
smb://workgroup/username:password@hostname/printer_name<br />
<br />
*Sometimes, the block device has wrong permissions:<br />
# ls /dev/usb/<br />
lp0<br />
# chgrp lp /dev/usb/lp0<br />
<br />
====HPLIP printer sends "/usr/lib/cups/backend/hp failed" error====<br />
Make sure dbus is installed and running. If the error persists, try starting avahi-daemon.<br />
<br />
Try adding the printer as a Network Printer using the http:// protocol. Generate the printer URI with {{ic|hp-makeuri}}.<br />
<br />
{{Note|There might need to set permissions issues right. Follow indications here: [[CUPS#Device node permissions]].}}<br />
<br />
====HPLIP printer claims job is complete but printer does nothing====<br />
This happens on HP printers when you select the (old) hpijs driver (e.g. the Deskjet D1600 series). Instead, use the hpcups driver when adding the printer.<br />
<br />
Some HP printers (e.g HP LaserJet) require their firmware to be downloaded from the computer every time the printer is switched on. If there is an issue with udev (or equivalent) and the firmware download rule is never fired, you may experience this issue.<br />
As a workaround, you can manually download the firmware to the printer. Ensure the printer is plugged in and switched on, then enter<br />
hp-firmware -n<br />
<br />
====hp-toolbox sends an error, "Unable to communicate with device"====<br />
If running hp-toolbox as a regular user results in:<br />
# hp-toolbox<br />
# error: Unable to communicate with device (code=12): hp:/usb/<printer id><br />
or, "{{ic|Unable to communicate with device"}}", then it may be needed to [[Groups#Group management|add the user to the lp and sys groups]].<br />
<br />
This can also be caused by printers such as the P1102 that provide a virtual cd-rom drive for MS-Windows drivers. The lp dev appears and then disappears. In that case try the '''usb-modeswitch''' and '''usb-modeswitch-data''' packages, that lets one switch off the "Smart Drive" (udev rules included in said packages).<br />
<br />
This can also occur with network attached printers if the [[Avahi|avahi-daemon]] is not running.<br />
<br />
====CUPS returns '"foomatic-rip" not available/stopped with status 3' with a HP printer====<br />
If receiving any of the following error messages in {{ic|/var/log/cups/error_log}} while using a HP printer, with jobs appearing to be processed while they all end up not being completed with their status set to 'stopped':<br />
Filter "foomatic-rip" for printer "<printer_name>" not available: No such file or director<br />
or:<br />
PID 5771 (/usr/lib/cups/filter/foomatic-rip) stopped with status 3!<br />
make sure {{pkg|hplip}} has been [[pacman|installed]], in addition to [[#Packages|the packages mentioned above]]. See [https://bbs.archlinux.org/viewtopic.php?id=65615 this forum post] for more information.<br />
<br />
====Printing fails with unauthorised error====<br />
If the user has been added to the lp group, and allowed to print (set in {{ic|cupsd.conf}}), then the problem lies in {{ic|/etc/cups/printers.conf}}. This line could be the culprit:<br />
AuthInfoRequired negotiate<br />
<br />
Comment it out and restart CUPS.<br />
<br />
====Print button greyed-out in GNOME print dialogs====<br />
:''<small>Source: [https://bbs.archlinux.org/viewtopic.php?id=70418 I can't print from gnome applications. - Arch Forums]</small>''<br />
<br />
Be sure the package: '''libgnomeprint''' is installed<br />
<br />
Edit {{ic|/etc/cups/cupsd.conf}} and add<br />
# HostNameLookups Double<br />
<br />
Restart CUPS:<br />
# systemctl restart cups<br />
<br />
====Unknown supported format: application/postscript====<br />
Comment the lines:<br />
application/octet-stream application/vnd.cups-raw 0 -<br />
from {{ic|/etc/cups/mime.convs}}, and:<br />
application/octet-stream<br />
in {{ic|/etc/cups/mime.types}}.<br />
<br />
====Finding URIs for Windows Print Servers====<br />
<br />
Sometimes Windows is a little less than forthcoming about exact device URIs (device locations). If having trouble specifying the correct device location in CUPS, run the following command to list all shares available to a certain windows username:<br />
$ smbtree -U ''windowsusername''<br />
This will list every share available to a certain Windows username on the local area network subnet, as long as Samba is set up and running properly. It should return something like this:<br />
{{bc| WORKGROUP<br />
\\REGULATOR-PC <br />
\\REGULATOR-PC\Z <br />
\\REGULATOR-PC\Public <br />
\\REGULATOR-PC\print$ Printer Drivers<br />
\\REGULATOR-PC\G <br />
\\REGULATOR-PC\EPSON Stylus CX8400 Series EPSON Stylus CX8400 Series}}<br />
What is needed here is first part of the last line, the resource matching the printer description. So to print to the EPSON Stylus printer, one would enter:<br />
smb://username.password@REGULATOR-PC/EPSON Stylus CX8400 Series<br />
as the URI into CUPS. Notice that whitespaces are allowed in URIs, whereas backslashes get replaced with forward slashes.<br />
If it won't work try '%20' instead of spaces.<br />
<br />
====Print-Job client-error-document-format-not-supported====<br />
Try installing the foomatic packages and use a foomatic driver.<br />
<br />
====/usr/lib/cups/backend/hp failed====<br />
Change<br />
SystemGroup sys root<br />
to<br />
SystemGroup lp root<br />
in {{ic|/etc/cups/cupsd.conf}}<br />
<br />
<br />
Following steps 1-3 in the Alternative CUPS interfaces below may be a better solution, since newer versions of cups will not allow the same group for both normal and admin operation.<br />
<br />
==== Unable to get list of printer drivers ====<br />
* Check your ServerName in /etc/cups/client.conf is written without http://<br />
ServerName localhost:631<br />
* Try to remove Foomatic drivers.<br />
<br />
====lp: Error - Scheduler Not Responding====<br />
If you get this error when printing a document using:<br />
<br />
$ lp document-to-print<br />
<br />
Try setting the CUPS_SERVER environment variable:<br />
<br />
$ export CUPS_SERVER=localhost<br />
<br />
If this solves your problem, make the solution permanent by adding the export line above to ~/.bash_profile.<br />
<br />
====CUPS prints only an empty and an error-message page on HP LaserJet====<br />
<br />
There is a bug that causes CUPS to fail when printing images on HP LaserJet (in my case 3380). The bug has been reported and fixed by [https://bugs.launchpad.net/ubuntu/+source/cups-filters/+bug/998087 Ubuntu].<br />
The first page is empty, the second page contains the following error message:<br />
ERROR:<br />
invalidaccess<br />
OFFENDING COMMAND:<br />
filter<br />
STACK:<br />
/SubFileDecode<br />
endstream<br />
...<br />
<br />
In order to fix the issue, use the following command (as superuser):<br />
lpadmin -p <printer> -o pdftops-renderer-default=pdftops<br />
<br />
===="Using invalid Host" error message====<br />
<br />
Try to add "ServerAlias *" into cupsd.conf<br />
<br />
====Printer doesn't print with an "Filter failed" message on CUPS web interface (HP printer)====<br />
<br />
Change the permissions of the printer USB port:<br />
<br />
Get the bus and device number from lsusb, then set the permission using:<br />
<br />
{{ic|chmod 0666 /dev/bus/usb/<bus number>/<device number>}}<br />
<br />
To make the persistent permission change that will be triggered automatically each time the computer is rebooted, add the following line.<br />
<br />
{{hc|/etc/udev/rules.d/10-local.rules|<nowiki>SUBSYSTEM=="usb", ATTRS{idVendor}=="Printer_idVendor", ATTRS{idProduct}=="Printer_idProduct", GROUP="lp", MODE:="666"</nowiki>}}<br />
<br />
Obtain the right information by using {{ic|lsusb}} command, and don't forget to substitute {{ic|Printer_idVendor}} & {{ic|Printer_idProduct}} with the relevant ones.<br />
<br />
Each system may vary, so consult [[udev#List_attributes_of_a_device]] wiki page.<br />
<br />
====HPLIP 3.13: Plugin is installed, but HP Device Manager complains it is not====<br />
<br />
The issue might have to do with the file permission change that had been made to {{ic|/var/lib/hp/hplip.state}}. To correct the issue, a simple {{ic|chmod 644 /var/lib/hp/hplip.state}} and {{ic|chmod 755 /var/lib/hp}} should be sufficient. For further information, please read this [https://bugs.launchpad.net/hplip/+bug/1131596 link].<br />
<br />
====Printer is not recognized by CUPS====<br />
<br />
If your printer is not listed in the "Add Printers" page of the CUPS web interface, nor by lpinfo -v, try the following (suggested in [https://bbs.archlinux.org/viewtopic.php?pid=1037279#p1037279 this thread]):<br />
<br />
# Remove {{ic|usblp}} from blacklist<br />
# Load {{ic|usblp}} module<br />
modprobe usblp<br />
# Stop cups (sudo systemctl stop cups)<br />
# Add the following udev rule in the following new rule /etc/udev/rules.d/10-cups_device_link.rules<br />
KERNEL=="lp[0-9]", SYMLINK+="%k", GROUP="lp"<br />
# Reload udev rules<br />
sudo udevadm control --reload-rules<br />
# Unplug and re-plug the printer <br />
# Wait a few seconds and then start cups again (sudo systemctl start cups)<br />
<br />
====Can't load /etc/samba/smb.conf====<br />
<br />
If you're printing to a remote printer over SMB and get this error message: "Can't load /etc/samba/smb.conf - run testparm to debug it", then create an empty smb.conf:<br />
<br />
sudo mkdir /etc/samba<br />
sudo touch /etc/samba/smb.conf<br />
<br />
and restart cupsd:<br />
<br />
sudo systemctl restart cupsd<br />
<br />
==See also==<br />
* [http://localhost:631/documentation.html Official CUPS documentation], ''locally installed''<br />
* [http://www.cups.org/ Official CUPS Website]<br />
* [http://www.linuxprinting.org/ Linux Printing], ''[http://www.linuxfoundation.org The Linux Foundation]''<br />
* [http://www.gentoo.org/doc/en/printing-howto.xml Gentoo's Printing Guide], ''[http://www.gentoo.org/doc/en Gentoo Documentation Resources]''<br />
* [https://bbs.archlinux.org/ Arch Linux User Forums]<br />
* [http://wiki.gotux.net/tutorials/software/hp-printer Install HP Printers Easy Way]</div>Cinchhttps://wiki.archlinux.org/index.php?title=AMD_Catalyst&diff=254289AMD Catalyst2013-04-16T19:55:25Z<p>Cinch: /* Catalyst-hook */</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X Server]]<br />
[[es:ATI Catalyst]]<br />
[[fr:ATI#Catalyst]]<br />
[[it:AMD Catalyst]]<br />
[[zh-CN:AMD Catalyst]]<br />
{{Article summary start}}<br />
{{Article summary text|An overview of AMD's proprietary Linux "Catalyst" video card driver.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|ATI}}<br />
{{Article summary wiki|Xorg}}<br />
{{Article summary heading|Resources}}<br />
{{Article summary link|cchtml.com - Unofficial Wiki for the ATI Linux Driver|http://wiki.cchtml.com/index.php/Main_Page}}<br />
{{Article summary link|Unofficial ATI Linux Driver Bugzilla|http://ati.cchtml.com/query.cgi}}<br />
{{Article summary end}}<br />
<br />
Owners of '''ATI/AMD''' video cards have a choice between AMD's proprietary driver ({{AUR|catalyst}}) and the [[ATI|open source driver]] ({{Pkg|xf86-video-ati}}). This article covers the proprietary driver.<br />
<br />
AMD's Linux driver package ''catalyst'' was previously named ''fglrx'' ('''F'''ire'''GL''' and '''R'''adeon '''X'''). Only the package name has changed, while the kernel module retains its original ''fglrx.ko'' filename. Therefore, any mention of fglrx below is specifically in reference to the ''kernel module'', '''not the package'''.<br />
<br />
As of October 2012, binary packages are being offered. Currently, packages are available in the [community] repository, but it's unknown what will happen when an Xorg upgrade will break the driver. In the past, Catalyst [https://www.archlinux.org/news/ati-catalyst-support-dropped/ has been dropped] from official Arch support because of dissatisfaction with the quality and speed of development. Also, a legacy driver for Radeon HD 2xxx 3xxx 4xxx is not available in [community] yet. For more information, see [https://bbs.archlinux.org/viewtopic.php?pid=1166052#p1166052/ this] this forum post and onwards.<br />
<br />
Compared to the open source driver, Catalyst performs worse in 2D graphics, but has a better support for 3D rendering. Supported devices are [[wikipedia:Radeon|ATI/AMD Radeon]] video cards with chipset R600 and newer (as of Catalyst 9.4). See [[wikipedia:Comparison_of_AMD_graphics_processing_units|this table]], or the Xorg [http://www.x.org/wiki/RadeonFeature#Decoder_ring_for_engineering_vs_marketing_names "Decoder ring",] to translate ''model'' names (X1900, HD4850) to/from ''chip'' names (R580, RV770 respectively).<br />
<br />
== Installation ==<br />
<br />
There are four ways of installing Catalyst on your system. One way is to use the official [community] repository, but this does not contain the legacy driver. Another one is to use Vi0L0's (Arch's unofficial Catalyst maintainer) repository. This repository does contain all the necessary packages. The third method you can use is the AUR; PKGBUILDs offered here are also made by Vi0L0 and are the same he uses to built packages for his repository. Lastly, you can install the driver directly from AMD.<br />
<br />
Before choosing the method you prefer, you will have to see which driver you need. Since Catalyst 12.4, AMD has separated its development for Radeon HD 2xxx, 3xxx and 4xxx cards into the '''legacy''' Catalyst driver. For Radeon HD 5xxx and newer, there is the regular Catalyst driver. Regardless of the driver you need, you will also need the Catalyst utilities.<br />
<br />
{{Note|After the instructions for every method of installing, you will find general instructions '''everyone''' has to perform, regardless of the method you used.}}<br />
<br />
=== Installing the driver ===<br />
==== Installing from the official repository ====<br />
This is the most simple and straightforward way, as it requires no unofficial repositories and because this package uses [[Dynamic Kernel Module Support|DKMS]] to automatically rebuilt the kernel modules when the kernel is upgraded. If this repository holds the packages you need, it is suggested you take this one. <br />
<br />
To install Catalyst, [[Pacman|install]] {{Pkg|catalyst-dkms}} and {{Pkg|catalyst-utils}} from the [[official repositories]].<br />
<br />
{{Note|If pacman asks you about removing '''libgl''' you can safely do so.}}<br />
<br />
{{Note|If you intend to use [[Dynamic Kernel Module Support|DKMS]] don't forget to install {{Pkg|linux-headers}} and enable the {{ic|dkms.service}} [[daemons|service]].}}<br />
<br />
If you are on 64-bit and also need 32-bit OpenGL support, install {{Pkg|lib32-catalyst-utils}} from the [[multilib]] repository.<br />
<br />
If you need OpenCL support, install {{Pkg|opencl-catalyst}}.<br />
<br />
Later on, a legacy driver will also be offered here.<br />
<br />
==== Installing from the unofficial repository ====<br />
If you need packages that currently aren't hosted by the official repository and don't fancy building the packages from the [[Arch User Repository|AUR]], this is the way to go. The repository is maintained by our unofficial Catalyst maintainer, Vi0L0. All packages are signed and I consider them safe to use. As you will see later on in this article, Vi0L0 is also responsible for many other packages that will help you get your system working with your ATI graphic cards. <br />
<br />
Vi0L0 has three different Catalyst repositories, each having different drivers:<br />
*[catalyst]; for the regular Catalyst driver needed by Radeon HD 5xxx and up, it contains the latest (stable or beta) Catalyst release;<br />
*[catalyst-stable]; for the regular Catalyst driver needed by Radeon HD 5xxx and up, with the latest stable driver;<br />
*[catalyst-hd234k]; for the legacy Catalyst driver needed by Radeon HD 2xxx, 3xxx and 4xxx cards. <br />
<br />
{{Warning|The Legacy driver does not support Xorg 1.13 or 1.14 for now. Support should be added by AMD in a century or two, but this could be sooner. Should you want to use this driver, see [[#Xorg repositories]] for instructions on how to roll back to or hold back Xorg 1.12.}}<br />
<br />
To enable one of these, you will have to edit {{ic|/etc/pacman.conf}} and add the repository of choice's information '''above all other repositories''' in {{ic|/etc/pacman.conf}}.<br />
<br />
*For [catalyst], add:<br />
<br />
[catalyst]<br />
<nowiki>Server = http://catalyst.wirephire.com/repo/catalyst/$arch</nowiki><br />
<br />
*For [catalyst-stable], add:<br />
<br />
[catalyst-stable]<br />
<nowiki>Server = http://catalyst.wirephire.com/repo/catalyst/$arch</nowiki><br />
<br />
*For [catalyst-hd234k], add:<br />
<br />
[catalyst-hd234k]<br />
<nowiki>Server = http://catalyst.wirephire.com/repo/catalyst-hd234k/$arch</nowiki><br />
<br />
You must also [[User:Vi0L0|add Vi0L0's GPG key]] so that pacman trusts the repositories.<br />
<br />
# pacman-key --keyserver pgp.mit.edu --recv-keys 0xabed422d653c3094<br />
# pacman-key --lsign-key 0xabed422d653c3094<br />
<br />
Make sure that your kernel have got headers files. The package that contains headers for default ARCH's linux kernel is called '''linux-headers''':<br />
<br />
# pacman -S linux-headers<br />
<br />
Once you have done this, update pacman's database and install the packages:<br />
<br />
# pacman -Syu<br />
# pacman -S catalyst-hook catalyst-utils<br />
<br />
{{Note|If pacman asks you about removing '''libgl''' you can safely do so.}}<br />
<br />
You should now enable the {{ic|catalyst-hook.service}} which will automatically update the fglrx modules while the system shuts down or reboots, whenever it's necessary:<br />
<br />
# systemctl enable catalyst-hook<br />
# systemctl start catalyst-hook<br />
<br />
{{Note|catalyst-hook is described in [[#Catalyst-hook]] section.}}<br />
<br />
If you are on 64-bit and also need 32-bit OpenGL support:<br />
<br />
# pacman -S lib32-catalyst-utils<br />
<br />
Repositories also contain other packages, that can ''replace'' the catalyst-hook package:<br />
<br />
* '''catalyst-generator'''; this package is able to generate fglrx modules packed into pacman compliant packages - most secure and KISS-compatible package in this side-note, although it has to be operated manually. It's described in [[#Catalyst-generator]]<br />
* '''catalyst'''; this package contains only one fglrx module for ARCH's default kernel - '''linux'''. It should be installed by the users who have encountered problems with hook or generator. <br />
<br />
You will find more details about those packages in [[#Tools| Tools section]].<br />
Lastly, both repositories also contain the '''xvba-video''' package, which enables video acceleration, described in [[#Video acceleration]], the '''AMDOverdriveCtrl''' package, which is a GUI to control over- and underclocking, also described in [[#GPU/Mem frequency, Temperature, Fan speed, Overclocking utilities]], and a pack of tools for '''OpenCL/OpenGL developers''', described in [[#OpenCL_and_OpenGL_development]]<br />
<br />
==== Installing from the AUR ====<br />
The last way to install Catalyst is from the [[Arch User Repository|AUR]]. If you want to built the packages specifically for your computer, this is your way to go. Note that this is also the most tedious way to install Catalyst; it requires the most work and also requires manual updates upon every kernel update.<br />
<br />
{{Warning|If you install the Catalyst package from the AUR, you will have to rebuild Catalyst every time the kernel is updated. Otherwise X '''will''' fail to start.}}<br />
{{Warning|The Legacy driver does not support Xorg 1.13 for now. Support should be added by AMD in a century or two, but this could be sooner. Should you want to use this driver, see [[#Xorg repositories]] for instructions on how to roll back to or hold back Xorg 1.12.}}<br />
<br />
All packages mentioned above in Vi0L0's unofficial repository are also available on the [[Arch User Repository|AUR]]:<br />
* {{AUR|Catalyst}};<br />
* {{AUR|Catalyst-utils}};<br />
* {{AUR|Lib32-catalyst-utils}};<br />
* {{AUR|Catalyst-generator}};<br />
* {{AUR|Catalyst-hook}};<br />
* {{AUR|Catalyst-daemon}}.<br />
<br />
The AUR also holds some packages that are '''not''' found in any of the repositories. These packages contain the so-called ''Catalyst-total'' packages and the beta versions:<br />
* {{AUR|Catalyst-total-hd234k}};<br />
* {{AUR|Catalyst-total}};<br />
* {{AUR|Catalyst-test}};<br />
* {{AUR|Lib32-catalyst-test}};<br />
* {{AUR|Catalyst-total-pxp}};<br />
<br />
The ''Catalyst-total'' packages are made to make the lives of AUR users easier. It builds the driver, the kernel utilities and the 32 bit kernel utilities. It also builds the Catalyst-hook package, which is explained above.<br />
<br />
''Catalyst-total-pxp'' builds Catalyst with experimental powerXpress support.<br />
<br />
For more information on building from the AUR, read [[#Installing_from_AUR| Installing from AUR]].<br />
<br />
==== Installing directly from AMD ====<br />
{{Warning|Using the installer from ati.com/amd.com is '''not''' recommended! It may cause file conflicts and X failures and you will miss Arch-specific fixes. You '''must''' be familiar with booting to the command-line if you wish to attempt this.}}<br />
<br />
{{Note|If you have attempted a manual install from the official installer and cannot recover your desktop:<br />
# /usr/share/ati/fglrx-uninstall.sh<br />
}}<br />
<br />
1.) Download the installer from AMD or elsewhere (whereas *-* will be the version): {{ic|ati-driver-installer-*-*-x86.x86_64.run}}<br />
<br />
2.) Make sure it's executable: {{ic|# chmod +x ati-driver*}}<br />
<br />
3.) Ensure you're using a basic video driver like vesa and remove conflicting drivers (i.e. {{ic|xf86-video-ati}}) with pacman.<br />
<br />
4.) Symlink {{ic|/usr/src/linux}} to {{ic|<nowiki>/usr/src/{kernelsource}</nowiki>}}. 64-bit users also symlink{{ic|/usr/lib64}} to {{ic|/usr/lib}}.<br />
<br />
5.) Be sure to have your build environment setup: {{ic|# pacman -Syu base-devel linux-headers}}<br />
<br />
6.) Now run {{ic|# ./ati-driver-installer-*-*-x86.86_64.run}} (Files will extract to a temporary folder and scripts will run...)<br />
<br />
Assuming nothing went horribly wrong...<br />
<br />
7.) Check {{ic|/usr/share/ati/fglrx-install.log}} for issues. There should also be a {{ic|/lib/modules/fglrx/make.{ker_version}.log}}.<br />
<br />
{{Note|If you modify the make scripts, save to a different filename. Otherwise uninstall will not complete successfully.}}<br />
<br />
=== Configuring the driver ===<br />
After you have installed the driver via your chosen method, you will have to configure X to work with Catalyst. Also, you will have to make sure the module gets loaded at boot. Also, one should disable [[KMS|kernel mode setting]].<br />
<br />
==== Configuring X ====<br />
To configure X, you will have to create an xorg.conf file. Catalyst provides its own {{ic|aticonfig}} tool to create and/or modify this file.<br />
It also can configure virtually every aspect of the card for it also accesses the {{ic|/etc/ati/amdpcsdb}} file. For a complete list of {{ic|aticonfig}} options, run:<br />
<br />
# aticonfig --help | less<br />
<br />
{{Warning|Use the --output option before committing to /etc/X11 as an xorg.conf file will override anything in /etc/X11/xorg.conf.d}}<br />
<br />
{{Note|If you want to adhere to the new xorg.conf.d: Append your {{ic|aticonfig}} string with ''--output'' so that you can adapt the Device section to {{ic|/etc/X11/xorg.conf.d/20-radeon.conf}}. The drawback of this is that many {{ic|aticonfig}} options rely on an xorg.conf, and thus will be unavailable.}}<br />
<br />
Now, to configure Catalyst. If you have only one monitor, run this:<br />
<br />
# aticonfig --initial<br />
<br />
{{Note | If you have PowerXpress problem you should probably install {{ic|catalyst-utils-pxp}}}}<br />
<br />
However, if you have two monitors and want to use both of them, you can run the command stated below. Note that this will generate a dual head configuration with the second screen located above the first screen.<br />
<br />
# aticonfig --initial=dual-head --screen-layout=above<br />
<br />
{{Note|See [[#Double Screen (Dual Head / Dual Screen / Xinerama)]] for more information on setting up dual monitors.}}<br />
<br />
You can compare the generated file to one of the [[Xorg#Sample_xorg.conf_Files|Sample Xorg.conf]] examples listed on the Xorg page.<br />
<br />
Although the current Xorg versions auto-detect most options when started, you may want to specify some in case the defaults change between versions.<br />
<br />
Here is an example (with notes) '''for reference'''. Entries with '#' should be required, add entries with '##' as needed:<br />
<br />
{{bc|1=<br />
Section "ServerLayout"<br />
Identifier "Arch"<br />
Screen 0 "Screen0" 0 0 # 0's are necessary.<br />
EndSection<br />
Section "Module"<br />
Load ...<br />
...<br />
EndSection<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
...<br />
EndSection<br />
Section "Device"<br />
Identifier "Card0"<br />
Driver "fglrx" # Essential.<br />
BusID "PCI:1:0:0" # Recommended if autodetect fails.<br />
Option "OpenGLOverlay" "0" ##<br />
Option "XAANoOffscreenPixmaps" "false" ##<br />
EndSection<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24 # Should not change from '24'<br />
Modes "1280x1024" "2048x1536" ## 1st value=default resolution, 2nd=maximum.<br />
Virtual 1664 1200 ## (x+64, y) to workaround potential OGL rect. artifacts/<br />
EndSubSection ## fixed in Catalyst 9.8<br />
EndSection<br />
Section "DRI"<br />
Mode 0666 # May help enable direct rendering.<br />
EndSection<br />
}}<br />
<br />
{{Note|With '''every''' Catalyst update you should remove '''amdpcsdb''' file in this way: kill X, remove {{ic|/etc/ati/amdpcsdb}}, start X and then run {{ic|amdcccle}} - otherwise the version of Catalyst may display wrongly in amdcccle.}}<br />
<br />
''If you need more information on Catalyst, visit [https://bbs.archlinux.org/viewtopic.php?id=57084 this thread].''<br />
<br />
==== Loading the module at boot ====<br />
{{Note|Users of the [community] package do not have to do this, it's automatically done for them when installing the package.}}<br />
We have to blacklist the {{ic|radeon}} module to prevent it from auto-loading. To do so, blacklist ''radeon'' in {{ic|/etc/modprobe.d/modprobe.conf}}. Also, make sure that it is not loaded by any file under {{ic|/etc/modules-load.d/}}. For more information, see [[Modprobe|blacklisting in this article]]. <br />
<br />
Then we will have to make sure that the {{ic|fglrx}} module gets auto-loaded. Either add {{ic|fglrx}} on a new line of an existing module file located under {{ic|/etc/modules-load.d/}}, or create a new file and add {{ic|fglrx}}.<br />
<br />
==== Disable kernel mode setting ====<br />
<br />
Disabling kernel mode setting is important, as the driver doesn't take advantage of [[KMS]] yet. If you do not deactivate KMS, your system might freeze when trying to switch to a tty or even when shutting down via your DE.<br />
<br />
For [[GRUB Legacy|GRUB Legacy]], edit {{ic|menu.lst}} by adding {{ic|nomodeset}} to the kernel parameters. For example:<br />
<br />
kernel /boot/vmlinuz-linux root=/dev/sda1 ro '''nomodeset'''<br />
<br />
For [[GRUB2|GRUB 2]], edit {{ic|/etc/default/grub}} and add ''nomodeset'' to the kernel parameter options, e.g.<br />
<br />
GRUB_CMDLINE_LINUX="nomodeset"<br />
<br />
Then run, as root;<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
For [[Syslinux|Syslinux]], edit {{ic|/boot/syslinux/syslinux.cfg}} and add ''nomodeset'' to the {{ic|APPEND}} line, e.g.:<br />
<br />
APPEND root=/dev/sda2 ro ''nomodeset''<br />
<br />
==== Checking operation ====<br />
<br />
Assuming that a reboot to your login was successful, you can check if fglrx is running properly with the following commands:<br />
<br />
$ lsmod | grep fglrx<br />
$ fglrxinfo<br />
<br />
If you get output, it works. Finally, run X with {{ic|startx}} or by using GDM/KDM and verify that direct rendering is enabled by running the following command in a terminal:<br />
<br />
$ glxinfo | grep "direct rendering"<br />
<br />
If it says "direct rendering: yes" then you're good to go! If the glxinfo command is not found install the {{Pkg|mesa-demos}} package.<br />
<br />
{{Note|You can also use:<br />
$ fgl_glxgears<br />
as the fglrx alternative test to glxgears.<br />
}}<br />
<br />
{{Warning|In recent versions of Xorg, the paths of libs are changed. So, sometimes {{ic|libGL.so}} cannot be correctly loaded even if it's installed. Check this if your GL is not working. Please read "Troubleshooting" section for details.}}<br />
<br />
If you have trouble, see [[#Troubleshooting]].<br />
<br />
=== Custom Kernels ===<br />
<br />
To install catalyst for a custom kernel, you'll need to build your own {{ic|catalyst-$kernel}} package.<br />
<br />
If you are at all uncomfortable or inexperienced with making packages, read up the [[ABS]] wiki page first so things go smoothly.<br />
<br />
# Obtain the {{ic|PKGBUILD}} and {{ic|catalyst.install}} files from [[AUR|Catalyst]].<br />
# Editing the PKGBUILD. Two changes need to be made here:<br />
## Change {{ic|1=pkgname=catalyst}} to {{ic|1=pkgname=catalyst-$kernel_name}}, where $kernel_name is whatever you want (e.g. custom, mm, themostawesomekernelever).<br />
## Change the dependency of {{ic|linux}} to {{ic|$kernel_name}}.<br />
# Build your package and install; run {{ic|makepkg -i}} or {{ic|makepkg}} followed by {{ic|pacman -U pkgname.pkg.tar.gz}}<br />
<br />
{{Note|If you run multiple kernels, you have to install the Catalyst-utils packages for all kernels. They won't conflict with one another.}}<br />
<br />
{{Note|Catalyst-generator is able to build catalyst-{kernver} packages for you so you do not actually need to perform all those steps manually. For more information, see [[#Tools| Tools section]].}}<br />
<br />
=== PowerXpress support ===<br />
<br />
PowerXpress technology allows switching notebooks with dual-graphic capability from integrated graphics (IGP) to discrete graphics either to increase battery life or to achieve better 3D rendering capabilities.<br />
<br />
To use such functionality on Arch you will have to:<br />
* Get and build {{AUR|catalyst-total-pxp}} package from the [[Arch User Repository|AUR]], or<br />
* Install '''catalyst-utils-pxp''' package from the [catalyst] repository (plus additional lib32-catalyst-utils-pxp, if needed).<br />
<br />
To perform a switch into Intel's IGP you will also have to install the '''mesa-libgl''' package and Intel's drivers: '''xf86-video-intel''' and '''intel-dri'''.<br />
<br />
{{Note|'''With the latest version of Catalyst, version 13.1 (not Catalyst legacy) ChrisXY was able to work on the newest xorg-server (version 1.13.1), mesa 9.0.1 and xf86-video-intel 2.20.18'''.<br />
<br />
On any version of Catalyst below 13.1 (and all versions of Catalyst legacy) there are some problems with the new Intel drivers and the '''last noted working version of xf86-video-intel is 2.20.2-2''', so you will probably have to downgrade from the latest version that you have gotten from Arch's repositories (although we recommend to test the newest one before downgrading - there's always some possibility that it will work).<br />
<br />
'''xf86-video-intel 2.20.2-2''' works only with xorg-server 1.12 and so it is a part of the '''xorg112 repository'''. If you want to use it you will have to downgrade xorg-server as well. For information on this, see [[#Xorg repositories]].}}<br />
<br />
Now you can switch between the integrated and the discrete GPU, using these commands:<br />
<br />
{{bc|1=<br />
# aticonfig --px-igpu #for integrated GPU<br />
# aticonfig --px-dgpu #for discrete GPU<br />
}}<br />
<br />
Just remember that fglrx needs /etc/X11/xorg.conf configured for AMD's card with 'fglrx' inside.<br />
<br />
You can also use the '''pxp_switch_catalyst''' switching script that will perform some additional usefull operations:<br />
* Switching xorg.conf - it will rename xorg.conf into xorg.conf.cat (if there's fglrx inside) or xorg.conf.oth (if there's intel inside) and then it will create a symlink to xorg.conf, depending on what you chose.<br />
* Running {{ic|aticonfig --px-Xgpu}}.<br />
* Running {{ic|switchlibGL}}.<br />
* Adding/removing fglrx into/from {{ic|/etc/modules-load.d/catalyst.conf}}.<br />
<br />
Usage:<br />
{{bc|1=<br />
# pxp_switch_catalyst amd<br />
# pxp_switch_catalyst intel<br />
}}<br />
<br />
If you have got problems when you try to run X on Intel's driver you may try to force '''"UXA" acceleration'''; just make sure that your xorg.conf for Intel's GPU got '''Option "AccelMethod" "uxa"''', like here:<br />
{{bc|1=<br />
Section "Device"<br />
Identifier "Intel Graphics"<br />
Driver "intel"<br />
#Option "AccelMethod" "sna"<br />
Option "AccelMethod" "uxa"<br />
#Option "AccelMethod" "xaa"<br />
EndSection<br />
}}<br />
<br />
==== Running two X servers (one using the Intel driver, another one using fglrx) simultaneously ====<br />
Because fglrx is crash-prone (regarding PowerXpress), it could be a good idea to use the Intel driver in the main X server and have a secondary X server using fglrx when 3D acceleration is needed. However, simply switching to the discrete GPU from the integrated GPU using {{ic|aticonfig}} or {{ic|amdcccle}} will cause all sorts of weird bugs when starting the second X.<br />
<br />
To run two X servers at the same time (each using different drivers), you should firstly set up a fully working X with Catalyst and then move its {{ic|xorg.conf}} to a temporary place (for example, {{ic|/etc/X11/xorg.conf.fglrx}}. The next time X is started, it will use the Intel driver by default instead of fglrx.<br />
<br />
To start a second X server using fglrx, simply move {{ic|xorg.conf}} back to the proper place ({{ic|/etc/X11/xorg.conf}}) before starting X. This method even allows you to switch between running X sessions. When you are done using fglrx, move {{ic|xorg.conf}} somewhere else again.<br />
<br />
The only disadvantage of this method is not having 3D acceleration using the Intel driver. 2D acceleration, however, is fully functional. Other than that, this will provide us with a completely stable desktop.<br />
<br />
== Xorg repositories ==<br />
Catalyst is notorious for its slow update process. As such, it is common that a new Xorg version is pushed down from upstream that will break compatibility for Catalyst. This means that Catalyst users either have to hold the Xorg packages from updating, or use a backported repository that only contains the Xorg packages that should be hold back. Vi0L0 has stepped in to fulfil this task and provides several backported repositories. <br />
<br />
If you want to use pacman to hold back packages from updating, see [[pacman|skip package from being upgraded]]. Packages you should hold back, are:<br />
*xorg-server-*<br />
*xf86-input-*<br />
*xf86-video-*<br />
<br />
If you want to use the backported repositories, you have to edit {{ic|/etc/pacman.conf}} and add the information of the repository '''above all other repositories''', even above your Catalyst repository, should you use one.<br />
<br />
===[xorg113]===<br />
Catalyst doesn't support xorg-server 1.14.<br />
<br />
[xorg113]<br />
<nowiki>Server = http://catalyst.wirephire.com/repo/xorg113/$arch</nowiki><br />
<br />
===[xorg112]===<br />
Catalyst < 12.10 doesn't support xorg-server 1.13.<br />
<br />
[xorg112]<br />
<nowiki>Server = http://catalyst.wirephire.com/repo/xorg112/$arch</nowiki><br />
<br />
===[xorg111]===<br />
Catalyst < 12.6 doesn't support xorg-server 1.12.<br />
<br />
[xorg111]<br />
<nowiki>Server = http://catalyst.wirephire.com/repo/xorg111/$arch</nowiki><br />
<br />
== Tools ==<br />
<br />
=== Catalyst-hook ===<br />
[https://aur.archlinux.org/packages.php?ID=40834 Catalyst-hook] is a hook for [[mkinitcpio|mkinitcpio]] and a [[systemd|systemd]] service that will automatically rebuild the fglrx modules while the system shuts down or reboots, but only if it's necessary (e.g. after an update).<br />
<br />
To enable the automatic update, enable the {{ic|catalyst-hook.service}}:<br />
<br />
# systemctl enable catalyst-hook<br />
# systemctl start catalyst-hook<br />
<br />
You can also use this package to build the fglrx module manually. Simply run the catalyst_build_module script after the kernel has been updated:<br />
<br />
# catalyst_build_module all<br />
<br />
<br />
'''A few more technical details:'''<br />
<br />
The {{ic|catalyst-hook.service}} is stopping the systemd "river" and is forcing systemd to wait until catalyst-hook finishes its job.<br />
<br />
The {{ic|catalyst-hook.service}} is calling the {{ic|catalyst_build_module check}} function which checks if fglrx rebuilds are really necessary.<br />
<br />
The {{ic|check}} function is checking if the fglrx module exists, if it:<br />
<br />
*doesn't exist, it will build it;<br />
<br />
*does exist, it will compare the two values to be sure that a rebuild is necessary.<br />
<br />
These values are md5sums of the {{ic|/usr/lib/modules/<kernel_version>/build/Module.symvers}} file (because I, Vi0L0, noticed that this file is unique and different for every kernel's release). The first value is the md5sum of the existing {{ic|Module.symvers}} file. The second value is the md5sum of the {{ic|Module.symvers}} file which existed in a moment of the fglrx module creation. This value was compiled into the fglrx module by a catalyst_build_module script.<br />
<br />
If the values are different, it will compile the new fglrx module.<br />
<br />
The check is checking the whole {{ic|/usr/lib/modules/}} directory and building modules for all of the installed kernels if it's necessary. If the build or rebuild isn't necessary, the whole process takes only some milliseconds to complete before it gets killed by systemd.<br />
<br />
'''This is basically the same as catalyst-dkms from [community]... not''' - just to clarify things:<br />
<br />
- catalyst-hook does not need dkms to work, dkms is far more complex than mkinitcpio's hook or systemd's service;<br />
<br />
- catalyst-hook should be safer - because dkms is building modules at system's startup, so right when also X/DM is trying to start<br />
<br />
=== Catalyst-generator ===<br />
<br />
[https://aur.archlinux.org/packages.php?ID=41040 Catalyst-generator] is a package that is able to build and install the fglrx module packed into pacman compliant catalyst-${kernver} packages. The basic difference from Catalyst-hook is that you will have to trigger this command manually, whereas Catalyst-hook will do this automatically at boot when a new kernel got installed.<br />
<br />
It creates catalyst-${kernver} packages using [[makepkg]] and installs them with [[pacman]]. ''${kernver}'' is the kernel version for which each package was built (e.g. catalyst-2.6.35-ARCH package was built for 2.6.35-ARCH kernel).<br />
<br />
To build and install catalyst-${kernver} package for a currently booted kernel as an unprivileged user (non-root; safer way), use {{ic|catalyst_build_module}}. You will be asked for your root password to proceed to package installation.<br />
<br />
A short summary on how to use this package:<br />
<br />
# As root: {{ic|catalyst_build_module remove}}. This will remove all unused {{ic|catalyst-{kernver} }} packages.<br />
# As unprivileged user: {{ic|catalyst_build_module ${kernver}}}, where ${kernver} is the version of the kernel to which you just updated. For example: {{ic|catalyst_build_module 2.6.36-ARCH}}. You can also build catalyst-${kernver} for all installed kernels by using {{ic|catalyst_build_module all}}.<br />
# If you want to remove {{ic|catalyst-generator}}, it's best to run this as root before removing catalyst-generator: {{ic|catalyst_build_module remove_all}}. '''This will remove all catalyst-{kernver} packages from the system.'''<br />
<br />
Catalyst-generator isn't able to remove all those catalyst-{kernver} packages automatically while being removed because there can not be more than one instance of pacman running. If you forget to run {{ic|catalyst_build_module remove_all}} before using {{ic|pacman -R catalyst-generator}} catalyst-generator will tell you which catalyst-{kernver} packages you will have to remove manually after removing catalyst-generator itself.<br />
<br />
Catalyst-generator is most safe and KISS-friendly solution because:<br />
<br />
- you can use unprivileged user to build the package;<br />
<br />
- it's building modules in fakeroot environment;<br />
<br />
- it's not throwing files here and there, package manager always knows where they are;<br />
<br />
... all you have to do is to remember to use it<br />
<br />
{{Note|If you see those warnings:<br />
<br />
'''WARNING:''' Package contains reference to $srcdir<br />
<br />
'''WARNING:''' '.pkg' is not a valid archive extension.<br />
<br />
while building catalyst-{kernver} package, do not be concerned, it's normal.}}<br />
<br />
<br />
=== OpenCL and OpenGL development ===<br />
<br />
Since years AMD is working on tools for OpenCL and OpenGL developement.<br />
<br />
Now under the banner of '''"Heterogeneous Computing"''' AMD is providing even more of them, fortunately most of their computing tools are available also for Linux.<br />
<br />
In the AUR and the [catalyst] repositories you will find packages that represent the most important work from AMD, namely; [https://aur.archlinux.org/packages/amdapp-aparapi amdapp-aparapi], [https://aur.archlinux.org/packages/amdapp-sdk amdapp-sdk] and [https://aur.archlinux.org/packages/amdapp-codexl amdapp-codexl].<br />
<br />
APP shortcut stands for Accelerated Parallel Processing.<br />
<br />
==== amdapp-aparapi ====<br />
AMD's Aparapi is an API for expressing data parallel workloads in Java and a runtime component capable of converting the Java bytecode of compatible workloads into OpenCL so that it can be executed on a variety of GPU devices. If Aparapi can’t execute on the GPU, it will execute in a Java thread pool.<br />
<br />
You can find more information about Aparapi [http://developer.amd.com/tools/heterogeneous-computing/aparapi/ here].<br />
<br />
==== amdapp-sdk (formerly known as amdstream) ====<br />
The AMD APP Software Development Kit (SDK) is a complete development platform created by AMD to allow you to quickly and easily develop applications accelerated by AMD APP technology. The SDK provides samples, documentation and other materials to quickly get you started leveraging accelerated compute using OpenCL, Bolt, or C++ AMP in your C/C++ application.<br />
<br />
Since version 2.8 amdapp-sdk is providing aparapiUtil as well as aparapi's samples. A package is available on the [catalyst] repository; it depends on the amdapp-aparapi package. The AUR's package will let you decide whether you want aparapi's additions or not.<br />
<br />
Version 2.8 does not provide Profiler functionality, it has been moved to CodeXL.<br />
<br />
You can find more information about AMD APP SDK [http://developer.amd.com/tools/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/ here].<br />
<br />
==== amdapp-codexl ====<br />
CodeXL is an OpenCL and OpenGL Debugger and Profiler, with a static OpenCL kernel analyzer. It's a GUI application written atop of the well known [https://aur.archlinux.org/packages/gdebugger gDEBugger] and is available only for x86_64 systems.<br />
<br />
You can find more informations about CodeXL [http://developer.amd.com/tools/heterogeneous-computing/codexl/ here].<br />
<br />
== Features ==<br />
<br />
=== Tear Free Rendering ===<br />
<br />
Presented in '''Catalyst 11.1''', the ''Tear Free Desktop'' feature reduces tearing in 2D, 3D and video applications. This likely adds triple-buffering and v-sync. Do note that it requires additional GPU processing.<br />
<br />
To enable 'Tear Free Desktop' run {{ic|amdcccle}} and go to: {{ic|Display Options}} → {{ic|Tear Free}}.<br />
<br />
Or as root run:<br />
<br />
# aticonfig --set-pcs-u32=DDX,EnableTearFreeDesktop,1<br />
<br />
To disable, again use {{ic|amdcccle}} or run as root:<br />
<br />
# aticonfig --del-pcs-key=DDX,EnableTearFreeDesktop<br />
<br />
=== Video acceleration ===<br />
<br />
'''[[wikipedia:Video_Acceleration_API|Video Acceleration API]] (VA API)''' is an open source software library (libVA) and API specification which provides GPU acceleration for video processing on Linux/UNIX based operating systems. The process works by enabling hardware accelerated video decode at various entry-points (VLD, IDCT, Motion Compensation, deblocking) for common encoding standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/WMV3).<br />
<br />
VA-API gained a proprietary backend (in November 2009) called {{AUR|xvba-video}}, that allows VA-API programmed applications to take advantage of AMD Radeons UVD2 chipsets via the [[wikipedia:XvBA|XvBA (X-Video Bitstream Acceleration API designed by AMD)]] library.<br />
<br />
XvBA support and xvba-video is still under development, however it is '''working very well in most cases'''. Build the {{AUR|xvba-video}} package from AUR or soon, install it from [community] and install {{Pkg|mplayer-vaapi}} and {{Pkg|libva}}. Then just set your video player to use vaapi:gl as video output:<br />
<br />
$ mplayer -vo vaapi:gl movie.avi<br />
<br />
These options can be added to your mplayer configuration file, see [[MPlayer]].<br />
<br />
For '''smplayer''':<br />
<br />
Options → Preferences → General → Video (tab) → Output driver: User Defined : vaapi:gl<br />
Options → Preferences → General → Video (tab) → Double buffering '''on'''<br />
Options → Preferences → General → General → Screenshots → Turn screenshots '''off'''<br />
Options → Preferences → Performance → Threads for decoding: '''1''' (to turn off -lavdopts parameter)<br />
<br />
{{Note|If Tear Free Desktop is enabled it's better to use:<br />
Options -> Preferences -> General -> Video (tab) -> Output driver: vaapi<br />
If Video Output '''vaapi:gl''' isn't working - please check:<br />
'''vaapi''', '''vaapi:gl2''' or simply '''xv(0 - AMD Radeon [[wikipedia:Avivo|AVIVO Video]])'''.<br />
}}<br />
<br />
For '''VLC''':<br />
<br />
Tools → Preferences → Input & Codecs → Use GPU accelerated decoding<br />
<br />
It might help to enable v-sync in '''amdcccle''':<br />
<br />
3D → More Settings → Wait for vertical refresh = Always On<br />
<br />
{{Note|If you are using '''Compiz/KWin''', the only way to '''avoid video flickering''' is to watch videos in '''full-screen''' and only when '''Unredirect Fullscreen is off'''.<br />
<br />
In '''compiz''' you need to set '''Redirected Direct Rendering''' in General Options of ccsm. If it is still flickering, try to disable this option in CCSM. It's off by default in '''KWin''', but if you see flickering try to turn "Suspend desktop effects for fullscreen windows" on or off in System Settings → Desktop Effects → Advanced.}}<br />
<br />
=== GPU/Mem frequency, Temperature, Fan speed, Overclocking utilities ===<br />
<br />
You can get the GPU/Mem clocks with: {{ic|$ aticonfig --od-getclocks}}.<br />
<br />
You can get the fan speed with: {{ic|$ aticonfig --pplib-cmd "get fanspeed 0"}}<br />
<br />
You can get the temperature with: {{ic|$ aticonfig --odgt}}<br />
<br />
To set the fanspeed with: {{ic|$ aticonfig --pplib-cmd "set fanspeed 0 50"}} Query Index: 50, Speed in percent<br />
<br />
To overclock and/or underclock it's easier to use a GUI, like '''ATi Overclocking Utility''', which is very simple and requires qt to work. It might be out of date/old, but you can get it [http://kde-apps.org/content/show.php/ATI+Overclock?content=47796 here].<br />
<br />
Another, more complex utility to perform such operations is '''AMDOverdriveCtrl'''. Its homepage is [http://sourceforge.net/projects/amdovdrvctrl here] and you can build an Arch package from [https://aur.archlinux.org/packages.php?ID=45298 AUR] or from Vi0L0's unofficial repositories.<br />
<br />
=== Double Screen (Dual Head / Dual Screen / Xinerama) ===<br />
<br />
==== Introduction ====<br />
<br />
{{Warning| you should know that there isn't one specific solution because each setup differs and needs its own configuration. That's why you will have to adapt the steps below to your own needs. It is possible that you have to try more than once. '''Therefore, you should save your working {{ic|/etc/X11/xorg.conf}} before you start modifying and you must be able to recover from a command-line environment.'''}}<br />
<br />
* In this chapter, we will describe the installation of two different-sized screens on only one graphics card with two different output ports (DVI + HDMI) using a "BIG Desktop" configuration.<br />
<br />
* The Xinerama solution has some inconveniences, especially because it is not compatible with XrandR. For that very reason, you should not use this solution, because XrandR is a must for our later configuration.<br />
<br />
* The Dual Head solution would allow you to have 2 different sessions (one for each screen). It could be what you want, but you will not be able to move windows from one screen to another. If you have only one screen, you will have to define the mouse inside your Xorg session for each of the two sessions inside the Server Layout section.<br />
<br />
[http://support.amd.com/us/kbarticles/Pages/1105-HowCanIConfigureMultip.aspx ATI Documentation]<br />
<br />
==== ATI Catalyst Control Center ====<br />
<br />
The GUI tool shipped by ATI is very useful and we will try to use it as much as we can. To launch it, open a terminal and use the following command:<br />
<br />
$ {kdesu/gksu} amdcccle<br />
<br />
{{Warning|Do '''not''' use sudo directly with a GUI. Sudo gives you admin rights with user account information. Instead, use ''gksu'' (GNOME) or ''kdesu'' (KDE).}}<br />
<br />
==== Installation ====<br />
<br />
Before we start, make sure that your hardware is plugged in correctly, that power is on and that you know your hardware characteristics (screen dimensions, sizes, refreshment rates, etc.) Normally, both screens are recognized during boot time but not necessarily identified properly, especially if you are not using any Xorg base configuration file ({{ic|/etc/X11/xorg.conf}}) but relying on the hot-plugging feature.<br />
<br />
The first step is to make sure that you screens will be recognized by your DE and by X. For this, you need to generate a basic Xorg configuration file for your two screens:<br />
<br />
# aticonfig --initial --desktop-setup=horizontal --overlay-on=1<br />
<br />
or<br />
<br />
# aticonfig --initial=dual-head --screen-layout=left<br />
<br />
{{Note|{{ic|overlay}} is important because it allows you to have 1 pixel (or more) shared between the 2 screens.}}<br />
{{Tip|For the other possible and available options, do not hesitate to type {{ic|aticonfig --help}} inside a terminal to display all available command lines.}}<br />
<br />
Now you should have a basic Xorg configuration file that you can edit to add your screen resolutions. It is important to use the precise resolution, especially if you have screens of different sizes. These resolutions have to be added in the "Screen" section:<br />
<br />
SubSection "Display"<br />
Depth 24<br />
Modes "X-resolution screen 1xY-resolution screen 1" "Xresolution screen 2xY-resolution screen 2"<br />
EndSubSection<br />
<br />
From now on, instead of editing the {{ic|xorg.conf}} file manually, let us use the ATI GUI tool. Restart X to be sure that your two screens are properly supported and that the resolutions are properly recognized (Screens must be independent, not mirrored).<br />
<br />
==== Configuration ====<br />
<br />
Now you will only have to launch the ATI control center with root privileges, go to the display menu and choose how you would like to set your configuration (small arrow of the drop down menu). A last restart of X and you should be done!<br />
<br />
Before you restart X, do not hesitate to verify your new {{ic|xorg.conf}} file. At this stage, inside the "Display" sub-section of the "Screen" section, you should see a "Virtual" command line, of which the resolution should be the sum of both screens. The "Server Layout" section says all the rest.<br />
<br />
== Uninstallation ==<br />
<br />
{{Out of date|This section still references rc.conf, which has been deprecated.}} <br />
<br />
If for any reason this driver is not working for you or you want to try out the open source driver, remove {{ic|catalyst}} and {{ic|catalyst-utils}} packages. Also you should remove {{Aur|catalyst-daemon}}, {{Aur|catalyst-generator}}, {{Aur|catalyst-hook}} and {{Aur|lib32-catalyst-utils}} packages if they have been installed on your system.<br />
<br />
{{Warning|You may need to use {{ic|pacman -Rdd}} to remove {{aur|catalyst-utils}} (and/or {{aur|lib32-catalyst-utils}}) because that package contains ''gl'' related files and many of your installed packages depend on them.<br />
You also have to remove ''/etc/profile.d/ati-flgrx.sh'' (if it exists on your system), otherwise ''r600_dri.so'' will fail to load and you would not have 3D support.}}<br />
<br />
{{Note|You should remove unofficial repositories from your {{ic|/etc/pacman.conf}} and run {{ic|pacman -Syu}}, because those repositories include out-dated Xorg packages to allow use of {{ic|catalyst}} and the {{Pkg|xf86-video-ati}} package needs up-to-date Xorg packages from the [[Official repositories]].}}<br />
<br />
Also follow these steps:<br />
<br />
* If you have the {{ic|/etc/modprobe.d/blacklist-radeon.conf}} file remove it or comment the line {{ic|blacklist radeon}} in that file.<br />
* If you have a file in {{ic|/etc/modules-load.d}} to load the {{ic|fglrx}} module on boot, remove it or comment the line containing {{ic|fglrx}}.<br />
* Make sure to remove or backup {{ic|/etc/X11/xorg.conf}}.<br />
* If you have installed the {{Aur|catalyst-hook}} package, make sure to remove ''fglrx'' from the "HOOKS" array of {{ic|/etc/mkinitcpio.conf}} in case if post-removal script of the package don't work.<br />
* If you have installed the {{Aur|catalyst-generator}} package, make sure to remove "fglrx" from the "MODULES" array of {{ic|/etc/rc.conf}} in case if post-removal script of the package don't work.<br />
* If you have installed the {{Aur|catalyst-daemon}} package, make sure to remove "autofglrx" from the "DAEMONS" array of {{ic|/etc/rc.conf}} in case if post-removal script of the package don't work.<br />
* If you used the "nomodeset" option in your [[Boot Loader#Configuration files|configuration file]] in kernel parameters line and plan to use [[#Kernel mode-setting (KMS)|KMS]], remove it.<br />
* '''Reboot''' before installing another driver.<br />
<br />
== Troubleshooting ==<br />
<br />
If you can still boot to command-line, then the problem probably lies in {{ic|/etc/X11/xorg.conf}}<br />
<br />
You can parse the whole {{ic|/var/log/Xorg.0.log}} or, for clues:<br />
<br />
$ grep '(EE)' /var/log/Xorg.0.log<br />
$ grep '(WW)' /var/log/Xorg.0.log<br />
<br />
If you are still confused about what is going on, search the forums first. Then post a message in the [https://bbs.archlinux.org/viewtopic.php?pid=1166052#p1166052/ thread specific to ATI/AMD]. Provide the information from {{ic|xorg.conf}} and both commands mentioned above.<br />
<br />
=== 3D Wine applications freeze ===<br />
If you use a 3D Wine application and it hangs, you have to disable TLS. To do this, either use {{ic|aticonfig}} or edit {{ic|/etc/X11/xorg.conf}}. To use {{ic|aticonfig}}:<br />
<br />
# aticonfig --tls=off<br />
<br />
Or, to edit {{ic|/etc/X11/xorg.conf}}; first open the file in an editor as root and then add {{ic|Option "UseFastTLS" "off"}} to the ''Device'' section of this file. <br />
<br />
After applying either of the solutions, restart X for it to take effect.<br />
<br />
=== Problems with video colours ===<br />
<br />
You may still use {{ic|vaapi:gl}} to avoid video flickering, but without video acceleration:<br />
<br />
* Run '''mplayer''' without {{ic|-vo vaapi}} switch.<br />
<br />
* Run '''smplayer''' remove {{ic|-vo vaapi}} from Options → Preferences → Advanced → Options for MPlayer → Options: -vo vaapi<br />
<br />
Plus for '''smplayer''' you may now safely turn screenshots on.<br />
<br />
=== KWin and composite ===<br />
<br />
You may use XRender if the rendering with OpenGL is slow. However, XRender might also be slower than OpenGL depending on your card.<br />
XRender also solves artefact issues in some cases, for instance when resizing Konsole.<br />
<br />
=== Black screen with complete lockups and/or hangs after reboot or startx ===<br />
<br />
Ensure you have added the '''nomodeset''' option to the kernel options line in your bootloader (see [[#Disable kernel mode setting]]).<br />
<br />
If you are using the legacy driver (catalyst-hd234k) and get a black screen, try downgrading xorg-server to 1.11 by using the [[#xorg111]] repository.<br />
<br />
==== Faulty ACPI hardware calls ====<br />
It is possible that fglrx doesn't cooperate well with the system's ACPI hardware calls, so it auto-disables itself and there is no screen output.<br />
<br />
If so, try to run this:<br />
<br />
$ aticonfig --acpi-services=off<br />
<br />
=== KDM disappears after logout ===<br />
<br />
If you are running Catalyst proprietary driver and you get a console (tty1) instead of the expected KDM greeting when you log out, you must instruct KDM to restart the X server after each logout:<br />
<br />
$ sudo nano /usr/share/config/kdm/kdmrc<br />
<br />
Uncomment the following line under the section titled {{ic|[X-:*-Core]}}:<br />
<br />
TerminateServer=True<br />
<br />
KDM should now appear when you log out of KDE.<br />
<br />
=== Direct Rendering does not work ===<br />
<br />
This problem may occur when using the proprietary '''Catalyst''' driver.<br />
<br />
{{Warning|This error would also appear if you have not '''rebooted''' your system after the installation or upgrade of catalyst. The system needs to load the fglrx.ko module in order to make the driver work.}}<br />
<br />
If you have problem with direct rendering, run:<br />
<br />
$ LIBGL_DEBUG=verbose glxinfo > /dev/null<br />
<br />
at the command prompt. At the very start of the output, it'll usually give you a nice error message saying why you do not have direct rendering.<br />
<br />
Common errors and their solutions, are:<br />
<br />
libGL error: XF86DRIQueryDirectRenderingCapable returned false<br />
<br />
* Ensure that you are loading the correct agp modules for your AGP chipset before you load the fglrx kernel module. To determine which agp modules you'll need, run {{ic|hwdetect --show-agp}}. Then open your {{ic|fglrx.conf}} file in {{ic|/etc/modules-load.d}} and add the agp module on a line '''before''' the fglrx line.<br />
<br />
libGL error: failed to open DRM: Operation not permitted<br />
libGL error: reverting to (slow) indirect rendering<br />
<br />
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri//fglrx_dri.so<br />
libGL error: dlopen /usr/lib/xorg/modules/dri//fglrx_dri.so failed<br />
(/usr/lib/xorg/modules/dri//fglrx_dri.so: cannot open shared object file: No such file or directory)<br />
libGL error: unable to find driver: fglrx_dri.so<br />
<br />
* Something has not been installed correctly. If the paths in the error message are {{ic|/usr/X11R6/lib/modules/dri/fglrx_dri.so}}, then ensure you've logged completely out of your system, then back in. If you're using a graphical login manager (gdm, kdm, xdm), ensure that {{ic|/etc/profile}} is sourced every time you log in. This is usually accomplished by adding {{ic|source /etc/profile}} into {{ic|~/.xsession}} or {{ic|~/.xinitrc}}, but this may vary between login managers.<br />
<br />
* If the paths above in your error message ''are'' {{ic|/usr/lib/xorg/modules/dri/fglrx_dri.so}}, then something has not been correctly installed. Try reinstalling the {{ic|catalyst}} package.<br />
<br />
Errors such as:<br />
<br />
fglrx: libGL version undetermined - OpenGL module is using glapi fallback<br />
<br />
could be caused by having multiple versions of {{ic|libGL.so}} on your system. Run:<br />
<br />
$ sudo updatedb<br />
$ locate libGL.so<br />
<br />
This should return the following output:<br />
<br />
$ locate libGL.so<br />
/usr/lib/libGL.so<br />
/usr/lib/libGL.so.1<br />
/usr/lib/libGL.so.1.2<br />
<br />
These are the only three libGL.so files you should have on your system. If you have any more (e.g. {{ic|/usr/X11R6/lib/libGL.so.1.2}}), then remove them. This should fix your problem.<br />
<br />
You might not get any error to indicate that this is a problem. If you are using X11R7, make sure you do '''not''' have these files on your system:<br />
<br />
/usr/X11R6/lib/libGL.so.1.2<br />
/usr/X11R6/lib/libGL.so.1<br />
<br />
=== Hibernate/Sleep Issues ===<br />
<br />
==== Video fails to resume from suspend2ram ====<br />
<br />
ATI's proprietary Catalyst driver cannot resume from suspend if the framebuffer is enabled. To disable the framebuffer, add '''vga=0''' to your kernel options in for example, Grub Legacy's {{ic|/boot/grub/menu.lst}}:<br />
<br />
kernel /vmlinuz-linux root=/dev/sda3 resume=/dev/sda2 ro quiet '''vga=0'''<br />
<br />
To see where you need to add this with other bootloaders, see [[#Disable kernel mode setting]].<br />
<br />
=== System Freezes/Hard locks ===<br />
<br />
* The {{ic|radeonfb}} framebuffer drivers have been known in the past to cause problems of this nature. If your kernel has radeonfb support compiled in, you may want to try a different kernel and see if this helps.<br />
<br />
* If you experience system freezes when exiting your DE (shut down, suspend, switching to tty etc.) you probably forgot to deactivate KMS. (See [[#Disable kernel mode setting]])<br />
<br />
=== Hardware Conflicts ===<br />
<br />
Radeon cards used in conjunction with some versions of the nForce3 chipset (e.g. nForce 3 250Gb) won't have 3D acceleration. Currently the cause of this issue is unknown, but some sources indicate that it may be possible to get acceleration with this combination of hardware by booting Windows with the drivers from nVIDIA and then rebooting the system. This can be verified by issuing in a root console the following command:<br />
<br />
$ dmesg | grep agp<br />
<br />
If you get something similar to this (using an nForce3-based system):<br />
<br />
agpgart: Detected AGP bridge 0<br />
agpgart: Setting up Nforce3 AGP.<br />
agpgart: aperture base > 4G<br />
<br />
and also if issuing this command...<br />
<br />
$ tail -n 100 /var/log/Xorg.0.log | grep agp<br />
<br />
...gets something similar to:<br />
<br />
(EE) fglrx(0): [agp] unable to acquire AGP, error "xf86_ENODEV"<br />
<br />
Then you have this bug.<br />
<br />
Some sources indicate that in some situations, downgrading the motherboard BIOS may help, but this cannot be verified in all cases. Also, '''a bad BIOS downgrade can render your hardware useless, so beware.'''<br />
<br />
See [http://bugzilla.kernel.org/show_bug.cgi?id=6350/ this bugreport] for more information and a potential fix.<br />
<br />
=== Temporary hangs when playing video ===<br />
<br />
This problem may occur when using the proprietary Catalyst.<br />
<br />
If you experience temporary hangs lasting from a few seconds to several minutes occuring randomly during playback with mplayer, check /var/log/messages.log for output like:<br />
<br />
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160<br />
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160<br />
Nov 28 18:31:56 pandemonium [<f8bc628c>] ? ip_firegl_ioctl+0x1c/0x30 [fglrx]<br />
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160<br />
Nov 28 18:31:56 pandemonium [<c0197038>] ? vfs_ioctl+0x78/0x90<br />
Nov 28 18:31:56 pandemonium [<c01970b7>] ? do_vfs_ioctl+0x67/0x2f0<br />
Nov 28 18:31:56 pandemonium [<c01973a6>] ? sys_ioctl+0x66/0x70<br />
Nov 28 18:31:56 pandemonium [<c0103ef3>] ? sysenter_do_call+0x12/0x33<br />
Nov 28 18:31:56 pandemonium [<c01c64a6>] ? proc_get_sb+0xc6/0x160<br />
Nov 28 18:31:56 pandemonium =======================<br />
<br />
Adding the nopat kernel option to your kernel options in your bootloader and rebooting fixed the problem at least for me. To see how to do this for different bootloaders, see [[#Disable kernel mode setting]].<br />
<br />
=== "aticonfig: No supported adapters detected" ===<br />
<br />
If when running<br />
<br />
# aticonfig --initial<br />
<br />
you get:<br />
<br />
aticonfig: No supported adaptaters detected<br />
<br />
But you do have an AMD GPU (or APU), it may still be possible to get Catalyst working by manually setting the device in your your {{ic|etc/X11/xorg.conf}} file or by copying an older working /etc/ati/control file (preferred - this also fixes the watermark issue).<br />
<br />
To get an older control file, download a previous version of fglrx from AMD and run it with "--extract driver" parameter. You'll find the control file in driver/common/etc/ati/control. Copy the extracted file over the system file and restart Xorg. You can try different versions of the file.<br />
<br />
To set your model in xorg.conf,edit the device section of {{ic|/etc/X11/xorg.conf}} to:<br />
<br />
Section "Device"<br />
Identifier "ATI radeon '''****'''"<br />
Driver "fglrx"<br />
EndSection<br />
<br />
Where ''****'' should be replaced with your device's marketing number (e.g. 6870 for the HD 6870 and 6310 for the E-350 APU).<br />
<br />
Xorg will start and it is possible to use {{ic|amdcccle}} instead of {{ic|aticonfig}}. There will be an "AMD Unsupported hardware" watermark.<br />
<br />
You can remove this watermark using the following script:<br />
<br />
#!/bin/sh<br />
DRIVER=/usr/lib/xorg/modules/drivers/fglrx_drv.so<br />
for x in $(objdump -d $DRIVER|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do<br />
sed -i "s/$x/\x90\x90\x90\x90\x90/g" $DRIVER<br />
done<br />
<br />
and rebooting.<br />
<br />
=== WebGL support in Chromium ===<br />
<br />
Google has blacklisted Linux's Catalyst driver from supporting webGL in their Chromium/Chrome browsers.<br />
<br />
You can turn webGL on by editing {{ic|/usr/share/applications/chromium.desktop}} file and adding {{ic|--ignore-gpu-blacklist}} flag into the '''Exec''' line so it looks like this:<br />
<br />
Exec=chromium %U --ignore-gpu-blacklist<br />
<br />
You can also run chromium from console with the same {{ic|--ignore-gpu-blacklist}} flag:<br />
<br />
$ chromium --ignore-gpu-blacklist<br />
<br />
{{Warning|Catalyst does not support the GL_ARB_robustness extension, so it is possible that a malicious site could use WebGL to perform a DoS attack on your graphic card. For more info, read [http://www.h-online.com/security/news/item/WebGL-as-a-security-problem-1240567.html/ this].}}<br />
<br />
=== Laggs/freezes when watching flash videos via Adobe's flashplugin ===<br />
<br />
Edit {{ic|/etc/adobe/mms.cfg}} and make it look like this:<br />
<br />
#EnableLinuxHWVideoDecode=1<br />
OverrideGPUValidation=true<br />
<br />
If you are using KDE make sure that "Suspend desktop effects for fullscreen windows" is unchecked under System Settings->Workspace Appearance and Behaviour->Desktop Effects->Advanced.<br />
<br />
=== Laggs/slow windows movement in GNOME3 ===<br />
<br />
You can try this solution out, it's working for many people.<br />
<br />
Add this line into {{ic|~/.profile}} or into {{ic|/etc/profile}}:<br />
<br />
export CLUTTER_VBLANK=none<br />
<br />
Restart X server or reboot your system.<br />
<br />
=== Not using fullscreen resolution at 1920x1080 (underscanning) ===<br />
<br />
Using the amdcccle GUI you can select the display, go to adjustments, and set Underscan to 0% (aticonfig defaults to 15% underscan).<br />
<br />
Alternatively, you can use aticonfig to disable underscanning as well:<br />
<br />
aticonfig --set-pcs-val=MCIL,DigitalHDTVDefaultUnderscan,0<br />
<br />
For newer version (for example, 12.11), if Catalyst control center repeatedly fails to save the overscan setting, edit /etc/ati/amdpcsdb:<br />
<br />
TVEnableOverscan=V0<br />
<br />
Then logout and login.<br />
<br />
=== Dual Screen Setup: general problems with acceleration, OpenGL, compositing, performance ===<br />
Try to disable xinerama and xrandr12. Check out ie. this way:<br />
<br />
As root type those commands:<br />
aticonfig --initial<br />
aticonfig --set-pcs-str="DDX,EnableRandR12,FALSE"<br />
Then reboot your system. In /etc/X11/xorg.conf check that xinerama is disabled, if it's not disable it and reboot your system.<br />
<br />
Next run amdcccle and pick up amdcccle->display manager->multi-display->multidisplay desktop with display(s) 2.<br />
<br />
Reboot again and set up your display layout whatever you desire.<br />
<br />
=== Disabling VariBright Feature ===<br />
As root type command:<br />
aticonfig --set-pcs-u32=MCIL,PP_UserVariBrightEnable,0<br />
<br />
=== Hybrid/PowerXpress: turning off discrete GPU ===<br />
When you are using catalyst-total-pxp or catalyst-utils-pxp and you are switching to integrated GPU you may notice that discrete GPU is still working, consuming power and making your system's temperature higher. <br />
<br />
Sometimes ie. when your integrated GPU is intel's one you can use '''vgaswitcheroo''' to turn the discrete GPU off.<br />
Sometimes unfortunatelly, it's not working.<br />
<br />
Then you may check out [https://aur.archlinux.org/packages/?O=0&K=acpi_call acpi_call]. MrDeepPurple has prepared the script which he's using to perform 'turn off' task, he's calling script via systemd service while booting and resuming his system.<br />
Here's his script:<br />
#!/bin/sh<br />
libglx=$(/usr/lib/fglrx/switchlibglx query)<br />
modprobe acpi_call<br />
if [ "$libglx" = "intel" ]; then<br />
echo '\_SB.PCI0.PEG0.PEGP._OFF' > /proc/acpi/call<br />
fi</div>Cinchhttps://wiki.archlinux.org/index.php?title=GNOME&diff=252581GNOME2013-04-01T14:41:47Z<p>Cinch: /* fix url */</p>
<hr />
<div>[[Category:Desktop environments]]<br />
[[cs:GNOME]]<br />
[[de:GNOME]]<br />
[[es:GNOME]]<br />
[[fr:GNOME]]<br />
[[it:GNOME]]<br />
[[nl:GNOME]]<br />
[[pl:GNOME]]<br />
[[pt:GNOME]]<br />
[[ru:GNOME]]<br />
[[sr:GNOME]]<br />
[[th:GNOME]]<br />
[[tr:Gnome_Masaüstü_Ortamı]]<br />
[[uk:GNOME]]<br />
[[zh-CN:GNOME]]<br />
[[zh-TW:GNOME]]<br />
{{Article summary start}}<br />
{{Article summary text|GNOME 3 provides a modern desktop, rewritten from scratch, using the GTK3+ toolkit.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Graphical user interface overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|GTK+}}<br />
{{Article summary wiki|GDM}}<br />
{{Article summary wiki|Nautilus}}<br />
{{Article summary end}}<br />
<br />
From [http://www.gnome.org/about/ About Us | GNOME]:<br />
<br />
:''The GNOME Project was started in 1997 by two then university students, Miguel de Icaza and Federico Mena. Their aim: to produce a free (as in freedom) [[desktop environment]]. Since then, GNOME has grown into a hugely successful enterprise. Used by millions of people across the world, it is the most popular desktop environment for GNU/Linux and UNIX-type operating systems. The desktop has been utilised in successful, large-scale enterprise and public deployments, and the project’s developer technologies are utilised in a large number of popular mobile devices.''<br />
<br />
== Introduction ==<br />
<br />
GNOME 3 has ''two'' interfaces:<br />
<br />
*'''GNOME Shell''' is the new standard layout using the Mutter window manager. It acts as a composite manager for the desktop, employing hardware graphics acceleration to provide effects aimed at reducing screen clutter.<br />
<br />
*'''fallback mode''' (known as "classic mode" to some) is similar to GNOME 2, it uses gnome-panel and Metacity instead of gnome-shell/Mutter. No hardware acceleration is required to run fallback mode.<br />
<br />
GNOME-session automatically detects if your computer is incapable of running GNOME Shell and starts fallback mode when appropriate. When you are on fallback mode you can still replace GNOME's default window manager with your preferred one.<br />
<br />
==Installation==<br />
<br />
GNOME 3 is available in the [[official repositories]] and can be [[pacman|installed]] with two groups of packages:<br />
*{{Grp|gnome}} contains the core desktop environment and applications required for the standard GNOME experience.<br />
<br />
*{{Grp|gnome-extra}} contains various optional tools such as a media player, a calculator, an editor and other non-critical applications that go well with the GNOME desktop. Installing this group is optional.<br />
<br />
Note that installing only {{Grp|gnome-extra}} will not pull the whole {{Grp|gnome}} group by dependencies: if you really want everything you must explicitly install both groups.<br />
<br />
=== Starting GNOME ===<br />
<br />
'''Graphical log-in'''<br />
<br />
For the best desktop integration, login manager '''GDM''' is recommended. Other login managers can be used in place of GDM. Check out the [[Display_Manager|wiki article on display managers]] to learn how desktop environments are started.<br />
<br />
The login manager is a limited process entrusted with duties that impact the system. The [[PolicyKit|PolicyKit wiki article]] addresses the topic of system‑wide access control.<br />
<br />
{{Tip|Refer to the [[GDM]] article for installation and configuration instructions.}}<br />
<br />
'''Starting GNOME manually'''<br />
<br />
If you prefer to start GNOME manually from the console, add the following line to your {{ic|~/.xinitrc}} file:<br />
{{hc|~/.xinitrc|<nowiki><br />
exec gnome-session<br />
</nowiki>}}<br />
<br />
After the {{ic|exec}} command is placed, GNOME can be launched by typing {{ic|startx}}.<br />
<br />
See [[xinitrc]] for details, such as preserving the logind (and/or consolekit) session.<br />
<br />
== Using the shell ==<br />
<br />
=== GNOME cheat sheet ===<br />
<br />
The GNOME web site has a helpful [https://live.gnome.org/GnomeShell/CheatSheet GNOME Shell cheat sheet] explaining task switching, keyboard use, window control, the panel, overview mode, and more.<br />
<br />
=== Restarting the shell ===<br />
<br />
After appearance tweaks you are often asked to restart the GNOME shell. You could log out and log back in, but it is simpler and faster to issue the following keyboard command. Restart the shell by pressing {{Keypress|Alt}} + {{Keypress|F2}} then {{Keypress|r}} then {{Keypress|Enter}}<br />
<br />
=== Shell crashes ===<br />
<br />
Certain tweaks and/or repeated shell restarts may cause the shell to crash when a restart is attempted. In this case, you are informed about the crash and then forced to log out. Some shell changes, such as switching between '''''GNOME Shell''''' and '''''fallback mode,''''' cannot be accomplished via a keyboard restart; you must log out and log back in to effect them.<br />
<br />
It is common sense — but worth repeating — that valuable documents should be saved (and perhaps closed) before attempting a shell restart. It is not strictly necessary; open windows and documents usually remain intact after a shell restart.<br />
<br />
=== Shell freezes ===<br />
<br />
Sometimes shell extensions freeze the GNOME Shell. In this case a possible strategy is to switch to another terminal via {{Keypress|Ctrl+Alt+F2}} through {{Keypress|Ctrl+Alt+F6}}, log in, and restart X by:<br />
<br />
# pkill X<br />
<br />
The GNOME Shell then restarts automatically.<br />
<br />
If this doesn't work, you can try to restart your login manager. For instance, if you use GDM, try:<br />
<br />
# systemctl restart gdm.service<br />
<br />
{{Tip|You can also use '''htop''' in tty; press ''t'', select the ''gnome-shell'' tree, press ''k'' and send ''SIGKILL''.}}<br />
<br />
== Customizing GNOME appearance ==<br />
<br />
=== Overall appearance ===<br />
<br />
GNOME 3 may have "started from scratch", but like most large software projects it is assembled from parts dating to different eras. There is not '''one''' all-encompassing configuration tool. The new ''Systems Settings'' tool is a big improvement over previous control panels. ''System Settings'' is well-organized, but you may find yourself wishing for more control over system appearance.<br />
<br />
You may be familiar with existing configuration tools: some of these still work; many will not. Some settings are not readily exposed for you to change. Indubitably, many settings will migrate to newer tools and/or become exposed as time progresses and the wider community embraces and extends the latest GNOME desktop.<br />
<br />
==== Gsettings ====<br />
<br />
A new command-line tool '''gsettings''' stores data in a binary format, unlike previous tools using XML text. A tutorial [http://blog.fpmurphy.com/2011/03/customizing-the-gnome-3-shell.html Customizing the GNOME Shell] explores the power of gsettings.<br />
<br />
==== GNOME tweak tool ====<br />
<br />
This graphical tool customizes fonts, themes, titlebar buttons and other settings. <br />
<br />
# pacman -S gnome-tweak-tool<br />
<br />
==== GTK3 theme via settings.ini ====<br />
<br />
Like {{ic|~/.gtkrc-2.0}} with GTK2+, it is possible to set a GTK3 theme via {{ic|${XDG_CONFIG_HOME}/gtk-3.0/settings.ini}}.<br />
<br />
Variable {{ic|$XDG_CONFIG_HOME}} is usually set to {{ic|~/.config}}<br />
<br />
''Adwaita,'' the default GNOME 3 theme, is a part of {{pkg|gnome-themes-standard}}. Additional GTK3 themes can be found at [http://browse.deviantart.com/customization/skins/linuxutil/desktopenv/gnome/gtk3/ Deviantart web site.] For example:<br />
{{hc|${XDG_CONFIG_HOME}/gtk-3.0/settings.ini|<nowiki><br />
[Settings]<br />
gtk-theme-name = Adwaita<br />
gtk-fallback-icon-theme = gnome<br />
# next option is applicable only if selected theme supports it<br />
gtk-application-prefer-dark-theme = true<br />
# set font name and dimension<br />
gtk-font-name = Sans 10<br />
</nowiki>}}<br />
<br />
It is necessary to [[#Restarting_the_shell|restart the GNOME shell]] for settings to be applied. More GTK options are found at [http://developer.gnome.org/gtk3/3.0/GtkSettings.html#GtkSettings.properties GNOME developer documentation.]<br />
<br />
==== Icon theme ====<br />
<br />
Using {{pkg|gnome-tweak-tool}} version 3.0.3 and later, you can place any icon theme you wish to use inside {{ic|~/.icons}}.<br />
<br />
Usefully, GNOME 3 is compatible with GNOME 2 icon themes, which means you are not stuck with the default icons. To install a new set of icons, copy your desired icon theme's directory to {{ic|~/.icons}}. As an example:<br />
<br />
$ cp -R /home/user/Desktop/my_icon_theme ~/.icons<br />
<br />
The new theme ''my_icon_theme'' is now selectable using {{ic|gnome-tweak-tool}} under ''interface''.<br />
<br />
Alternatively, you may textually select your icon theme with no need for gnome-tweak-tool. Add the GTK icon theme name to {{ic|${XDG_CONFIG_HOME}/gtk-3.0/settings.ini}}. Please note, not to use "" as your settings would not be recognised then.<br />
<br />
{{hc|${XDG_CONFIG_HOME}/gtk-3.0/settings.ini|<nowiki>... previous lines ...<br />
<br />
gtk-icon-theme-name = my_new_icon_theme</nowiki>}}<br />
<br />
=== Nautilus ===<br />
<br />
''See [[Nautilus]].''<br />
<br />
=== Totem ===<br />
<br />
To play back h.264 videos, you need to install {{Pkg|gst-libav}}<br />
<br />
For more information on gstreamer hardware acceleration, see [[GStreamer#Hardware_Acceleration|Gstreamer: Hardware Acceleration]].<br />
<br />
=== GNOME panel ===<br />
<br />
==== Show date in top bar ====<br />
<br />
By default GNOME displays only the weekday and time in the top bar. This can be changed with the following command. Changes take effect immediately. <br />
<br />
GNOME 3.4.2:<br />
# gsettings set org.gnome.shell.clock show-date true<br />
<br />
GNOME 3.6.2:<br />
# gsettings set org.gnome.desktop.interface clock-show-date true<br />
<br />
==== Always show the "Log Out" entry in the user menu ====<br />
<br />
Since GNOME 3.6, the "Log Out" entry in the user menu is only shown when multiple non-root users are present in the system.<br />
<br />
To always enable this entry, run the following command from a terminal:<br />
<br />
# gsettings set org.gnome.shell always-show-log-out true<br />
<br />
You can also change this in dconf-editor: Navigate to org.gnome.shell, then check the "always-show-log-out" checkbox.<br />
<br />
Then, restart the GNOME shell:<br />
#{{Keypress|Alt+F2}}<br />
#{{Keypress|r}}<br />
#{{Keypress|Enter}}<br />
<br />
==== Hiding icons in the top bar ====<br />
<br />
When doing a GNOME install, some unwanted icons might appear in the panel. These icons can be removed either with GNOME shell extensions or by manually editing the GNOME panel script.<br />
<br />
===== Hiding icons with shell extensions =====<br />
<br />
To remove the accessibility icon, one can use the https://extensions.gnome.org/extension/112/remove-accesibility/. <br />
<br />
The best way to use extensions is installing them from the gnome extensions web page like the one above.<br />
<br />
===== Manually editing the GNOME panel script =====<br />
<br />
For example, to remove the '''universal access icon''', comment out the 'a11y' line in PANEL_ITEM_IMPLEMENTATIONS:<br />
<br />
{{hc|/usr/share/gnome-shell/js/ui/panel.js|<nowiki><br />
const PANEL_ITEM_IMPLEMENTATIONS = {<br />
'activities': ActivitiesButton,<br />
'appMenu': AppMenuButton,<br />
'dateMenu': imports.ui.dateMenu.DateMenuButton,<br />
// 'a11y': imports.ui.status.accessibility.ATIndicator,<br />
'volume': imports.ui.status.volume.Indicator,<br />
'battery': imports.ui.status.power.Indicator,<br />
'lockScreen': imports.ui.status.lockScreenMenu.Indicator,<br />
'keyboard': imports.ui.status.keyboard.InputSourceIndicator,<br />
'powerMenu': imports.gdm.powerMenu.PowerMenuButton,<br />
'userMenu': imports.ui.userMenu.UserMenuButton<br />
};<br />
</nowiki>}}<br />
<br />
Then, save your results and restart the shell:<br />
<br />
#{{Keypress|Alt+F2}}<br />
#{{Keypress|r}}<br />
#{{Keypress|Enter}}<br />
<br />
==== Show battery icon ====<br />
<br />
To show the battery tray icon, [[pacman|install]] {{Pkg|gnome-power-manager}} from the [[Official Repositories|official repositories]].<br />
<br />
==== Disable "Suspend" in the status and gdm menu ====<br />
<br />
A quick way to do it system-wide for GNOME 3.2 is to change line 539 of {{ic|/usr/share/gnome-shell/js/ui/userMenu.js}} and line 103 of {{ic|/usr/share/gnome-shell/js/gdm/powerMenu.js}}. (For GNOME versions prior to 3.2, look at line 153 of {{ic|/usr/share/gnome-shell/js/ui/statusMenu.js}}.) This change takes effect the next time GNOME Shell is started.<br />
<br />
{{hc|/usr/share/gnome-shell/js/ui/userMenu.js|<nowiki><br />
// this._haveSuspend = this._upClient.get_can_suspend(); // Comment this line out.<br />
this._haveSuspend = false; // Use this line instead.<br />
</nowiki>}}<br />
<br />
To accomplish this, paste the following command(s) in your terminal:<br />
GNOME_SHELL=/usr/share/gnome-shell<br />
SCRIPTS=`grep -lr get_can_suspend $GNOME_SHELL/js`<br />
for FILE in $SCRIPTS ; do<br />
sed -r -i -e 's/[^= ]+.get_can_suspend\(\)/false/' "$FILE"<br />
done<br />
<br />
The above change does not persist after a GNOME version update, however. A more perennial solution is to add the code above in some gdm or system startup script (eg: /etc/rc.local), to keep the "suspend" option disabled after updates.<br />
<br />
Alternatively you can install the [[#GNOME shell extensions|GNOME shell extension]] {{ic|alternative status menu}} in package {{Pkg|gnome-shell-extension-alternative-status-menu}}.<br />
<br />
==== Eliminate delay when logging out ====<br />
<br />
The following tweak removes the confirmation dialog and sixty second delay for logging out.<br />
<br />
This dialog normally appears when you log out with the status menu. This tweak affects the '''''Power Off''''' dialog as well. This is not a system-wide change; it affects only the user who enters this command. The change takes effect immediately after entering the command.<br />
<br />
$ gsettings set org.gnome.SessionManager logout-prompt 'false'<br />
<br />
==== Show system monitor ====<br />
<br />
Install the {{AUR|gnome-shell-system-monitor-applet-git}} extension available in the [[AUR]].<br />
<br />
==== Show weather information ====<br />
<br />
Install {{AUR|gnome-shell-extension-weather-git}} from [[AUR]].<br />
<br />
=== Activity view ===<br />
<br />
==== Remove entries from Applications view ====<br />
<br />
Like other desktop environments, GNOME uses .desktop files to populate its Applications view. These text files are in '''{{ic|/usr/share/applications}}'''. It is not possible to edit these files from a folder view ‒ Nautilus does not treat their icons as text files. Use a terminal to display or edit .desktop file entries.<br />
<br />
# ls /usr/share/applications<br />
# nano /usr/share/applications/foo.desktop<br />
<br />
For system wide changes, edit files in '''{{ic|/usr/share/applications}}'''. For local changes, make a copy of ''foo.desktop'' in your home folder.<br />
<br />
$ cp /usr/share/applications/foo.desktop ~/.local/share/applications/<br />
<br />
Edit .desktop files to fit your wishes. <br />
<br />
{{Note|Removing a .desktop file does not uninstall an application, but instead removes its desktop integration: MIME types, shortcuts, and so forth.}}<br />
<br />
The following command appends one line to a .desktop file and hides its associated icon from Applications view:<br />
<br />
$ echo "NoDisplay=true" >> foo.desktop<br />
<br />
==== To Remove Wine Launchers from the Applications menu ====<br />
<br />
Enter {{ic|~/.local/share/applications/wine/Programs/}} and look for the wine application's name. In the directories are the ".desktop" files which configure the launchers. Remove the program directory to easily remove the launchers.<br />
<br />
==== Change application icon size ====<br />
<br />
One awkward selection of the GNOME designers is their choice of large icons for Applications view. This view is painful when working with a small screen containing many large application icons. There is a way to reduce the icon size. It is done by editing the GNOME-Shell theme.<br />
<br />
Edit system files directly (make a backup first) or copy theme files to your local folder and edit these files. <br />
* For the '''default''' theme, edit '''{{ic|/usr/share/gnome-shell/theme/gnome-shell.css}}'''<br />
<br />
* For '''user themes''', edit '''{{ic|/usr/share/themes/<UserTheme>/gnome-shell/gnome-shell.css}}'''<br />
<br />
Edit ''gnome-shell.css'' and replace the following values. Afterward, [[#Restarting_the_shell|restart the GNOME shell.]]<br />
{{hc|gnome-shell.css|<nowiki><br />
...<br />
/* Application Launchers and Grid */<br />
<br />
.icon-grid {<br />
spacing: 18px;<br />
-shell-grid-horizontal-item-size: 82px;<br />
-shell-grid-vertical-item-size: 82px;<br />
}<br />
<br />
.icon-grid .overview-icon {<br />
icon-size: 48px;<br />
}<br />
...<br />
</nowiki>}}<br />
<br />
==== Change dash icon size ====<br />
GNOME's Activities view has a dash on the left hand side, the size of the icons in this dash will scale depending on the amount of icons set to display. The scaling can be manipulated or set to a constant icon size. To do so, edit {{ic|/usr/share/gnome-shell/js/ui/dash.js}}.<br />
<br />
{{hc|dash.js|<nowiki><br />
...<br />
<br />
let iconSizes = [ 16, 22, 24, 32, 48, 64 ];<br />
<br />
...<br />
</nowiki>}}<br />
<br />
==== Change switcher (alt-tab) icon size ====<br />
GNOME comes with a built in task switcher, the size of the icons in this task switcher will scale depending on the amount of icons set to display. The scaling can be manipulated or set to a constant icon size. To do so, edit {{ic|/usr/share/gnome-shell/js/ui/altTab.js}}<br />
<br />
{{hc|altTab.js|<nowiki><br />
...<br />
<br />
const iconSizes = [96, 64, 48, 32, 22];<br />
<br />
...<br />
</nowiki>}}<br />
<br />
==== Change system tray icon size ====<br />
GNOME comes with a built in system tray, visible when the mouse is hovered over the bottom right corner of the screen. The size of the icons in this tray is set to a fixed value of 24. To change this value, edit {{ic|/usr/share/gnome-shell/js/ui/messageTray.js}}<br />
{{hc|messageTray.js|<nowiki><br />
...<br />
<br />
ICON_SIZE: 24,<br />
<br />
...<br />
</nowiki>}}<br />
<br />
==== Disable Activity hot corner hovering ====<br />
<br />
To disable automatic activity view when the hot corner is hovered, edit {{ic|/usr/share/gnome-shell/js/ui/layout.js}} (that was ''panel.js'' in GNOME 3.0.x) :<br />
{{hc|layout.js|<nowiki><br />
this._corner = new Clutter.Rectangle({ name: 'hot-corner',<br />
width: 1,<br />
height: 1,<br />
opacity: 0,<br />
reactive: true });icon-size: 48px;<br />
}<br />
</nowiki>}}<br />
and set {{ic|reactive}} to {{ic|false}}. GNOME Shell needs to be restarted.<br />
<br />
==== Disable Message Tray hovering ====<br />
<br />
The message tray is shown when the mouse hovers at the bottom of the screen for one second. To disable this behavior, comment out the following line in {{ic|/usr/share/gnome-shell/js/ui/messageTray.js}}:<br />
{{hc|messageTray.js|<nowiki><br />
//pointerWatcher.addWatch(TRAY_DWELL_CHECK_INTERVAL, Lang.bind(this, this._checkTrayDwell));<br />
</nowiki>}}<br />
GNOME Shell needs to be restarted. The message tray is still visible in activity view.<br />
<br />
=== Titlebar ===<br />
==== Remove title bar ====<br />
Install [https://extensions.gnome.org/extension/354/maximus/ Maximus] GNOME shell extension.<br />
<br />
It can also have white list / black list of application.<br />
<br />
This extension requires xorg-xprop, install it if you don't have it already.<br />
<br />
{{bc|pacman -S xorg-xprop}}<br />
<br />
More about [[#GNOME shell extensions | GNOME shell extensions]].<br />
<br />
==== Reduce title bar height ====<br />
* ''' global''' - edit {{ic|/usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml}}, search for {{ic|title_vertical_pad}} and and reduce its value to a minimum of {{ic|0}}.<br />
* '''user-only''' - copy {{ic|/usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml}} to {{ic|/home/$USER/.themes/Adwaita/metacity-1/metacity-theme-3.xml}}, search for {{ic|title_vertical_pad}} and reduce its value to a minimum of {{ic|0}}.<br />
<br />
Then [[#Restarting_the_shell|Restart the GNOME shell.]] <br />
<br />
To restore the original values, [[pacman|install]] the package {{Pkg|gnome-themes-standard}} from the [[Official Repositories|official repositories]] or remove {{ic|/home/$USER/.themes/Adwaita/metacity-1/metacity-theme-3.xml}}<br />
<br />
==== Reorder titlebar buttons ====<br />
<br />
At present this setting can be changed through '''dconf-editor.'''<br />
<br />
For example, we move the close and minimize buttons to the left side of the titlebar. Open '''dconf-editor''' and locate the '''''org.gnome.shell.overrides.button_layout''''' key. Change its value to '''{{ic|close,minimize:}}''' (Colon symbol designates the spacer between left side and right side of the titlebar.) Use whichever buttons in whatever order you prefer. You cannot use a button more than once. Also, keep in mind that certain buttons are deprecated. [[#Restarting_the_shell|Restart the shell]] to see your new button arrangement.<br />
<br />
==== Hide titlebar when maximized ====<br />
<br />
# sed -i -r 's|(<frame_geometry name="max")|\1 has_title="false"|' /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml<br />
<br />
[[#Restarting_the_shell|Restart the GNOME shell.]] After this tweak, you may find it difficult to un-maximize a window when there is no titlebar to grab.<br />
<br />
With suitable keybindings, you should be able to use {{Keypress|Alt+F5}}, {{Keypress|Alt+F10}} or {{Keypress|Alt+Space}} to remedy the situation.<br />
<br />
To prevent {{ic|metacity-theme-3.xml}} from being overwritten each time package {{pkg|gnome-themes-standard}} is upgraded, add its name to {{ic|/etc/pacman.conf}} with {{ic|NoUpgrade}}.<br />
<br />
{{hc|/etc/pacman.conf|<nowiki>... previous lines ...<br />
<br />
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup<br />
# IgnorePkg =<br />
# IgnoreGroup =<br />
<br />
NoUpgrade = usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml # Do not add a leading slash to the path<br />
<br />
... more lines ...</nowiki>}}<br />
<br />
To restore original Adwaita theme values, install the {{pkg|gnome-themes-standard}} package.<br />
<br />
=== Login screen ===<br />
{{Merge|GDM|Login managers have their own wiki pages and information should be maintained separately.}}<br />
To modify characteristics of the login screen (GDM, the GNOME display manager) the following lines can be executed. The first command allows all users, including "gdm", to access X settings (albeit temporarily). This command creates a temporary vulnerability, so be advised. The second command opens a bash session with the credentials of user "gdm". {{Note|For exposition, user gdm's terminal prompt is shown as '''$'''. In actuality, it shows something like -bash-4.2$.}}<br />
<br />
# xhost +<br />
# su - gdm -s /bin/bash<br />
$ dbus-launch<br />
<br />
The third command prints DBUS_SESSION_BUS_ADDRESS and DBUS_SESSION_BUS_PID. We must export these variables. Either manually export the below two variables shown in the output of dbus-launch like this:<br />
<br />
$ export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Jb433gMQHS,guid=fc14d4bf3d000e38276a5a2200000d38<br />
$ export DBUS_SESSION_BUS_PID=4283<br />
<br />
Or use the follow command:<br />
<br />
$ `dbus-launch | sed "s/^/export /"`<br />
<br />
Check to see if dconf-service is running and if not, start it like this<br />
<br />
$ /usr/lib/dconf/dconf-service &<br />
<br />
==== Login background image ====<br />
<br />
Once session variables have been exported as explained above, you may issue commands to retrieve or set items used by GDM. <br />
<br />
The easiest way to changes all the settings is by launching the Configuration Editor gui with the command<br />
<br />
$ dconf-editor<br />
<br />
The location of each setting is the same as in the command line style of configuration shown below:<br />
<br />
The following is the command-line approach to retrieve or set the file name used for GDM's wallpaper.<br />
{{bc|<nowiki><br />
$ GSETTINGS_BACKEND=dconf gsettings get org.gnome.desktop.background picture-uri<br />
$ GSETTINGS_BACKEND=dconf gsettings set org.gnome.desktop.background picture-uri 'file:///usr/share/backgrounds/gnome/SundownDunes.jpg'<br />
<br />
$ GSETTINGS_BACKEND=dconf gsettings set org.gnome.desktop.background picture-options 'zoom'<br />
## Possible values: centered, none, scaled, spanned, stretched, wallpaper, zoom</nowiki>}}<br />
{{Note|You must specify a file which user "gdm" has permission to read. GDM cannot read files in your home directory.}}<br />
<br />
An alternative graphical interface to changing themes (gtk3, icons and cursor), the wallpaper and minor other settings of the GDM login screen, you can install {{aur|gdm3setup}} from AUR.<br />
<br />
==== Larger font for login ====<br />
<br />
This tweak enlarges the login font with a scaling factor. It is the same method employed by ''Accessibility Manager'' on the desktop.<br />
<br />
You must [[#Login_screen|export the GDM session variables]] before performing this tweak.<br />
<br />
$ GSETTINGS_BACKEND=dconf gsettings set org.gnome.desktop.interface text-scaling-factor '1.25'<br />
<br />
==== Turning off the sound ====<br />
<br />
This tweak disables the audible feedback heard when the system volume is adjusted (via keyboard) on the login screen. You must first export the GDM session variables.<br />
<br />
$ GSETTINGS_BACKEND=dconf gsettings set org.gnome.desktop.sound event-sounds 'false'<br />
<br />
If the above tweak does not work for you or you are unable to export the GDM session variables, there is always the easiest solution to the "ready sound" problem: mute or lower the sound while in GDM login screen using the media keys (if available) of your keyboard.<br />
<br />
==== Make the power button interactive ====<br />
<br />
The default installation sets the power button to suspend the system. '''''Power off''''' or '''''Show dialog''''' is a better choice. You must first export the GDM session variables as [[#Login_screen|outlined previously.]]<br />
<br />
$ GSETTINGS_BACKEND=dconf gsettings set org.gnome.settings-daemon.plugins.power button-power 'interactive'<br />
$ GSETTINGS_BACKEND=dconf gsettings set org.gnome.settings-daemon.plugins.power button-hibernate 'interactive'<br />
$ gsettings list-recursively org.gnome.settings-daemon.plugins.power<br />
<br />
{{Warning|Please note that the [[Acpid|acpid]] daemon also handle the "power button" an "hibernate button" event. Running both systems at the same time may lead to unexpected behaviour.}}<br />
<br />
==== Prevent suspend when closing the lid ====<br />
<br />
On some systems it happens that your laptop suspends when you are closing the lid despite having set the options ''Laptop lid close action on battery'' and ''Laptop lid close action on AC'' to ''blank''. If this is the case, append the following line to {{ic|/etc/systemd/logind.conf}}:<br />
<br />
HandleLidSwitch=ignore<br />
<br />
==== GDM keyboard layout ====<br />
<br />
GDM does not know about your GNOME 3 desktop keyboard settings. To change keyboard settings used by GDM, set your layout using Xorg configuration. Refer to this section of the [[Beginners'_Guide#Non-US_keyboard|Beginner's Guide.]]<br />
<br />
=== Other tips ===<br />
See [[GNOME Tips]].<br />
<br />
== Miscellaneous settings ==<br />
<br />
=== Automatic program launch upon logging in ===<br />
<br />
Specify which programs start automatically after logging in using {{ic|gnome-session-properties}}. This tool is part of the {{Pkg|gnome-session}} package.<br />
<br />
$ gnome-session-properties<br />
<br />
=== Editing applications menu ===<br />
<br />
{{pkg|gnome-menus}} provides ''gmenu-simple-editor'' which can show/hide menu entries.<br />
<br />
{{pkg|alacarte}} provides a more complete menu editor for adding/editing menu entries.<br />
<br />
=== Some 'System Settings' not preserved ===<br />
<br />
GNOME 3 is using [[systemd]] (an init daemon for Linux) with more modern capabilities. Previously GNOME programs were altered to use Arch's init functionalities to gather settings but either the maintenance required to do this or possibly this is because of a transitioning to the new init system (read more about this [https://bbs.archlinux.org/viewtopic.php?pid=1115208#p1115208 here]). Areas that settings will not be preserved are '''Date and Time''' and adding ICC profiles in the '''Color''' menu and possibly others.<br />
<br />
To gain the functionality back, [[systemd]] needs to be installed and the ''gdm.service'' and ''NetworkManager.service'' services need to be enabled.<br />
<br />
=== Disable sound effects in Terminal ===<br />
By default the terminal has these annoying sound effects when e.g. pushing the tab button on your keyboard. One solution is to turn off or mute all sound effects in the settings menu of Gnome. However, this will also turn off notification sounds in other application such as Skype. A better solution is to open a terminal, go to Edit -> Profile Preferences -> General and untick '''Terminal bell'''.<br />
<br />
=== Move dialog windows ===<br />
The default configuration for dialogs will not allow you to move them which causes problems in some cases. To change this you will need to use gconf-editor and change this setting:<br />
<br />
/desktop/gnome/shell/windows/attach_modal_dialogs<br />
<br />
After the change you will need to restart the shell for it to take affect.<br />
<br />
=== GNOME shell extensions ===<br />
<br />
GNOME Shell can be customized with extensions. These provide features such as a dock or a widget for changing the theme.<br />
<br />
Many extensions are collected and hosted by [https://extensions.gnome.org/ extensions.gnome.org]. They can be browsed and installed simply activating them in the browser. More information about gnome shell extensions can be found [https://extensions.gnome.org/about/ here].<br />
<br />
See [[#When_an_extension_breaks_GNOME|when an extension breaks GNOME]] for troubleshooting information.<br />
<br />
=== Default file browser/replace Nautilus ===<br />
<br />
You can trick GNOME into using another file browser by editing the {{ic|Exec}} line in {{ic|/usr/share/applications/nautilus.desktop}}. See the correct parameters in the {{ic|.desktop}} file of the file manager of your choice, e.g.:<br />
{{hc|/usr/share/applications/nautilus.desktop|<br />
2=[...]<br />
Exec=thunar %F<br />
OR<br />
Exec=pcmanfm %U<br />
OR<br />
Exec=nemo %U<br />
[...]<br />
}}<br />
<br />
=== Default PDF viewer ===<br />
In some cases when you have installed Inkscape or other graphic programs Evince Document Viewer might no longer be selected as the default PDF application. If it is not available in the '''Open With''' entry which would be the GUI solution, you can use the following user command to make it the default application again.<br />
<br />
xdg-mime default evince.desktop application/pdf<br />
<br />
=== Default terminal ===<br />
<br />
{{ic|gsettings}} (which replaces {{ic|gconftool-2}}) is used to set the default terminal. The setting affects ''nautilus-open-terminal'' (a Nautilus extension).<br />
To make [[rxvt-unicode|urxvt]] the default, run:<br />
<br />
gsettings set org.gnome.desktop.default-applications.terminal exec urxvtc<br />
gsettings set org.gnome.desktop.default-applications.terminal exec-arg "'-e'"<br />
<br />
{{Note|The {{ic|-e}} flag is for executing a command. When ''nautilus-open-terminal'' invokes {{ic|urxvtc}}, it puts a {{ic|cd}} command at the end of the command line so that the new terminal starts in the directory you opened it from. Other terminals will require a different (perhaps empty) {{ic|exec-arg}}.}}<br />
<br />
=== Middle mouse button ===<br />
<br />
By default, GNOME 3 disables middle mouse button emulation regardless of [[Xorg]] settings ('''Emulate3Buttons'''). To enable middle mouse button emulation use:<br />
<br />
$ gsettings set org.gnome.settings-daemon.peripherals.mouse middle-button-enabled true<br />
<br />
=== Display dimming ===<br />
<br />
By default GNOME 3 has a ten second idle timeout to dim the screen regardless of the battery and AC state:<br />
<br />
gsettings get org.gnome.settings-daemon.plugins.power idle-dim-time<br />
<br />
To set a new value type the following<br />
<br />
gsettings set org.gnome.settings-daemon.plugins.power idle-dim-time <int><br />
<br />
where <int> is the value in seconds<br />
<br />
=== Alternate window manager ===<br />
<br />
You can use an alternate window manager with GNOME by [[#Enabling_fallback_mode|forcing fallback mode]] and creating two files:<br />
<br />
{{Note|Xmonad is used as an example, but this works for other window managers.}}<br />
<br />
{{hc|/usr/share/gnome-session/sessions/xmonad.session|<nowiki>[GNOME Session]<br />
Name=Xmonad session<br />
RequiredComponents=gnome-panel;gnome-settings-daemon;<br />
RequiredProviders=windowmanager;notifications;<br />
DefaultProvider-windowmanager=xmonad<br />
DefaultProvider-notifications=notification-daemon</nowiki>}}<br />
<br />
{{hc|/usr/share/xsessions/xmonad-gnome-session.desktop|<nowiki>[Desktop Entry]<br />
Name=Xmonad GNOME<br />
Comment=Tiling window manager<br />
TryExec=/usr/bin/gnome-session<br />
Exec=gnome-session --session=xmonad<br />
Type=XSession</nowiki>}}<br />
<br />
The next time you log in, you should have the ability to choose ''Xmonad GNOME'' as your session.<br />
<br />
If there isn't a .desktop file for the window manager, you'll need to create one. Example for [[wmii]]:<br />
<br />
{{hc|/usr/share/applications/wmii.desktop|<nowiki><br />
[Desktop Entry]<br />
Version=1.0<br />
Type=Application<br />
Name=wmii<br />
TryExec=wmii<br />
Exec=wmii</nowiki>}}<br />
<br />
For more information, see [http://makandra.com/notes/1367-running-the-awesome-window-manager-within-gnome this article on running awesome as the window manager in GNOME].<br />
<br />
== Hidden features ==<br />
<br />
GNOME 3 hides many useful options which you can customize with '''dconf-editor.''' GNOME 3 also supports '''gconf-editor''' for settings that have not yet migrated to dconf.<br />
<br />
=== Changing hotkeys ===<br />
It is possible to manually change the keys via an application's so-called accel map file. Where it is to be found is up to the application: For instance, Thunar's is at ~/.config/Thunar/accels.scm, whereas Nautilus's is located at ~/.config/nautilus/accels and ~/.gnome2/accels/nautilus on old release.<br />
<br />
The file should contain a list of possible hotkeys, each unchanged line commented out with a leading ";" that has to be removed for a change to become active.<br />
For example to replace the hotkey used by Nautilus to move files to the trash folder, change the line :<br />
; (gtk_accel_path "<Actions>/DirViewActions/Trash" "<Primary>Delete")<br />
to this :<br />
(gtk_accel_path "<Actions>/DirViewActions/Trash" "Delete")<br />
<br />
The file is regenerate regularly so don't waist time on commenting the file. The uncommented line will stay but every comment you may add will be lost.<br />
<br />
==== Nautilus 3.4 and older ====<br />
Firstly, use '''dconf-editor''' to place a checkmark next to {{ic|can-change-accels}} in the key named ''org.gnome.desktop.interface.''<br />
<br />
We will replace the hotkey — a.k.a. keyboard shortcut, keyboard accelerator — used by Nautilus to move files to the trash folder.<br />
The default assignment is a somewhat-awkward {{Keypress|Ctrl+Delete}}.<br />
* Open Nautilus, select any file, and click '''Edit''' on the menu bar.<br />
* Hover over the ''Move to Trash'' menu item.<br />
* While hovering, press {{Keypress|Delete}}. The current accelerator is now unset.<br />
* Press the key that you wish to become the new keyboard accelerator.<br />
* Press {{Keypress|Delete}} to make the new accelerator be the Delete key.<br />
Unless you select a file or folder, ''Move to Trash'' will be grayed-out. Finally, disable {{ic|can-change-accels}} to prevent accidental hotkey changes.<br />
<br />
=== Shutdown via the status menu ===<br />
<br />
Currently, the GNOME designers have hidden the ''Shutdown'' option inside the status menu. To shut down your system with the status menu, click the menu and hold down the {{Keypress|Alt}} key so that the '''''Suspend''''' item changes to '''''Power Off'''''. The subsequent dialog allows you to shut down or restart your system.<br />
<br />
If you disable the Suspend menu item system-wide as described [[#Disable_"Suspend"_in_the_status_menu|elsewhere in this document]] you do not have to go through these motions.<br />
<br />
Another option is to install the ''Alternative Status Menu'' extension. See the section on shell extensions. The alternative menu extension installs a new status menu with a non-hidden '''''Power Off''''' entry.<br />
<br />
=== Modify Keyboard with XkbOptions ===<br />
<br />
Using the '''dconf-editor''', navigate to the key named ''org.gnome.desktop.input-sources.xkb-options'' and add desired XkbOptions (e.g. 'caps:swapescape') to the list.<br />
<br />
See /usr/share/X11/xkb/rules/xorg for all XkbOptions and then /usr/share/X11/xkb/symbols/* for the respective descriptions.<br />
<br />
=== Toggle keyboard layouts ===<br />
Since Gnome does not consider any configuration in {{ic|/etc/X11/conf.d/*.conf}} you have to set the command for layout switching either via the control center with the options ''Switch to previous source'' and ''Switch to next source'' or if you want to use Alt - Shift combination you have to use the Gnome-Tweak-Tool and set ''Typing -> Modifiers-only input sources -> select Alt-shift''. For more information see also the forum [https://bbs.archlinux.org/viewtopic.php?id=152127 thread].<br />
<br />
== Integrated messaging (Empathy) ==<br />
<br />
Empathy, the engine behind integrated messaging, and all system settings based on messaging accounts will not show up unless the {{grp|telepathy}} group of packages or at least one of the backends ({{pkg|telepathy-gabble}}, or {{pkg|telepathy-haze}}, for example) is installed.<br />
<br />
These packages are not included in default Arch GNOME installs. You can install the Telepathy and optionally any backends with:<br />
<br />
# pacman -S telepathy<br />
<br />
Without telepathy, Empathy will not open the account management dialog and can get stuck in this state. If this happens -- even after quitting Empathy cleanly -- the {{ic|/usr/bin/empathy-accounts}} application can remain running and will need to be killed before you can add any new accounts.<br />
<br />
View descriptions of telepathy components on the [http://telepathy.freedesktop.org/wiki/Components Freedesktop.org Telepathy Wiki.]<br />
<br />
== Forcing fallback mode ==<br />
<br />
Your session automatically starts in fallback mode when '''gnome-shell''' is not present, or when your hardware cannot handle graphics acceleration — such as running within a virtual machine or running on old hardware.<br />
<br />
If you wish to enable fallback mode while still having '''gnome-shell''' installed, make the following system change:<br />
<br />
Go to '''System Settings''' ({{ic|gnome-control-center}}) -> '''Details''' -> '''Graphics''' and set '''Forced Fallback Mode''' to {{ic|ON}}.<br />
<br />
You can alternatively choose the type of session from a terminal with {{ic|gsettings}}:<br />
<br />
$ gsettings set org.gnome.desktop.session session-name gnome-fallback<br />
<br />
You may want to log out after making the change. You will see the chosen type of session upon your next login.<br />
<br />
To disable the forced-fallback mode change it back to {{ic|gnome}}.<br />
<br />
== Troubleshooting ==<br />
<br />
=== When an extension breaks GNOME ===<br />
<br />
When enabling shell extensions causes GNOME breakage, you should first remove the ''user-theme'' and ''auto-move-windows'' extensions from their installation directory.<br />
<br />
The installation directory could be one of '''{{ic|~/.local/share/gnome‑shell/extensions,}}''' '''{{ic|/usr/share/gnome‑shell/extensions,}}''' or '''{{ic|/usr/local/share/gnome‑shell/extensions}}'''. Removing these two extension-containing folders may fix the breakage. Otherwise, isolate the problem extension with trial‑and‑error.<br />
<br />
Removing or adding an extension-containing folder to the aforementioned directories removes or adds the corresponding extension to your system. Details on GNOME Shell extensions are available at the [https://live.gnome.org/GnomeShell/Extensions GNOME web site.]<br />
<br />
=== Extensions do not work after GNOME 3 update ===<br />
<br />
Locate the folder where your extensions are installed. It might be '''{{ic|~/.local/share/gnome-shell/extensions}}''' or '''{{ic|/usr/share/gnome-shell/extensions}}'''.<br />
<br />
Edit each occurrence of '''{{ic|metadata.json}}''' which appears in each extension sub-folder. <br />
<br />
{| border="0"<br />
| Insert: || '''{{ic|"shell-version": ["3.6"]}}'''<br />
|-<br />
| Instead of (for example): || '''{{ic|"shell-version": ["3.4"]}}'''<br />
|}<br />
<br />
<br />
'''"3.x"''' indicates the extension works with every Shell version. If it breaks, you'll know to change it back.<br />
<br />
=== The "Windows" key ===<br />
By default, this key is mapped to the "overlay-key" to launch the Overview. You can remove this key mapping to free up your {{ic|Windows Key}} (also called {{ic|Mod4}}), which GNOME calls {{ic|Super_L}}, by utilizing {{ic|gsettings}}.<br />
<br />
Example:<br />
{{ic| gsettings set org.gnome.mutter overlay-key 'Foo';}}.<br />
You can leave out '''Foo''' to simply remove any binding to that function.<br />
<br />
{{Note| GNOME also uses {{ic|Alt+F1}} to launch the Overview.}}<br />
<br />
=== Keyboard Shortcut do not work with only conky running ===<br />
The gnome-shell keyboard shortcuts like {{keypress|Alt+F2}}, {{keypress|Alt+F1}}, and the media key shortcuts do not work if conky is the only program running. However if another application like gedit is running, then the keyboard shortcuts work.<br />
<br />
solution: edit .conkyrc <br />
<br />
own_window yes<br />
own_window_transparent yes<br />
own_window_argb_visual yes<br />
own_window_type dock<br />
own_window_class Conky<br />
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager<br />
<br />
=== xf86-video-ati driver: flickers from time to time ===<br />
<br />
If you use that driver, your desktop might flicker a lot when you hover the bottom right corner, and also when you start up gdm.<br />
Write the following in your '''{{ic|/etc/X11/xorg.conf.d/20-radeon.conf}}''' and see if it works then:<br />
<br />
Section "Device"<br />
Identifier "Radeon"<br />
Driver "radeon"<br />
Option "EnablePageFlip" "off"<br />
EndSection<br />
<br />
=== Window opens behind other windows when using multiple monitors ===<br />
<br />
This is possibly a bug in GNOME Shell which causes new windows to open behind others.<br />
Unchecking "workspaces_only_on_primary" in desktop/gnome/shell/windows using gconf-editor solves this problem.<br />
<br />
=== Multiple monitors and dock extension ===<br />
<br />
If you have multiple monitors configured using Nvidia Twinview, the dock extension may get sandwiched in-between the monitors. You can edit the source of this extension to reposition the dock to a position of your choosing.<br />
<br />
Edit {{ic|/usr/share/gnome-shell/extensions/dock@gnome-shell-extensions.gnome.org/extension.js}} and locate this line in the source:<br />
<br />
this.actor.set_position(primary.width-this._item_size-this._spacing-2, (primary.height-height)/2);<br />
<br />
The first parameter is the X position of the dock display, by subtracting 15 pixels as opposed to 2 pixels from this it correctly positioned on my primary monitor, you can play around with any X,Y coordinate pair to position it correctly.<br />
<br />
this.actor.set_position(primary.width-this._item_size-this._spacing-15, (primary.height-height)/2);<br />
<br />
=== No event sounds for Empathy and other programs ===<br />
<br />
If you are using [[OSS]], you may want to install {{AUR|libcanberra-oss}} from the [[AUR]].<br />
<br />
=== Gnome sets the keyboard layout to USA after every log in === <br />
<br />
See the [[https://bugzilla.redhat.com/show_bug.cgi?id=530452 this]] bug report for more information. It is related to GDM and can be fixed by choosing the correct layout at GDM login startup. However, users who do not use GDM or any login manager but a pure startx approach have to use a workaround. Create the file {{ic|~/.keyboard}} and make it executable {{ic|chmod +x}}:<br />
<br />
# Set the correct keyboard layout after Gnome start<br />
setxkbmap -layout "us,pl" -variant altgr-intl -option "grp:alt_shift_toggle" nodeadkeys<br />
<br />
Now run {{ic|gnome-session-properties}} and add this .keyboard file to the programs run at startup:<br />
<br />
Name: Keyboard layout <br />
Command: /home/username/.keyboard<br />
Comment: Sets the correct keyboard layout after Gnome start<br />
<br />
Further you need to create the executable file {{ic|/etc/pm/sleep.d/90_keyboard}} with the following content in order to run the script on resume from suspend and hibernation.<br />
<br />
#!/bin/bash<br />
case $1 in<br />
resume|thaw)<br />
/home/username/.keyboard<br />
;;<br />
esac<br />
<br />
=== Panels do not respond to right-click in fallback mode ===<br />
<br />
Check Configuration Editor: /apps/metacity/general/mouse_button_modifier. This modifier key ({{Keypress|Alt}}, {{Keypress|Super}}, etc) used for normal windows is also used by panels and their applets.<br />
<br />
=== "Show Desktop" keyboard shortcut does not work ===<br />
<br />
GNOME developers treated the corresponding binding as bug (see https://bugzilla.gnome.org/show_bug.cgi?id=643609) due to Minimization being deprecated. To show the desktop again assign ALT+STRG+D to the following setting:<br />
<br />
System Settings --> Keyboard --> Shortcuts --> Navigation --> Hide all normal windows<br />
<br />
=== Nautilus does not start ===<br />
<br />
# Press {{keypress|Alt+F2}}<br />
# Enter {{ic|gnome-tweak-tool}}<br />
# Select the ''File Manager'' tab.<br />
# Locate option ''Have file manager handle the desktop'' and assure it is toggled '''off'''.<br />
<br />
=== Epiphany does not play Flash videos ===<br />
<br />
Adobe Flash Player is buggy and does not work directly in Epiphany. See [[Epiphany#Flash]] for a workaround involving nspluginwrapper.<br />
<br />
=== Unable to apply stored configuration for monitors ===<br />
<br />
If you encounter this message try to disable the xrandr gnome-settings-daemon plugin :<br />
<br />
$ dconf write /org/gnome/settings-daemon/plugins/xrandr/active false<br />
<br />
=== Lock button fails to re-enable touchpad ===<br />
<br />
Some laptops have a touchpad lock button that disables the touchpad so that users can type without worrying about touching the touchpad. It appears currently that although GNOME can lock the touchpad by pressing this button, it cannot unlock it. If the touchpad gets locked you can do the following to unlock it.<br />
# Start a terminal. You can do this by pressing {{keypress|Alt+F2}}, then typing {{ic|gnome-terminal}} followed by pressing {{keypress|Enter}}.<br />
# Type in the following command<br />
$ xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 1<br />
<br />
=== Unable to connect to secured Wi-Fi networks ===<br />
<br />
You can see the network connections listing, but choosing an encrypted network fails to show a dialog for key entry. You may need to [[pacman|install]] {{Pkg|network-manager-applet}}. See [[NetworkManager#GNOME|GNOME NetworkManager setup]].<br />
<br />
=== "Any command has been defined 33" ===<br />
<br />
When you press the {{Keypress|Print Screen}} key (sometimes labeled {{Keypress|PrntScr}} or {{Keypress|PrtSc}}) to take a screenshot, and you got "Any command has been defined 33", [[pacman|install]] {{Pkg|metacity}}.<br />
<br />
=== GDM and GNOME use X11 cursors ===<br />
<br />
To fix this issue, become root and put the following into {{ic|/usr/share/icons/default/index.theme}} (creating the directory {{ic|/usr/share/icons/default}} if necessary):<br />
{{hc|/usr/share/icons/default/index.theme|<nowiki><br />
[Icon Theme]<br />
Inherits=Adwaita<br />
</nowiki>}}<br />
<br />
Note: Instead of "Adwaita", you can choose another cursor theme (e.g. Human).<br />
Alternatively, you can install {{AUR|gnome-cursors-fix}} from the [[AUR]].<br />
<br />
=== Tracker & Documents don't list any local files ===<br />
<br />
In order for Tracker (and, therefore, Documents) to detect your local files, they must be stored in directories that it knows of. If your documents are contained in one of the usual XDG standard directories (i.e. "Documents" or "Music"), you should install [https://www.archlinux.org/packages/extra/x86_64/xdg-user-dirs/ xdg-user-dirs] and run:<br />
<br />
# xdg-user-dirs-update<br />
<br />
This will create all of the usual XDG home directories if they don't already exist and it will create the config file definining these directories that Tracker and Documents depend upon.<br />
<br />
=== Passwords are not remembered ===<br />
<br />
If you get a password prompt every time you login, and you find password are not saved, you might need to create/set a default keyring:<br />
<br />
$ pacman -S seahorse<br />
<br />
Open "Passwords and Keys" from the menu or run "seahorse". Select View > By Keyring. If there is no keyring in the left column (it will be marked with a lock icon), go to File > New > Password Keyring and give it a nice name. You will be asked to enter a password. If you do not give it a password it will be unlocked automatically even when using autologin, but passwords will not be stored securely. Finally, right-click on the keyring you just created and select "Set as default".<br />
<br />
=== Windows can't be modified with Alt-Key + Mouse-Button ===<br />
<br />
Change the dconf-setting "org.gnome.desktop.wm.preferences.mouse-button-modifier" from <Super> back to <Alt>. It is not possible to change this with ''System Settings'' > "Keyboard" > "Shortcuts", you will find there only the regular keybindings. The developers of GNOME decided to change this from 3.4 to 3.6 because of this bug report https://bugzilla.gnome.org/show_bug.cgi?id=607797<br />
<br />
== External links ==<br />
* [http://www.gnome.org/ The Official Website of GNOME]<br />
* [http://extensions.gnome.org/ Extensions for GNOME-shell]<br />
* Themes, icons, and backgrounds:<br />
** [http://art.gnome.org/ GNOME Art]<br />
** [http://www.gnome-look.org/ GNOME Look]<br />
* GTK/GNOME programs:<br />
** [http://www.gnomefiles.org/ GNOME Files]<br />
** [http://www.gnome.org/projects/ GNOME Project Listing]</div>Cinch