https://wiki.archlinux.org/api.php?action=feedcontributions&user=Roguededguy&feedformat=atomArchWiki - User contributions [en]2024-03-29T05:49:02ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Xfce&diff=97348Xfce2010-02-18T21:02:41Z<p>Roguededguy: /* How to Install Xfce */</p>
<hr />
<div>{{accuracy}}<br />
[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|Xfce}}<br />
<br />
== What is Xfce? ==<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. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware.<br />
<br />
== Why use Xfce? ==<br />
Here is a (subjective) list of reasons to use Xfce:<br />
* It's fast, faster than the other major DEs.<br />
* It's stable. In the long time Xfce-4 has been out, only a small handful of bugs has been discovered, despite it having a rather large following.<br />
* It's pretty. It uses GTK2 and is themable. You can make Xfce look very nice. The fonts are completely AA as well.<br />
* It works great with multiple monitors. Xfce's [[Wikipedia:Xinerama|Xinerama]] support is arguably the best out of any WM/DE.<br />
* It doesn't get in your way. You'll find Xfce helps your work flow, rather than always making itself "present."<br />
* It comes with a built-in compositor which allows for true transparency among other cool things.<br />
<br />
== Why not use Xfce? ==<br />
Here is a (subjective) list of reasons not to use Xfce:<br />
* Doesn't contain all the features and integration of the major DEs.<br />
* Slower development cycle.<br />
* Because it's based on the CDE design, the layout may not be as familiar.<br />
<br />
== How to Install Xfce ==<br />
Xfce is modular. That means there is no need for you to run every part, you can pick and choose. Because of this, Xfce has a bunch of Arch packages.<br />
<br />
To install the base Xfce system, run:<br />
<br />
# pacman -S xfce4<br />
<br />
If you want extras, like panel plugins, run this:<br />
<br />
# pacman -S xfce4-goodies<br />
<br />
To get xfce working, you HAVE to install the dbus package, otherwise you'll keep getting some dbus errors and unable to start xfce:<br />
<br />
# pacman -S dbus<br />
<br />
At the time of this writing there is a known issue with Xfce missing icons in the default menu. To fix this you have to install the following icon sets:<br />
# pacman -S gnome-icon-theme<br />
or even<br />
# pacman -S tango-icon-theme<br />
<br />
In order to get the xfce4-mixer to work with alsa, you need to install gstreamer0.10-base-plugins. See below for help with OSS.<br />
# pacman -S gstreamer0.10-base-plugins<br />
<br />
== Running Xfce ==<br />
<br />
Before you start xfce, you must get the hal daemon working, to do this:<br />
<br />
# sudo /etc/rc.d/hal start<br />
<br />
You may want to add hal to the daemon section in rc.conf so you don't have to start is manaully everytime.<br />
<br />
There are two ways to run Xfce. One is the "automatic" method. To start Xfce from the console, you can simply run:<br />
<br />
# startxfce4<br />
'''Note:''' startxfce4 sets DPI to 96 by default, so font sizes will be different than when starting from .xinitrc.<br />
<br />
To customize the Xfce startup using this method, you could copy /etc/xdg/xfce4/xinitrc to $HOME/.xfce4, and edit that file.<br><br />
To add programs to the startup using this method, add symlinks from the programs you want to $HOME/Desktop/Autostart.<br />
<br />
If you want more control over what starts and your initial settings, you can add these items to your $HOME/.xinitrc (leaving out and adding what you want):<br />
<br />
xfce-mcs-manager<br />
xfwm4 --daemon<br />
xfdesktop &<br />
exec xfce4-panel<br />
<br />
or<br />
exec xfce4-session<br />
or<br />
exec startxfce4<br />
<br />
== How To Use Xfce With DMs ==<br />
As of Xfce 4.2.0, the Arch packages add the proper session files for Xfce. They are contained in the xfce-utils package, which should be installed with a base installation. Simply [[Display Manager|Enable a DM]].<br />
<br />
== How to shutdown and reboot from Xfce(This may also help with issues Mounting USB Drives)==<br />
<br />
Make sure that DBus and HAL are enabled in the DAEMONS line in /etc/rc.conf. Then add your normal user to the ''shutdown'' group:<br />
<br />
# gpasswd -a USER power<br />
<br />
Note: This group is only used by HAL, so you still need root privileges for shutting down the system via command line (halt/poweroff/shutdown).<br />
<br />
With the new hal in extra situation has changed: Use either a consolekit/policykit capable display manager (e.g. gdm) or when you start from a shell use "startx" instead of "startxfce4" and add this to your ~/.xinitrc:<br />
<br />
exec ck-launch-session xfce4-session<br />
or<br />
exec ck-launch-session startxfce4<br />
<br />
see http://bbs.archlinux.org/viewtopic.php?id=59954 for more details.<br />
<br />
== Tips ==<br />
=== Commands for the settings manager ===<br />
<br />
There is no official documentation for the commands executed. One must look at .desktop files ''/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 />
xfce-setting-show backdrop<br />
xfce-setting-show display<br />
xfce-setting-show keyboard<br />
xfce4-menueditor<br />
xfce-setting-show sound<br />
xfce-setting-show mouse<br />
xfce-setting-show session<br />
xfce-setting-show<br />
xfce-setting-show splash<br />
xfce-setting-show ui<br />
xfce-setting-show xfwm4<br />
xfce-setting-show wmtweaks<br />
xfce-setting-show workspaces<br />
xfce-setting-show printing_system<br />
xfce4-appfinder<br />
xfce4-autostart-editor<br />
xfce4-panel -c<br />
<br />
To review all the available setting manager commands run the following in a terminal:<br />
<br />
$ grep xfce-setting-show /usr/share/applications/xfce*settings*<br />
<br />
=== A drop down console like in quake ===<br />
<br />
# pacman -S tilda<br />
<br />
will install tilda, a drop down console, similar to yakuake. A more lightweight alternative would be '''stjerm''' which can be found in the AUR.<br />
<br />
To configure tilda, type<br />
<br />
# tilda -C<br />
<br />
which opens a configuration window in X.<br />
<br />
====Guake====<br />
Another functional alternative is guake, which is available in the community repo:<br />
<br />
# pacman -S guake<br />
<br />
=== How to enable the compositor in Xfce 4.4 ===<br />
Xfce 4.4 comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on.<br />
<br />
You can find it in Settings->Window manager tweaks. But if it isn't there, take the following steps:<br />
* Open up $HOME/.config/xfce4/mcs_settings/wmtweaks.xml, and ensure that ''<option name="Xfwm/UseCompositing" type="int" value="1"/>'' is present. If the wmtweaks file is not there, open up the Settings->Window manager tweaks and change some things, then close it, and the file should appear.<br />
* Make sure the following lines are in your /etc/X11/xorg.conf file:<br />
<pre><br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
</pre><br />
* Finally, restart X and the compositor should be available.<br />
<br />
=== Why doesn't my desktop refresh? ===<br />
Xfce 4.4 uses [[FAM]] (File Alteration Monitor) or [[gamin]] (FAM's successor) to get notification when a file or directory changes.<br />
If you decide to use FAM, don't forget to add 'fam' to the list of DAEMONS in /etc/rc.conf.<br />
This step is not necessary for gamin.<br />
<br />
<br />
=== Use a transparent background for desktop icon titles ===<br />
To change the default white background of desktop icon titles to something more suitable, edit the .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 />
=== How to customize xfce panel background ===<br />
The same, edit ~/.gtkrc-2.0. ( foo.bar is path to your image )<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 />
=== Quicklaunch and smart bookmark plugins for xfce panel ===<br />
<br />
If these options do not appear in your "add new items" panel menu when the appropriate package(s) are installed, edit /usr/share/xfce4/panel-plugins/quicklauncher.desktop as follows:<br />
<br />
#X-XFCE-Module=/usr/lib/xfce4/panel-plugins/libquicklauncher.so<br />
X-XFCE-Module=quicklauncher<br />
X-XFCE-Module-Path=/usr/lib/xfce4/panel-plugins<br />
<br />
and similarly for smartbookmark (replacing quicklauncher->smartbookmark in the above).<br />
<br />
This might only be a problem for those installing xfce4-panel and plugins seperately from an actual xfce4 install.<br />
<br />
=== How to customize starting xfce ===<br />
<br />
This includes getting necessary environment variables into the GUI runtime.<br />
<br />
* Copy the file /etc/xdg/xfce4/xinitrc to ~/.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 />
=== How to add themes to XFCE === <br />
<br />
1. Go to [http://xfce-look.org 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 /usr/share/themes (for all users) or ~/.themes (for just you). Inside /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 />
=== Fonts ===<br />
<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 />
=== Replacements for the default 'menu' panel applet ===<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 [http://aur.archlinux.org/packages.php?ID=10259 the AUR]<br />
<br />
=== How to remove menu entries from the System menu === <br />
With the built-in menu editor, you cannot remove menu entries from the System menu. Here’s how to hide them:<br />
# Go to the /usr/share/applications folder. Type in the terminal (Xfce menu > System > Terminal): <pre>$ cd /usr/share/applications</pre><br />
# This folder should be full of .desktop files. To see how many there are, type: <pre>$ ls</pre>Say the one you want to edit is Firefox. Type in the terminal:<pre>$ sudo mousepad firefox.desktop</pre><br />
# In the bottom of the file, paste the following: <pre>NoDisplay=true</pre><br />
# Save and exit. Now Firefox won’t show up in the System menu. You can do this with any program.<br />
<br />
=== But what do you do with menu entries which do not show up in /usr/share/applications (e.g., apps installed via wine)? === <br />
I've found some shortcuts that show in the category “Other” in this directory:<br />
~/.local/share/applications/wine/.<br />
<br />
=== How do I get xfce4-mixer and OSS4 to work together? ===<br />
<br />
==== For Old Xfce4.4 ====<br />
It seems as if the xfce4-mixer package in the binary repositories is only compiled for ALSA sound support. For those of us who use OSS4, there is a very easy way to get xfce4-mixer to support OSS4. First, navigate to the SVN entry for the xfce4-mixer package[http://repos.archlinux.org/viewvc.cgi/xfce4-mixer/repos/extra-i686/]:<br />
<br />
Then download both the PKGBUILD and the .install file to the same directory on your machine. Next, cd to that directory, and look for this line in the PKGBUILD file (it's near the bottom):<br />
<br />
--with-sound=alsa || return 1<br />
<br />
Change '''alsa''' to '''oss''' in that line and save the file. Then run:<br />
<br />
makepkg PKGBUILD<br />
<br />
This takes a few minutes, depending upon the speed of your system and your compiling options in /etc/makepkg.conf.<br />
<br />
After that, there will be a .pkg.tar.gz file in the current directory, and all you need to do to finish installing xfce4-mixer is:<br />
<br />
pacman -U xfce4-mixer-4.4.2-2-i686.pkg.tar.gz<br />
<br />
Your file version and architecture may be different from mine; 4.4.2-2 32-bit was the version I installed on my system.<br />
<br />
'''EDIT:''' I have just posted the modified version of xfce4-mixer as xfce4-mixer-oss4 on AUR, and you can simply install that as you would any ABS package and achieve the same results as above.<br />
<br />
--[[User:Kclive18|Kclive18]] 18:02, 23 September 2008 (EDT)<br />
<br />
==== New Xfce4.6 ====<br />
Xfce 4.6 uses gstreamer as the backend to control volume, so first you have to make gstreamer cooperate with xfce4-mixer.<br />
<br />
pacman -S xfce4-mixer gstreamer0.10-base-plugins<br />
<br />
(Optional) Second, try to install gstreamer0.10-good-plugins, gstreamer0.10-bad-plugins<br />
<br />
pacman -S gstreamer0.10-good-plugins gstreamer0.10-bad-plugins<br />
<br />
login and logout, or just remove the mixer plugin and add it again. If it doesn't work at all, then you have to compile gstreamer0.10-good-plugins yourself. and can <br />
<br />
Download the PKGBUILD and other files needed from ABS or [http://repos.archlinux.org/viewvc.cgi/gstreamer0.10-good-plugins/repos/extra-i686/ here], edit the PKGBUILD, add --enable-oss. <br />
<br />
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var '''--enable-oss'''\<br />
--disable-static --enable-experimental \<br />
--enable-ladspa \<br />
--with-package-name="GStreamer Good Plugins (Arch Linux)" \<br />
--with-package-origin="http://www.archlinux.org/" || return 1<br />
<br />
and then run makepkg -i. <br />
<br />
makepkg -i<br />
<br />
Still not working? Try tis package in AUR [http://aur.archlinux.org/packages.php?ID=17024 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 />
=== How to take screenshots (print-screen key) ===<br />
<br />
Simple way is use command-line screenshot utility with Xfce<br />
<br />
# pacman -S scrot<br />
<br />
Then<br />
<br />
Xfce-menu --> Settings --> Keybord >>> Application Shortcuts<br />
<br />
Add new setting for command "scrot" use key "PrintScreen".<br />
<br />
All screenshorts will be placed in your home folder with unique name like<br />
<br />
this "2009-02-19-063052_1280x1024_scrot.png"!<br />
<br />
<br />
====Screenshooter====<br />
<br />
There is also an a plugin for the panel able to do this with available in extra:<br />
<br />
# pacman -S xfce4-screenshooter<br />
<br />
=== Change volume with keyboard volume buttons ===<br />
<br />
Go to Settings > Keyboard. Click the "Application Shortcuts" tab and add click the "Add" button. Add the following:<br />
<br />
==== ALSA ====<br />
<br />
amixer set Master 5+<br />
for the volume up button<br />
amixer set Master 5-<br />
for the volume down button<br />
amixer set Master toggle<br />
for the mute/unmute button.<br />
<br />
==== OSS ====<br />
Use one of these scripts:<br />
[http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Using_multimedia_keys_with_OSS<br />
]<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 />
=== Change mount options ===<br />
<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 changing the default iocharset to utf8, which is easily done adding a line to '''/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 />
<br />
Note that when using utf-8, the system will distinct between upper- and lowercases, potentially corrupting your files. Be careful.<br />
<br />
== Troubleshooting ==<br />
=== Keyboard shortcuts aren't working ===<br />
This is usually the case when the settings helper is not working. To start it execute:<br />
xfce4-settings-helper<br />
Now it should be working fine.<br />
<br />
== Related Articles ==<br />
* [[Build order for XFCE]]<br />
* [[Improve GTK Application Looks]]<br />
* [[Startup_files#XFCE|HOWTO: Autostart programs on XFCE]]<br />
<br />
== External Resources ==<br />
* [http://www.us.xfce.org/documentation/ 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]<br />
* [https://xubuntu.wordpress.com/2006/08/04/howto-remove-menu-entries-from-the-system-menu/ Howto: Remove menu entries from the System menu]<br />
* [http://www.linuxquestions.org/questions/linux-general-1/how-to-use-xfce-themes-658354/ XFCE themes at linuxquestions.org]</div>Roguededguyhttps://wiki.archlinux.org/index.php?title=Xfce&diff=94918Xfce2010-02-03T19:39:09Z<p>Roguededguy: /* For New Xfce4.6 */</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|Česky|Xfce (Česky)}}<br />
{{i18n_entry|English|xfce}}<br />
{{i18n_entry|Español|xfce (Español)}}<br />
{{i18n_entry|简体中文|xfce_(简体中文)}}<br />
{{i18n_entry|Italiano|Xfce (Italiano)}}<br />
{{i18n_entry|Türkçe|Xfce (Türkçe)}}<br />
{{i18n_links_end}}<br />
<br />
== What is Xfce? ==<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. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware.<br />
<br />
== Why use Xfce? ==<br />
Here is a (subjective) list of reasons to use Xfce:<br />
* It's fast, faster than the other major DEs.<br />
* It's stable. In the long time Xfce-4 has been out, only a small handful of bugs has been discovered, despite it having a rather large following.<br />
* It's pretty. It uses GTK2 and is themable. You can make Xfce look very nice. The fonts are completely AA as well.<br />
* It works great with multiple monitors. Xfce's [[Wikipedia:Xinerama|Xinerama]] support is arguably the best out of any WM/DE.<br />
* It doesn't get in your way. You'll find Xfce helps your work flow, rather than always making itself "present."<br />
* It comes with a built-in compositor which allows for true transparency among other cool things.<br />
<br />
== Why not use Xfce? ==<br />
Here is a (subjective) list of reasons not to use Xfce:<br />
* Doesn't contain all the features and integration of the major DEs.<br />
* Slower development cycle.<br />
* Because it's based on the CDE design, the layout may not be as familiar.<br />
<br />
== How to Install Xfce ==<br />
The Xfce source and documentation are available at http://www.xfce.org/. But since you're using Arch Linux, you can grab Xfce from Pacman.<br />
<br />
Xfce is modular. That means there is no need for you to run every part, you can pick and choose. Because of this, Xfce has a bunch of Arch packages.<br />
<br />
To install the base Xfce system, run:<br />
<br />
# pacman -S xfce4<br />
<br />
If you want extras, like panel plugins, run this:<br />
<br />
# pacman -S xfce4-goodies<br />
<br />
To get xfce working, you HAVE to install the dbus package, otherwise you'll keep getting some dbus errors and unable to start xfce:<br />
<br />
# pacman -S dbus<br />
<br />
If you want to admire 'Tips and Tricks' on login, you must install the '''fortune-mod''' package:<br />
# pacman -S fortune-mod<br />
<br />
At the time of this writing there is a known issue with Xfce missing icons in the default menu. To fix this you have to install the following icon sets:<br />
# pacman -S gnome-icon-theme<br />
or even<br />
# pacman -S tango-icon-theme<br />
<br />
NOTE: In order to get the xfce4-mixer to work with alsa, you may need to install gstreamer0.10-base-plugins. See below for help with OSS.<br />
<br />
== Running Xfce ==<br />
<br />
Before you start xfce, you must get the hal daemon working, to do this:<br />
<br />
# sudo /etc/rc.d/hal start<br />
<br />
You may want to add hal to the daemon section in rc.conf so you don't have to start is manaully everytime.<br />
<br />
There are two ways to run Xfce. One is the "automatic" method. To start Xfce from the console, you can simply run:<br />
<br />
# startxfce4<br />
'''Note:''' startxfce4 sets DPI to 96 by default, so font sizes will be different than when starting from .xinitrc.<br />
<br />
To customize the Xfce startup using this method, you could copy /etc/xdg/xfce4/xinitrc to $HOME/.xfce4, and edit that file.<br><br />
To add programs to the startup using this method, add symlinks from the programs you want to $HOME/Desktop/Autostart.<br />
<br />
If you want more control over what starts and your initial settings, you can add these items to your $HOME/.xinitrc (leaving out and adding what you want):<br />
<br />
xfce-mcs-manager<br />
xfwm4 --daemon<br />
xfdesktop &<br />
exec xfce4-panel<br />
<br />
or<br />
exec xfce4-session<br />
or<br />
exec startxfce4<br />
<br />
== How To Use Xfce With DMs ==<br />
As of Xfce 4.2.0, the Arch packages add the proper session files for Xfce. They are contained in the xfce-utils package, which should be installed with a base installation. Simply [[Adding_a_login_manager_%28KDM%2C_GDM%2C_or_XDM%29_to_automatically_boot_on_startup|Enable a DM]].<br />
<br />
== How to shutdown and reboot from Xfce(This may also help with issues Mounting USB Drives)==<br />
<br />
Make sure that DBus and HAL are enabled in the DAEMONS line in /etc/rc.conf. Then add your normal user to the ''shutdown'' group:<br />
<br />
# gpasswd -a USER power<br />
<br />
Note: This group is only used by HAL, so you still need root privileges for shutting down the system via command line (halt/poweroff/shutdown).<br />
<br />
With the new hal in extra situation has changed: Use either a consolekit/policykit capable display manager (e.g. gdm) or when you start from a shell use "startx" instead of "startxfce4" and add this to your ~/.xinitrc:<br />
<br />
exec ck-launch-session xfce4-session<br />
or<br />
exec ck-launch-session startxfce4<br />
<br />
see http://bbs.archlinux.org/viewtopic.php?id=59954 for more details.<br />
<br />
== Tips ==<br />
=== Commands for the settings manager ===<br />
<br />
There is no official documentation for the commands executed. One must look at .desktop files ''/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 />
xfce-setting-show backdrop<br />
xfce-setting-show display<br />
xfce-setting-show keyboard<br />
xfce4-menueditor<br />
xfce-setting-show sound<br />
xfce-setting-show mouse<br />
xfce-setting-show session<br />
xfce-setting-show<br />
xfce-setting-show splash<br />
xfce-setting-show ui<br />
xfce-setting-show xfwm4<br />
xfce-setting-show wmtweaks<br />
xfce-setting-show workspaces<br />
xfce-setting-show printing_system<br />
xfce4-appfinder<br />
xfce4-autostart-editor<br />
xfce4-panel -c<br />
<br />
To review all the available setting manager commands run the following in a terminal:<br />
<br />
$ grep xfce-setting-show /usr/share/applications/xfce*settings*<br />
<br />
=== A drop down console like in quake ===<br />
<br />
# pacman -S tilda<br />
<br />
will install tilda, a drop down console, juste like yakuake in kde. It uses quite some ram, and a more lightweight alternative would be '''stjerm''' that can be found in the AUR.<br />
<br />
To configure tilda, type<br />
<br />
# tilda -C<br />
<br />
which opens a configuration window in X.<br />
<br />
====Guake====<br />
A much more eyecandy and functional alternative is guake, which is available in community repo:<br />
<br />
# pacman -S guake<br />
<br />
=== How to enable the compositor in Xfce 4.4 ===<br />
Xfce 4.4 comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on.<br />
<br />
You can find it in Settings->Window manager tweaks. But if it isn't there, take the following steps:<br />
* Open up $HOME/.config/xfce4/mcs_settings/wmtweaks.xml, and ensure that ''<option name="Xfwm/UseCompositing" type="int" value="1"/>'' is present. If the wmtweaks file is not there, open up the Settings->Window manager tweaks and change some things, then close it, and the file should appear.<br />
* Make sure the following lines are in your /etc/X11/xorg.conf file:<br />
<pre><br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
</pre><br />
* Finally, restart X and the compositor should be available.<br />
<br />
=== Why doesn't my desktop refresh? ===<br />
Xfce 4.4 uses [[FAM]] (File Alteration Monitor) or [[gamin]] (FAM's successor) to get notification when a file or directory changes.<br />
If you decide to use FAM, don't forget to add 'fam' to the list of DAEMONS in /etc/rc.conf.<br />
This step is not necessary for gamin.<br />
<br />
<br />
=== Use a transparent background for desktop icon titles ===<br />
To change the default white background of desktop icon titles to something more suitable, edit the .gtkrc-2.0 file in your home directory and add the following (create the file if needed):<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 />
=== How to customize xfce panel background ===<br />
The same, edit ~/.gtkrc-2.0. ( foo.bar is path to your image )<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 />
=== Quicklaunch and smart bookmark plugins for xfce panel ===<br />
<br />
If these options do not appear in your "add new items" panel menu when the appropriate package(s) are installed, edit /usr/share/xfce4/panel-plugins/quicklauncher.desktop as follows:<br />
<br />
#X-XFCE-Module=/usr/lib/xfce4/panel-plugins/libquicklauncher.so<br />
X-XFCE-Module=quicklauncher<br />
X-XFCE-Module-Path=/usr/lib/xfce4/panel-plugins<br />
<br />
and similarly for smartbookmark (replacing quicklauncher->smartbookmark in the above).<br />
<br />
This might only be a problem for those installing xfce4-panel and plugins seperately from an actual xfce4 install.<br />
<br />
=== How to customize starting xfce ===<br />
<br />
This includes getting necessary environment variables into the GUI runtime.<br />
<br />
* Copy the file /etc/xdg/xfce4/xinitrc to ~/.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 />
=== How to add themes to XFCE === <br />
<br />
1. Go to [http://xfce-look.org 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 /usr/share/themes (for all users) or ~/.themes (for just you). Inside /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 />
=== Fonts ===<br />
<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 />
=== Replacements for the default 'menu' panel applet ===<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 [http://aur.archlinux.org/packages.php?ID=10259 the AUR]<br />
<br />
=== How to remove menu entries from the System menu === <br />
With the built-in menu editor, you cannot remove menu entries from the System menu. Here’s how to hide them:<br />
# Go to the /usr/share/applications folder. Type in the terminal (Xfce menu > System > Terminal): <pre>$ cd /usr/share/applications</pre><br />
# This folder should be full of .desktop files. To see how many there are, type: <pre>$ ls</pre>Say the one you want to edit is Firefox. Type in the terminal:<pre>$ sudo mousepad firefox.desktop</pre><br />
# In the bottom of the file, paste the following: <pre>NoDisplay=true</pre><br />
# Save and exit. Now Firefox won’t show up in the System menu. You can do this with any program.<br />
<br />
=== But what do you do with menu entries which do not show up in /usr/share/applications (e.g., apps installed via wine)? === <br />
I've found some shortcuts that show in the category “Other” in this directory:<br />
~/.local/share/applications/wine/.<br />
<br />
=== How do I get xfce4-mixer and OSS4 to work together? ===<br />
<br />
==== For Old Xfce4.4 ====<br />
It seems as if the xfce4-mixer package in the binary repositories is only compiled for ALSA sound support. For those of us who use OSS4, there is a very easy way to get xfce4-mixer to support OSS4. First, navigate to the SVN entry for the xfce4-mixer package[http://repos.archlinux.org/viewvc.cgi/xfce4-mixer/repos/extra-i686/]:<br />
<br />
Then download both the PKGBUILD and the .install file to the same directory on your machine. Next, cd to that directory, and look for this line in the PKGBUILD file (it's near the bottom):<br />
<br />
--with-sound=alsa || return 1<br />
<br />
Change '''alsa''' to '''oss''' in that line and save the file. Then run:<br />
<br />
makepkg PKGBUILD<br />
<br />
This takes a few minutes, depending upon the speed of your system and your compiling options in /etc/makepkg.conf.<br />
<br />
After that, there will be a .pkg.tar.gz file in the current directory, and all you need to do to finish installing xfce4-mixer is:<br />
<br />
pacman -U xfce4-mixer-4.4.2-2-i686.pkg.tar.gz<br />
<br />
Your file version and architecture may be different from mine; 4.4.2-2 32-bit was the version I installed on my system.<br />
<br />
'''EDIT:''' I have just posted the modified version of xfce4-mixer as xfce4-mixer-oss4 on AUR, and you can simply install that as you would any ABS package and achieve the same results as above.<br />
<br />
--[[User:Kclive18|Kclive18]] 18:02, 23 September 2008 (EDT)<br />
<br />
==== New Xfce4.6 ====<br />
Xfce 4.6 uses gstreamer as the backend to control volume, so first you have to make gstreamer cooperate with xfce4-mixer.<br />
<br />
pacman -S xfce4-mixer gstreamer0.10-base-plugins<br />
<br />
(Optional) Second, try to install gstreamer0.10-good-plugins, gstreamer0.10-bad-plugins<br />
<br />
pacman -S gstreamer0.10-good-plugins gstreamer0.10-bad-plugins<br />
<br />
login and logout, or just remove the mixer plugin and add it again. If it doesn't work at all, then you have to compile gstreamer0.10-good-plugins yourself. and can <br />
<br />
Download the PKGBUILD and other files needed from ABS or [http://repos.archlinux.org/viewvc.cgi/gstreamer0.10-good-plugins/repos/extra-i686/ here], edit the PKGBUILD, add --enable-oss. <br />
<br />
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var '''--enable-oss'''\<br />
--disable-static --enable-experimental \<br />
--enable-ladspa \<br />
--with-package-name="GStreamer Good Plugins (Arch Linux)" \<br />
--with-package-origin="http://www.archlinux.org/" || return 1<br />
<br />
and then run makepkg -i. <br />
<br />
makepkg -i<br />
<br />
Still not working? Try tis package in AUR [http://aur.archlinux.org/packages.php?ID=17024 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 />
=== How to make screenshots (print-screen key) ===<br />
<br />
Simple way is use command-line screenshot utility with Xfce<br />
<br />
# pacman -S scrot<br />
<br />
Then<br />
<br />
Xfce-menu --> Settings --> Keybord >>> Application Shortcuts<br />
<br />
Add new setting for command "scrot" use key "PrintScreen".<br />
<br />
All screenshorts will be placed in your home folder with unique name like<br />
<br />
this "2009-02-19-063052_1280x1024_scrot.png"!<br />
<br />
<br />
====Screenshooter====<br />
<br />
There is also an a plugin for the panel able to do this with available in extra:<br />
<br />
# pacman -S xfce4-screenshooter<br />
<br />
=== Change volume with keyboard volume buttons ===<br />
<br />
Go to Settings > Keyboard. Click the "Application Shortcuts" tab and add click the "Add" button. Add the following:<br />
<br />
==== ALSA ====<br />
<br />
amixer set Master 5+<br />
for the volume up button<br />
amixer set Master 5-<br />
for the volume down button<br />
amixer set Master toggle<br />
for the mute/unmute button.<br />
<br />
==== OSS ====<br />
Use one of these scripts:<br />
[http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Using_multimedia_keys_with_OSS<br />
]<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 />
=== Change mount options ===<br />
<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 changing the default iocharset to utf8, which is easily done adding a line to '''/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 />
<br />
Note that when using utf-8, the system will distinct between upper- and lowercases, potentially corrupting your files. Be careful.<br />
<br />
== Troubleshooting ==<br />
=== Keyboard shortcuts aren't working ===<br />
This is usually the case when the settings helper is not working. To start it execute:<br />
xfce4-settings-helper<br />
Now it should be working fine.<br />
<br />
== Related Articles ==<br />
* [[Build order for XFCE]]<br />
* [[Howto make GTK apps look nice| HOWTO: Make GTK1 apps look nice]]<br />
* [[Startup_files#XFCE|HOWTO: Autostart programs on XFCE]]<br />
<br />
== External Resources ==<br />
* [http://www.us.xfce.org/documentation/ 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]<br />
* [https://xubuntu.wordpress.com/2006/08/04/howto-remove-menu-entries-from-the-system-menu/ Howto: Remove menu entries from the System menu]<br />
* [http://www.linuxquestions.org/questions/linux-general-1/how-to-use-xfce-themes-658354/ XFCE themes at linuxquestions.org]</div>Roguededguyhttps://wiki.archlinux.org/index.php?title=Xfce&diff=94917Xfce2010-02-03T19:38:09Z<p>Roguededguy: /* For New Xfce4.6 */</p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|Česky|Xfce (Česky)}}<br />
{{i18n_entry|English|xfce}}<br />
{{i18n_entry|Español|xfce (Español)}}<br />
{{i18n_entry|简体中文|xfce_(简体中文)}}<br />
{{i18n_entry|Italiano|Xfce (Italiano)}}<br />
{{i18n_entry|Türkçe|Xfce (Türkçe)}}<br />
{{i18n_links_end}}<br />
<br />
== What is Xfce? ==<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. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware.<br />
<br />
== Why use Xfce? ==<br />
Here is a (subjective) list of reasons to use Xfce:<br />
* It's fast, faster than the other major DEs.<br />
* It's stable. In the long time Xfce-4 has been out, only a small handful of bugs has been discovered, despite it having a rather large following.<br />
* It's pretty. It uses GTK2 and is themable. You can make Xfce look very nice. The fonts are completely AA as well.<br />
* It works great with multiple monitors. Xfce's [[Wikipedia:Xinerama|Xinerama]] support is arguably the best out of any WM/DE.<br />
* It doesn't get in your way. You'll find Xfce helps your work flow, rather than always making itself "present."<br />
* It comes with a built-in compositor which allows for true transparency among other cool things.<br />
<br />
== Why not use Xfce? ==<br />
Here is a (subjective) list of reasons not to use Xfce:<br />
* Doesn't contain all the features and integration of the major DEs.<br />
* Slower development cycle.<br />
* Because it's based on the CDE design, the layout may not be as familiar.<br />
<br />
== How to Install Xfce ==<br />
The Xfce source and documentation are available at http://www.xfce.org/. But since you're using Arch Linux, you can grab Xfce from Pacman.<br />
<br />
Xfce is modular. That means there is no need for you to run every part, you can pick and choose. Because of this, Xfce has a bunch of Arch packages.<br />
<br />
To install the base Xfce system, run:<br />
<br />
# pacman -S xfce4<br />
<br />
If you want extras, like panel plugins, run this:<br />
<br />
# pacman -S xfce4-goodies<br />
<br />
To get xfce working, you HAVE to install the dbus package, otherwise you'll keep getting some dbus errors and unable to start xfce:<br />
<br />
# pacman -S dbus<br />
<br />
If you want to admire 'Tips and Tricks' on login, you must install the '''fortune-mod''' package:<br />
# pacman -S fortune-mod<br />
<br />
At the time of this writing there is a known issue with Xfce missing icons in the default menu. To fix this you have to install the following icon sets:<br />
# pacman -S gnome-icon-theme<br />
or even<br />
# pacman -S tango-icon-theme<br />
<br />
NOTE: In order to get the xfce4-mixer to work with alsa, you may need to install gstreamer0.10-base-plugins. See below for help with OSS.<br />
<br />
== Running Xfce ==<br />
<br />
Before you start xfce, you must get the hal daemon working, to do this:<br />
<br />
# sudo /etc/rc.d/hal start<br />
<br />
You may want to add hal to the daemon section in rc.conf so you don't have to start is manaully everytime.<br />
<br />
There are two ways to run Xfce. One is the "automatic" method. To start Xfce from the console, you can simply run:<br />
<br />
# startxfce4<br />
'''Note:''' startxfce4 sets DPI to 96 by default, so font sizes will be different than when starting from .xinitrc.<br />
<br />
To customize the Xfce startup using this method, you could copy /etc/xdg/xfce4/xinitrc to $HOME/.xfce4, and edit that file.<br><br />
To add programs to the startup using this method, add symlinks from the programs you want to $HOME/Desktop/Autostart.<br />
<br />
If you want more control over what starts and your initial settings, you can add these items to your $HOME/.xinitrc (leaving out and adding what you want):<br />
<br />
xfce-mcs-manager<br />
xfwm4 --daemon<br />
xfdesktop &<br />
exec xfce4-panel<br />
<br />
or<br />
exec xfce4-session<br />
or<br />
exec startxfce4<br />
<br />
== How To Use Xfce With DMs ==<br />
As of Xfce 4.2.0, the Arch packages add the proper session files for Xfce. They are contained in the xfce-utils package, which should be installed with a base installation. Simply [[Adding_a_login_manager_%28KDM%2C_GDM%2C_or_XDM%29_to_automatically_boot_on_startup|Enable a DM]].<br />
<br />
== How to shutdown and reboot from Xfce(This may also help with issues Mounting USB Drives)==<br />
<br />
Make sure that DBus and HAL are enabled in the DAEMONS line in /etc/rc.conf. Then add your normal user to the ''shutdown'' group:<br />
<br />
# gpasswd -a USER power<br />
<br />
Note: This group is only used by HAL, so you still need root privileges for shutting down the system via command line (halt/poweroff/shutdown).<br />
<br />
With the new hal in extra situation has changed: Use either a consolekit/policykit capable display manager (e.g. gdm) or when you start from a shell use "startx" instead of "startxfce4" and add this to your ~/.xinitrc:<br />
<br />
exec ck-launch-session xfce4-session<br />
or<br />
exec ck-launch-session startxfce4<br />
<br />
see http://bbs.archlinux.org/viewtopic.php?id=59954 for more details.<br />
<br />
== Tips ==<br />
=== Commands for the settings manager ===<br />
<br />
There is no official documentation for the commands executed. One must look at .desktop files ''/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 />
xfce-setting-show backdrop<br />
xfce-setting-show display<br />
xfce-setting-show keyboard<br />
xfce4-menueditor<br />
xfce-setting-show sound<br />
xfce-setting-show mouse<br />
xfce-setting-show session<br />
xfce-setting-show<br />
xfce-setting-show splash<br />
xfce-setting-show ui<br />
xfce-setting-show xfwm4<br />
xfce-setting-show wmtweaks<br />
xfce-setting-show workspaces<br />
xfce-setting-show printing_system<br />
xfce4-appfinder<br />
xfce4-autostart-editor<br />
xfce4-panel -c<br />
<br />
To review all the available setting manager commands run the following in a terminal:<br />
<br />
$ grep xfce-setting-show /usr/share/applications/xfce*settings*<br />
<br />
=== A drop down console like in quake ===<br />
<br />
# pacman -S tilda<br />
<br />
will install tilda, a drop down console, juste like yakuake in kde. It uses quite some ram, and a more lightweight alternative would be '''stjerm''' that can be found in the AUR.<br />
<br />
To configure tilda, type<br />
<br />
# tilda -C<br />
<br />
which opens a configuration window in X.<br />
<br />
====Guake====<br />
A much more eyecandy and functional alternative is guake, which is available in community repo:<br />
<br />
# pacman -S guake<br />
<br />
=== How to enable the compositor in Xfce 4.4 ===<br />
Xfce 4.4 comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on.<br />
<br />
You can find it in Settings->Window manager tweaks. But if it isn't there, take the following steps:<br />
* Open up $HOME/.config/xfce4/mcs_settings/wmtweaks.xml, and ensure that ''<option name="Xfwm/UseCompositing" type="int" value="1"/>'' is present. If the wmtweaks file is not there, open up the Settings->Window manager tweaks and change some things, then close it, and the file should appear.<br />
* Make sure the following lines are in your /etc/X11/xorg.conf file:<br />
<pre><br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
</pre><br />
* Finally, restart X and the compositor should be available.<br />
<br />
=== Why doesn't my desktop refresh? ===<br />
Xfce 4.4 uses [[FAM]] (File Alteration Monitor) or [[gamin]] (FAM's successor) to get notification when a file or directory changes.<br />
If you decide to use FAM, don't forget to add 'fam' to the list of DAEMONS in /etc/rc.conf.<br />
This step is not necessary for gamin.<br />
<br />
<br />
=== Use a transparent background for desktop icon titles ===<br />
To change the default white background of desktop icon titles to something more suitable, edit the .gtkrc-2.0 file in your home directory and add the following (create the file if needed):<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 />
=== How to customize xfce panel background ===<br />
The same, edit ~/.gtkrc-2.0. ( foo.bar is path to your image )<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 />
=== Quicklaunch and smart bookmark plugins for xfce panel ===<br />
<br />
If these options do not appear in your "add new items" panel menu when the appropriate package(s) are installed, edit /usr/share/xfce4/panel-plugins/quicklauncher.desktop as follows:<br />
<br />
#X-XFCE-Module=/usr/lib/xfce4/panel-plugins/libquicklauncher.so<br />
X-XFCE-Module=quicklauncher<br />
X-XFCE-Module-Path=/usr/lib/xfce4/panel-plugins<br />
<br />
and similarly for smartbookmark (replacing quicklauncher->smartbookmark in the above).<br />
<br />
This might only be a problem for those installing xfce4-panel and plugins seperately from an actual xfce4 install.<br />
<br />
=== How to customize starting xfce ===<br />
<br />
This includes getting necessary environment variables into the GUI runtime.<br />
<br />
* Copy the file /etc/xdg/xfce4/xinitrc to ~/.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 />
=== How to add themes to XFCE === <br />
<br />
1. Go to [http://xfce-look.org 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 /usr/share/themes (for all users) or ~/.themes (for just you). Inside /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 />
=== Fonts ===<br />
<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 />
=== Replacements for the default 'menu' panel applet ===<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 [http://aur.archlinux.org/packages.php?ID=10259 the AUR]<br />
<br />
=== How to remove menu entries from the System menu === <br />
With the built-in menu editor, you cannot remove menu entries from the System menu. Here’s how to hide them:<br />
# Go to the /usr/share/applications folder. Type in the terminal (Xfce menu > System > Terminal): <pre>$ cd /usr/share/applications</pre><br />
# This folder should be full of .desktop files. To see how many there are, type: <pre>$ ls</pre>Say the one you want to edit is Firefox. Type in the terminal:<pre>$ sudo mousepad firefox.desktop</pre><br />
# In the bottom of the file, paste the following: <pre>NoDisplay=true</pre><br />
# Save and exit. Now Firefox won’t show up in the System menu. You can do this with any program.<br />
<br />
=== But what do you do with menu entries which do not show up in /usr/share/applications (e.g., apps installed via wine)? === <br />
I've found some shortcuts that show in the category “Other” in this directory:<br />
~/.local/share/applications/wine/.<br />
<br />
=== How do I get xfce4-mixer and OSS4 to work together? ===<br />
<br />
==== For Old Xfce4.4 ====<br />
It seems as if the xfce4-mixer package in the binary repositories is only compiled for ALSA sound support. For those of us who use OSS4, there is a very easy way to get xfce4-mixer to support OSS4. First, navigate to the SVN entry for the xfce4-mixer package[http://repos.archlinux.org/viewvc.cgi/xfce4-mixer/repos/extra-i686/]:<br />
<br />
Then download both the PKGBUILD and the .install file to the same directory on your machine. Next, cd to that directory, and look for this line in the PKGBUILD file (it's near the bottom):<br />
<br />
--with-sound=alsa || return 1<br />
<br />
Change '''alsa''' to '''oss''' in that line and save the file. Then run:<br />
<br />
makepkg PKGBUILD<br />
<br />
This takes a few minutes, depending upon the speed of your system and your compiling options in /etc/makepkg.conf.<br />
<br />
After that, there will be a .pkg.tar.gz file in the current directory, and all you need to do to finish installing xfce4-mixer is:<br />
<br />
pacman -U xfce4-mixer-4.4.2-2-i686.pkg.tar.gz<br />
<br />
Your file version and architecture may be different from mine; 4.4.2-2 32-bit was the version I installed on my system.<br />
<br />
'''EDIT:''' I have just posted the modified version of xfce4-mixer as xfce4-mixer-oss4 on AUR, and you can simply install that as you would any ABS package and achieve the same results as above.<br />
<br />
--[[User:Kclive18|Kclive18]] 18:02, 23 September 2008 (EDT)<br />
<br />
==== For New Xfce4.6 ====<br />
New xfce4.6 use gstreamer as backend to control volume, so you have to make your gstreamer work with the xfce4-mixer.<br />
<br />
pacman -S xfce4-mixer gstreamer0.10-base-plugins<br />
<br />
(Optional) Second, try to install gstreamer0.10-good-plugins, gstreamer0.10-bad-plugins<br />
<br />
pacman -S gstreamer0.10-good-plugins gstreamer0.10-bad-plugins<br />
<br />
login and logout, or just remove the mixer plugin and add it again. If it doesn't work at all, then you have to compile gstreamer0.10-good-plugins yourself. and can <br />
<br />
Download the PKGBUILD and other files needed from ABS or [http://repos.archlinux.org/viewvc.cgi/gstreamer0.10-good-plugins/repos/extra-i686/ here], edit the PKGBUILD, add --enable-oss. <br />
<br />
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var '''--enable-oss'''\<br />
--disable-static --enable-experimental \<br />
--enable-ladspa \<br />
--with-package-name="GStreamer Good Plugins (Arch Linux)" \<br />
--with-package-origin="http://www.archlinux.org/" || return 1<br />
<br />
and then run makepkg -i. <br />
<br />
makepkg -i<br />
<br />
Still not working? Try tis package in AUR [http://aur.archlinux.org/packages.php?ID=17024 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 />
=== How to make screenshots (print-screen key) ===<br />
<br />
Simple way is use command-line screenshot utility with Xfce<br />
<br />
# pacman -S scrot<br />
<br />
Then<br />
<br />
Xfce-menu --> Settings --> Keybord >>> Application Shortcuts<br />
<br />
Add new setting for command "scrot" use key "PrintScreen".<br />
<br />
All screenshorts will be placed in your home folder with unique name like<br />
<br />
this "2009-02-19-063052_1280x1024_scrot.png"!<br />
<br />
<br />
====Screenshooter====<br />
<br />
There is also an a plugin for the panel able to do this with available in extra:<br />
<br />
# pacman -S xfce4-screenshooter<br />
<br />
=== Change volume with keyboard volume buttons ===<br />
<br />
Go to Settings > Keyboard. Click the "Application Shortcuts" tab and add click the "Add" button. Add the following:<br />
<br />
==== ALSA ====<br />
<br />
amixer set Master 5+<br />
for the volume up button<br />
amixer set Master 5-<br />
for the volume down button<br />
amixer set Master toggle<br />
for the mute/unmute button.<br />
<br />
==== OSS ====<br />
Use one of these scripts:<br />
[http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Using_multimedia_keys_with_OSS<br />
]<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 />
=== Change mount options ===<br />
<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 changing the default iocharset to utf8, which is easily done adding a line to '''/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 />
<br />
Note that when using utf-8, the system will distinct between upper- and lowercases, potentially corrupting your files. Be careful.<br />
<br />
== Troubleshooting ==<br />
=== Keyboard shortcuts aren't working ===<br />
This is usually the case when the settings helper is not working. To start it execute:<br />
xfce4-settings-helper<br />
Now it should be working fine.<br />
<br />
== Related Articles ==<br />
* [[Build order for XFCE]]<br />
* [[Howto make GTK apps look nice| HOWTO: Make GTK1 apps look nice]]<br />
* [[Startup_files#XFCE|HOWTO: Autostart programs on XFCE]]<br />
<br />
== External Resources ==<br />
* [http://www.us.xfce.org/documentation/ 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]<br />
* [https://xubuntu.wordpress.com/2006/08/04/howto-remove-menu-entries-from-the-system-menu/ Howto: Remove menu entries from the System menu]<br />
* [http://www.linuxquestions.org/questions/linux-general-1/how-to-use-xfce-themes-658354/ XFCE themes at linuxquestions.org]</div>Roguededguyhttps://wiki.archlinux.org/index.php?title=Xfce&diff=94916Xfce2010-02-03T19:36:44Z<p>Roguededguy: </p>
<hr />
<div>[[Category:Desktop environments (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|Česky|Xfce (Česky)}}<br />
{{i18n_entry|English|xfce}}<br />
{{i18n_entry|Español|xfce (Español)}}<br />
{{i18n_entry|简体中文|xfce_(简体中文)}}<br />
{{i18n_entry|Italiano|Xfce (Italiano)}}<br />
{{i18n_entry|Türkçe|Xfce (Türkçe)}}<br />
{{i18n_links_end}}<br />
<br />
== What is Xfce? ==<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. Unlike GNOME or KDE, Xfce is lightweight and designed more around CDE than Windows or Mac. It has a much slower development cycle, but is very stable and extremely fast. Xfce is great for older hardware.<br />
<br />
== Why use Xfce? ==<br />
Here is a (subjective) list of reasons to use Xfce:<br />
* It's fast, faster than the other major DEs.<br />
* It's stable. In the long time Xfce-4 has been out, only a small handful of bugs has been discovered, despite it having a rather large following.<br />
* It's pretty. It uses GTK2 and is themable. You can make Xfce look very nice. The fonts are completely AA as well.<br />
* It works great with multiple monitors. Xfce's [[Wikipedia:Xinerama|Xinerama]] support is arguably the best out of any WM/DE.<br />
* It doesn't get in your way. You'll find Xfce helps your work flow, rather than always making itself "present."<br />
* It comes with a built-in compositor which allows for true transparency among other cool things.<br />
<br />
== Why not use Xfce? ==<br />
Here is a (subjective) list of reasons not to use Xfce:<br />
* Doesn't contain all the features and integration of the major DEs.<br />
* Slower development cycle.<br />
* Because it's based on the CDE design, the layout may not be as familiar.<br />
<br />
== How to Install Xfce ==<br />
The Xfce source and documentation are available at http://www.xfce.org/. But since you're using Arch Linux, you can grab Xfce from Pacman.<br />
<br />
Xfce is modular. That means there is no need for you to run every part, you can pick and choose. Because of this, Xfce has a bunch of Arch packages.<br />
<br />
To install the base Xfce system, run:<br />
<br />
# pacman -S xfce4<br />
<br />
If you want extras, like panel plugins, run this:<br />
<br />
# pacman -S xfce4-goodies<br />
<br />
To get xfce working, you HAVE to install the dbus package, otherwise you'll keep getting some dbus errors and unable to start xfce:<br />
<br />
# pacman -S dbus<br />
<br />
If you want to admire 'Tips and Tricks' on login, you must install the '''fortune-mod''' package:<br />
# pacman -S fortune-mod<br />
<br />
At the time of this writing there is a known issue with Xfce missing icons in the default menu. To fix this you have to install the following icon sets:<br />
# pacman -S gnome-icon-theme<br />
or even<br />
# pacman -S tango-icon-theme<br />
<br />
NOTE: In order to get the xfce4-mixer to work with alsa, you may need to install gstreamer0.10-base-plugins. See below for help with OSS.<br />
<br />
== Running Xfce ==<br />
<br />
Before you start xfce, you must get the hal daemon working, to do this:<br />
<br />
# sudo /etc/rc.d/hal start<br />
<br />
You may want to add hal to the daemon section in rc.conf so you don't have to start is manaully everytime.<br />
<br />
There are two ways to run Xfce. One is the "automatic" method. To start Xfce from the console, you can simply run:<br />
<br />
# startxfce4<br />
'''Note:''' startxfce4 sets DPI to 96 by default, so font sizes will be different than when starting from .xinitrc.<br />
<br />
To customize the Xfce startup using this method, you could copy /etc/xdg/xfce4/xinitrc to $HOME/.xfce4, and edit that file.<br><br />
To add programs to the startup using this method, add symlinks from the programs you want to $HOME/Desktop/Autostart.<br />
<br />
If you want more control over what starts and your initial settings, you can add these items to your $HOME/.xinitrc (leaving out and adding what you want):<br />
<br />
xfce-mcs-manager<br />
xfwm4 --daemon<br />
xfdesktop &<br />
exec xfce4-panel<br />
<br />
or<br />
exec xfce4-session<br />
or<br />
exec startxfce4<br />
<br />
== How To Use Xfce With DMs ==<br />
As of Xfce 4.2.0, the Arch packages add the proper session files for Xfce. They are contained in the xfce-utils package, which should be installed with a base installation. Simply [[Adding_a_login_manager_%28KDM%2C_GDM%2C_or_XDM%29_to_automatically_boot_on_startup|Enable a DM]].<br />
<br />
== How to shutdown and reboot from Xfce(This may also help with issues Mounting USB Drives)==<br />
<br />
Make sure that DBus and HAL are enabled in the DAEMONS line in /etc/rc.conf. Then add your normal user to the ''shutdown'' group:<br />
<br />
# gpasswd -a USER power<br />
<br />
Note: This group is only used by HAL, so you still need root privileges for shutting down the system via command line (halt/poweroff/shutdown).<br />
<br />
With the new hal in extra situation has changed: Use either a consolekit/policykit capable display manager (e.g. gdm) or when you start from a shell use "startx" instead of "startxfce4" and add this to your ~/.xinitrc:<br />
<br />
exec ck-launch-session xfce4-session<br />
or<br />
exec ck-launch-session startxfce4<br />
<br />
see http://bbs.archlinux.org/viewtopic.php?id=59954 for more details.<br />
<br />
== Tips ==<br />
=== Commands for the settings manager ===<br />
<br />
There is no official documentation for the commands executed. One must look at .desktop files ''/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 />
xfce-setting-show backdrop<br />
xfce-setting-show display<br />
xfce-setting-show keyboard<br />
xfce4-menueditor<br />
xfce-setting-show sound<br />
xfce-setting-show mouse<br />
xfce-setting-show session<br />
xfce-setting-show<br />
xfce-setting-show splash<br />
xfce-setting-show ui<br />
xfce-setting-show xfwm4<br />
xfce-setting-show wmtweaks<br />
xfce-setting-show workspaces<br />
xfce-setting-show printing_system<br />
xfce4-appfinder<br />
xfce4-autostart-editor<br />
xfce4-panel -c<br />
<br />
To review all the available setting manager commands run the following in a terminal:<br />
<br />
$ grep xfce-setting-show /usr/share/applications/xfce*settings*<br />
<br />
=== A drop down console like in quake ===<br />
<br />
# pacman -S tilda<br />
<br />
will install tilda, a drop down console, juste like yakuake in kde. It uses quite some ram, and a more lightweight alternative would be '''stjerm''' that can be found in the AUR.<br />
<br />
To configure tilda, type<br />
<br />
# tilda -C<br />
<br />
which opens a configuration window in X.<br />
<br />
====Guake====<br />
A much more eyecandy and functional alternative is guake, which is available in community repo:<br />
<br />
# pacman -S guake<br />
<br />
=== How to enable the compositor in Xfce 4.4 ===<br />
Xfce 4.4 comes with a builtin compositor adding the option for fancy window effects, shadows and transparency and so on.<br />
<br />
You can find it in Settings->Window manager tweaks. But if it isn't there, take the following steps:<br />
* Open up $HOME/.config/xfce4/mcs_settings/wmtweaks.xml, and ensure that ''<option name="Xfwm/UseCompositing" type="int" value="1"/>'' is present. If the wmtweaks file is not there, open up the Settings->Window manager tweaks and change some things, then close it, and the file should appear.<br />
* Make sure the following lines are in your /etc/X11/xorg.conf file:<br />
<pre><br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
</pre><br />
* Finally, restart X and the compositor should be available.<br />
<br />
=== Why doesn't my desktop refresh? ===<br />
Xfce 4.4 uses [[FAM]] (File Alteration Monitor) or [[gamin]] (FAM's successor) to get notification when a file or directory changes.<br />
If you decide to use FAM, don't forget to add 'fam' to the list of DAEMONS in /etc/rc.conf.<br />
This step is not necessary for gamin.<br />
<br />
<br />
=== Use a transparent background for desktop icon titles ===<br />
To change the default white background of desktop icon titles to something more suitable, edit the .gtkrc-2.0 file in your home directory and add the following (create the file if needed):<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 />
=== How to customize xfce panel background ===<br />
The same, edit ~/.gtkrc-2.0. ( foo.bar is path to your image )<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 />
=== Quicklaunch and smart bookmark plugins for xfce panel ===<br />
<br />
If these options do not appear in your "add new items" panel menu when the appropriate package(s) are installed, edit /usr/share/xfce4/panel-plugins/quicklauncher.desktop as follows:<br />
<br />
#X-XFCE-Module=/usr/lib/xfce4/panel-plugins/libquicklauncher.so<br />
X-XFCE-Module=quicklauncher<br />
X-XFCE-Module-Path=/usr/lib/xfce4/panel-plugins<br />
<br />
and similarly for smartbookmark (replacing quicklauncher->smartbookmark in the above).<br />
<br />
This might only be a problem for those installing xfce4-panel and plugins seperately from an actual xfce4 install.<br />
<br />
=== How to customize starting xfce ===<br />
<br />
This includes getting necessary environment variables into the GUI runtime.<br />
<br />
* Copy the file /etc/xdg/xfce4/xinitrc to ~/.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 />
=== How to add themes to XFCE === <br />
<br />
1. Go to [http://xfce-look.org 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 /usr/share/themes (for all users) or ~/.themes (for just you). Inside /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 />
=== Fonts ===<br />
<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 />
=== Replacements for the default 'menu' panel applet ===<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 [http://aur.archlinux.org/packages.php?ID=10259 the AUR]<br />
<br />
=== How to remove menu entries from the System menu === <br />
With the built-in menu editor, you cannot remove menu entries from the System menu. Here’s how to hide them:<br />
# Go to the /usr/share/applications folder. Type in the terminal (Xfce menu > System > Terminal): <pre>$ cd /usr/share/applications</pre><br />
# This folder should be full of .desktop files. To see how many there are, type: <pre>$ ls</pre>Say the one you want to edit is Firefox. Type in the terminal:<pre>$ sudo mousepad firefox.desktop</pre><br />
# In the bottom of the file, paste the following: <pre>NoDisplay=true</pre><br />
# Save and exit. Now Firefox won’t show up in the System menu. You can do this with any program.<br />
<br />
=== But what do you do with menu entries which do not show up in /usr/share/applications (e.g., apps installed via wine)? === <br />
I've found some shortcuts that show in the category “Other” in this directory:<br />
~/.local/share/applications/wine/.<br />
<br />
=== How do I get xfce4-mixer and OSS4 to work together? ===<br />
<br />
==== For Old Xfce4.4 ====<br />
It seems as if the xfce4-mixer package in the binary repositories is only compiled for ALSA sound support. For those of us who use OSS4, there is a very easy way to get xfce4-mixer to support OSS4. First, navigate to the SVN entry for the xfce4-mixer package[http://repos.archlinux.org/viewvc.cgi/xfce4-mixer/repos/extra-i686/]:<br />
<br />
Then download both the PKGBUILD and the .install file to the same directory on your machine. Next, cd to that directory, and look for this line in the PKGBUILD file (it's near the bottom):<br />
<br />
--with-sound=alsa || return 1<br />
<br />
Change '''alsa''' to '''oss''' in that line and save the file. Then run:<br />
<br />
makepkg PKGBUILD<br />
<br />
This takes a few minutes, depending upon the speed of your system and your compiling options in /etc/makepkg.conf.<br />
<br />
After that, there will be a .pkg.tar.gz file in the current directory, and all you need to do to finish installing xfce4-mixer is:<br />
<br />
pacman -U xfce4-mixer-4.4.2-2-i686.pkg.tar.gz<br />
<br />
Your file version and architecture may be different from mine; 4.4.2-2 32-bit was the version I installed on my system.<br />
<br />
'''EDIT:''' I have just posted the modified version of xfce4-mixer as xfce4-mixer-oss4 on AUR, and you can simply install that as you would any ABS package and achieve the same results as above.<br />
<br />
--[[User:Kclive18|Kclive18]] 18:02, 23 September 2008 (EDT)<br />
<br />
==== For New Xfce4.6 ====<br />
New xfce4.6 use gstreamer as backend to control volume, so you have to make your gstreamer work. First of all, of course is install xfce4-mixer.<br />
<br />
pacman -S xfce4-mixer gstreamer0.10-base-plugins<br />
<br />
(Optional) Second, try to install gstreamer0.10-good-plugins, gstreamer0.10-bad-plugins<br />
<br />
pacman -S gstreamer0.10-good-plugins gstreamer0.10-bad-plugins<br />
<br />
login and logout, or just remove the mixer plugin and add it again. If it doesn't work at all, then you have to compile gstreamer0.10-good-plugins yourself. and can <br />
<br />
Download the PKGBUILD and other files needed from ABS or [http://repos.archlinux.org/viewvc.cgi/gstreamer0.10-good-plugins/repos/extra-i686/ here], edit the PKGBUILD, add --enable-oss. <br />
<br />
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var '''--enable-oss'''\<br />
--disable-static --enable-experimental \<br />
--enable-ladspa \<br />
--with-package-name="GStreamer Good Plugins (Arch Linux)" \<br />
--with-package-origin="http://www.archlinux.org/" || return 1<br />
<br />
and then run makepkg -i. <br />
<br />
makepkg -i<br />
<br />
Still not working? Try tis package in AUR [http://aur.archlinux.org/packages.php?ID=17024 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 />
=== How to make screenshots (print-screen key) ===<br />
<br />
Simple way is use command-line screenshot utility with Xfce<br />
<br />
# pacman -S scrot<br />
<br />
Then<br />
<br />
Xfce-menu --> Settings --> Keybord >>> Application Shortcuts<br />
<br />
Add new setting for command "scrot" use key "PrintScreen".<br />
<br />
All screenshorts will be placed in your home folder with unique name like<br />
<br />
this "2009-02-19-063052_1280x1024_scrot.png"!<br />
<br />
<br />
====Screenshooter====<br />
<br />
There is also an a plugin for the panel able to do this with available in extra:<br />
<br />
# pacman -S xfce4-screenshooter<br />
<br />
=== Change volume with keyboard volume buttons ===<br />
<br />
Go to Settings > Keyboard. Click the "Application Shortcuts" tab and add click the "Add" button. Add the following:<br />
<br />
==== ALSA ====<br />
<br />
amixer set Master 5+<br />
for the volume up button<br />
amixer set Master 5-<br />
for the volume down button<br />
amixer set Master toggle<br />
for the mute/unmute button.<br />
<br />
==== OSS ====<br />
Use one of these scripts:<br />
[http://www.opensound.com/wiki/index.php/Tips_And_Tricks#Using_multimedia_keys_with_OSS<br />
]<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 />
=== Change mount options ===<br />
<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 changing the default iocharset to utf8, which is easily done adding a line to '''/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 />
<br />
Note that when using utf-8, the system will distinct between upper- and lowercases, potentially corrupting your files. Be careful.<br />
<br />
== Troubleshooting ==<br />
=== Keyboard shortcuts aren't working ===<br />
This is usually the case when the settings helper is not working. To start it execute:<br />
xfce4-settings-helper<br />
Now it should be working fine.<br />
<br />
== Related Articles ==<br />
* [[Build order for XFCE]]<br />
* [[Howto make GTK apps look nice| HOWTO: Make GTK1 apps look nice]]<br />
* [[Startup_files#XFCE|HOWTO: Autostart programs on XFCE]]<br />
<br />
== External Resources ==<br />
* [http://www.us.xfce.org/documentation/ 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]<br />
* [https://xubuntu.wordpress.com/2006/08/04/howto-remove-menu-entries-from-the-system-menu/ Howto: Remove menu entries from the System menu]<br />
* [http://www.linuxquestions.org/questions/linux-general-1/how-to-use-xfce-themes-658354/ XFCE themes at linuxquestions.org]</div>Roguededguyhttps://wiki.archlinux.org/index.php?title=Smart_Common_Input_Method&diff=93756Smart Common Input Method2010-01-27T03:14:29Z<p>Roguededguy: /* Installing SCIM */</p>
<hr />
<div>[[Category:Internationalization (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Scim}}<br />
{{i18n_entry|简体中文|SCIM 输入法 (简体中文)}}<br />
{{i18n_entry|正體中文|SCIM中文輸入法}}<br />
{{i18n_links_end}}<br />
<br />
= About SCIM =<br />
Su Zhe (or James Su)-who at that time worked for TurboLinux- started this project about 2001 with the goal:<br />
* Act as an unified frontend for current available input method libraries. Currently bindings to uim and m17n library are available.<br />
* Act as a language engine of IIIMF input method framework (TBD).<br />
* Provide as many native IMEngines as possible.<br />
* Support as many input method protocol/interface as possible.<br />
* Support as many operating systems as possible.<br />
<br />
SCIM has the following features:<br />
* Fully Object Oriented structure written in C++.<br />
* Highly modularized.<br />
* Very flexible architecture, can be used as a dynamically loaded library as well as a C/S input method environment.<br />
* Simple programming interface.<br />
* Fully i18n support with UCS-4/UTF-8 encoding.<br />
* Include many handy utility functions to speedup the development.<br />
* GUI Panel with very rich features.<br />
* Unified configuration framework.<br />
<br />
= Installing SCIM =<br />
# pacman -S scim<br />
== Installing Input Method Engines ==<br />
Currently the SCIM project has a wide range of input methods (some may need other libraries), covering more than 30 languages, including (Simplified/Traditional) Chinese, Japanese, Korean and many European languages.<br />
These are some of the examples (more can be found [http://www.scim-im.org/projects/imengines here]):<br />
<br />
Chinese Smart PinYin:<br />
# pacman -S scim-pinyin<br />
Chinese WuBi or other tables based:<br />
# pacman -S scim-tables<br />
Japanese:<br />
# pacman -S scim-anthy<br />
Korean:<br />
# pacman -S scim-hangul<br />
<br />
= Configure SCIM =<br />
<br />
In order to work correctly, SCIM configuration needs three steps:<br />
<br />
1. exporting environment variables<br />
<br />
2. modify locale-related files<br />
<br />
3. start the application<br />
<br />
=== Best case example ===<br />
<br />
If you use a good DE/WM and do need SCIM to work urgently, put these lines into /etc/profile or ~/.xprofile ,then reboot:<br />
<br />
export XMODIFIERS=@im=SCIM<br />
export GTK_IM_MODULE="scim"<br />
export QT_IM_MODULE="scim"<br />
scim -d<br />
<br />
This is also the base example. The Correct Way of Doing Things is presented below, together with some common variants.<br />
<br />
== Environment variables ==<br />
<br />
Following environment variables have to be exported ''before'' executing scim:<br />
<br />
export XMODIFIERS=@im=SCIM<br />
export GTK_IM_MODULE="scim"<br />
export QT_IM_MODULE="scim"<br />
<br />
It is usual to put these lines into some script file, e.g. ~/.xinitrc or /etc/profile (for global settings), or also ~/.config/openbox/autostart.sh (if you use Openbox as WM). If you put them into ~/.xinitrc, they have to be put ''before'' executing your DE/WM.<br />
<br />
'''If you do not know which solution is the right one for you, just use /etc/profile.'''<br />
<br />
Note: the first environment variable conflicts with some (unusual) options like XMODIFIERS=urxvt.<br />
<br />
=== Note for amsn users ===<br />
You must also export the following variable to be able to use scim input with amsn.<br />
export XIM_MODULE="scim -d"<br />
<br />
=== Note for GNOME, XFCE, LXDE ===<br />
<br />
If ''export QT_IM_MODULE="scim"'' didn't work for you, you can use 'scim-bridge'' from AUR. This configuration is working in Gnome, XFCE, LXDE with last updates on 2009.02.15 (scim 1.4.7-1, scim-bridge 0.4.15-1 from AUR). Like this:<br />
<br />
export QT_IM_MODULE="scim-bridge"<br />
<br />
=== Note for KDE3 ===<br />
<br />
For '''KDE''' you should either change QT IMM to '''xim''', or have ''scim-qtimm-cvs'' installed from AUR. Like this:<br />
<br />
export QT_IM_MODULE="xim"<br />
<br />
== Locale-related files ==<br />
<br />
If your keyboard locale is en_US.UTF-8 (or en_US.utf8), just skip this second step.<br />
<br />
If your keyboard locale is ''not'' en_US.UTF-8 (nor en_US.utf8), you have to modify the first line of ~/.scim/global (or /etc/scim/global to have an user-indipendent effect) according to the following example:<br />
<br />
/SupportedUnicodeLocales = en_US.UTF-8,de_CH.UTF-8<br />
<br />
Obviously, you have to put your locale instead of de_CH.UTF-8.<br />
<br />
Note: your locale has to be active (i.e. you have to uncomment it in /etc/locale-gen and then execute locale-gen as root) ''and'' has to be supported by SCIM (most *.UTF-8 locales are).<br />
<br />
If you do not know which locales you have active at the moment, you can check it:<br />
<br />
locale -a<br />
<br />
(alternatively you can look at /etc/locale.gen).<br />
<br />
=== Further troubleshooting with locales ===<br />
<br />
If after you have install scim and the necessary input tables, and scim still doesn't work (click on the system tray, and nothing pops up), then you need to set the '''LC_CTYPE''' environmental variable in '''/etc/profile''' to the locale you plan to use. Simply create an entry for LC_CTYPE in /etc/profile, if there isn't one. <br />
<br />
eg. LC_CTYPE="zh_CN.UTF-8" //if you want to type simplified chinese<br />
<br />
Finally you need to generate the locale using the locale-gen command. Modify the /etc/locale.gen file to uncomment the language and encoding set you wish to use scim with. Then run the following command to generate the locale for your system.<br />
<br />
locale-gen<br />
<br />
<br />
== Executing SCIM ==<br />
<br />
To execute SCIM, you ''usually'' can just execute (but see below):<br />
<br />
scim<br />
<br />
It is common to start SCIM as a daemon, so that you can use your computer/terminal while SCIM is working. '''That is, the normal case is to execute''':<br />
<br />
scim -d<br />
<br />
As above, it is a common practice to put this command into some script file instead of executing it explicitely. As above, usual places are ~/.xinitrc (after environment variables and before DE/WM), /etc/profile (after environment variables) or ~/.config/openbox/autostart.sh (after environment variables and possibly after some sleep command).<br />
<br />
=== Note for GNOME ===<br />
<br />
In case you use GNOME as DE, the command above seems not to work as expected. Instead, you have to execute the following:<br />
<br />
scim -f x11 -c simple -d<br />
<br />
If you want SCIM to start automatically at startup, go to System > Preferences > Session and create a new command with the line above.<br />
<br />
Note: If you use the line scim -f socket -c socket -d instead, the configuration of your SCIM will be unmodifiable.<br />
<br />
=== Note for KDE ===<br />
<br />
In case you use KDE as a DE, the command above seems not to work as expected. Instead, you have to execute the following:<br />
<br />
scim -f socket -c socket -d<br />
<br />
You can also apply following ''optional'' steps:<br />
<br />
1. Install '''skim''' from the [http://aur.archlinux.org/packages.php?ID=22652 AUR].<br />
<br />
2. Start '''SKIM''', right click on the system tray icon and click 'Configure'<br />
<br />
3. Under '''Frontend > X Window''', tick the checkbox for "Start skim automatically when KDE starts"<br />
<br />
4. Logout and restart X server (ctrl+alt+del), then login again<br />
<br />
In any application, press ''ctrl+space'' to activate the input window.<br />
<br />
[http://www.archlinux.org/news/166/ See the official news page for more details].<br />
<br />
[http://www.h4.dion.ne.jp/~apricots/scim-anthy/howto.html Complex SCIM Mandriva howto type Japaneese]</div>Roguededguyhttps://wiki.archlinux.org/index.php?title=CUPS&diff=93754CUPS2010-01-27T02:42:46Z<p>Roguededguy: /* Between GNU/Linux systems */</p>
<hr />
<div>[[Category:Printers (English)]][[Category:HOWTOs (English)]]<br />
{{Article summary start|Summary}}<br />
{{Article summary text|Installing and configuring CUPS}}<br />
{{Article summary heading|Language}}<br />
{{i18n_entry|English|CUPS}}<br />
{{i18n_entry|Рolski|CUPS (Polski)}}<br />
{{i18n_entry|Русский|CUPS (Русский)}}<br />
{{i18n_entry|Türkçe|CUPS (Türkçe)}}<br />
{{i18n_entry|正體中文|CUPS (正體中文)}}<br />
<!--<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|}}<br />
--><br />
{{Article summary end}}<br />
From [http://www.cups.org/index.php CUPS' site]:<br />
:"''CUPS is the standards-based, open source printing system developed by Apple Inc. for Mac OS® X and other UNIX®-like operating systems.''"<br />
Although there are other printing packages such as LPRNG, the ''C''ommon ''U''nix ''P''rinting ''S''ystem is the most popular choice because of its relative ease of use.<br />
<br />
==Installing==<br />
These packages are needed:<br />
# pacman -S cups ghostscript gsfonts<br />
<br />
*;cups<br />
:The actual CUPS software<br />
*;ghostscript<br />
:Interpreter for the Postscript language<br />
*;gsfonts<br />
:GhostScript standard Type1 fonts<br />
*;hal-cups-utils<br />
:This package might be needed. Read [http://bbs.archlinux.org/viewtopic.php?pid=655391#p655391 this forum post] for more information<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 Samba:<br />
# pacman -S samba<br />
<br />
===Printer driver===<br />
Here are some of the driver packages. Choosing the right driver depends on the printer:<br />
*;gutenprint<br />
:A collection of high quality drivers for Canon, Epson, Lexmark, Sony, Olympus, and PCL printers for use with GhostSscript, CUPS, Foomatic, and the [[GIMP]]<br />
<br />
*;foomatic-db, foomatic-db-engine, foomatic-db-nonfree, and foomatic-filters<br />
: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 />
<br />
*;hplip<br />
:HP GNU/Linux inkjet driver. Provides support for DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet printer models<br />
<br />
*;splix<br />
:Samsung drivers for SPL (Samsung Printer Language) printers<br />
<br />
*;ufr2<br />
:Canon UFR2 driver with support for LBP, iR and MF series printers. Package is available in the [[AUR]].<br />
<br />
*;cups-pdf<br />
:A package that allows one to setup a virtual PDF Printer that generates a PDF out of jobs sent to it<br />
<br />
If unsure of what driver package to install or if the current driver is not working, it may be easiest to just install all of drivers, since some of the packages are misleading because printers of other makes may rely on them. For instance, the Brother HL-2140 needs the hplip driver installed.<br />
# pacman -S gutenprint foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-filters hplip splix ufr2 cups-pdf<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.linuxprinting.org/printer_list.cgi 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 {{Filename|/usr/share/cups/model/}}}}<br />
<br />
==Configuring==<br />
Now that CUPS is installed, there are a variety of options on how to setup printing solutions. As always, the tried and true command line method is at disposal. Likewise, various desktop environments such as GNOME and KDE have useful programs that can help manage printers. However, in order to make this process easy for the largest amount of users, this article will focus on the web interface provided by CUPS.<br />
<br />
Please note that if planning on connecting to a network printer, rather than one that is directly connected to the computer, read the [[#Printer sharing]] section 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 />
===Kernel modules===<br />
Before using the CUPS web interface, the appropriate kernel modules need to be installed. The following steps are from the Gentoo Printing Guide.<br />
<br />
This section may not be necessary, however, depending on which kernel is being used. The kernel module may load automatically after plugging in the printer. Use the {{Codeline|tail}} command (described below) to see if the printer has already been detected. The {{Codeline|lsmod}} utility can also be used to see what modules have been loaded.<br />
<br />
====USB printers====<br />
USB printer users may need to blacklist the {{codeline|usblp}} module. Keep in mind that there seems to be a lot of [http://bbs.archlinux.org/viewtopic.php?pid=660601 uncertainty] regarding blacklisting usblp, as some USB printers, including some Canon printer series, are not recognized without it. To disable the module, edit {{filename|rc.conf}} as shown:<br />
MODULES=(... '''!usblp''' ...)<br />
<br />
Custom kernel users may need to manually load the {{codeline|usbcore}} module before proceeding:<br />
# modprobe usbcore<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 />
The output should indicate that the printer has been detected:<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 />
====Parallel port printers====<br />
If planning on using a parallel port printer, note that the configuration is pretty much the same, except for the modules:<br />
# modprobe lp<br />
# modprobe parport<br />
# modprobe parport_pc<br />
<br />
Once again, 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 />
====Auto-loading====<br />
It's convenient to have the system automatically load the kernel module every time the it starts up. To do so, use a text editor to open up {{Filename|/etc/[[rc.conf]]}} and add the appropriate module to the <code>MODULES=()</code> line. Here is an example:<br />
MODULES=(!usbserial scsi_mod sd_mod snd-ymfpci snd-pcm-oss '''lp parport parport_pc''' ide-scsi)<br />
<br />
===CUPS daemon===<br />
With the kernel modules installed, the system is now ready to start the actual CUPS daemon. To do this, simply run this command:<br />
# /etc/rc.d/cups start<br />
<br />
For automatically starting CUPS every time the system is powered on, add it to the <code>DAEMONS=()</code> line in the {{Filename|/etc/rc.conf}} file. For example:<br />
DAEMONS=(pcmcia syslogd klogd !fam esd mono network autofs '''cups''' crond gdm)<br />
<br />
===Web interface and tool-kit===<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 {{Filename|/etc/hosts}}).<br />
<br />
{{Tip|[[GNOME]] users may be inclined towards installing the GNOME CUPS manager GUI frontend. See: [[#Alternative CUPS interfaces]]}}<br />
<br />
From here, follow the various wizards to add the printer. A usual procedure is to start by clicking on ''Manage Printers'', and then ''Add Printer''. When prompted for a user-name 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, chose the appropriate drivers and the configuration is complete.<br />
<br />
Now, test the configuration by pressing the 'Print Test Page' button. 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 />
====CUPS administration====<br />
A user-name and password will be required when administrating the printer in the web interface, such as: adding or removing printers, stopping print tasks, etc. The default user-name is the one assigned in the ''sys'' group, or root (change this by editing {{Filename|/etc/cups/cupsd.conf}} in the line of ''SystemGroup''). <br />
<br />
If the root account has been locked, it is not possible to log in the CUPS administration interface with the default user-name and password. In this case, it may be needed to change the default SystemGroup in cupsd.conf and read [http://bbs.archlinux.org/viewtopic.php?id=35567 this post].<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 {{Filename|/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 />
There are three levels of access that 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 {{codeline|Allow}} statement to that level's section. An {{codeline|Allow}} statement can take one or more of the forms listed below:<br />
Allow all<br />
Allow host.domain.com<br />
Allow *.domain.com<br />
Allow ip-address<br />
Allow 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 {{Filename|/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 />
==Printer sharing==<br />
<br />
===Between GNU/Linux systems===<br />
Once CUPS has been setup on the GNU/Linux print server, sharing the printer with another GNU/Linux system is relatively easy, but there is a hard way.<br />
<br />
'''The Easy Way'''<br />
<br />
Point your browser at http://localhost:631 and you will see the cups administration home page. <br />
<br />
Click on the Administration tab near the top and select the add printer option and it should automatically detect the printer you have connected. If not, try turning the printer power off then back on and try again. <br />
<br />
Once you have your printer set up, look under the Server heading and click the checkbox for "Show printers connected to this system". Now click change settings and the server will automatically restart, and you are done. <br />
<br />
You can also select "Edit Configuration File" to make direct edits to the cups.conf file, this is useful for only allowing certain users and IPs access to the server. See the Hard way below for an example.<br />
<br />
'''The Hard Way'''<br />
<br />
On the server computer (the one directly connected to the printer) simply open up {{Filename|/etc/cups/cupsd.conf}} and allow access to the server by modifying the location lines. For instance:<br />
<Location /><br />
Order allow,deny<br />
Allow localhost<br />
Allow 192.168.0.*<br />
</Location><br />
<br />
Also make sure the server is listening on the IP address the client will be addressing. Add the following line after "# Listen <serverip>:631" (using the server's IP address instead of client's 192.168.0.100):<br />
Listen 192.168.0.101:631<br />
<br />
To "Show shared printers on the local network", add the line "BrowseAllow all":<br />
Browsing On<br />
BrowseOrder allow,deny<br />
BrowseAllow @LOCAL<br />
BrowseAllow all<br />
<br />
After making modifications, restart CUPS by:<br />
# /etc/rc.d/cups restart<br />
<br />
On the client system, open up (create if not present) {{Filename|/etc/cups/client.conf}} and add the ServerName to match the IP address or the name of the server. Add this line:<br />
ServerName 192.168.0.101<br />
<br />
To "Show shared printers on the local network", add the line "BrowseAllow all":<br />
Browsing On<br />
BrowseOrder allow,deny<br />
BrowseAllow @LOCAL<br />
BrowseAllow all<br />
<br />
There are more configuration possibilities, including automatic methods, which are described in detail in http://localhost:631/help/network.html <!-- Someone with CUPS installed could rename the link to the page title --><br />
<br />
After making modifications, restart CUPS.<br />
<br />
{{Note|When adding the printer from the client, if using the Internet Printing Protocol (IPP), put the URI as ipp://192.168.0.101:631/printers/<name-of-printer>}}<br />
<br />
===Between GNU/Linux and Windows===<br />
<br />
====GNU/Linux client====<br />
If connected to a Windows print server (or any other Samba capable print server), skip the section about kernel modules and such. All that needs to be done is to start the CUPS daemon and complete the web interface as specified previously. Before this, activate the Samba CUPS back-end. Do this by entering the following command:<br />
# ln -s `which smbspool` /usr/lib/cups/backend/smb<br />
{{Note| The symbol is a backtick ( '''`''' ) ; not a regular apostrophe.}}<br />
<br />
After completing this task, restart CUPS issuing the command specified in the previous section. Next, simply log in on the CUPS web interface and choose to add a new printer. As a device choose "Windows Printer via SAMBA".<br />
<br />
For the device location, enter:<br />
smb://username:password@hostname/printer_name<br />
<br />
Or without a password:<br />
smb://username@hostname/printer_name<br />
<br />
Make sure that the user actually has access to the printer on the Windows computer and select the appropriate drivers. If the computer is located on a domain, make sure the user-name includes the domain: <br />
smb://username:password@domain/hostname/printer_name<br />
<br />
If the network contains many printers, use {{Codeline|lpoptions -d desired_default_printer_name}} to set the preferred printer.<br />
<br />
====Windows client====<br />
Sometimes one might want to allow a Windows computer to connect to a GNU/Linux server. There are a few ways to do this, including Samba. In order to do this, edit {{Filename|/etc/samba/smb.conf}} file to allow access to printers. File {{Filename|smb.conf}} can look something like this:<br />
<pre><br />
[global]<br />
workgroup=Heroes<br />
server string=Arch Linux Print Server<br />
security=user<br />
<br />
[printers]<br />
comment=All Printers<br />
path=/var/spool/samba<br />
browseable=yes<br />
# to allow user 'guest account' to print.<br />
guest ok=no<br />
writable=no<br />
printable=yes<br />
create mode=0700<br />
write list=@adm root neocephas<br />
</pre><br />
<br />
That should be enough to share the printer, yet adding an individual printer entry may be desirable:<br />
<pre><br />
[ML1250]<br />
comment=Samsung ML-1250 Laser Printer<br />
printer=ml1250<br />
path=/var/spool/samba<br />
printing=cups<br />
printable=yes<br />
printer admin=@admin root neocephas<br />
user client driver=yes<br />
# to allow user 'guest account' to print.<br />
guest ok=no<br />
writable=no<br />
write list=@adm root neocephas<br />
valid users=@adm root neocephas<br />
</pre><br />
<br />
Please note that this assumes configuration was made so that users must have a valid account to access the printer. To have a public printer, set ''guest ok'' to ''yes'', and remove the ''valid users'' line. To add accounts, set up a regular GNU/Linux account and then set up a Samba password on the server. For instance:<br />
<pre><br />
# useradd neocephas<br />
# smbpasswd -a neocephas<br />
</pre><br />
<br />
After setting up all the needed user accounts, the samba spool directory also needs configuration:<br />
<pre><br />
# mkdir /var/spool/samba<br />
# chmod 777 /var/spool/samba<br />
</pre><br />
<br />
The next items that need changing are {{Filename|/etc/cups/mime.convs}} and {{Filename|/etc/cups/mime.types}}:<br />
<br />
{{Filename|mime.convs}}:<br />
<pre><br />
# The following line is found at near the end of the file. Uncomment it.<br />
application/octet-stream application/vnd.cups-raw 0 -<br />
</pre><br />
<br />
{{Filename|mime.types}}:<br />
<pre><br />
# Again near the end of the file.<br />
application/octet-stream<br />
</pre><br />
<br />
The changes to {{Filename|mime.convs}} and {{Filename|mime.types}} are needed to make CUPS print Microsoft Office document files. Many users seem to need that.<br />
<br />
After this, restart Samba daemon:<br />
# /etc/rc.d/samba restart<br />
<br />
Obviously, there are a lot of tweaks and customizations that can be done with setting up a Samba print server, so it is advised to look at the Samba and CUPS documentation for more help. The {{Filename|smb.conf.example}} file also has some good samples that might warrant imitating.<br />
<br />
=====Windows 2000 and Windows XP=====<br />
<!-- Requesting page titles for the CUPS interface links in this section and the next. --><br />
For the most modern flavors of Windows, an alternative way of connecting to the GNU/Linux printer server is to use the CUPS protocol directly. The Windows client will need to be using Windows 2000 or Windows XP. Make sure the clients are allowed to access the print server by editing the location settings as specified in section 4.1.<br />
<br />
On the Windows computer, go to the printer control panel and choose to 'Add a New Printer'. Next, choose to give a URL. For the URL, type in the location of the printer: http://host_ip_address:631/printers/printer_name (where host_ip_address is the GNU/Linux server's IP address and printer_name is the name of the printer being connected to).<br />
<br />
After this, install the printer drivers for the Windows computer. If the CUPS server is setup to use its own printer drivers, then just select a generic postscript printer for the Windows client. Then test the print setup by printing a test page.<br />
<br />
===Other operating systems===<br />
More information on interfacing CUPS with other printing systems can be found in the CUPS manual, e.g. on http://localhost:631/sam.html#PRINTING_OTHER<br />
<br />
==Troubleshooting==<br />
The best way to get printing working is to set 'LogLevel' in {{Filename|/etc/cups/cupsd.conf}} to:<br />
LogLevel debug<br />
<br />
And then viewing the output from {{Filename|/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 />
*{{Filename|/var/log/cups/page_log}} - Echoes a new entry each time a print is successful<br />
*{{Filename|/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 {{Filename|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" my result from trying to manage CUPS via localhost:631, for example.<br />
<br />
To use the new configuration, copy /etc/cups/cupsd.conf.default to /etc/cups/cupsd.conf (backup the old the configuration if needed):<br />
# cp /etc/cups/cupsd.conf.default /etc/cups/cupsd.conf<br />
and restart CUPS to employ the new settings.<br />
<br />
====Error with gnutls====<br />
If receiving errors such as:<br />
/usr/sbin/cupsd: error while loading shared libraries: libgnutls.so.13: cannot open shared object file: No such file or directory<br />
gnutls may be in need of updating:<br />
# pacman -S gnutls<br />
<br />
After updating, there may be a file named {{Filename|cupsd.conf.pacnew}} in {{Filename|/etc/cups}}. This is the unmodified original configuration file that has been placed as part of the update. Compare it with the currently installed version and adjust to preference.<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 />
====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 />
===USB printers under CUPS 1.4.x===<br />
New CUPS 1.4.x introduces many changes:<br />
<br />
====Configuration file====<br />
The syntax of the configuration file cupsd.conf changed. Start with a new cupsd.conf file based on /etc/cups/cupsd.conf.default.<br />
<br />
====Blacklisting usblp====<br />
CUPS now uses libusb and printer USB devices (under /dev/bus/usb/) instead of the usblp generated /dev/usb/lpX ones. In order to get USB printers working, the usblp module needs disabling. This can be done by blacklisting it in /etc/rc.conf, or by adding "blacklist usblp" to a configuration file in /etc/modprobe.d. Some users have also reported that they needed to reinstall their printer.<br />
<br />
====Device node permissions====<br />
In addition to usblp not being loaded, CUPS also needs the ownership of the USB device file of the printer to be root:lp, and permissions to be 660. E.g.<br />
$ ls -l /dev/bus/usb/003/002<br />
crw-rw---- 1 root lp 189, 257 20. Okt 10:32 /dev/bus/usb/003/002<br />
<br />
This is supposed to be achieved by two udev rules in /lib/udev/rules.d/50-udev-default.rules:<br />
# hplip and cups 1.4+ use raw USB devices, so permissions should be similar to<br />
# the ones from the old usblp kernel module<br />
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="", IMPORT{program}="usb_id --export %p"<br />
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}==":0701*:", GROUP="lp", MODE="660"<br />
<br />
However, for some devices, in particular combined printer/scanner devices, these rules either do not trigger, or are overwritten by rules of the 'sane' package. In these cases a custom udev rule needs to be added. See below.<br />
<br />
=====Device node permission troubleshooting=====<br />
Get the printer's device file and its permissions with: <br />
$ lsusb<br />
...<br />
Bus 003 Device 002: ID 04b8:0841 Seiko Epson Corp.<br />
$ ls -l /dev/bus/usb/003/002<br />
crw-rw---- 1 root lp 189, 257 20. Okt 10:32 /dev/bus/usb/003/002<br />
<br />
If the permissions are not already root:lp 660, enforce it by creating a custom udev rule, e.g<br />
cat /etc/udev/rules.d/10-usbprinter.rules<br />
ATTR{idVendor}=="04b8", ATTR{idProduct}=="0841", MODE:="0660", GROUP:="lp"<br />
<br />
Note that idVendor and idProduct are from the lsusb listing above.<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, e.g. check DAEMONS in {{Filename|/etc/rc.conf}} or run {{Codeline|ls /var/run/daemons}}.<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, "{{Codeline|Unable to communicate with device"}}", then it may be needed to add the user to the lp group by running the following command:<br />
# gpasswd -a <username> lp<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 {{Filename|/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 '''hplip''' has been installed, in addition to [[#Packages|the packages mentioned above]], '''net-snmp''' is also needed. See [http://bbs.archlinux.org/viewtopic.php?id=65615 this forum post].<br />
# pacman -S hplip<br />
<br />
====Printing fails with unauthorised error====<br />
If the user has been added to the lp group, and allowed to print (set in {{Filename|cups.conf}}), then the problem lies in {{Filename|/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: [http://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 {{filename|/etc/cups/cupsd.conf}} and add<br />
# HostNameLookups Double<br />
<br />
Restart CUPS:<br />
# /etc/rc.d/cups restart<br />
<br />
====CUPS fails to print with 'Unable to open device "hal:///[...]": Permission denied'====<br />
The permissions on some files are wrong:<br />
# cd /usr/lib/cups/backend<br />
# chmod 700 hal # (previously 755)<br />
# chmod 700 usb # (previously 755)<br />
<br />
====Unknown supported format: application/postscript====<br />
Comment the lines:<br />
application/octet-stream application/vnd.cups-raw 0 -<br />
from {{Filename|/etc/cups/mime.convs}}, and:<br />
application/octet-stream<br />
in {{Filename|/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 />
<pre> 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</pre><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 />
<br />
===Printer-specific===<br />
''Printer-specific problems and their solutions''<br />
<br />
<br />
<br />
====Brother DCP 7020====<br />
See: [[Brother DCP-7020]]<br />
<br />
====Canon MF 4150====<br />
This is required as some Canon printers apparently do not declare their specification correctly for kernel and libusb to recognize them<br />
<br />
* Do NOT blacklist usblp module.<br />
<br />
* Install hal-cups-utils and restart hal<br />
# sudo pacman -S hal-cups-utils<br />
# sudo /etc/rc.d/hal restart<br />
<br />
* Connect the printer<br />
<br />
The printer should now be recognzed by the CUPS Add printer dialog. Try restarting CUPS if you are still having trouble.<br />
<br />
* Install UFRII driver ({{Package AUR|ufr2}} from the [[AUR]] and complete the printer installation.<br />
<br />
====Epson AcuLaser CX11(NF)====<br />
Install [http://aur.archlinux.org/packages.php?ID=30424 Epson-ALCX11-filter] from the AUR. Restart CUPS and add the printer using the driver "EPSON AL-CX11, ESC/PageS Filter".<br />
<br />
Both connections, USB and network, should work as expected.<br />
<br />
====FX C1110 (not model B)====<br />
Keep in mind that these directions assume that the printer is connected and listening on the network.<br />
<br />
*Install cpio and rpmunpack to later unpack the package:<br />
# pacman -S cpio rpmunpack cups ghostscript gsfonts<br />
<br />
*Get the FX GNU/Linux driver [http://www.fujixeroxprinters.com/downloads/uploaded/Drivers/DocuPrint%20C1110%20C1110B/linux/fxlinuxprint-1.0.1-1.i386.zip here].<br />
<br />
*Unzip {{Filename|fxlinuxprint-1.0.1-1.i386.zip}} to /var/tmp (the directory is not important):<br />
$ unzip fxlinuxprint-1.0.1-1.i386.zip -d /var/tmp<br />
<br />
*Continue extracting the file:<br />
$ cd /var/tmp<br />
$ rpmunpack fxlinuxprint-1.0.1-1.i386.rpm<br />
$ gunzip fxlinuxprint-1.0.1-1.cpio.gz<br />
<br />
*Move the cpio DST file (for convenience):<br />
$ mkdir /var/tmp/DST<br />
$ mv fxlinuxprint-1.0.1-1.cpio /var/tmp/DST<br />
<br />
*Extract it:<br />
$ cd /var/tmp/DST<br />
$ cpio -id < fxlinuxprint-1.0.1-1.cpio<br />
<br />
*Filter the relevant files:<br />
$ cd /var/tmp<br />
$ find /var/tmp/DST -type f |cat -n<br />
1 /var/tmp/DST/etc/cups/mimefx.convs<br />
2 /var/tmp/DST/etc/cups/mimefx.types<br />
3 /var/tmp/DST/usr/lib/cups/filter/pdftopjlfx<br />
4 /var/tmp/DST/usr/lib/cups/filter/pstopdffx<br />
5 /var/tmp/DST/usr/lib/cups/filter/pdftopdffx<br />
6 /var/tmp/DST/usr/share/cups/model/FujiXerox/en/fxlinuxprint.ppd<br />
<br />
*Copy the files found in the previous step to /<br />
{{Note|For the PPD use {{Filename|/usr/share/cups/model/fxlinuxprint.ppd}}}}<br />
<br />
*Access http://localhost:631/ and add the lpd://f.q.d.n/queue printer, aunthenticating as root.<br />
<br />
*Go through "Manage Printer" and "Set Printer Options".<br />
<br />
*Print a test page (substitue color103 with the assigned printer name):<br />
$ lpq -P color103<br />
color103 is ready<br />
no entries<br />
<br />
====Printing does not work with the HP Deskjet 700 Series====<br />
The solution is to install '''pnm2ppa''' printer filter for the HP Deskjet 700 series. Without this, the print jobs will be aborted by the system. A [[Arch Build System|PKGBUILD]] for pnm2ppa can be found in [http://aur.archlinux.org/packages.php?do_Details=1&ID=696&O=0&L=0&C=0&K=pnm&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0 AUR].<br />
<br />
====Getting HP LaserJet 1010 to work====<br />
A solution may be to compile a newer version of GhostScript:<br />
<pre><br />
$ pacman -Qs cups a2ps psutils foo ghost<br />
local/cups 1.1.23-3<br />
The CUPS Printing System<br />
local/a2ps 4.13b-3<br />
a2ps is an Any to PostScript filter<br />
local/psutils p17-3<br />
A set of postscript utilities.<br />
local/foomatic-db 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/foomatic-db-engine 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/foomatic-db-ppd 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/foomatic-filters 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/espgs 8.15.1-1<br />
ESP Ghostscript<br />
</pre><br />
<br />
Setting <code>LogLevel</code> may also need to be set in {{Filename|/etc/cups/cupsd.conf}} to <code>debug2</code>, this way the logs will show how to circumvent minor issues, such as missing fonts. Search Google for [http://www.google.com/search?q=n019003l+filetype%3Apfb n019003l filetype:pfb]<br />
<br />
The debug solution might work if getting errors similar to 'Unsupport PCL', etc. See: [http://linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_1010 OpenPrinting database - Printer: HP LaserJet 1010]<br />
<br />
====HP LaserJet 1020====<br />
<br />
=====Installation from AUR=====<br />
Install the package foo2zjs from AUR and modify the {{Filename|PKGBUILD}}. Change the line:<br />
./getweb all<br />
to<br />
./getweb 1020<br />
<br />
If getting errors with incorrect md5sums, the md5sum of {{Filename|foo2zjs.tar.gz}} in the PKGBUILD should be changed to match the downloaded driver.<br />
<br />
As a last step, add and configure the printer in the CUPS manager. The printer should be recognized automatically, and function for both root and regular users.<br />
<br />
=====Manual installation=====<br />
{{Warning|This section involves installing packages without pacman. These directions should ideally be automated with a PKGBUILD in order to prevent issues.}}<br />
<br />
First of all, only CUPS and GhostScript needs to be installed. Then follow the links in [http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_1020 OpenPrinting database - Printer: HP LaserJet 1020] and [http://foo2zjs.rkkda.com/ foo2zjs: a linux printer driver for ZjStream protocol] to the printer driver page, and follow the install instructions. After login in as root, and downloading all the package and extracted the archives, change into the foo2zjs directory. Now, follow the regular installation instructions with a minor modification to change the 'userid' for printing:<br />
$ make<br />
$ ./getweb 1020<br />
<br />
Open the {{Filename|Makefile}}:<br />
$ nano Makefile<br />
and search for the line:<br />
# LPuid=-olp<br />
modify it to:<br />
# LPuid=-oroot<br />
then continue with the script:<br />
$ make install<br />
$ make install-hotplug<br />
$ make cups<br />
<br />
====Printer connected to an Airport Express Station====<br />
The first step is to scan the Airport Express station. It seems that there are different addresses depending on the model:<br />
<pre><br />
[root@somostation somos]# nmap 192.168.0.4<br />
<br />
Starting Nmap 4.20 ( http://insecure.org ) at 2007-06-26 00:50 CEST<br />
Interesting ports on 192.168.0.4:<br />
Not shown: 1694 closed ports<br />
PORT STATE SERVICE<br />
5000/tcp open UPnP<br />
9100/tcp open jetdirect<br />
10000/tcp open snet-sensor-mgmt<br />
MAC Address: 00:14:51:70:D5:66 (Apple Computer)<br />
<br />
Nmap finished: 1 IP address (1 host up) scanned in 25.815 seconds<br />
</pre><br />
<br />
The Airport station is accessed like an HP JetDirect printer. Afterwards, edit {{Filename|printer.conf}}:<br />
<pre><br />
# Printer configuration file for CUPS v1.2.11<br />
# Written by cupsd on 2007-06-26 00:44<br />
<Printer LaserSim><br />
Info SAMSUNG ML-1510 gdi<br />
Location SomoStation<br />
DeviceURI socket://192.168.0.4:9100<br />
State Idle<br />
StateTime 1182811465<br />
Accepting Yes<br />
Shared Yes<br />
JobSheets none none<br />
QuotaPeriod 0<br />
PageLimit 0<br />
KLimit 0<br />
OpPolicy default<br />
ErrorPolicy stop-printer<br />
</Printer><br />
</pre><br />
Problems may be resolved by removing foomatic and installing foomatic-db, foomatic-db-engine, foomatic-db-ppd instead.<br />
<br />
==Appendix==<br />
<br />
===Alternative CUPS interfaces===<br />
If using [[GNOME]], a possibility is to manage and configure the printer by using the gnome-cups-manager. This package is available through pacman: <br />
# pacman -S gnome-cups-manager<br />
<br />
Alternatively, system-config-printer-gnome can be installed:<br />
# pacman -S system-config-printer-gnome<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<br />
# groupadd lpadmin<br />
# usermod -aG lpadmin <username><br />
<br />
* 2. Add "lpadmin" (without the quotes) to this line in {{Filename|/etc/cups/cupsd.conf}}<br />
SystemGroup sys root <insert here><br />
<br />
* 3. Restart cups, log out and in again (or restart computer)<br />
# /etc/rc.d/cups restart<br />
<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 />
There is also gtklp:<br />
# pacman -S gtklp<br />
<br />
===Utility functions on Epson printers===<br />
<br />
====escputil====<br />
This section explains how to perform some of the utility functions (such as nozzle cleaning) on Epson printers, by using the escputil utility, part of the gutenprint package.<br />
<br />
There is a escputil's man-page provides basic information, but it does not touch on how to identify the printer. There are two parameters that can be used to do so:<br />
<br />
* One is <tt>--printer</tt>: it expects the name used to identify the printer when is was configured.<br />
<br />
* The other is <tt>--raw-device</tt>: this option expects a path beginning with "/dev". If the printer is the only serial printer on the system, "/dev/lp0" should be its device node. For USB printers, it is "/dev/usb/lp0". If having more than one printer, they will have names ending in "lp1", "lp2", etc.<br />
<br />
On to the maintenance options:<br />
* To clean the printer heads:<br />
$ escputil -u --clean-head<br />
<br />
* To print the nozzle-check pattern (allows verifying that the previous head cleaning worked, and determining the heads need cleaning):<br />
$ escputil -u --nozzle-check<br />
<br />
If wanting to perform an operation that requires two-way communication with a printer, use the "--raw-device" specification and the user must be root or be a member of the group "lp".<br />
<br />
* The following is an example of getting the printer's internal identification:<br />
$ sudo escputil --raw-device=/dev/usb/lp0 --identify<br />
<br />
* To print out the ink levels of the printer:<br />
$ sudo escputil --raw-device=/dev/usb/lp0 --ink-level<br />
<br />
====mtink====<br />
This is a printer status monitor which enables to get the remaining ink quantity, to print test patterns, to reset printer and to clean nozzle. It use an intuitive graphical user interface. Package can be downloaded from [http://aur.archlinux.org/packages.php?do_Details=1&ID=476&O=0&L=0&C=0&K=mtink&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR].<br />
<br />
====Stylus-toolbox====<br />
This is a GUI using escputil and cups drivers. It supports nearly all USB printer of Epson and displays ink quantity, can clean and align print heads and print test patterns. It can be downloaded from [http://aur.archlinux.org/packages.php?ID=30319 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. Obviously this package is not necessary, but it can be quite useful.<br />
<br />
Find generated PDF documents in a sub-directory located at <code>/var/spool/cups-pdf</code>. Normally, the subdirectory is named after the user who performed the job.<br />
<br />
This package can be installed by 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. For the Device, select '''CUPS-PDF (Virtual PDF Printer)'''; Make/Manufacturer, choose '''Generic'''; Model/Driver, select '''Generic postscript color printer'''. Alternatively, provide the PPD file from [http://www.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/cups-pdf-CURRENT/extra/CUPS-PDF.ppd this link].<br />
<br />
====Print to postscript: CUPS-PDF virtual printer trick====<br />
Printing to PDF in most applications like OpenOffice is no problem; just hit the button. Yet when printing out to postscript, matters take a little more work. For applications like OpenOffice where printing to kprinter is nebulous at best, there has to be another way -- and there is. The CUPS-PDF (Virtual PDF Printer) actually creates a postscript file and then creates the PDF using the ps2pdf utility. To print to postscript, what needs to be done is capturing the intermediate postscript file created by CUPS-PDF. This is easily accomplished with by selecting the "print to file" option in the print dialog. (choose either .ps or .eps as the extension) After selecting the "print to file" checkbox simply enter the filename and click "print".<br />
<br />
=====Configuring CUPS-PDF virtual printer=====<br />
1. Install cups & cups-pdf from extra.<br />
<br />
2. Start cups with:<br />
# /etc/rc.d/cups <br />
<br />
{{Note|Add 'cups' to the deamons line in /etc/rc.conf to start automatically at boot.}}<br />
<br />
3. Access the cups print manager: http://localhost:631 and select:<br />
Administration -> Find New Printers<br />
Select CUPS-PDF (Virtual PDF), choose for the make and driver:<br />
Make: Generic<br />
Driver: Generic CUPS-PDF Printer<br />
<br />
Now 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 />
===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 />
==Resources==<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://home.nyc.rr.com/computertaijutsu/cups.html Tips and Suggestions on common CUPS problems], '''(Dead link)'''<br />
* [http://www.gentoo.org/doc/en/printing-howto.xml Gentoo's Printing Guide], ''[http://www.gentoo.org/doc/en Gentoo Documentation Resources]''<br />
* [http://bbs.archlinux.org/ Arch Linux User Forums]<br />
<br />
{{Wikipedia|Common Unix Printing System}}</div>Roguededguyhttps://wiki.archlinux.org/index.php?title=CUPS&diff=93752CUPS2010-01-27T02:40:53Z<p>Roguededguy: /* Between GNU/Linux systems */</p>
<hr />
<div>[[Category:Printers (English)]][[Category:HOWTOs (English)]]<br />
{{Article summary start|Summary}}<br />
{{Article summary text|Installing and configuring CUPS}}<br />
{{Article summary heading|Language}}<br />
{{i18n_entry|English|CUPS}}<br />
{{i18n_entry|Рolski|CUPS (Polski)}}<br />
{{i18n_entry|Русский|CUPS (Русский)}}<br />
{{i18n_entry|Türkçe|CUPS (Türkçe)}}<br />
{{i18n_entry|正體中文|CUPS (正體中文)}}<br />
<!--<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|}}<br />
--><br />
{{Article summary end}}<br />
From [http://www.cups.org/index.php CUPS' site]:<br />
:"''CUPS is the standards-based, open source printing system developed by Apple Inc. for Mac OS® X and other UNIX®-like operating systems.''"<br />
Although there are other printing packages such as LPRNG, the ''C''ommon ''U''nix ''P''rinting ''S''ystem is the most popular choice because of its relative ease of use.<br />
<br />
==Installing==<br />
These packages are needed:<br />
# pacman -S cups ghostscript gsfonts<br />
<br />
*;cups<br />
:The actual CUPS software<br />
*;ghostscript<br />
:Interpreter for the Postscript language<br />
*;gsfonts<br />
:GhostScript standard Type1 fonts<br />
*;hal-cups-utils<br />
:This package might be needed. Read [http://bbs.archlinux.org/viewtopic.php?pid=655391#p655391 this forum post] for more information<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 Samba:<br />
# pacman -S samba<br />
<br />
===Printer driver===<br />
Here are some of the driver packages. Choosing the right driver depends on the printer:<br />
*;gutenprint<br />
:A collection of high quality drivers for Canon, Epson, Lexmark, Sony, Olympus, and PCL printers for use with GhostSscript, CUPS, Foomatic, and the [[GIMP]]<br />
<br />
*;foomatic-db, foomatic-db-engine, foomatic-db-nonfree, and foomatic-filters<br />
: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 />
<br />
*;hplip<br />
:HP GNU/Linux inkjet driver. Provides support for DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet printer models<br />
<br />
*;splix<br />
:Samsung drivers for SPL (Samsung Printer Language) printers<br />
<br />
*;ufr2<br />
:Canon UFR2 driver with support for LBP, iR and MF series printers. Package is available in the [[AUR]].<br />
<br />
*;cups-pdf<br />
:A package that allows one to setup a virtual PDF Printer that generates a PDF out of jobs sent to it<br />
<br />
If unsure of what driver package to install or if the current driver is not working, it may be easiest to just install all of drivers, since some of the packages are misleading because printers of other makes may rely on them. For instance, the Brother HL-2140 needs the hplip driver installed.<br />
# pacman -S gutenprint foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-filters hplip splix ufr2 cups-pdf<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.linuxprinting.org/printer_list.cgi 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 {{Filename|/usr/share/cups/model/}}}}<br />
<br />
==Configuring==<br />
Now that CUPS is installed, there are a variety of options on how to setup printing solutions. As always, the tried and true command line method is at disposal. Likewise, various desktop environments such as GNOME and KDE have useful programs that can help manage printers. However, in order to make this process easy for the largest amount of users, this article will focus on the web interface provided by CUPS.<br />
<br />
Please note that if planning on connecting to a network printer, rather than one that is directly connected to the computer, read the [[#Printer sharing]] section 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 />
===Kernel modules===<br />
Before using the CUPS web interface, the appropriate kernel modules need to be installed. The following steps are from the Gentoo Printing Guide.<br />
<br />
This section may not be necessary, however, depending on which kernel is being used. The kernel module may load automatically after plugging in the printer. Use the {{Codeline|tail}} command (described below) to see if the printer has already been detected. The {{Codeline|lsmod}} utility can also be used to see what modules have been loaded.<br />
<br />
====USB printers====<br />
USB printer users may need to blacklist the {{codeline|usblp}} module. Keep in mind that there seems to be a lot of [http://bbs.archlinux.org/viewtopic.php?pid=660601 uncertainty] regarding blacklisting usblp, as some USB printers, including some Canon printer series, are not recognized without it. To disable the module, edit {{filename|rc.conf}} as shown:<br />
MODULES=(... '''!usblp''' ...)<br />
<br />
Custom kernel users may need to manually load the {{codeline|usbcore}} module before proceeding:<br />
# modprobe usbcore<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 />
The output should indicate that the printer has been detected:<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 />
====Parallel port printers====<br />
If planning on using a parallel port printer, note that the configuration is pretty much the same, except for the modules:<br />
# modprobe lp<br />
# modprobe parport<br />
# modprobe parport_pc<br />
<br />
Once again, 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 />
====Auto-loading====<br />
It's convenient to have the system automatically load the kernel module every time the it starts up. To do so, use a text editor to open up {{Filename|/etc/[[rc.conf]]}} and add the appropriate module to the <code>MODULES=()</code> line. Here is an example:<br />
MODULES=(!usbserial scsi_mod sd_mod snd-ymfpci snd-pcm-oss '''lp parport parport_pc''' ide-scsi)<br />
<br />
===CUPS daemon===<br />
With the kernel modules installed, the system is now ready to start the actual CUPS daemon. To do this, simply run this command:<br />
# /etc/rc.d/cups start<br />
<br />
For automatically starting CUPS every time the system is powered on, add it to the <code>DAEMONS=()</code> line in the {{Filename|/etc/rc.conf}} file. For example:<br />
DAEMONS=(pcmcia syslogd klogd !fam esd mono network autofs '''cups''' crond gdm)<br />
<br />
===Web interface and tool-kit===<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 {{Filename|/etc/hosts}}).<br />
<br />
{{Tip|[[GNOME]] users may be inclined towards installing the GNOME CUPS manager GUI frontend. See: [[#Alternative CUPS interfaces]]}}<br />
<br />
From here, follow the various wizards to add the printer. A usual procedure is to start by clicking on ''Manage Printers'', and then ''Add Printer''. When prompted for a user-name 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, chose the appropriate drivers and the configuration is complete.<br />
<br />
Now, test the configuration by pressing the 'Print Test Page' button. 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 />
====CUPS administration====<br />
A user-name and password will be required when administrating the printer in the web interface, such as: adding or removing printers, stopping print tasks, etc. The default user-name is the one assigned in the ''sys'' group, or root (change this by editing {{Filename|/etc/cups/cupsd.conf}} in the line of ''SystemGroup''). <br />
<br />
If the root account has been locked, it is not possible to log in the CUPS administration interface with the default user-name and password. In this case, it may be needed to change the default SystemGroup in cupsd.conf and read [http://bbs.archlinux.org/viewtopic.php?id=35567 this post].<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 {{Filename|/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 />
There are three levels of access that 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 {{codeline|Allow}} statement to that level's section. An {{codeline|Allow}} statement can take one or more of the forms listed below:<br />
Allow all<br />
Allow host.domain.com<br />
Allow *.domain.com<br />
Allow ip-address<br />
Allow 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 {{Filename|/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 />
==Printer sharing==<br />
<br />
===Between GNU/Linux systems===<br />
Once CUPS has been setup on the GNU/Linux print server, sharing the printer with another GNU/Linux system is relatively easy, but there is a hard way.<br />
<br />
'''The Easy Way'''<br />
<br />
Point your browser at http://localhost:631 and you will see the cups administration home page. Click on the Administration tab near the top and select the add printer option and it should automatically detect the printer you have connected. If not, try turning the printer power off then back on and try again. Once you have your printer set up, look under the Server heading and click the checkbox for "Show printers connected to this system". Now click change settings and the server will automatically restart, and you are done. You can also select "Edit Configuration File" to make direct edits to the cups.conf file, this is useful for only allowing certain users and IPs access to the server. See the Hard way below for an example.<br />
<br />
'''The Hard Way'''<br />
<br />
On the server computer (the one directly connected to the printer) simply open up {{Filename|/etc/cups/cupsd.conf}} and allow access to the server by modifying the location lines. For instance:<br />
<Location /><br />
Order allow,deny<br />
Allow localhost<br />
Allow 192.168.0.*<br />
</Location><br />
<br />
Also make sure the server is listening on the IP address the client will be addressing. Add the following line after "# Listen <serverip>:631" (using the server's IP address instead of client's 192.168.0.100):<br />
Listen 192.168.0.101:631<br />
<br />
To "Show shared printers on the local network", add the line "BrowseAllow all":<br />
Browsing On<br />
BrowseOrder allow,deny<br />
BrowseAllow @LOCAL<br />
BrowseAllow all<br />
<br />
After making modifications, restart CUPS by:<br />
# /etc/rc.d/cups restart<br />
<br />
On the client system, open up (create if not present) {{Filename|/etc/cups/client.conf}} and add the ServerName to match the IP address or the name of the server. Add this line:<br />
ServerName 192.168.0.101<br />
<br />
To "Show shared printers on the local network", add the line "BrowseAllow all":<br />
Browsing On<br />
BrowseOrder allow,deny<br />
BrowseAllow @LOCAL<br />
BrowseAllow all<br />
<br />
There are more configuration possibilities, including automatic methods, which are described in detail in http://localhost:631/help/network.html <!-- Someone with CUPS installed could rename the link to the page title --><br />
<br />
After making modifications, restart CUPS.<br />
<br />
{{Note|When adding the printer from the client, if using the Internet Printing Protocol (IPP), put the URI as ipp://192.168.0.101:631/printers/<name-of-printer>}}<br />
<br />
===Between GNU/Linux and Windows===<br />
<br />
====GNU/Linux client====<br />
If connected to a Windows print server (or any other Samba capable print server), skip the section about kernel modules and such. All that needs to be done is to start the CUPS daemon and complete the web interface as specified previously. Before this, activate the Samba CUPS back-end. Do this by entering the following command:<br />
# ln -s `which smbspool` /usr/lib/cups/backend/smb<br />
{{Note| The symbol is a backtick ( '''`''' ) ; not a regular apostrophe.}}<br />
<br />
After completing this task, restart CUPS issuing the command specified in the previous section. Next, simply log in on the CUPS web interface and choose to add a new printer. As a device choose "Windows Printer via SAMBA".<br />
<br />
For the device location, enter:<br />
smb://username:password@hostname/printer_name<br />
<br />
Or without a password:<br />
smb://username@hostname/printer_name<br />
<br />
Make sure that the user actually has access to the printer on the Windows computer and select the appropriate drivers. If the computer is located on a domain, make sure the user-name includes the domain: <br />
smb://username:password@domain/hostname/printer_name<br />
<br />
If the network contains many printers, use {{Codeline|lpoptions -d desired_default_printer_name}} to set the preferred printer.<br />
<br />
====Windows client====<br />
Sometimes one might want to allow a Windows computer to connect to a GNU/Linux server. There are a few ways to do this, including Samba. In order to do this, edit {{Filename|/etc/samba/smb.conf}} file to allow access to printers. File {{Filename|smb.conf}} can look something like this:<br />
<pre><br />
[global]<br />
workgroup=Heroes<br />
server string=Arch Linux Print Server<br />
security=user<br />
<br />
[printers]<br />
comment=All Printers<br />
path=/var/spool/samba<br />
browseable=yes<br />
# to allow user 'guest account' to print.<br />
guest ok=no<br />
writable=no<br />
printable=yes<br />
create mode=0700<br />
write list=@adm root neocephas<br />
</pre><br />
<br />
That should be enough to share the printer, yet adding an individual printer entry may be desirable:<br />
<pre><br />
[ML1250]<br />
comment=Samsung ML-1250 Laser Printer<br />
printer=ml1250<br />
path=/var/spool/samba<br />
printing=cups<br />
printable=yes<br />
printer admin=@admin root neocephas<br />
user client driver=yes<br />
# to allow user 'guest account' to print.<br />
guest ok=no<br />
writable=no<br />
write list=@adm root neocephas<br />
valid users=@adm root neocephas<br />
</pre><br />
<br />
Please note that this assumes configuration was made so that users must have a valid account to access the printer. To have a public printer, set ''guest ok'' to ''yes'', and remove the ''valid users'' line. To add accounts, set up a regular GNU/Linux account and then set up a Samba password on the server. For instance:<br />
<pre><br />
# useradd neocephas<br />
# smbpasswd -a neocephas<br />
</pre><br />
<br />
After setting up all the needed user accounts, the samba spool directory also needs configuration:<br />
<pre><br />
# mkdir /var/spool/samba<br />
# chmod 777 /var/spool/samba<br />
</pre><br />
<br />
The next items that need changing are {{Filename|/etc/cups/mime.convs}} and {{Filename|/etc/cups/mime.types}}:<br />
<br />
{{Filename|mime.convs}}:<br />
<pre><br />
# The following line is found at near the end of the file. Uncomment it.<br />
application/octet-stream application/vnd.cups-raw 0 -<br />
</pre><br />
<br />
{{Filename|mime.types}}:<br />
<pre><br />
# Again near the end of the file.<br />
application/octet-stream<br />
</pre><br />
<br />
The changes to {{Filename|mime.convs}} and {{Filename|mime.types}} are needed to make CUPS print Microsoft Office document files. Many users seem to need that.<br />
<br />
After this, restart Samba daemon:<br />
# /etc/rc.d/samba restart<br />
<br />
Obviously, there are a lot of tweaks and customizations that can be done with setting up a Samba print server, so it is advised to look at the Samba and CUPS documentation for more help. The {{Filename|smb.conf.example}} file also has some good samples that might warrant imitating.<br />
<br />
=====Windows 2000 and Windows XP=====<br />
<!-- Requesting page titles for the CUPS interface links in this section and the next. --><br />
For the most modern flavors of Windows, an alternative way of connecting to the GNU/Linux printer server is to use the CUPS protocol directly. The Windows client will need to be using Windows 2000 or Windows XP. Make sure the clients are allowed to access the print server by editing the location settings as specified in section 4.1.<br />
<br />
On the Windows computer, go to the printer control panel and choose to 'Add a New Printer'. Next, choose to give a URL. For the URL, type in the location of the printer: http://host_ip_address:631/printers/printer_name (where host_ip_address is the GNU/Linux server's IP address and printer_name is the name of the printer being connected to).<br />
<br />
After this, install the printer drivers for the Windows computer. If the CUPS server is setup to use its own printer drivers, then just select a generic postscript printer for the Windows client. Then test the print setup by printing a test page.<br />
<br />
===Other operating systems===<br />
More information on interfacing CUPS with other printing systems can be found in the CUPS manual, e.g. on http://localhost:631/sam.html#PRINTING_OTHER<br />
<br />
==Troubleshooting==<br />
The best way to get printing working is to set 'LogLevel' in {{Filename|/etc/cups/cupsd.conf}} to:<br />
LogLevel debug<br />
<br />
And then viewing the output from {{Filename|/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 />
*{{Filename|/var/log/cups/page_log}} - Echoes a new entry each time a print is successful<br />
*{{Filename|/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 {{Filename|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" my result from trying to manage CUPS via localhost:631, for example.<br />
<br />
To use the new configuration, copy /etc/cups/cupsd.conf.default to /etc/cups/cupsd.conf (backup the old the configuration if needed):<br />
# cp /etc/cups/cupsd.conf.default /etc/cups/cupsd.conf<br />
and restart CUPS to employ the new settings.<br />
<br />
====Error with gnutls====<br />
If receiving errors such as:<br />
/usr/sbin/cupsd: error while loading shared libraries: libgnutls.so.13: cannot open shared object file: No such file or directory<br />
gnutls may be in need of updating:<br />
# pacman -S gnutls<br />
<br />
After updating, there may be a file named {{Filename|cupsd.conf.pacnew}} in {{Filename|/etc/cups}}. This is the unmodified original configuration file that has been placed as part of the update. Compare it with the currently installed version and adjust to preference.<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 />
====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 />
===USB printers under CUPS 1.4.x===<br />
New CUPS 1.4.x introduces many changes:<br />
<br />
====Configuration file====<br />
The syntax of the configuration file cupsd.conf changed. Start with a new cupsd.conf file based on /etc/cups/cupsd.conf.default.<br />
<br />
====Blacklisting usblp====<br />
CUPS now uses libusb and printer USB devices (under /dev/bus/usb/) instead of the usblp generated /dev/usb/lpX ones. In order to get USB printers working, the usblp module needs disabling. This can be done by blacklisting it in /etc/rc.conf, or by adding "blacklist usblp" to a configuration file in /etc/modprobe.d. Some users have also reported that they needed to reinstall their printer.<br />
<br />
====Device node permissions====<br />
In addition to usblp not being loaded, CUPS also needs the ownership of the USB device file of the printer to be root:lp, and permissions to be 660. E.g.<br />
$ ls -l /dev/bus/usb/003/002<br />
crw-rw---- 1 root lp 189, 257 20. Okt 10:32 /dev/bus/usb/003/002<br />
<br />
This is supposed to be achieved by two udev rules in /lib/udev/rules.d/50-udev-default.rules:<br />
# hplip and cups 1.4+ use raw USB devices, so permissions should be similar to<br />
# the ones from the old usblp kernel module<br />
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="", IMPORT{program}="usb_id --export %p"<br />
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}==":0701*:", GROUP="lp", MODE="660"<br />
<br />
However, for some devices, in particular combined printer/scanner devices, these rules either do not trigger, or are overwritten by rules of the 'sane' package. In these cases a custom udev rule needs to be added. See below.<br />
<br />
=====Device node permission troubleshooting=====<br />
Get the printer's device file and its permissions with: <br />
$ lsusb<br />
...<br />
Bus 003 Device 002: ID 04b8:0841 Seiko Epson Corp.<br />
$ ls -l /dev/bus/usb/003/002<br />
crw-rw---- 1 root lp 189, 257 20. Okt 10:32 /dev/bus/usb/003/002<br />
<br />
If the permissions are not already root:lp 660, enforce it by creating a custom udev rule, e.g<br />
cat /etc/udev/rules.d/10-usbprinter.rules<br />
ATTR{idVendor}=="04b8", ATTR{idProduct}=="0841", MODE:="0660", GROUP:="lp"<br />
<br />
Note that idVendor and idProduct are from the lsusb listing above.<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, e.g. check DAEMONS in {{Filename|/etc/rc.conf}} or run {{Codeline|ls /var/run/daemons}}.<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, "{{Codeline|Unable to communicate with device"}}", then it may be needed to add the user to the lp group by running the following command:<br />
# gpasswd -a <username> lp<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 {{Filename|/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 '''hplip''' has been installed, in addition to [[#Packages|the packages mentioned above]], '''net-snmp''' is also needed. See [http://bbs.archlinux.org/viewtopic.php?id=65615 this forum post].<br />
# pacman -S hplip<br />
<br />
====Printing fails with unauthorised error====<br />
If the user has been added to the lp group, and allowed to print (set in {{Filename|cups.conf}}), then the problem lies in {{Filename|/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: [http://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 {{filename|/etc/cups/cupsd.conf}} and add<br />
# HostNameLookups Double<br />
<br />
Restart CUPS:<br />
# /etc/rc.d/cups restart<br />
<br />
====CUPS fails to print with 'Unable to open device "hal:///[...]": Permission denied'====<br />
The permissions on some files are wrong:<br />
# cd /usr/lib/cups/backend<br />
# chmod 700 hal # (previously 755)<br />
# chmod 700 usb # (previously 755)<br />
<br />
====Unknown supported format: application/postscript====<br />
Comment the lines:<br />
application/octet-stream application/vnd.cups-raw 0 -<br />
from {{Filename|/etc/cups/mime.convs}}, and:<br />
application/octet-stream<br />
in {{Filename|/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 />
<pre> 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</pre><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 />
<br />
===Printer-specific===<br />
''Printer-specific problems and their solutions''<br />
<br />
<br />
<br />
====Brother DCP 7020====<br />
See: [[Brother DCP-7020]]<br />
<br />
====Canon MF 4150====<br />
This is required as some Canon printers apparently do not declare their specification correctly for kernel and libusb to recognize them<br />
<br />
* Do NOT blacklist usblp module.<br />
<br />
* Install hal-cups-utils and restart hal<br />
# sudo pacman -S hal-cups-utils<br />
# sudo /etc/rc.d/hal restart<br />
<br />
* Connect the printer<br />
<br />
The printer should now be recognzed by the CUPS Add printer dialog. Try restarting CUPS if you are still having trouble.<br />
<br />
* Install UFRII driver ({{Package AUR|ufr2}} from the [[AUR]] and complete the printer installation.<br />
<br />
====Epson AcuLaser CX11(NF)====<br />
Install [http://aur.archlinux.org/packages.php?ID=30424 Epson-ALCX11-filter] from the AUR. Restart CUPS and add the printer using the driver "EPSON AL-CX11, ESC/PageS Filter".<br />
<br />
Both connections, USB and network, should work as expected.<br />
<br />
====FX C1110 (not model B)====<br />
Keep in mind that these directions assume that the printer is connected and listening on the network.<br />
<br />
*Install cpio and rpmunpack to later unpack the package:<br />
# pacman -S cpio rpmunpack cups ghostscript gsfonts<br />
<br />
*Get the FX GNU/Linux driver [http://www.fujixeroxprinters.com/downloads/uploaded/Drivers/DocuPrint%20C1110%20C1110B/linux/fxlinuxprint-1.0.1-1.i386.zip here].<br />
<br />
*Unzip {{Filename|fxlinuxprint-1.0.1-1.i386.zip}} to /var/tmp (the directory is not important):<br />
$ unzip fxlinuxprint-1.0.1-1.i386.zip -d /var/tmp<br />
<br />
*Continue extracting the file:<br />
$ cd /var/tmp<br />
$ rpmunpack fxlinuxprint-1.0.1-1.i386.rpm<br />
$ gunzip fxlinuxprint-1.0.1-1.cpio.gz<br />
<br />
*Move the cpio DST file (for convenience):<br />
$ mkdir /var/tmp/DST<br />
$ mv fxlinuxprint-1.0.1-1.cpio /var/tmp/DST<br />
<br />
*Extract it:<br />
$ cd /var/tmp/DST<br />
$ cpio -id < fxlinuxprint-1.0.1-1.cpio<br />
<br />
*Filter the relevant files:<br />
$ cd /var/tmp<br />
$ find /var/tmp/DST -type f |cat -n<br />
1 /var/tmp/DST/etc/cups/mimefx.convs<br />
2 /var/tmp/DST/etc/cups/mimefx.types<br />
3 /var/tmp/DST/usr/lib/cups/filter/pdftopjlfx<br />
4 /var/tmp/DST/usr/lib/cups/filter/pstopdffx<br />
5 /var/tmp/DST/usr/lib/cups/filter/pdftopdffx<br />
6 /var/tmp/DST/usr/share/cups/model/FujiXerox/en/fxlinuxprint.ppd<br />
<br />
*Copy the files found in the previous step to /<br />
{{Note|For the PPD use {{Filename|/usr/share/cups/model/fxlinuxprint.ppd}}}}<br />
<br />
*Access http://localhost:631/ and add the lpd://f.q.d.n/queue printer, aunthenticating as root.<br />
<br />
*Go through "Manage Printer" and "Set Printer Options".<br />
<br />
*Print a test page (substitue color103 with the assigned printer name):<br />
$ lpq -P color103<br />
color103 is ready<br />
no entries<br />
<br />
====Printing does not work with the HP Deskjet 700 Series====<br />
The solution is to install '''pnm2ppa''' printer filter for the HP Deskjet 700 series. Without this, the print jobs will be aborted by the system. A [[Arch Build System|PKGBUILD]] for pnm2ppa can be found in [http://aur.archlinux.org/packages.php?do_Details=1&ID=696&O=0&L=0&C=0&K=pnm&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0 AUR].<br />
<br />
====Getting HP LaserJet 1010 to work====<br />
A solution may be to compile a newer version of GhostScript:<br />
<pre><br />
$ pacman -Qs cups a2ps psutils foo ghost<br />
local/cups 1.1.23-3<br />
The CUPS Printing System<br />
local/a2ps 4.13b-3<br />
a2ps is an Any to PostScript filter<br />
local/psutils p17-3<br />
A set of postscript utilities.<br />
local/foomatic-db 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/foomatic-db-engine 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/foomatic-db-ppd 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/foomatic-filters 3.0.2-1<br />
Foomatic is a system for using free software printer drivers with common<br />
spoolers on Unix<br />
local/espgs 8.15.1-1<br />
ESP Ghostscript<br />
</pre><br />
<br />
Setting <code>LogLevel</code> may also need to be set in {{Filename|/etc/cups/cupsd.conf}} to <code>debug2</code>, this way the logs will show how to circumvent minor issues, such as missing fonts. Search Google for [http://www.google.com/search?q=n019003l+filetype%3Apfb n019003l filetype:pfb]<br />
<br />
The debug solution might work if getting errors similar to 'Unsupport PCL', etc. See: [http://linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_1010 OpenPrinting database - Printer: HP LaserJet 1010]<br />
<br />
====HP LaserJet 1020====<br />
<br />
=====Installation from AUR=====<br />
Install the package foo2zjs from AUR and modify the {{Filename|PKGBUILD}}. Change the line:<br />
./getweb all<br />
to<br />
./getweb 1020<br />
<br />
If getting errors with incorrect md5sums, the md5sum of {{Filename|foo2zjs.tar.gz}} in the PKGBUILD should be changed to match the downloaded driver.<br />
<br />
As a last step, add and configure the printer in the CUPS manager. The printer should be recognized automatically, and function for both root and regular users.<br />
<br />
=====Manual installation=====<br />
{{Warning|This section involves installing packages without pacman. These directions should ideally be automated with a PKGBUILD in order to prevent issues.}}<br />
<br />
First of all, only CUPS and GhostScript needs to be installed. Then follow the links in [http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_1020 OpenPrinting database - Printer: HP LaserJet 1020] and [http://foo2zjs.rkkda.com/ foo2zjs: a linux printer driver for ZjStream protocol] to the printer driver page, and follow the install instructions. After login in as root, and downloading all the package and extracted the archives, change into the foo2zjs directory. Now, follow the regular installation instructions with a minor modification to change the 'userid' for printing:<br />
$ make<br />
$ ./getweb 1020<br />
<br />
Open the {{Filename|Makefile}}:<br />
$ nano Makefile<br />
and search for the line:<br />
# LPuid=-olp<br />
modify it to:<br />
# LPuid=-oroot<br />
then continue with the script:<br />
$ make install<br />
$ make install-hotplug<br />
$ make cups<br />
<br />
====Printer connected to an Airport Express Station====<br />
The first step is to scan the Airport Express station. It seems that there are different addresses depending on the model:<br />
<pre><br />
[root@somostation somos]# nmap 192.168.0.4<br />
<br />
Starting Nmap 4.20 ( http://insecure.org ) at 2007-06-26 00:50 CEST<br />
Interesting ports on 192.168.0.4:<br />
Not shown: 1694 closed ports<br />
PORT STATE SERVICE<br />
5000/tcp open UPnP<br />
9100/tcp open jetdirect<br />
10000/tcp open snet-sensor-mgmt<br />
MAC Address: 00:14:51:70:D5:66 (Apple Computer)<br />
<br />
Nmap finished: 1 IP address (1 host up) scanned in 25.815 seconds<br />
</pre><br />
<br />
The Airport station is accessed like an HP JetDirect printer. Afterwards, edit {{Filename|printer.conf}}:<br />
<pre><br />
# Printer configuration file for CUPS v1.2.11<br />
# Written by cupsd on 2007-06-26 00:44<br />
<Printer LaserSim><br />
Info SAMSUNG ML-1510 gdi<br />
Location SomoStation<br />
DeviceURI socket://192.168.0.4:9100<br />
State Idle<br />
StateTime 1182811465<br />
Accepting Yes<br />
Shared Yes<br />
JobSheets none none<br />
QuotaPeriod 0<br />
PageLimit 0<br />
KLimit 0<br />
OpPolicy default<br />
ErrorPolicy stop-printer<br />
</Printer><br />
</pre><br />
Problems may be resolved by removing foomatic and installing foomatic-db, foomatic-db-engine, foomatic-db-ppd instead.<br />
<br />
==Appendix==<br />
<br />
===Alternative CUPS interfaces===<br />
If using [[GNOME]], a possibility is to manage and configure the printer by using the gnome-cups-manager. This package is available through pacman: <br />
# pacman -S gnome-cups-manager<br />
<br />
Alternatively, system-config-printer-gnome can be installed:<br />
# pacman -S system-config-printer-gnome<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<br />
# groupadd lpadmin<br />
# usermod -aG lpadmin <username><br />
<br />
* 2. Add "lpadmin" (without the quotes) to this line in {{Filename|/etc/cups/cupsd.conf}}<br />
SystemGroup sys root <insert here><br />
<br />
* 3. Restart cups, log out and in again (or restart computer)<br />
# /etc/rc.d/cups restart<br />
<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 />
There is also gtklp:<br />
# pacman -S gtklp<br />
<br />
===Utility functions on Epson printers===<br />
<br />
====escputil====<br />
This section explains how to perform some of the utility functions (such as nozzle cleaning) on Epson printers, by using the escputil utility, part of the gutenprint package.<br />
<br />
There is a escputil's man-page provides basic information, but it does not touch on how to identify the printer. There are two parameters that can be used to do so:<br />
<br />
* One is <tt>--printer</tt>: it expects the name used to identify the printer when is was configured.<br />
<br />
* The other is <tt>--raw-device</tt>: this option expects a path beginning with "/dev". If the printer is the only serial printer on the system, "/dev/lp0" should be its device node. For USB printers, it is "/dev/usb/lp0". If having more than one printer, they will have names ending in "lp1", "lp2", etc.<br />
<br />
On to the maintenance options:<br />
* To clean the printer heads:<br />
$ escputil -u --clean-head<br />
<br />
* To print the nozzle-check pattern (allows verifying that the previous head cleaning worked, and determining the heads need cleaning):<br />
$ escputil -u --nozzle-check<br />
<br />
If wanting to perform an operation that requires two-way communication with a printer, use the "--raw-device" specification and the user must be root or be a member of the group "lp".<br />
<br />
* The following is an example of getting the printer's internal identification:<br />
$ sudo escputil --raw-device=/dev/usb/lp0 --identify<br />
<br />
* To print out the ink levels of the printer:<br />
$ sudo escputil --raw-device=/dev/usb/lp0 --ink-level<br />
<br />
====mtink====<br />
This is a printer status monitor which enables to get the remaining ink quantity, to print test patterns, to reset printer and to clean nozzle. It use an intuitive graphical user interface. Package can be downloaded from [http://aur.archlinux.org/packages.php?do_Details=1&ID=476&O=0&L=0&C=0&K=mtink&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR].<br />
<br />
====Stylus-toolbox====<br />
This is a GUI using escputil and cups drivers. It supports nearly all USB printer of Epson and displays ink quantity, can clean and align print heads and print test patterns. It can be downloaded from [http://aur.archlinux.org/packages.php?ID=30319 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. Obviously this package is not necessary, but it can be quite useful.<br />
<br />
Find generated PDF documents in a sub-directory located at <code>/var/spool/cups-pdf</code>. Normally, the subdirectory is named after the user who performed the job.<br />
<br />
This package can be installed by 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. For the Device, select '''CUPS-PDF (Virtual PDF Printer)'''; Make/Manufacturer, choose '''Generic'''; Model/Driver, select '''Generic postscript color printer'''. Alternatively, provide the PPD file from [http://www.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/cups-pdf-CURRENT/extra/CUPS-PDF.ppd this link].<br />
<br />
====Print to postscript: CUPS-PDF virtual printer trick====<br />
Printing to PDF in most applications like OpenOffice is no problem; just hit the button. Yet when printing out to postscript, matters take a little more work. For applications like OpenOffice where printing to kprinter is nebulous at best, there has to be another way -- and there is. The CUPS-PDF (Virtual PDF Printer) actually creates a postscript file and then creates the PDF using the ps2pdf utility. To print to postscript, what needs to be done is capturing the intermediate postscript file created by CUPS-PDF. This is easily accomplished with by selecting the "print to file" option in the print dialog. (choose either .ps or .eps as the extension) After selecting the "print to file" checkbox simply enter the filename and click "print".<br />
<br />
=====Configuring CUPS-PDF virtual printer=====<br />
1. Install cups & cups-pdf from extra.<br />
<br />
2. Start cups with:<br />
# /etc/rc.d/cups <br />
<br />
{{Note|Add 'cups' to the deamons line in /etc/rc.conf to start automatically at boot.}}<br />
<br />
3. Access the cups print manager: http://localhost:631 and select:<br />
Administration -> Find New Printers<br />
Select CUPS-PDF (Virtual PDF), choose for the make and driver:<br />
Make: Generic<br />
Driver: Generic CUPS-PDF Printer<br />
<br />
Now 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 />
===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 />
==Resources==<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://home.nyc.rr.com/computertaijutsu/cups.html Tips and Suggestions on common CUPS problems], '''(Dead link)'''<br />
* [http://www.gentoo.org/doc/en/printing-howto.xml Gentoo's Printing Guide], ''[http://www.gentoo.org/doc/en Gentoo Documentation Resources]''<br />
* [http://bbs.archlinux.org/ Arch Linux User Forums]<br />
<br />
{{Wikipedia|Common Unix Printing System}}</div>Roguededguyhttps://wiki.archlinux.org/index.php?title=SLiM&diff=93747SLiM2010-01-27T01:57:42Z<p>Roguededguy: /* Themes */</p>
<hr />
<div>[[Category:Display managers (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Provides an overview of the Simple Login Manager.}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|SLIM}}<br />
{{i18n_entry|简体中文|SLiM (简体中文)}}<br />
{{i18n_entry|Italiano|SLiM (Italiano)}}<br />
{{i18n_entry|Türkçe|SLIM(Türkçe)}}<br />
{{i18n_entry|Русский|SLIM(Русский)}}<br />
{{i18n_entry|한국어|SLiM (한국어)}}<br />
{{Article summary heading|Related articles}}<br />
{{Article summary wiki|Automatic login manager startup}}<br />
{{Article summary end}}<br />
[http://slim.berlios.de/ SLiM] is an acronym for Simple Login Manager. SLiM is simple, lightweight and easily configurable. SLiM is used by some because it does not require the dependencies of [[GNOME]] or [[KDE]] and can help make a lighter system for users that like to use lightweight desktops like [[Xfce]], [[Openbox]], and [[Fluxbox]].<br />
<br />
== Installation ==<br />
<br />
Install SLiM by:<br />
<br />
# pacman -Sy slim<br />
<br />
== Configuration ==<br />
<br />
How to load at startup, start your desktop environment, add themes...<br />
<br />
=== Enabling SLiM ===<br />
<br />
SLiM can be loaded on startup by entering it in your daemons array in {{Filename|rc.conf}}. However, see the innittab method of [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup|alternate ways]] for the recommended way of doing it.<br />
<br />
=== Single environments ===<br />
<br />
To configure SLiM to load a particular environment, edit your {{Filename|~/.xinitrc}} to load your desktop environment:<br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
<br />
exec [session-command]<br />
</pre><br />
<br />
SLiM reads the local {{Filename|~/.xinitrc}} configuration and then launches the desktop according to what is in that file. If you do not have have a {{Filename|~/.xinitrc}} file, you can use the skeleton file by:<br />
<br />
$ cp /etc/skel/.xinitrc $HOME<br />
<br />
Replace {{Codeline|[session-command]}} with the appropriate session command. Some examples of different desktop start commands:<br />
<br />
exec openbox-session<br />
exec fluxbox (or exec startfluxbox)<br />
exec startxfce4<br />
exec gnome-session<br />
exec startkde<br />
exec fvwm2<br />
exec awesome<br />
<br />
If your environment is not listed here, refer to the appropriate wiki page.<br />
<br />
=== PolicyKit ===<br />
<br />
If you have problems with the PolicyKit, use ConsoleKit's {{Codeline|ck-launch-session}}:<br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
<br />
exec ck-launch-session [session-command]<br />
</pre><br />
<br />
=== Multiple environments ===<br />
<br />
To be able to choose from multiple desktop environments, SLiM can be setup to log you into whichever you choose.<br />
<br />
Put a case statement similar to this one in your {{Filename|~/.xinitrc}} file and edit the sessions variable in {{Filename|/etc/slim.conf}} to match the names that trigger the case statement. You can choose the session at login time by pressing F1. Note that this feature is experimental.<br />
<br />
<pre><br />
# The following variable defines the session which is started if the user doesn't explicitly select a session<br />
# Source: http://svn.berlios.de/svnroot/repos/slim/trunk/xinitrc.sample<br />
<br />
DEFAULT_SESSION=twm<br />
<br />
case $1 in<br />
kde)<br />
exec startkde<br />
;;<br />
xfce4)<br />
exec startxfce4<br />
;;<br />
icewm)<br />
icewmbg &<br />
icewmtray &<br />
exec icewm<br />
;;<br />
wmaker)<br />
exec wmaker<br />
;;<br />
blackbox)<br />
exec blackbox<br />
;;<br />
*)<br />
exec $DEFAULT_SESSION<br />
;;<br />
esac<br />
</pre><br />
<br />
=== Themes ===<br />
<br />
Install the {{Package Official|slim-themes}} package:<br />
<br />
# pacman -Sy slim-themes archlinux-themes-slim<br />
<br />
The {{Package Official|archlinux-themes-slim}} packages contains several different themes. Look in the directory of {{Filename|/usr/share/slim/themes}} to see the themes available. Enter the theme name on the 'current_theme' line in {{Filename|/etc/slim.conf}}:<br />
<br />
#current_theme default<br />
current_theme archlinux-simplyblack<br />
<br />
To preview a theme run if no instance of the Xorg server is running by:<br />
<br />
$ slim -p /usr/share/slim/themes/<theme name><br />
<br />
To close, type "exit" in the Login line and press Enter.<br />
<br />
You can find some other cool Arch slim themes by using yaourt to search the aur for keyword "archlinux".<br />
<br />
==== Dual screen setup ====<br />
<br />
You can customize the slim theme in /usr/share/slim/themes/<your-theme>/slim.theme to turn these percents values:<br />
<br />
input_panel_x 50%<br />
input_panel_y 50%<br />
<br />
into pixels values:<br />
<br />
# These settings set the "archlinux-simplyblack" panel in the center of my 1440x900 left screen<br />
input_panel_x 495<br />
input_panel_y 325<br />
<br />
If your theme has a background picture you should use the background_style setting ('stretch', 'tile', 'center' or 'color') to get it correctly displayed. Have a look at the [http://slim.berlios.de/themes_howto.php very simple and clear official documentation about slim themes] for further details.<br />
<br />
== Other options ==<br />
<br />
A few things you might like to try.<br />
<br />
=== Changing the cursor ===<br />
<br />
If you want to change the default X cursor to a newer design, the {{Package AUR|slim-cursor}} package is available.<br />
<br />
After installing, edit {{Filename|/etc/slim.conf}} and uncomment the line:<br />
<br />
cursor left_ptr<br />
<br />
This will give you a normal arrow instead. This setting is forwarded to {{Codeline|xsetroot -cursor_name}}. You can look up the possible cursor names [http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/lib/X11/cursorfont.h?rev=HEAD&content-type=text/plain here] or in {{Filename|/usr/share/icons/<your-cursor-theme>/cursors/}}.<br />
<br />
To change the cursor theme being used at the login screen, make a file named {{Filename|/usr/share/icons/default/index.theme}} with this content:<br />
<br />
[Icon Theme]<br />
Inherits=<your-cursor-theme><br />
<br />
Replace <your-cursor-theme> with the name of the cursor theme you want to use (e.g. whiteglass).<br />
<br />
=== Match SLiM and Desktop Wallpaper ===<br />
<br />
To share a wallpaper between SLiM and your desktop, rename the used theme background, then create a link from your desktop wallpaper file to the default SLiM theme:<br />
<br />
# mv /usr/share/slim/themes/default/background.jpg{,.bck}<br />
# ln -s /path/to/mywallpaper.jpg /usr/share/slim/themes/default/background.jpg<br />
<br />
=== Shutdown, reboot, suspend, exit, launch terminal from SLiM ===<br />
<br />
You may shutdown, reboot, suspend, exit or even launch a terminal from the SLiM login screen. To do so, use the values in the username field, and the root password in the password field:<br />
<br />
* To launch a terminal, enter '''console''' as the username (defaults to xterm which must be installed separately... edit {{Filename|/etc/slim.conf}} to change terminal preference)<br />
* For shutdown, enter '''halt''' as the username<br />
* For reboot, enter '''reboot''' as the username<br />
* To exit to bash, enter '''exit''' as the username<br />
* For suspend, enter '''suspend''' as the username (suspend is disabled by default, edit {{Filename|/etc/slim.conf}} as root to uncomment the {{Filename|suspend_cmd}} line and, if necessary modify the suspend command itself (e.g. change {{Codeline|/usr/sbin/suspend}} to {{Codeline|sudo /usr/sbin/pm-suspend}}))<br />
<br />
=== Power-off error with Splashy ===<br />
<br />
If you use Splashy and SLiM, sometimes you can't power-off or reboot from menu in GNOME, Xfce, LXDE or others. Check your {{Filename|/etc/slim.conf}} and {{Filename|/etc/splash.conf}}; set the DEFAULT_TTY=7 same as xserver_arguments vt07.<br />
<br />
=== Login information with SLiM ===<br />
<br />
By default, SLiM fails to log logins to utmp and wtmp which causes who, last, etc. to misreport login information. To fix this edit your {{Filename|slim.conf}} as follows:<br />
<br />
sessionstart_cmd /usr/bin/sessreg -a -l $DISPLAY %user<br />
sessionstop_cmd /usr/bin/sessreg -d -l $DISPLAY %user<br />
<br />
=== Setting DPI with SLiM ===<br />
<br />
The Xorg server generally picks up the DPI but if it doesn't you can specify it to SLiM. If you set the DPI with the argument -dpi 96 in {{Filename|/etc/X11/xinit/xserverrc}} it will not work with SLiM. To fix this change your {{Filename|slim.conf}} from:<br />
<br />
xserver_arguments -nolisten tcp vt07 <br />
<br />
to<br />
<br />
xserver_arguments -nolisten tcp vt07 -dpi 96<br />
<br />
=== Use a random theme ===<br />
<br />
Use the current_theme variable as a comma separated list to specify a set to randomly choose from.<br />
<br />
== Resources ==<br />
<br />
* [http://slim.berlios.de/ SLiM homepage]<br />
* [http://slim.berlios.de/manual.php SLiM documentation]</div>Roguededguyhttps://wiki.archlinux.org/index.php?title=SLiM&diff=93744SLiM2010-01-27T01:28:01Z<p>Roguededguy: /* Enabling SLiM */</p>
<hr />
<div>[[Category:Display managers (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Provides an overview of the Simple Login Manager.}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|SLIM}}<br />
{{i18n_entry|简体中文|SLiM (简体中文)}}<br />
{{i18n_entry|Italiano|SLiM (Italiano)}}<br />
{{i18n_entry|Türkçe|SLIM(Türkçe)}}<br />
{{i18n_entry|Русский|SLIM(Русский)}}<br />
{{i18n_entry|한국어|SLiM (한국어)}}<br />
{{Article summary heading|Related articles}}<br />
{{Article summary wiki|Automatic login manager startup}}<br />
{{Article summary end}}<br />
[http://slim.berlios.de/ SLiM] is an acronym for Simple Login Manager. SLiM is simple, lightweight and easily configurable. SLiM is used by some because it does not require the dependencies of [[GNOME]] or [[KDE]] and can help make a lighter system for users that like to use lightweight desktops like [[Xfce]], [[Openbox]], and [[Fluxbox]].<br />
<br />
== Installation ==<br />
<br />
Install SLiM by:<br />
<br />
# pacman -Sy slim<br />
<br />
== Configuration ==<br />
<br />
How to load at startup, start your desktop environment, add themes...<br />
<br />
=== Enabling SLiM ===<br />
<br />
SLiM can be loaded on startup by entering it in your daemons array in {{Filename|rc.conf}}. However, see the innittab method of [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup|alternate ways]] for the recommended way of doing it.<br />
<br />
=== Single environments ===<br />
<br />
To configure SLiM to load a particular environment, edit your {{Filename|~/.xinitrc}} to load your desktop environment:<br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
<br />
exec [session-command]<br />
</pre><br />
<br />
SLiM reads the local {{Filename|~/.xinitrc}} configuration and then launches the desktop according to what is in that file. If you do not have have a {{Filename|~/.xinitrc}} file, you can use the skeleton file by:<br />
<br />
$ cp /etc/skel/.xinitrc $HOME<br />
<br />
Replace {{Codeline|[session-command]}} with the appropriate session command. Some examples of different desktop start commands:<br />
<br />
exec openbox-session<br />
exec fluxbox (or exec startfluxbox)<br />
exec startxfce4<br />
exec gnome-session<br />
exec startkde<br />
exec fvwm2<br />
exec awesome<br />
<br />
If your environment is not listed here, refer to the appropriate wiki page.<br />
<br />
=== PolicyKit ===<br />
<br />
If you have problems with the PolicyKit, use ConsoleKit's {{Codeline|ck-launch-session}}:<br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
<br />
exec ck-launch-session [session-command]<br />
</pre><br />
<br />
=== Multiple environments ===<br />
<br />
To be able to choose from multiple desktop environments, SLiM can be setup to log you into whichever you choose.<br />
<br />
Put a case statement similar to this one in your {{Filename|~/.xinitrc}} file and edit the sessions variable in {{Filename|/etc/slim.conf}} to match the names that trigger the case statement. You can choose the session at login time by pressing F1. Note that this feature is experimental.<br />
<br />
<pre><br />
# The following variable defines the session which is started if the user doesn't explicitly select a session<br />
# Source: http://svn.berlios.de/svnroot/repos/slim/trunk/xinitrc.sample<br />
<br />
DEFAULT_SESSION=twm<br />
<br />
case $1 in<br />
kde)<br />
exec startkde<br />
;;<br />
xfce4)<br />
exec startxfce4<br />
;;<br />
icewm)<br />
icewmbg &<br />
icewmtray &<br />
exec icewm<br />
;;<br />
wmaker)<br />
exec wmaker<br />
;;<br />
blackbox)<br />
exec blackbox<br />
;;<br />
*)<br />
exec $DEFAULT_SESSION<br />
;;<br />
esac<br />
</pre><br />
<br />
=== Themes ===<br />
<br />
Install the {{Package Official|slim-themes}} package:<br />
<br />
# pacman -Sy slim-themes archlinux-themes-slim<br />
<br />
The {{Package Official|archlinux-themes-slim}} packages contains several different themes. Look in the directory of {{Filename|/usr/share/slim/themes}} to see the themes available. Enter the theme name on the 'current_theme' line in {{Filename|/etc/slim.conf}}:<br />
<br />
#current_theme default<br />
current_theme archlinux-simplyblack<br />
<br />
To preview a theme run if no instance of the Xorg server is running by:<br />
<br />
$ slim -p /usr/share/slim/themes/<theme name><br />
<br />
To close, type "exit" in the Login line and press Enter.<br />
<br />
==== Dual screen setup ====<br />
<br />
You can customize the slim theme in /usr/share/slim/themes/<your-theme>/slim.theme to turn these percents values:<br />
<br />
input_panel_x 50%<br />
input_panel_y 50%<br />
<br />
into pixels values:<br />
<br />
# These settings set the "archlinux-simplyblack" panel in the center of my 1440x900 left screen<br />
input_panel_x 495<br />
input_panel_y 325<br />
<br />
If your theme has a background picture you should use the background_style setting ('stretch', 'tile', 'center' or 'color') to get it correctly displayed. Have a look at the [http://slim.berlios.de/themes_howto.php very simple and clear official documentation about slim themes] for further details.<br />
<br />
== Other options ==<br />
<br />
A few things you might like to try.<br />
<br />
=== Changing the cursor ===<br />
<br />
If you want to change the default X cursor to a newer design, the {{Package AUR|slim-cursor}} package is available.<br />
<br />
After installing, edit {{Filename|/etc/slim.conf}} and uncomment the line:<br />
<br />
cursor left_ptr<br />
<br />
This will give you a normal arrow instead. This setting is forwarded to {{Codeline|xsetroot -cursor_name}}. You can look up the possible cursor names [http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/lib/X11/cursorfont.h?rev=HEAD&content-type=text/plain here] or in {{Filename|/usr/share/icons/<your-cursor-theme>/cursors/}}.<br />
<br />
To change the cursor theme being used at the login screen, make a file named {{Filename|/usr/share/icons/default/index.theme}} with this content:<br />
<br />
[Icon Theme]<br />
Inherits=<your-cursor-theme><br />
<br />
Replace <your-cursor-theme> with the name of the cursor theme you want to use (e.g. whiteglass).<br />
<br />
=== Match SLiM and Desktop Wallpaper ===<br />
<br />
To share a wallpaper between SLiM and your desktop, rename the used theme background, then create a link from your desktop wallpaper file to the default SLiM theme:<br />
<br />
# mv /usr/share/slim/themes/default/background.jpg{,.bck}<br />
# ln -s /path/to/mywallpaper.jpg /usr/share/slim/themes/default/background.jpg<br />
<br />
=== Shutdown, reboot, suspend, exit, launch terminal from SLiM ===<br />
<br />
You may shutdown, reboot, suspend, exit or even launch a terminal from the SLiM login screen. To do so, use the values in the username field, and the root password in the password field:<br />
<br />
* To launch a terminal, enter '''console''' as the username (defaults to xterm which must be installed separately... edit {{Filename|/etc/slim.conf}} to change terminal preference)<br />
* For shutdown, enter '''halt''' as the username<br />
* For reboot, enter '''reboot''' as the username<br />
* To exit to bash, enter '''exit''' as the username<br />
* For suspend, enter '''suspend''' as the username (suspend is disabled by default, edit {{Filename|/etc/slim.conf}} as root to uncomment the {{Filename|suspend_cmd}} line and, if necessary modify the suspend command itself (e.g. change {{Codeline|/usr/sbin/suspend}} to {{Codeline|sudo /usr/sbin/pm-suspend}}))<br />
<br />
=== Power-off error with Splashy ===<br />
<br />
If you use Splashy and SLiM, sometimes you can't power-off or reboot from menu in GNOME, Xfce, LXDE or others. Check your {{Filename|/etc/slim.conf}} and {{Filename|/etc/splash.conf}}; set the DEFAULT_TTY=7 same as xserver_arguments vt07.<br />
<br />
=== Login information with SLiM ===<br />
<br />
By default, SLiM fails to log logins to utmp and wtmp which causes who, last, etc. to misreport login information. To fix this edit your {{Filename|slim.conf}} as follows:<br />
<br />
sessionstart_cmd /usr/bin/sessreg -a -l $DISPLAY %user<br />
sessionstop_cmd /usr/bin/sessreg -d -l $DISPLAY %user<br />
<br />
=== Setting DPI with SLiM ===<br />
<br />
The Xorg server generally picks up the DPI but if it doesn't you can specify it to SLiM. If you set the DPI with the argument -dpi 96 in {{Filename|/etc/X11/xinit/xserverrc}} it will not work with SLiM. To fix this change your {{Filename|slim.conf}} from:<br />
<br />
xserver_arguments -nolisten tcp vt07 <br />
<br />
to<br />
<br />
xserver_arguments -nolisten tcp vt07 -dpi 96<br />
<br />
=== Use a random theme ===<br />
<br />
Use the current_theme variable as a comma separated list to specify a set to randomly choose from.<br />
<br />
== Resources ==<br />
<br />
* [http://slim.berlios.de/ SLiM homepage]<br />
* [http://slim.berlios.de/manual.php SLiM documentation]</div>Roguededguyhttps://wiki.archlinux.org/index.php?title=SLiM&diff=93743SLiM2010-01-27T01:27:32Z<p>Roguededguy: /* Enabling SLiM */</p>
<hr />
<div>[[Category:Display managers (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Provides an overview of the Simple Login Manager.}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|SLIM}}<br />
{{i18n_entry|简体中文|SLiM (简体中文)}}<br />
{{i18n_entry|Italiano|SLiM (Italiano)}}<br />
{{i18n_entry|Türkçe|SLIM(Türkçe)}}<br />
{{i18n_entry|Русский|SLIM(Русский)}}<br />
{{i18n_entry|한국어|SLiM (한국어)}}<br />
{{Article summary heading|Related articles}}<br />
{{Article summary wiki|Automatic login manager startup}}<br />
{{Article summary end}}<br />
[http://slim.berlios.de/ SLiM] is an acronym for Simple Login Manager. SLiM is simple, lightweight and easily configurable. SLiM is used by some because it does not require the dependencies of [[GNOME]] or [[KDE]] and can help make a lighter system for users that like to use lightweight desktops like [[Xfce]], [[Openbox]], and [[Fluxbox]].<br />
<br />
== Installation ==<br />
<br />
Install SLiM by:<br />
<br />
# pacman -Sy slim<br />
<br />
== Configuration ==<br />
<br />
How to load at startup, start your desktop environment, add themes...<br />
<br />
=== Enabling SLiM ===<br />
<br />
SLiM can be loaded on startup by entering it in your daemons array in {{Filename|rc.conf}}. See the innittab method of [[Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup|alternate ways]] for the recommended way of doing it.<br />
<br />
=== Single environments ===<br />
<br />
To configure SLiM to load a particular environment, edit your {{Filename|~/.xinitrc}} to load your desktop environment:<br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
<br />
exec [session-command]<br />
</pre><br />
<br />
SLiM reads the local {{Filename|~/.xinitrc}} configuration and then launches the desktop according to what is in that file. If you do not have have a {{Filename|~/.xinitrc}} file, you can use the skeleton file by:<br />
<br />
$ cp /etc/skel/.xinitrc $HOME<br />
<br />
Replace {{Codeline|[session-command]}} with the appropriate session command. Some examples of different desktop start commands:<br />
<br />
exec openbox-session<br />
exec fluxbox (or exec startfluxbox)<br />
exec startxfce4<br />
exec gnome-session<br />
exec startkde<br />
exec fvwm2<br />
exec awesome<br />
<br />
If your environment is not listed here, refer to the appropriate wiki page.<br />
<br />
=== PolicyKit ===<br />
<br />
If you have problems with the PolicyKit, use ConsoleKit's {{Codeline|ck-launch-session}}:<br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
<br />
exec ck-launch-session [session-command]<br />
</pre><br />
<br />
=== Multiple environments ===<br />
<br />
To be able to choose from multiple desktop environments, SLiM can be setup to log you into whichever you choose.<br />
<br />
Put a case statement similar to this one in your {{Filename|~/.xinitrc}} file and edit the sessions variable in {{Filename|/etc/slim.conf}} to match the names that trigger the case statement. You can choose the session at login time by pressing F1. Note that this feature is experimental.<br />
<br />
<pre><br />
# The following variable defines the session which is started if the user doesn't explicitly select a session<br />
# Source: http://svn.berlios.de/svnroot/repos/slim/trunk/xinitrc.sample<br />
<br />
DEFAULT_SESSION=twm<br />
<br />
case $1 in<br />
kde)<br />
exec startkde<br />
;;<br />
xfce4)<br />
exec startxfce4<br />
;;<br />
icewm)<br />
icewmbg &<br />
icewmtray &<br />
exec icewm<br />
;;<br />
wmaker)<br />
exec wmaker<br />
;;<br />
blackbox)<br />
exec blackbox<br />
;;<br />
*)<br />
exec $DEFAULT_SESSION<br />
;;<br />
esac<br />
</pre><br />
<br />
=== Themes ===<br />
<br />
Install the {{Package Official|slim-themes}} package:<br />
<br />
# pacman -Sy slim-themes archlinux-themes-slim<br />
<br />
The {{Package Official|archlinux-themes-slim}} packages contains several different themes. Look in the directory of {{Filename|/usr/share/slim/themes}} to see the themes available. Enter the theme name on the 'current_theme' line in {{Filename|/etc/slim.conf}}:<br />
<br />
#current_theme default<br />
current_theme archlinux-simplyblack<br />
<br />
To preview a theme run if no instance of the Xorg server is running by:<br />
<br />
$ slim -p /usr/share/slim/themes/<theme name><br />
<br />
To close, type "exit" in the Login line and press Enter.<br />
<br />
==== Dual screen setup ====<br />
<br />
You can customize the slim theme in /usr/share/slim/themes/<your-theme>/slim.theme to turn these percents values:<br />
<br />
input_panel_x 50%<br />
input_panel_y 50%<br />
<br />
into pixels values:<br />
<br />
# These settings set the "archlinux-simplyblack" panel in the center of my 1440x900 left screen<br />
input_panel_x 495<br />
input_panel_y 325<br />
<br />
If your theme has a background picture you should use the background_style setting ('stretch', 'tile', 'center' or 'color') to get it correctly displayed. Have a look at the [http://slim.berlios.de/themes_howto.php very simple and clear official documentation about slim themes] for further details.<br />
<br />
== Other options ==<br />
<br />
A few things you might like to try.<br />
<br />
=== Changing the cursor ===<br />
<br />
If you want to change the default X cursor to a newer design, the {{Package AUR|slim-cursor}} package is available.<br />
<br />
After installing, edit {{Filename|/etc/slim.conf}} and uncomment the line:<br />
<br />
cursor left_ptr<br />
<br />
This will give you a normal arrow instead. This setting is forwarded to {{Codeline|xsetroot -cursor_name}}. You can look up the possible cursor names [http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/lib/X11/cursorfont.h?rev=HEAD&content-type=text/plain here] or in {{Filename|/usr/share/icons/<your-cursor-theme>/cursors/}}.<br />
<br />
To change the cursor theme being used at the login screen, make a file named {{Filename|/usr/share/icons/default/index.theme}} with this content:<br />
<br />
[Icon Theme]<br />
Inherits=<your-cursor-theme><br />
<br />
Replace <your-cursor-theme> with the name of the cursor theme you want to use (e.g. whiteglass).<br />
<br />
=== Match SLiM and Desktop Wallpaper ===<br />
<br />
To share a wallpaper between SLiM and your desktop, rename the used theme background, then create a link from your desktop wallpaper file to the default SLiM theme:<br />
<br />
# mv /usr/share/slim/themes/default/background.jpg{,.bck}<br />
# ln -s /path/to/mywallpaper.jpg /usr/share/slim/themes/default/background.jpg<br />
<br />
=== Shutdown, reboot, suspend, exit, launch terminal from SLiM ===<br />
<br />
You may shutdown, reboot, suspend, exit or even launch a terminal from the SLiM login screen. To do so, use the values in the username field, and the root password in the password field:<br />
<br />
* To launch a terminal, enter '''console''' as the username (defaults to xterm which must be installed separately... edit {{Filename|/etc/slim.conf}} to change terminal preference)<br />
* For shutdown, enter '''halt''' as the username<br />
* For reboot, enter '''reboot''' as the username<br />
* To exit to bash, enter '''exit''' as the username<br />
* For suspend, enter '''suspend''' as the username (suspend is disabled by default, edit {{Filename|/etc/slim.conf}} as root to uncomment the {{Filename|suspend_cmd}} line and, if necessary modify the suspend command itself (e.g. change {{Codeline|/usr/sbin/suspend}} to {{Codeline|sudo /usr/sbin/pm-suspend}}))<br />
<br />
=== Power-off error with Splashy ===<br />
<br />
If you use Splashy and SLiM, sometimes you can't power-off or reboot from menu in GNOME, Xfce, LXDE or others. Check your {{Filename|/etc/slim.conf}} and {{Filename|/etc/splash.conf}}; set the DEFAULT_TTY=7 same as xserver_arguments vt07.<br />
<br />
=== Login information with SLiM ===<br />
<br />
By default, SLiM fails to log logins to utmp and wtmp which causes who, last, etc. to misreport login information. To fix this edit your {{Filename|slim.conf}} as follows:<br />
<br />
sessionstart_cmd /usr/bin/sessreg -a -l $DISPLAY %user<br />
sessionstop_cmd /usr/bin/sessreg -d -l $DISPLAY %user<br />
<br />
=== Setting DPI with SLiM ===<br />
<br />
The Xorg server generally picks up the DPI but if it doesn't you can specify it to SLiM. If you set the DPI with the argument -dpi 96 in {{Filename|/etc/X11/xinit/xserverrc}} it will not work with SLiM. To fix this change your {{Filename|slim.conf}} from:<br />
<br />
xserver_arguments -nolisten tcp vt07 <br />
<br />
to<br />
<br />
xserver_arguments -nolisten tcp vt07 -dpi 96<br />
<br />
=== Use a random theme ===<br />
<br />
Use the current_theme variable as a comma separated list to specify a set to randomly choose from.<br />
<br />
== Resources ==<br />
<br />
* [http://slim.berlios.de/ SLiM homepage]<br />
* [http://slim.berlios.de/manual.php SLiM documentation]</div>Roguededguyhttps://wiki.archlinux.org/index.php?title=Advanced_Linux_Sound_Architecture&diff=93740Advanced Linux Sound Architecture2010-01-27T00:52:38Z<p>Roguededguy: /* Userspace utilities */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|ALSA}}<br />
{{i18n_entry|Español|ALSA (Español)}}<br />
{{i18n_entry|Deutsch|ALSA Einrichten}}<br />
{{i18n_entry|Italiano|ALSA (Italiano)}}<br />
{{i18n_entry|Nederlands|ALSA instellen}}<br />
{{i18n_entry|Русский|ALSA_(Russian)}}<br />
{{i18n_entry|Slovensky|Nastavenie ALSA}}<br />
{{i18n_entry|Česky|ALSA (Česky)}}<br />
{{i18n_entry|简体中文|ALSA 安装设置 (简体中文)}}<br />
{{i18n_entry|עברית|הגדרת ALSA}}<br />
{{i18n_entry|Рolski|ALSA Setup (Polski)}}<br />
{{i18n_entry|Português do Brasil|Instalação ALSA}}<br />
{{i18n_entry|ไทย|ALSA Setup (ไทย)}}<br />
{{i18n_entry|Türkçe|ALSA (Türkçe)}}<br />
{{i18n_entry|Français|ALSA (Français)}}<br />
{{i18n_entry|한국어|ALSA (한국어)}}<br />
{{i18n_links_end}}<br />
<br />
The Advanced Linux Sound Architecture (ALSA) is a Linux kernel component intended to provide device drivers for sound cards.<br />
<br />
This document tells how to get ALSA working with 2.6 kernels. Also see how to [[Allow_multiple_programs_to_play_sound_at_once|allow multiple programs to play sound at once]]<br />
<br />
See the [[Open Sound System]] page if you are looking for alternatives.<br />
<br />
==Installation==<br />
===Kernel drivers===<br />
<br />
ALSA has been included in the 2.6 kernels and is included in all Arch '''kernel26*''' packages. If you build a custom kernel, do not forget to enable the correct ALSA driver.<br />
<br />
All necessary modules should be detected and loaded automatically by udev. No special configuration has to be done unless you use ISA cards. '''NEVER''' use alsaconf if you have a PCI or ISAPNP sound card, as the entries alsaconf adds to the modprobe.conf file might break udev's autodetection.<br />
<br />
===Userspace utilities===<br />
<br />
* Required for native ALSA programs and administration<br />
# pacman -S alsa-utils<br />
* Recommended if you want to use applications with OSS sound support in combination with dmix:<br />
# pacman -S alsa-oss<br />
<br />
All ALSA programs will most likely have alsa-lib as a dependency, pacman will handle this automatically.<br />
<br />
==Configuration==<br />
===Set the default sound card===<br />
<br />
Telephony-capable modems and snd-pcsp (the internal PC speaker ALSA module) can conflict with the sound card for the default sound card slot. (pcspkr is another, non-ALSA PC speaker module. It will not conflict with ALSA sound cards.) To prevent this, discover your sound card model name with [http://linux.die.net/man/8/lspci lspci(8)] and your ALSA driver module names with ls(1):<br />
<br />
$ ls -l /sys/module/snd/holders<br />
total 0<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:49 snd_ac97_codec -> ../../snd_ac97_codec<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:49 snd_intel8x0 -> ../../snd_intel8x0<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:49 snd_intel8x0m -> ../../snd_intel8x0m<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:49 snd_pcm -> ../../snd_pcm<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:53 snd_pcsp -> ../../snd_pcsp<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:49 snd_timer -> ../../snd_timer<br />
<br />
Then add the names of your sound card modules to:<br />
<br />
{{file |name=/etc/modprobe.d/modprobe.conf (prior to module-init-tools 3.8, use /etc/modprobe.conf) |content=<br />
options snd-intel8x0 index=0<br />
options snd-pcsp index=1<br />
}}<br />
<br />
These entries ensure that the Intel 82801DB-ICH4 sound card will become card 0 and the PC speaker will become card 1.<br />
NB: Some modules do not support indexing options eg. snd-hda-intel. If you experience problems on on reboot edit /etc/modprobe.d/modprobe.conf to just have the modules.<br />
<br />
If you do not want snd-pcsp to load at all you can add the following to:<br />
<br />
{{file |name=/etc/rc.conf |content=MODULES=(... !snd-pcsp)<br />
}}<br />
<br />
If you want the PC speaker completely been disabled you can additionally add the following to:<br />
<br />
{{file |name=/etc/rc.conf |content=MODULES=(... !pcspkr)<br />
}}<br />
<br />
<br />
{{Note| You will need to unload all your sound modules and reload them for the changes to take effect. It might be easier to reboot. Your choice. }}<br />
<br />
===Making sure the sound modules are loaded===<br />
<br />
You can assume that udev will autodetect your sound properly, including the OSS compatibility modules. You can check this with the command<br />
<br />
$ lsmod|grep '^snd' | column -t<br />
snd_usb_audio 69696 0 <br />
snd_usb_lib 13504 1 snd_usb_audio<br />
snd_rawmidi 20064 1 snd_usb_lib<br />
snd_hwdep 7044 1 snd_usb_audio<br />
snd_seq_oss 29412 0 <br />
snd_seq_midi_event 6080 1 snd_seq_oss<br />
snd_seq 46220 4 snd_seq_oss,snd_seq_midi_event<br />
snd_seq_device 6796 3 snd_rawmidi,snd_seq_oss,snd_seq<br />
snd_pcm_oss 45216 0 <br />
snd_mixer_oss 15232 1 snd_pcm_oss<br />
snd_intel8x0 27932 0 <br />
snd_ac97_codec 87648 1 snd_intel8x0<br />
snd_ac97_bus 1792 1 snd_ac97_codec<br />
snd_pcm 76296 4 snd_usb_audio,snd_pcm_oss,snd_intel8x0,snd_ac97_codec<br />
snd_timer 19780 2 snd_seq,snd_pcm<br />
snd 43776 12 snd_usb_audio,snd_rawmidi,snd_hwdep,snd_seq_oss,snd_seq,snd_seq_device,<br />
snd_pcm_oss,snd_mixer_oss,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer<br />
snd_page_alloc 7944 2 snd_intel8x0,snd_pcm<br />
<br />
If the output looks similar, your sound drivers have been successfully autodetected (note that in this case, snd_intel8x0 and snd_usb_audio are the drivers for the hardware devices). You might also want to check the directory '''/dev/snd''' for the right device files:<br />
<br />
$ ls -l /dev/snd<br />
total 0<br />
crw-rw---- 1 root audio 116, 0 Apr 8 14:17 controlC0<br />
crw-rw---- 1 root audio 116, 32 Apr 8 14:17 controlC1<br />
crw-rw---- 1 root audio 116, 24 Apr 8 14:17 pcmC0D0c<br />
crw-rw---- 1 root audio 116, 16 Apr 8 14:17 pcmC0D0p<br />
crw-rw---- 1 root audio 116, 25 Apr 8 14:17 pcmC0D1c<br />
crw-rw---- 1 root audio 116, 56 Apr 8 14:17 pcmC1D0c<br />
crw-rw---- 1 root audio 116, 48 Apr 8 14:17 pcmC1D0p<br />
crw-rw---- 1 root audio 116, 1 Apr 8 14:17 seq<br />
crw-rw---- 1 root audio 116, 33 Apr 8 14:17 timer<br />
<br />
If you have at least the devices '''controlC0''' and '''pcmC0D0p''' or similar, then your sound modules have been detected and loaded properly.<br />
<br />
If this is not the case, your sound modules have not been detected properly. '''If you want any help on IRC or the forums, please post the output of the above commands.''' To solve this, you can try loading the modules manually:<br />
<br />
* Locate the module for your soundcard: [http://www.alsa-project.org/main/index.php/Matrix:Main ALSA Soundcard Matrix] The module will be prefixed with 'snd-' (for example: 'snd-via82xx').<br />
* Load modules:<br />
# modprobe snd-NAME-OF-MODULE<br />
# modprobe snd-pcm-oss<br />
* Check for the device files in '''/dev/snd''' (see above) and/or try if '''alsamixer''' or '''amixer''' have reasonable output.<br />
* Add '''snd-NAME-OF-MODULE''' and '''snd-pcm-oss''' to the list of MODULES in {{Filename|/etc/rc.conf}} to ensure they are loaded next time (make sure '''snd-NAME-OF-MODULE''' is before '''snd-pcm-oss''').<br />
<br />
===Unmute the channels and test===<br />
<br />
In this section, we assume that you are logged in as root. If you want to perform these steps as an unprivileged user, you have to skip to the next section ''Setup Permissions'' first.<br />
<br />
* Unmute Soundcard<br />
<br />
The current version of ALSA installs with all channels '''muted by default''', so even if installation completes successfully and all devices are working properly you will hear no sound. You will need to unmute the channels manually. It is recommended to use {{Codeline|alsamixer}} to accomplish this. From the alsamixer text ui, the label "MM" below a channel indicates that the channel is muted, and "00" indicates that it is open. Press the 'm' key to toggle MM/00. Use arrow-keys left and right to navigate through the channels and the arrow-keys up and down to adjust the volume. Such things as Master and PCM and possibly Speaker will need to unmuted for your sound to work.<br />
<br />
{{Note | When using '''{{Codeline|amixer}}''', be sure to '''unmute''' as well as bring volumes up to a specific level in percent, i.e you need to use that % sign. '''{{Codeline|amixer}}''' understands the percent sign (%), not numbers. If you use a number (say, 90) then '''{{Codeline|amixer}}''' will take it as 100%, which can harm your speakers.}}<br />
<br />
# amixer set Master 90% unmute<br />
# amixer set PCM 85% unmute<br />
<br />
* Try to play a WAV file<br />
<br />
# aplay /usr/share/sounds/alsa/Front_Center.wav<br />
<br />
{{Note | Some cards need to have digital output muted/turned off in order to hear analog sound. For the Soundblaster Audigy LS mute the IEC958 channel.}}<br />
<br />
If you cannot hear anything, double check your mixer settings, being sure to unmute PCM, MASTER (and some machines such as the IBM Thinkpad have an additional 'SPEAKER' channel) and try the alsaconf utility as root:<br />
# alsaconf<br />
<br />
* [[Allow multiple programs to play sound at once]]<br />
<br />
===Setup Permissions===<br />
<br />
To be able to use the sound card as a user, follow these steps:<br />
<br />
* Add your user to the audio group:<br />
# gpasswd -a USERNAME audio<br />
<br />
* Log your user out and back in to ensure the audio group is loaded.<br />
<br />
===Restore ALSA Mixer settings at startup===<br />
<br />
* Run {{Codeline|alsactl store}} once to create {{Filename|/etc/asound.state}}.<br />
<br />
# alsactl store<br />
<br />
* Edit {{Filename|/etc/[[rc.conf]]}} and add {{Codeline|"alsa"}} to the list of daemons to start on boot-up. This will store the mixer settings on every shutdown and restore them when you boot.<br />
<br />
* If the mixer settings are not loaded on boot-up, add the following line to {{Filename|/etc/rc.local}}:<br />
<br />
# alsactl restore<br />
<br />
===Getting SPDIF Output===<br />
<br />
(from gralves from the Gentoo forums)<br />
* In GNOME Volume Control, under the Options tab, change the IEC958 to PCM. This option can be enabled in the preferences.<br />
* If you don't have GNOME Volume Control installed,<br />
** Edit /etc/asound.state. This file is where alsasound stores your mixer settings.<br />
** Find a line that says: 'IEC958 Playback Switch'. Near it you will find a line saying value:false. Change it to value:true.<br />
** Now find this line: 'IEC958 Playback AC97-SPSA'. Change its value to 0.<br />
** Restart ALSA.<br />
<br />
Alternative way to enable SPDIF output automatically on login (tested on SoundBlaster Audigy):<br />
<br />
* add following lines to {{Filename|/etc/rc.local}}:<br />
# Use COAX-digital output<br />
amixer set 'IEC958 Optical' 100 unmute<br />
amixer set 'Audigy Analog/Digital Output Jack' on<br />
<br />
You can see the name of your card's digital output with:<br />
$ amixer scontrols<br />
<br />
===System-Wide Equalizer===<br />
<br />
{{Note | This method requires the use of a ladspa plugin which might use quite a bit of CPU when sound plays. In addition, this was made with stereophonic sound (e.g. headphones) in mind.}}<br />
<br />
* You will need, in addition to the aforementioned userspace utilities, alsa-plugins.<br />
# pacman -S alsa-plugins<br />
* Get the ladspa and swh-plugins packages too if you don't already have them.<br />
# pacman -S ladspa swh-plugins<br />
* If you haven't already created either an {{Filename|~/.asoundrc}} or a {{Filename|/etc/asound.conf}} file, then create either one<br />
$ vim ~/.asoundrc<br />
* Insert the following into your ALSA configuration file ({{Filename|~/.asoundrc}} or {{Filename|/etc/asound.conf}}):<br />
<br />
{{file |name=/etc/asound.conf |content=pcm.eq {<br />
type ladspa<br><br />
# The output from the EQ can either go direct to a hardware device<br />
# (if you have a hardware mixer, e.g. SBLive/Audigy) or it can go<br />
# to the software mixer shown here.<br />
#slave.pcm "plughw:0,0"<br />
slave.pcm "plug:dmix"<br><br />
# Sometimes you may need to specify the path to the plugins,<br />
# especially if you've just installed them. Once you've logged<br />
# out/restarted this shouldn't be necessary, but if you get errors<br />
# about being unable to find plugins, try uncommenting this.<br />
#path "/usr/lib/ladspa"<br><br />
plugins [<br />
{<br />
label mbeq<br />
id 1197<br />
input {<br />
#this setting is here by example, edit to your own taste<br />
#bands: 50hz, 100hz, 156hz, 220hz, 311hz, 440hz, 622hz, 880hz, 1250hz, 1750hz, 25000hz,<br />
#50000hz, 10000hz, 20000hz<br />
controls [ -5 -5 -5 -5 -5 -10 -20 -15 -10 -10 -10 -10 -10 -3 -2 ]<br />
}<br />
}<br />
]<br />
}<br><br />
# Redirect the default device to go via the EQ - you may want to do<br />
# this last, once you're sure everything is working. Otherwise all<br />
# your audio programs will break/crash if something has gone wrong.<br><br />
pcm.!default {<br />
type plug<br />
slave.pcm "eq"<br />
}<br><br />
# Redirect the OSS emulation through the EQ too (when programs are running through "aoss")<br><br />
pcm.dsp0 {<br />
type plug<br />
slave.pcm "eq"<br />
}<br />
}}<br />
<br />
*Reload your alsa settings (as root).<br />
# /etc/rc.d/alsa restart<br />
<br />
*You should be good to go (if not, ask in the forum).<br />
<br />
==Troubleshooting==<br />
===Model Settings===<br />
<br />
Although Alsa detects your soundcard through the BIOS at times Alsa may not be able to recognize your [http://www.mjmwired.net/kernel/Documentation/sound/alsa/HD-Audio-Models.txt model type]. The soundcard chip can be found in <code>alsamixer</code> (e.g. ALC662) and the model can be set in {{Filename|/etc/modprobe.d/modprobe.conf}}. For example:<br />
<br />
options snd-hda-intel model=MODEL<br />
<br />
There are other model settings too. For most cases Alsa defaults will do. If you want to look at more specific settings for your soundcard take a look at the [http://bugtrack.alsa-project.org/main/index.php/Matrix:Main Alsa Soundcard List] find your model, then Details, then look at the "Setting up modprobe..." section. Enter these values in {{Filename|/etc/modprobe.d/modprobe.conf}}. For example, for an Intel AC97 audio:<br />
<br />
<pre># ALSA portion<br />
alias char-major-116 snd<br />
alias snd-card-0 snd-intel8x0<br />
# module options should go here<br />
<br />
# OSS/Free portion<br />
alias char-major-14 soundcore<br />
alias sound-slot-0 snd-card-0<br />
<br />
# card #1<br />
alias sound-service-0-0 snd-mixer-oss<br />
alias sound-service-0-1 snd-seq-oss<br />
alias sound-service-0-3 snd-pcm-oss<br />
alias sound-service-0-8 snd-seq-oss<br />
alias sound-service-0-12 snd-pcm-oss</pre><br />
<br />
===Conflicting PC Speaker===<br />
<br />
Remember, ALSA installs with all channels '''muted by default''' (see previous section, [[Advanced Linux Sound Architecture#Unmute the channels and test|unmuting your soundcard]]).<br />
<br />
However, if you're sure nothing is muted, that your drivers are installed correctly, and that your volume is right, but you still do not hear anything, then try blacklisting snd-pcsp from your modules array in rc.conf:<br />
<br />
MODULES=(!snd-pcsp ... )<br />
<br />
Note that this will disable your PC's internal speaker.<br />
If that doesn't work, then try adding the following line to <code>/etc/modprobe.d/modprobe.conf</code>:<br />
<br />
options snd-NAME-OF-MODULE ac97_quirk=0<br />
<br />
The above fix has been observed to work with <code>via82xx</code><br />
options snd-NAME-OF-MODULE ac97_quirk=1<br />
The above fix has been reported to work with <code>snd_intel8x0</code><br />
<br />
===No Sound with Onboard Intel Sound Card===<br />
<br />
There may be an issue with two conflicting modules loaded, namely <code>snd_intel8x0</code> and <code>snd_intel8x0m</code>. In this case, edit <code>rc.conf</code> and in the MODULES array blacklist the latter one so that it reads <code>!snd_intel8x0m</code> afterwards.<br />
<br />
''Muting'' the "External Amplifier" in <code>alsamixer</code> or <code>amixer</code> may also help. See [http://alsa.opensrc.org/index.php/Intel8x0#Dell_Inspiron_8600_.28and_probably_others.29 the ALSA wiki].<br />
<br />
With '''Intel Corporation 82801 I (ICH9 Family) HD Audio Controller''' on laptop, you may need to add this line to<br />
<br />
/etc/modprobe.d/sound<br />
options snd-hda-intel model=laptop<br />
<br />
or<br />
options snd-hda-intel model=laptop enable=1 index=0<br />
<br />
Otherwise, the pcspkr may not work, and only the headphone have sound.<br />
<br />
===Poor Sound Quality===<br />
<br />
If you experience poor sound quality, try setting the PCM volume (in alsamixer) to a level such that gain is 0.<br />
<br />
===Pops When Starting and Stopping Playback===<br />
<br />
Some modules can power off your sound card when not in use. this can make an audible noise when powering down your sound card. If you find this annoying try "modinfo snd-MY-MODULE", and look for a module option that adjusts or disables this feature. <br />
<br />
for example: to disable the power saving mode using snd-hda-intel add "options snd-hda-intel power_save=0" in /etc/modprobe.d/modprobe.conf. or try it with "modprobe snd-hda-intel power_save=0"<br />
<br />
===Alsamixer Does Not Run===<br />
<br />
If running alsamixer does not work and you wind up with the following error<br />
alsamixer: function snd_ctl_open failed for default: No such device or directory<br />
<br />
You should first check /etc/group to ensure that your current user is in the 'audio' group. Don't forget to log out and log in again for the group changes.<br />
<br />
Then you might need to re-install your kernel. Run 'pacman -S kernel26' or whichever patchset you prefer to use.<br />
<br />
===S/PDIF Output Does Not Work===<br />
<br />
If the optical/coaxial digital output of your motherboard/sound card is not working or stopped working, and have already enabled and unmuted it in alsamixer, try running<br />
iecset audio on<br />
<br />
as root.<br />
<br />
You can also put this command in rc.local as it sometimes it may stop working after a reboot.<br />
<br />
===HDMI Output Does Not Work===<br />
<br />
If the HDMI output of your motherboard/sound card is not working or stopped working, and have already enabled and unmuted it in alsamixer, try the following.<br />
<br />
Query for Playback Devices:<br />
<br />
% aplay -l<br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: NVidia [HDA NVidia], device 1: ALC1200 Digital [ALC1200 Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
<br />
Now that we have the info for the HDMI device, try a test, In the example below, 0 is the card number and 3 is the device number.<br />
<br />
% aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Center.wav<br />
<br />
If aplay does not output any errors, but still no sound is heared, "reboot" the receiver, monitor or tv set. Since the HDMI interface executes a handshake on connection, it might have noticed before that there was no audio stream embedded, and disabled audio decoding.<br />
<br />
If the test is successful, edit/create asound.conf in /etc to set HDMI as the default audio device, reboot, and audio should now work. There might be a better way to do this??<br />
<br />
% cat /etc/asound.conf<br />
pcm.!default {<br />
type plug<br />
slave.pcm {<br />
type hw<br />
card 0<br />
device 3<br />
}<br />
}<br />
<br />
If the this inconclusive<br />
<br />
===No Adjustable PCM Channel===<br />
<br />
You may find that you lack adjustable PCM channel. In this case try to remove all sound-related stuff from MODULES section in /etc/rc.conf, except for snd-NAME-OF-MODULE and snd-pcm-oss.<br />
<br />
===HP TX2500===<br />
<br />
Add these 2 lines into {{Filename|/etc/modprobe.d/modprobe.conf}}:<br />
options snd-cmipci mpu_port=0x330 fm_port=0x388<br />
options snd-hda-intel index=0 model=toshiba position_fix=1<br />
<br />
And don't forget to enable 'hal' in the DAEMONS section of your {{Filename|/etc/rc.conf}}.<br />
<br />
options snd-hda-intel model=hp (works for tx2000cto)<br />
<br />
===Skipping Sound When Playing MP3===<br />
<br />
If you have sound skipping when playing MP3 files and you have more then 2 speakers attacked to your computer (i.e. > 2 speaker system), run alsamixer and disable the channels for the speakers that you '''DON'T''' have (i.e. don't enable the sound for the center speaker if you don't have a center speaker<br />
<br />
===Using a USB Headset and External USB Sound Cards===<br />
<br />
If you are using a USB headset with ALSA you can try using asoundconf (currently only available from the AUR) to set the headset as the primary sound output. ''note: before running please make sure you have usb audio modual enabled<br />
#modprobe snd-usb-audio<br />
<br />
you can add this to /etc/rc.conf if you wish''<br />
<br />
# asoundconf is-active<br />
# asoundconf list<br />
# asoundconf set-default-soundcard <chosen soundcard><br />
<br />
===KDE Settings===<br />
<br />
* Start up KDE:<br />
# startx<br />
<br />
* Set up the volumes as you want them for this user (each user has their own settings):<br />
# alsamixer<br />
<br />
Log out and log back in as user xyz to get sound to work (I had to kill X, logout then log back in as user xyz, then start X and open Firefox and bam audio working on YouTube)<br />
<br />
* '''KDE 3.3:''' Go to ''K Menu &rarr; Multimedia &rarr; KMix''<br />
** Choose ''Settings &rarr; Configure KMix...''<br />
** Uncheck the option "Restore volumes on logon"<br />
** Press OK, and you should be all set. Now your volumes will be the same from the command line or within KDE.<br />
<br />
===Error 'Unkown hardware' Appears After a Kernel Update===<br />
<br />
The following messages may be displayed during the start-up ALSA after the kernel update:<br />
Unknown hardware "foo" "bar" ...<br />
Hardware is initialized using a guess method<br />
/usr/sbin/alsactl: set_control:nnnn:failed to obtain info for control #mm (No such file or directory)<br />
<br />
Then, try to store ALSA mixer settings again:<br />
# alsactl store<br />
<br />
===HDA Analyzer===<br />
<br />
If the mappings to your audio pins(plugs) do not correspond but ALSA works fine, you could try HDA Analyzer -- a pyGTK2 GUI for HD-audio control can be found [http://www.alsa-project.org/main/index.php/HDA_Analyzer at the ALSA wiki].<br />
Try tweaking the Widget Control section of the PIN nodes, to make microphones IN and headphone jacks OUT. Referring to the Config Defaults heading is a good idea.<br />
<br />
==Example configurations==<br />
The following should serve as a guide for more advanced setups. The configuration takes place in /etc/asound.conf as mentioned earlier in this article. None of the following configurations are guaranteed to be working. <br />
<br />
===Upmixing of stereo sources to 7.1 using dmix while saturated sources do not get upmixed===<br />
# 2008-11-15<br />
#<br />
# This .asoundrc will allow the following:<br />
#<br />
# - upmix stereo files to 7.1 speakers.<br />
# - playback real 7.1 sounds, on 7.1 speakers,<br />
# - allow the playback of both stereo (upmixed) and surround(7.1) sources at the same time.<br />
# - use the 6th and 7th channel (side speakers) as a separate soundcard, i.e. for headphones<br />
# (This is called the "alternate" output throughout the file, device names prefixed with 'a')<br />
# - play mono sources in stereo (like skype & ekiga) on the alterate output<br />
#<br />
# Make sure you have "8 Channels" and NOT "6 Channels" selected in alsamixer!<br />
#<br />
# Please try the following commands, to make sure everything is working as it should.<br />
#<br />
# To test stereo upmix : speaker-test -c2 -Ddefault -twav<br />
# To test surround(5.1): speaker-test -c6 -Dplug:dmix6 -twav<br />
# To test surround(7.1): speaker-test -c6 -Dplug:dmix8 -twav<br />
# To test alternative output: speaker-test -c2 -Daduplex -twav<br />
# To test mono upmix: speaker-test -c1 -Dmonoduplex -twav<br />
#<br />
#<br />
# It may not work out of the box for all cards. If it doesnt work for you, read the comments throughout the file.<br />
# The basis of this file was written by wishie of #alsa, and then modified with info from various sources by <br />
# squisher. Svenstaro modified it for 7.1 output support.<br />
<br />
#Define the soundcard to use<br />
pcm.snd_card {<br />
type hw<br />
card 0<br />
device 0<br />
}<br />
<br />
# 8 channel dmix - output whatever audio, to all 8 speakers<br />
pcm.dmix8 {<br />
type dmix<br />
ipc_key 1024<br />
ipc_key_add_uid false<br />
ipc_perm 0660<br />
slave {<br />
pcm "snd_card"<br />
rate 48000<br />
channels 8<br />
period_time 0<br />
period_size 1024<br />
buffer_time 0<br />
buffer_size 5120<br />
}<br />
<br />
# Some cards, like the "nforce" variants require the following to be uncommented. <br />
# It routes the audio to the correct speakers.<br />
# bindings {<br />
# 0 0<br />
# 1 1<br />
# 2 4<br />
# 3 5<br />
# 4 2<br />
# 5 3<br />
# 6 6<br />
# 7 7<br />
# }<br />
}<br />
<br />
# upmixing - duplicate stereo data to all 8 channels<br />
pcm.ch71dup {<br />
type route<br />
slave.pcm dmix8<br />
slave.channels 8<br />
ttable.0.0 1<br />
ttable.1.1 1<br />
ttable.0.2 1<br />
ttable.1.3 1<br />
ttable.0.4 0.5<br />
ttable.1.4 0.5<br />
ttable.0.5 0.5<br />
ttable.1.5 0.5<br />
ttable.0.6 1<br />
ttable.1.7 1<br />
}<br />
<br />
# this creates a six channel soundcard<br />
# and outputs to the eight channel one<br />
# i.e. for usage in mplayer I had to define in ~/.mplayer/config:<br />
# ao=alsa:device=dmix6<br />
# channels=6<br />
pcm.dmix6 {<br />
type route<br />
slave.pcm dmix8<br />
slave.channels 8<br />
ttable.0.0 1<br />
ttable.1.1 1<br />
ttable.2.2 1<br />
ttable.3.3 1<br />
ttable.4.4 1<br />
ttable.5.5 1<br />
ttable.6.6 1<br />
ttable.7.7 1<br />
}<br />
<br />
# share the microphone, i.e. because virtualbox grabs it by default<br />
pcm.microphone {<br />
type dsnoop<br />
ipc_key 1027<br />
slave {<br />
pcm "snd_card"<br />
}<br />
}<br />
<br />
# rate conversion, needed i.e. for wine<br />
pcm.2chplug {<br />
type plug<br />
slave.pcm "ch71dup"<br />
}<br />
pcm.a2chplug {<br />
type plug<br />
slave.pcm "dmix8"<br />
}<br />
<br />
# routes the channel for the alternative<br />
# 2 channel output, which becomes the 7th and 8th channel <br />
# on the real soundcard<br />
#pcm.alt2ch {<br />
# type route<br />
# slave.pcm "a2chplug"<br />
# slave.channels 8<br />
# ttable.0.6 1<br />
# ttable.1.7 1<br />
#}<br />
<br />
# skype and ekiga are only mono, so route left channel to the right channel<br />
# note: this gets routed to the alternative 2 channels<br />
pcm.mono_playback {<br />
type route<br />
slave.pcm "a2chplug"<br />
slave.channels 8<br />
# Send Skype channel 0 to the L and R speakers at full volume<br />
#ttable.0.6 1<br />
#ttable.0.7 1<br />
}<br />
<br />
# 'full-duplex' device for use with aoss<br />
pcm.duplex {<br />
type asym<br />
playback.pcm "2chplug"<br />
capture.pcm "microphone"<br />
}<br />
<br />
#pcm.aduplex {<br />
# type asym<br />
# playback.pcm "alt2ch"<br />
# capture.pcm "microphone"<br />
#}<br />
<br />
pcm.monoduplex {<br />
type asym<br />
playback.pcm "mono_playback"<br />
capture.pcm "microphone"<br />
}<br />
<br />
# for aoss<br />
pcm.dsp0 "duplex"<br />
ctl.mixer0 "duplex"<br />
<br />
# softvol manages volume in alsa<br />
# i.e. wine likes this<br />
pcm.mainvol {<br />
type softvol<br />
slave.pcm "duplex"<br />
control {<br />
name "2ch-Upmix Master"<br />
card 0<br />
}<br />
}<br />
<br />
#pcm.!default "mainvol"<br />
<br />
# set the default device according to the environment<br />
# variable ALSA_DEFAULT_PCM and default to mainvol<br />
pcm.!default {<br />
@func refer<br />
name { @func concat <br />
strings [ "pcm."<br />
{ @func getenv<br />
vars [ ALSA_DEFAULT_PCM ]<br />
default "mainvol"<br />
}<br />
]<br />
}<br />
}<br />
<br />
# uncomment the following if you want to be able to control<br />
# the mixer device through environment variables as well<br />
#ctl.!default {<br />
# @func refer<br />
# name { @func concat <br />
# strings [ "ctl."<br />
# { @func getenv<br />
# vars [ ALSA_DEFAULT_CTL<br />
# ALSA_DEFAULT_PCM<br />
# ]<br />
# default "duplex"<br />
# }<br />
# ]<br />
# }<br />
#}<br />
<br />
===Surround51 incl. upmix stereo & dmix, swap L/R, bad speaker position in room===<br />
<br />
Bad practice but works fine for almost everything without additional per-program/file customization:<br />
pcm.!default {<br />
type route<br />
## forwards to the mixer pcm defined below<br />
slave.pcm dmix51<br />
slave.channels 6<br />
<br />
## "Native Channels" stereo, swap left/right<br />
ttable.0.1 1<br />
ttable.1.0 1<br />
## original normal left/right commented out<br />
# ttable.0.0 1<br />
# ttable.1.1 1<br />
<br />
## route "native surround" so it still works but weaken signal (+ RL/RF swap) <br />
## because my rear speakers are more like random than really behind me<br />
ttable.2.3 0.7<br />
ttable.3.2 0.7<br />
ttable.4.4 0.7<br />
ttable.5.5 0.7<br />
<br />
## stereo => quad speaker "upmix" for "rear" speakers + swap L/R<br />
ttable.0.3 1<br />
ttable.1.2 1<br />
<br />
## stereo L+R => join to Center & Subwoofer 50%/50%<br />
ttable.0.4 0.5<br />
ttable.1.4 0.5<br />
ttable.0.5 0.5<br />
ttable.1.5 0.5<br />
## to test: "$ speaker-test -c6 -twav" and: "$ speaker-test -c2 -twav"<br />
}<br />
<br />
pcm.dmix51 {<br />
type dmix<br />
ipc_key 1024<br />
# let multiple users share<br />
ipc_key_add_uid false <br />
# IPC permissions (octal, default 0600)<br />
# I think changing this fixed something - but I'm not sure what.<br />
ipc_perm 0660 # <br />
slave {<br />
## this is specific to my hda_intel. Often hd:0 is just allready it; To find: $ aplay -L <br />
pcm surround51 <br />
# this rate makes my soundcard crackle<br />
# rate 44100<br />
# this rate stops flash in firefox from playing audio, but I don't need that<br />
rate 48000<br />
channels 6<br />
## Any other values in the 4 lines below seem to make my soundcard crackle, too<br />
period_time 0<br />
period_size 1024<br />
buffer_time 0<br />
buffer_size 4096<br />
}<br />
}<br />
<br />
==External Resources==<br />
<br />
More info can be found here:<br />
* [http://www.mjmwired.net/kernel/Documentation/sound/alsa/ALSA-Configuration.txt Advanced ALSA module configuration]<br />
* [http://alsa.opensrc.org/index.php/Main_Page Unofficial ALSA Wiki]<br />
* [http://alsa.opensrc.org/index.php/Aadebug A simple shell script to aid ALSA audio debugging]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=36815 HOWTO: Compile driver from svn]<br />
* [http://gentoo-wiki.com/HOWTO_Set_up_a_system-wide_equaliser_with_ALSA_and_LADSPA HOWTO Set up a system-wide equaliser with ALSA and LADSPA]<br />
<br />
* [http://archux.com/page/setting-audio Simple instructions for setting up ALSA]<br />
<!-- vim: set ft=Wikipedia: --></div>Roguededguyhttps://wiki.archlinux.org/index.php?title=Advanced_Linux_Sound_Architecture&diff=93739Advanced Linux Sound Architecture2010-01-27T00:51:54Z<p>Roguededguy: /* Userspace utilities */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|ALSA}}<br />
{{i18n_entry|Español|ALSA (Español)}}<br />
{{i18n_entry|Deutsch|ALSA Einrichten}}<br />
{{i18n_entry|Italiano|ALSA (Italiano)}}<br />
{{i18n_entry|Nederlands|ALSA instellen}}<br />
{{i18n_entry|Русский|ALSA_(Russian)}}<br />
{{i18n_entry|Slovensky|Nastavenie ALSA}}<br />
{{i18n_entry|Česky|ALSA (Česky)}}<br />
{{i18n_entry|简体中文|ALSA 安装设置 (简体中文)}}<br />
{{i18n_entry|עברית|הגדרת ALSA}}<br />
{{i18n_entry|Рolski|ALSA Setup (Polski)}}<br />
{{i18n_entry|Português do Brasil|Instalação ALSA}}<br />
{{i18n_entry|ไทย|ALSA Setup (ไทย)}}<br />
{{i18n_entry|Türkçe|ALSA (Türkçe)}}<br />
{{i18n_entry|Français|ALSA (Français)}}<br />
{{i18n_entry|한국어|ALSA (한국어)}}<br />
{{i18n_links_end}}<br />
<br />
The Advanced Linux Sound Architecture (ALSA) is a Linux kernel component intended to provide device drivers for sound cards.<br />
<br />
This document tells how to get ALSA working with 2.6 kernels. Also see how to [[Allow_multiple_programs_to_play_sound_at_once|allow multiple programs to play sound at once]]<br />
<br />
See the [[Open Sound System]] page if you are looking for alternatives.<br />
<br />
==Installation==<br />
===Kernel drivers===<br />
<br />
ALSA has been included in the 2.6 kernels and is included in all Arch '''kernel26*''' packages. If you build a custom kernel, do not forget to enable the correct ALSA driver.<br />
<br />
All necessary modules should be detected and loaded automatically by udev. No special configuration has to be done unless you use ISA cards. '''NEVER''' use alsaconf if you have a PCI or ISAPNP sound card, as the entries alsaconf adds to the modprobe.conf file might break udev's autodetection.<br />
<br />
===Userspace utilities===<br />
<br />
* Required for native ALSA programs and administration<br />
# pacman -S alsa-utils<br />
* Recommended if you want to use applications with OSS sound support in combination with dmix:<br />
# pacman -S alsa-oss<br />
<br />
All ALSA programs will most likely have alsa-lib as a dependency.<br />
<br />
==Configuration==<br />
===Set the default sound card===<br />
<br />
Telephony-capable modems and snd-pcsp (the internal PC speaker ALSA module) can conflict with the sound card for the default sound card slot. (pcspkr is another, non-ALSA PC speaker module. It will not conflict with ALSA sound cards.) To prevent this, discover your sound card model name with [http://linux.die.net/man/8/lspci lspci(8)] and your ALSA driver module names with ls(1):<br />
<br />
$ ls -l /sys/module/snd/holders<br />
total 0<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:49 snd_ac97_codec -> ../../snd_ac97_codec<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:49 snd_intel8x0 -> ../../snd_intel8x0<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:49 snd_intel8x0m -> ../../snd_intel8x0m<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:49 snd_pcm -> ../../snd_pcm<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:53 snd_pcsp -> ../../snd_pcsp<br />
lrwxrwxrwx 1 root root 0 2009-06-02 23:49 snd_timer -> ../../snd_timer<br />
<br />
Then add the names of your sound card modules to:<br />
<br />
{{file |name=/etc/modprobe.d/modprobe.conf (prior to module-init-tools 3.8, use /etc/modprobe.conf) |content=<br />
options snd-intel8x0 index=0<br />
options snd-pcsp index=1<br />
}}<br />
<br />
These entries ensure that the Intel 82801DB-ICH4 sound card will become card 0 and the PC speaker will become card 1.<br />
NB: Some modules do not support indexing options eg. snd-hda-intel. If you experience problems on on reboot edit /etc/modprobe.d/modprobe.conf to just have the modules.<br />
<br />
If you do not want snd-pcsp to load at all you can add the following to:<br />
<br />
{{file |name=/etc/rc.conf |content=MODULES=(... !snd-pcsp)<br />
}}<br />
<br />
If you want the PC speaker completely been disabled you can additionally add the following to:<br />
<br />
{{file |name=/etc/rc.conf |content=MODULES=(... !pcspkr)<br />
}}<br />
<br />
<br />
{{Note| You will need to unload all your sound modules and reload them for the changes to take effect. It might be easier to reboot. Your choice. }}<br />
<br />
===Making sure the sound modules are loaded===<br />
<br />
You can assume that udev will autodetect your sound properly, including the OSS compatibility modules. You can check this with the command<br />
<br />
$ lsmod|grep '^snd' | column -t<br />
snd_usb_audio 69696 0 <br />
snd_usb_lib 13504 1 snd_usb_audio<br />
snd_rawmidi 20064 1 snd_usb_lib<br />
snd_hwdep 7044 1 snd_usb_audio<br />
snd_seq_oss 29412 0 <br />
snd_seq_midi_event 6080 1 snd_seq_oss<br />
snd_seq 46220 4 snd_seq_oss,snd_seq_midi_event<br />
snd_seq_device 6796 3 snd_rawmidi,snd_seq_oss,snd_seq<br />
snd_pcm_oss 45216 0 <br />
snd_mixer_oss 15232 1 snd_pcm_oss<br />
snd_intel8x0 27932 0 <br />
snd_ac97_codec 87648 1 snd_intel8x0<br />
snd_ac97_bus 1792 1 snd_ac97_codec<br />
snd_pcm 76296 4 snd_usb_audio,snd_pcm_oss,snd_intel8x0,snd_ac97_codec<br />
snd_timer 19780 2 snd_seq,snd_pcm<br />
snd 43776 12 snd_usb_audio,snd_rawmidi,snd_hwdep,snd_seq_oss,snd_seq,snd_seq_device,<br />
snd_pcm_oss,snd_mixer_oss,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer<br />
snd_page_alloc 7944 2 snd_intel8x0,snd_pcm<br />
<br />
If the output looks similar, your sound drivers have been successfully autodetected (note that in this case, snd_intel8x0 and snd_usb_audio are the drivers for the hardware devices). You might also want to check the directory '''/dev/snd''' for the right device files:<br />
<br />
$ ls -l /dev/snd<br />
total 0<br />
crw-rw---- 1 root audio 116, 0 Apr 8 14:17 controlC0<br />
crw-rw---- 1 root audio 116, 32 Apr 8 14:17 controlC1<br />
crw-rw---- 1 root audio 116, 24 Apr 8 14:17 pcmC0D0c<br />
crw-rw---- 1 root audio 116, 16 Apr 8 14:17 pcmC0D0p<br />
crw-rw---- 1 root audio 116, 25 Apr 8 14:17 pcmC0D1c<br />
crw-rw---- 1 root audio 116, 56 Apr 8 14:17 pcmC1D0c<br />
crw-rw---- 1 root audio 116, 48 Apr 8 14:17 pcmC1D0p<br />
crw-rw---- 1 root audio 116, 1 Apr 8 14:17 seq<br />
crw-rw---- 1 root audio 116, 33 Apr 8 14:17 timer<br />
<br />
If you have at least the devices '''controlC0''' and '''pcmC0D0p''' or similar, then your sound modules have been detected and loaded properly.<br />
<br />
If this is not the case, your sound modules have not been detected properly. '''If you want any help on IRC or the forums, please post the output of the above commands.''' To solve this, you can try loading the modules manually:<br />
<br />
* Locate the module for your soundcard: [http://www.alsa-project.org/main/index.php/Matrix:Main ALSA Soundcard Matrix] The module will be prefixed with 'snd-' (for example: 'snd-via82xx').<br />
* Load modules:<br />
# modprobe snd-NAME-OF-MODULE<br />
# modprobe snd-pcm-oss<br />
* Check for the device files in '''/dev/snd''' (see above) and/or try if '''alsamixer''' or '''amixer''' have reasonable output.<br />
* Add '''snd-NAME-OF-MODULE''' and '''snd-pcm-oss''' to the list of MODULES in {{Filename|/etc/rc.conf}} to ensure they are loaded next time (make sure '''snd-NAME-OF-MODULE''' is before '''snd-pcm-oss''').<br />
<br />
===Unmute the channels and test===<br />
<br />
In this section, we assume that you are logged in as root. If you want to perform these steps as an unprivileged user, you have to skip to the next section ''Setup Permissions'' first.<br />
<br />
* Unmute Soundcard<br />
<br />
The current version of ALSA installs with all channels '''muted by default''', so even if installation completes successfully and all devices are working properly you will hear no sound. You will need to unmute the channels manually. It is recommended to use {{Codeline|alsamixer}} to accomplish this. From the alsamixer text ui, the label "MM" below a channel indicates that the channel is muted, and "00" indicates that it is open. Press the 'm' key to toggle MM/00. Use arrow-keys left and right to navigate through the channels and the arrow-keys up and down to adjust the volume. Such things as Master and PCM and possibly Speaker will need to unmuted for your sound to work.<br />
<br />
{{Note | When using '''{{Codeline|amixer}}''', be sure to '''unmute''' as well as bring volumes up to a specific level in percent, i.e you need to use that % sign. '''{{Codeline|amixer}}''' understands the percent sign (%), not numbers. If you use a number (say, 90) then '''{{Codeline|amixer}}''' will take it as 100%, which can harm your speakers.}}<br />
<br />
# amixer set Master 90% unmute<br />
# amixer set PCM 85% unmute<br />
<br />
* Try to play a WAV file<br />
<br />
# aplay /usr/share/sounds/alsa/Front_Center.wav<br />
<br />
{{Note | Some cards need to have digital output muted/turned off in order to hear analog sound. For the Soundblaster Audigy LS mute the IEC958 channel.}}<br />
<br />
If you cannot hear anything, double check your mixer settings, being sure to unmute PCM, MASTER (and some machines such as the IBM Thinkpad have an additional 'SPEAKER' channel) and try the alsaconf utility as root:<br />
# alsaconf<br />
<br />
* [[Allow multiple programs to play sound at once]]<br />
<br />
===Setup Permissions===<br />
<br />
To be able to use the sound card as a user, follow these steps:<br />
<br />
* Add your user to the audio group:<br />
# gpasswd -a USERNAME audio<br />
<br />
* Log your user out and back in to ensure the audio group is loaded.<br />
<br />
===Restore ALSA Mixer settings at startup===<br />
<br />
* Run {{Codeline|alsactl store}} once to create {{Filename|/etc/asound.state}}.<br />
<br />
# alsactl store<br />
<br />
* Edit {{Filename|/etc/[[rc.conf]]}} and add {{Codeline|"alsa"}} to the list of daemons to start on boot-up. This will store the mixer settings on every shutdown and restore them when you boot.<br />
<br />
* If the mixer settings are not loaded on boot-up, add the following line to {{Filename|/etc/rc.local}}:<br />
<br />
# alsactl restore<br />
<br />
===Getting SPDIF Output===<br />
<br />
(from gralves from the Gentoo forums)<br />
* In GNOME Volume Control, under the Options tab, change the IEC958 to PCM. This option can be enabled in the preferences.<br />
* If you don't have GNOME Volume Control installed,<br />
** Edit /etc/asound.state. This file is where alsasound stores your mixer settings.<br />
** Find a line that says: 'IEC958 Playback Switch'. Near it you will find a line saying value:false. Change it to value:true.<br />
** Now find this line: 'IEC958 Playback AC97-SPSA'. Change its value to 0.<br />
** Restart ALSA.<br />
<br />
Alternative way to enable SPDIF output automatically on login (tested on SoundBlaster Audigy):<br />
<br />
* add following lines to {{Filename|/etc/rc.local}}:<br />
# Use COAX-digital output<br />
amixer set 'IEC958 Optical' 100 unmute<br />
amixer set 'Audigy Analog/Digital Output Jack' on<br />
<br />
You can see the name of your card's digital output with:<br />
$ amixer scontrols<br />
<br />
===System-Wide Equalizer===<br />
<br />
{{Note | This method requires the use of a ladspa plugin which might use quite a bit of CPU when sound plays. In addition, this was made with stereophonic sound (e.g. headphones) in mind.}}<br />
<br />
* You will need, in addition to the aforementioned userspace utilities, alsa-plugins.<br />
# pacman -S alsa-plugins<br />
* Get the ladspa and swh-plugins packages too if you don't already have them.<br />
# pacman -S ladspa swh-plugins<br />
* If you haven't already created either an {{Filename|~/.asoundrc}} or a {{Filename|/etc/asound.conf}} file, then create either one<br />
$ vim ~/.asoundrc<br />
* Insert the following into your ALSA configuration file ({{Filename|~/.asoundrc}} or {{Filename|/etc/asound.conf}}):<br />
<br />
{{file |name=/etc/asound.conf |content=pcm.eq {<br />
type ladspa<br><br />
# The output from the EQ can either go direct to a hardware device<br />
# (if you have a hardware mixer, e.g. SBLive/Audigy) or it can go<br />
# to the software mixer shown here.<br />
#slave.pcm "plughw:0,0"<br />
slave.pcm "plug:dmix"<br><br />
# Sometimes you may need to specify the path to the plugins,<br />
# especially if you've just installed them. Once you've logged<br />
# out/restarted this shouldn't be necessary, but if you get errors<br />
# about being unable to find plugins, try uncommenting this.<br />
#path "/usr/lib/ladspa"<br><br />
plugins [<br />
{<br />
label mbeq<br />
id 1197<br />
input {<br />
#this setting is here by example, edit to your own taste<br />
#bands: 50hz, 100hz, 156hz, 220hz, 311hz, 440hz, 622hz, 880hz, 1250hz, 1750hz, 25000hz,<br />
#50000hz, 10000hz, 20000hz<br />
controls [ -5 -5 -5 -5 -5 -10 -20 -15 -10 -10 -10 -10 -10 -3 -2 ]<br />
}<br />
}<br />
]<br />
}<br><br />
# Redirect the default device to go via the EQ - you may want to do<br />
# this last, once you're sure everything is working. Otherwise all<br />
# your audio programs will break/crash if something has gone wrong.<br><br />
pcm.!default {<br />
type plug<br />
slave.pcm "eq"<br />
}<br><br />
# Redirect the OSS emulation through the EQ too (when programs are running through "aoss")<br><br />
pcm.dsp0 {<br />
type plug<br />
slave.pcm "eq"<br />
}<br />
}}<br />
<br />
*Reload your alsa settings (as root).<br />
# /etc/rc.d/alsa restart<br />
<br />
*You should be good to go (if not, ask in the forum).<br />
<br />
==Troubleshooting==<br />
===Model Settings===<br />
<br />
Although Alsa detects your soundcard through the BIOS at times Alsa may not be able to recognize your [http://www.mjmwired.net/kernel/Documentation/sound/alsa/HD-Audio-Models.txt model type]. The soundcard chip can be found in <code>alsamixer</code> (e.g. ALC662) and the model can be set in {{Filename|/etc/modprobe.d/modprobe.conf}}. For example:<br />
<br />
options snd-hda-intel model=MODEL<br />
<br />
There are other model settings too. For most cases Alsa defaults will do. If you want to look at more specific settings for your soundcard take a look at the [http://bugtrack.alsa-project.org/main/index.php/Matrix:Main Alsa Soundcard List] find your model, then Details, then look at the "Setting up modprobe..." section. Enter these values in {{Filename|/etc/modprobe.d/modprobe.conf}}. For example, for an Intel AC97 audio:<br />
<br />
<pre># ALSA portion<br />
alias char-major-116 snd<br />
alias snd-card-0 snd-intel8x0<br />
# module options should go here<br />
<br />
# OSS/Free portion<br />
alias char-major-14 soundcore<br />
alias sound-slot-0 snd-card-0<br />
<br />
# card #1<br />
alias sound-service-0-0 snd-mixer-oss<br />
alias sound-service-0-1 snd-seq-oss<br />
alias sound-service-0-3 snd-pcm-oss<br />
alias sound-service-0-8 snd-seq-oss<br />
alias sound-service-0-12 snd-pcm-oss</pre><br />
<br />
===Conflicting PC Speaker===<br />
<br />
Remember, ALSA installs with all channels '''muted by default''' (see previous section, [[Advanced Linux Sound Architecture#Unmute the channels and test|unmuting your soundcard]]).<br />
<br />
However, if you're sure nothing is muted, that your drivers are installed correctly, and that your volume is right, but you still do not hear anything, then try blacklisting snd-pcsp from your modules array in rc.conf:<br />
<br />
MODULES=(!snd-pcsp ... )<br />
<br />
Note that this will disable your PC's internal speaker.<br />
If that doesn't work, then try adding the following line to <code>/etc/modprobe.d/modprobe.conf</code>:<br />
<br />
options snd-NAME-OF-MODULE ac97_quirk=0<br />
<br />
The above fix has been observed to work with <code>via82xx</code><br />
options snd-NAME-OF-MODULE ac97_quirk=1<br />
The above fix has been reported to work with <code>snd_intel8x0</code><br />
<br />
===No Sound with Onboard Intel Sound Card===<br />
<br />
There may be an issue with two conflicting modules loaded, namely <code>snd_intel8x0</code> and <code>snd_intel8x0m</code>. In this case, edit <code>rc.conf</code> and in the MODULES array blacklist the latter one so that it reads <code>!snd_intel8x0m</code> afterwards.<br />
<br />
''Muting'' the "External Amplifier" in <code>alsamixer</code> or <code>amixer</code> may also help. See [http://alsa.opensrc.org/index.php/Intel8x0#Dell_Inspiron_8600_.28and_probably_others.29 the ALSA wiki].<br />
<br />
With '''Intel Corporation 82801 I (ICH9 Family) HD Audio Controller''' on laptop, you may need to add this line to<br />
<br />
/etc/modprobe.d/sound<br />
options snd-hda-intel model=laptop<br />
<br />
or<br />
options snd-hda-intel model=laptop enable=1 index=0<br />
<br />
Otherwise, the pcspkr may not work, and only the headphone have sound.<br />
<br />
===Poor Sound Quality===<br />
<br />
If you experience poor sound quality, try setting the PCM volume (in alsamixer) to a level such that gain is 0.<br />
<br />
===Pops When Starting and Stopping Playback===<br />
<br />
Some modules can power off your sound card when not in use. this can make an audible noise when powering down your sound card. If you find this annoying try "modinfo snd-MY-MODULE", and look for a module option that adjusts or disables this feature. <br />
<br />
for example: to disable the power saving mode using snd-hda-intel add "options snd-hda-intel power_save=0" in /etc/modprobe.d/modprobe.conf. or try it with "modprobe snd-hda-intel power_save=0"<br />
<br />
===Alsamixer Does Not Run===<br />
<br />
If running alsamixer does not work and you wind up with the following error<br />
alsamixer: function snd_ctl_open failed for default: No such device or directory<br />
<br />
You should first check /etc/group to ensure that your current user is in the 'audio' group. Don't forget to log out and log in again for the group changes.<br />
<br />
Then you might need to re-install your kernel. Run 'pacman -S kernel26' or whichever patchset you prefer to use.<br />
<br />
===S/PDIF Output Does Not Work===<br />
<br />
If the optical/coaxial digital output of your motherboard/sound card is not working or stopped working, and have already enabled and unmuted it in alsamixer, try running<br />
iecset audio on<br />
<br />
as root.<br />
<br />
You can also put this command in rc.local as it sometimes it may stop working after a reboot.<br />
<br />
===HDMI Output Does Not Work===<br />
<br />
If the HDMI output of your motherboard/sound card is not working or stopped working, and have already enabled and unmuted it in alsamixer, try the following.<br />
<br />
Query for Playback Devices:<br />
<br />
% aplay -l<br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: NVidia [HDA NVidia], device 1: ALC1200 Digital [ALC1200 Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
<br />
Now that we have the info for the HDMI device, try a test, In the example below, 0 is the card number and 3 is the device number.<br />
<br />
% aplay -D plughw:0,3 /usr/share/sounds/alsa/Front_Center.wav<br />
<br />
If aplay does not output any errors, but still no sound is heared, "reboot" the receiver, monitor or tv set. Since the HDMI interface executes a handshake on connection, it might have noticed before that there was no audio stream embedded, and disabled audio decoding.<br />
<br />
If the test is successful, edit/create asound.conf in /etc to set HDMI as the default audio device, reboot, and audio should now work. There might be a better way to do this??<br />
<br />
% cat /etc/asound.conf<br />
pcm.!default {<br />
type plug<br />
slave.pcm {<br />
type hw<br />
card 0<br />
device 3<br />
}<br />
}<br />
<br />
If the this inconclusive<br />
<br />
===No Adjustable PCM Channel===<br />
<br />
You may find that you lack adjustable PCM channel. In this case try to remove all sound-related stuff from MODULES section in /etc/rc.conf, except for snd-NAME-OF-MODULE and snd-pcm-oss.<br />
<br />
===HP TX2500===<br />
<br />
Add these 2 lines into {{Filename|/etc/modprobe.d/modprobe.conf}}:<br />
options snd-cmipci mpu_port=0x330 fm_port=0x388<br />
options snd-hda-intel index=0 model=toshiba position_fix=1<br />
<br />
And don't forget to enable 'hal' in the DAEMONS section of your {{Filename|/etc/rc.conf}}.<br />
<br />
options snd-hda-intel model=hp (works for tx2000cto)<br />
<br />
===Skipping Sound When Playing MP3===<br />
<br />
If you have sound skipping when playing MP3 files and you have more then 2 speakers attacked to your computer (i.e. > 2 speaker system), run alsamixer and disable the channels for the speakers that you '''DON'T''' have (i.e. don't enable the sound for the center speaker if you don't have a center speaker<br />
<br />
===Using a USB Headset and External USB Sound Cards===<br />
<br />
If you are using a USB headset with ALSA you can try using asoundconf (currently only available from the AUR) to set the headset as the primary sound output. ''note: before running please make sure you have usb audio modual enabled<br />
#modprobe snd-usb-audio<br />
<br />
you can add this to /etc/rc.conf if you wish''<br />
<br />
# asoundconf is-active<br />
# asoundconf list<br />
# asoundconf set-default-soundcard <chosen soundcard><br />
<br />
===KDE Settings===<br />
<br />
* Start up KDE:<br />
# startx<br />
<br />
* Set up the volumes as you want them for this user (each user has their own settings):<br />
# alsamixer<br />
<br />
Log out and log back in as user xyz to get sound to work (I had to kill X, logout then log back in as user xyz, then start X and open Firefox and bam audio working on YouTube)<br />
<br />
* '''KDE 3.3:''' Go to ''K Menu &rarr; Multimedia &rarr; KMix''<br />
** Choose ''Settings &rarr; Configure KMix...''<br />
** Uncheck the option "Restore volumes on logon"<br />
** Press OK, and you should be all set. Now your volumes will be the same from the command line or within KDE.<br />
<br />
===Error 'Unkown hardware' Appears After a Kernel Update===<br />
<br />
The following messages may be displayed during the start-up ALSA after the kernel update:<br />
Unknown hardware "foo" "bar" ...<br />
Hardware is initialized using a guess method<br />
/usr/sbin/alsactl: set_control:nnnn:failed to obtain info for control #mm (No such file or directory)<br />
<br />
Then, try to store ALSA mixer settings again:<br />
# alsactl store<br />
<br />
===HDA Analyzer===<br />
<br />
If the mappings to your audio pins(plugs) do not correspond but ALSA works fine, you could try HDA Analyzer -- a pyGTK2 GUI for HD-audio control can be found [http://www.alsa-project.org/main/index.php/HDA_Analyzer at the ALSA wiki].<br />
Try tweaking the Widget Control section of the PIN nodes, to make microphones IN and headphone jacks OUT. Referring to the Config Defaults heading is a good idea.<br />
<br />
==Example configurations==<br />
The following should serve as a guide for more advanced setups. The configuration takes place in /etc/asound.conf as mentioned earlier in this article. None of the following configurations are guaranteed to be working. <br />
<br />
===Upmixing of stereo sources to 7.1 using dmix while saturated sources do not get upmixed===<br />
# 2008-11-15<br />
#<br />
# This .asoundrc will allow the following:<br />
#<br />
# - upmix stereo files to 7.1 speakers.<br />
# - playback real 7.1 sounds, on 7.1 speakers,<br />
# - allow the playback of both stereo (upmixed) and surround(7.1) sources at the same time.<br />
# - use the 6th and 7th channel (side speakers) as a separate soundcard, i.e. for headphones<br />
# (This is called the "alternate" output throughout the file, device names prefixed with 'a')<br />
# - play mono sources in stereo (like skype & ekiga) on the alterate output<br />
#<br />
# Make sure you have "8 Channels" and NOT "6 Channels" selected in alsamixer!<br />
#<br />
# Please try the following commands, to make sure everything is working as it should.<br />
#<br />
# To test stereo upmix : speaker-test -c2 -Ddefault -twav<br />
# To test surround(5.1): speaker-test -c6 -Dplug:dmix6 -twav<br />
# To test surround(7.1): speaker-test -c6 -Dplug:dmix8 -twav<br />
# To test alternative output: speaker-test -c2 -Daduplex -twav<br />
# To test mono upmix: speaker-test -c1 -Dmonoduplex -twav<br />
#<br />
#<br />
# It may not work out of the box for all cards. If it doesnt work for you, read the comments throughout the file.<br />
# The basis of this file was written by wishie of #alsa, and then modified with info from various sources by <br />
# squisher. Svenstaro modified it for 7.1 output support.<br />
<br />
#Define the soundcard to use<br />
pcm.snd_card {<br />
type hw<br />
card 0<br />
device 0<br />
}<br />
<br />
# 8 channel dmix - output whatever audio, to all 8 speakers<br />
pcm.dmix8 {<br />
type dmix<br />
ipc_key 1024<br />
ipc_key_add_uid false<br />
ipc_perm 0660<br />
slave {<br />
pcm "snd_card"<br />
rate 48000<br />
channels 8<br />
period_time 0<br />
period_size 1024<br />
buffer_time 0<br />
buffer_size 5120<br />
}<br />
<br />
# Some cards, like the "nforce" variants require the following to be uncommented. <br />
# It routes the audio to the correct speakers.<br />
# bindings {<br />
# 0 0<br />
# 1 1<br />
# 2 4<br />
# 3 5<br />
# 4 2<br />
# 5 3<br />
# 6 6<br />
# 7 7<br />
# }<br />
}<br />
<br />
# upmixing - duplicate stereo data to all 8 channels<br />
pcm.ch71dup {<br />
type route<br />
slave.pcm dmix8<br />
slave.channels 8<br />
ttable.0.0 1<br />
ttable.1.1 1<br />
ttable.0.2 1<br />
ttable.1.3 1<br />
ttable.0.4 0.5<br />
ttable.1.4 0.5<br />
ttable.0.5 0.5<br />
ttable.1.5 0.5<br />
ttable.0.6 1<br />
ttable.1.7 1<br />
}<br />
<br />
# this creates a six channel soundcard<br />
# and outputs to the eight channel one<br />
# i.e. for usage in mplayer I had to define in ~/.mplayer/config:<br />
# ao=alsa:device=dmix6<br />
# channels=6<br />
pcm.dmix6 {<br />
type route<br />
slave.pcm dmix8<br />
slave.channels 8<br />
ttable.0.0 1<br />
ttable.1.1 1<br />
ttable.2.2 1<br />
ttable.3.3 1<br />
ttable.4.4 1<br />
ttable.5.5 1<br />
ttable.6.6 1<br />
ttable.7.7 1<br />
}<br />
<br />
# share the microphone, i.e. because virtualbox grabs it by default<br />
pcm.microphone {<br />
type dsnoop<br />
ipc_key 1027<br />
slave {<br />
pcm "snd_card"<br />
}<br />
}<br />
<br />
# rate conversion, needed i.e. for wine<br />
pcm.2chplug {<br />
type plug<br />
slave.pcm "ch71dup"<br />
}<br />
pcm.a2chplug {<br />
type plug<br />
slave.pcm "dmix8"<br />
}<br />
<br />
# routes the channel for the alternative<br />
# 2 channel output, which becomes the 7th and 8th channel <br />
# on the real soundcard<br />
#pcm.alt2ch {<br />
# type route<br />
# slave.pcm "a2chplug"<br />
# slave.channels 8<br />
# ttable.0.6 1<br />
# ttable.1.7 1<br />
#}<br />
<br />
# skype and ekiga are only mono, so route left channel to the right channel<br />
# note: this gets routed to the alternative 2 channels<br />
pcm.mono_playback {<br />
type route<br />
slave.pcm "a2chplug"<br />
slave.channels 8<br />
# Send Skype channel 0 to the L and R speakers at full volume<br />
#ttable.0.6 1<br />
#ttable.0.7 1<br />
}<br />
<br />
# 'full-duplex' device for use with aoss<br />
pcm.duplex {<br />
type asym<br />
playback.pcm "2chplug"<br />
capture.pcm "microphone"<br />
}<br />
<br />
#pcm.aduplex {<br />
# type asym<br />
# playback.pcm "alt2ch"<br />
# capture.pcm "microphone"<br />
#}<br />
<br />
pcm.monoduplex {<br />
type asym<br />
playback.pcm "mono_playback"<br />
capture.pcm "microphone"<br />
}<br />
<br />
# for aoss<br />
pcm.dsp0 "duplex"<br />
ctl.mixer0 "duplex"<br />
<br />
# softvol manages volume in alsa<br />
# i.e. wine likes this<br />
pcm.mainvol {<br />
type softvol<br />
slave.pcm "duplex"<br />
control {<br />
name "2ch-Upmix Master"<br />
card 0<br />
}<br />
}<br />
<br />
#pcm.!default "mainvol"<br />
<br />
# set the default device according to the environment<br />
# variable ALSA_DEFAULT_PCM and default to mainvol<br />
pcm.!default {<br />
@func refer<br />
name { @func concat <br />
strings [ "pcm."<br />
{ @func getenv<br />
vars [ ALSA_DEFAULT_PCM ]<br />
default "mainvol"<br />
}<br />
]<br />
}<br />
}<br />
<br />
# uncomment the following if you want to be able to control<br />
# the mixer device through environment variables as well<br />
#ctl.!default {<br />
# @func refer<br />
# name { @func concat <br />
# strings [ "ctl."<br />
# { @func getenv<br />
# vars [ ALSA_DEFAULT_CTL<br />
# ALSA_DEFAULT_PCM<br />
# ]<br />
# default "duplex"<br />
# }<br />
# ]<br />
# }<br />
#}<br />
<br />
===Surround51 incl. upmix stereo & dmix, swap L/R, bad speaker position in room===<br />
<br />
Bad practice but works fine for almost everything without additional per-program/file customization:<br />
pcm.!default {<br />
type route<br />
## forwards to the mixer pcm defined below<br />
slave.pcm dmix51<br />
slave.channels 6<br />
<br />
## "Native Channels" stereo, swap left/right<br />
ttable.0.1 1<br />
ttable.1.0 1<br />
## original normal left/right commented out<br />
# ttable.0.0 1<br />
# ttable.1.1 1<br />
<br />
## route "native surround" so it still works but weaken signal (+ RL/RF swap) <br />
## because my rear speakers are more like random than really behind me<br />
ttable.2.3 0.7<br />
ttable.3.2 0.7<br />
ttable.4.4 0.7<br />
ttable.5.5 0.7<br />
<br />
## stereo => quad speaker "upmix" for "rear" speakers + swap L/R<br />
ttable.0.3 1<br />
ttable.1.2 1<br />
<br />
## stereo L+R => join to Center & Subwoofer 50%/50%<br />
ttable.0.4 0.5<br />
ttable.1.4 0.5<br />
ttable.0.5 0.5<br />
ttable.1.5 0.5<br />
## to test: "$ speaker-test -c6 -twav" and: "$ speaker-test -c2 -twav"<br />
}<br />
<br />
pcm.dmix51 {<br />
type dmix<br />
ipc_key 1024<br />
# let multiple users share<br />
ipc_key_add_uid false <br />
# IPC permissions (octal, default 0600)<br />
# I think changing this fixed something - but I'm not sure what.<br />
ipc_perm 0660 # <br />
slave {<br />
## this is specific to my hda_intel. Often hd:0 is just allready it; To find: $ aplay -L <br />
pcm surround51 <br />
# this rate makes my soundcard crackle<br />
# rate 44100<br />
# this rate stops flash in firefox from playing audio, but I don't need that<br />
rate 48000<br />
channels 6<br />
## Any other values in the 4 lines below seem to make my soundcard crackle, too<br />
period_time 0<br />
period_size 1024<br />
buffer_time 0<br />
buffer_size 4096<br />
}<br />
}<br />
<br />
==External Resources==<br />
<br />
More info can be found here:<br />
* [http://www.mjmwired.net/kernel/Documentation/sound/alsa/ALSA-Configuration.txt Advanced ALSA module configuration]<br />
* [http://alsa.opensrc.org/index.php/Main_Page Unofficial ALSA Wiki]<br />
* [http://alsa.opensrc.org/index.php/Aadebug A simple shell script to aid ALSA audio debugging]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=36815 HOWTO: Compile driver from svn]<br />
* [http://gentoo-wiki.com/HOWTO_Set_up_a_system-wide_equaliser_with_ALSA_and_LADSPA HOWTO Set up a system-wide equaliser with ALSA and LADSPA]<br />
<br />
* [http://archux.com/page/setting-audio Simple instructions for setting up ALSA]<br />
<!-- vim: set ft=Wikipedia: --></div>Roguededguyhttps://wiki.archlinux.org/index.php?title=Smart_Common_Input_Method&diff=84488Smart Common Input Method2009-11-20T00:38:30Z<p>Roguededguy: /* Environment variables */</p>
<hr />
<div>[[Category:Internationalization (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Scim}}<br />
{{i18n_entry|简体中文|SCIM 输入法 (简体中文)}}<br />
{{i18n_entry|正體中文|SCIM中文輸入法}}<br />
{{i18n_links_end}}<br />
<br />
= About SCIM =<br />
Su Zhe (or James Su)-who at that time worked for TurboLinux- started this project about 2001 with the goal:<br />
* Act as an unified frontend for current available input method libraries. Currently bindings to uim and m17n library are available.<br />
* Act as a language engine of IIIMF input method framework (TBD).<br />
* Provide as many native IMEngines as possible.<br />
* Support as many input method protocol/interface as possible.<br />
* Support as many operating systems as possible.<br />
<br />
SCIM has the following features:<br />
* Fully Object Oriented structure written in C++.<br />
* Highly modularized.<br />
* Very flexible architecture, can be used as a dynamically loaded library as well as a C/S input method environment.<br />
* Simple programming interface.<br />
* Fully i18n support with UCS-4/UTF-8 encoding.<br />
* Include many handy utility functions to speedup the development.<br />
* GUI Panel with very rich features.<br />
* Unified configuration framework.<br />
<br />
= Installing SCIM =<br />
# pacman -S scim<br />
== Installing Input Method Engines ==<br />
Currently the SCIM project has a wide range of input methods (some may need other libraries), covering more than 30 languages, including (Simplified/Traditional) Chinese, Japanese, Korean and many European languages.<br />
These are some of the examples (more can be found [http://www.scim-im.org/projects/imengines here]):<br />
<br />
Chinese Smart PinYin:<br />
# pacman -S scim-pinyin<br />
Chinese WuBi or other tables based:<br />
# pacman -S scim-tables<br />
Japanese:<br />
# pacman -S scim-anthy<br />
Korean:<br />
# pacman -S scim-hangul<br />
<br />
= Configure SCIM =<br />
<br />
In order to work correctly, SCIM configuration needs three steps:<br />
<br />
1. exporting environment variables<br />
<br />
2. modify locale-related files<br />
<br />
3. start the application<br />
<br />
=== Best case example ===<br />
<br />
If you use a good DE/WM and do need SCIM to work urgently, put these lines into /etc/profile or ~/.xprofile ,then reboot:<br />
<br />
export XMODIFIERS=@im=SCIM<br />
export GTK_IM_MODULE="scim"<br />
export QT_IM_MODULE="scim"<br />
scim -d<br />
<br />
This is also the base example. The Correct Way of Doing Things is presented below, together with some common variants.<br />
<br />
== Environment variables ==<br />
<br />
Following environment variables have to be exported ''before'' executing scim:<br />
<br />
export XMODIFIERS=@im=SCIM<br />
export GTK_IM_MODULE="scim"<br />
export QT_IM_MODULE="scim"<br />
<br />
It is usual to put these lines into some script file, e.g. ~/.xinitrc or /etc/profile (for global settings), or also ~/.config/openbox/autostart.sh (if you use Openbox as WM). If you put them into ~/.xinitrc, they have to be put ''before'' executing your DE/WM.<br />
<br />
'''If you do not know which solution is the right one for you, just use /etc/profile.'''<br />
<br />
Note: the first environment variable conflicts with some (unusual) options like XMODIFIERS=urxvt.<br />
<br />
=== Note for amsn users ===<br />
You must also export the following variable to be able to use scim input with amsn.<br />
export XIM_MODULE="scim -d"<br />
<br />
=== Note for GNOME, XFCE, LXDE ===<br />
<br />
If ''export QT_IM_MODULE="scim"'' didn't work for you, you can use 'scim-bridge'' from AUR. This configuration is working in Gnome, XFCE, LXDE with last updates on 2009.02.15 (scim 1.4.7-1, scim-bridge 0.4.15-1 from AUR). Like this:<br />
<br />
export QT_IM_MODULE="scim-bridge"<br />
<br />
=== Note for KDE3 ===<br />
<br />
For '''KDE''' you should either change QT IMM to '''xim''', or have ''scim-qtimm-cvs'' installed from AUR. Like this:<br />
<br />
export QT_IM_MODULE="xim"<br />
<br />
== Locale-related files ==<br />
<br />
If your keyboard locale is en_US.UTF-8 (or en_US.utf8), just skip this second step.<br />
<br />
If your keyboard locale is ''not'' en_US.UTF-8 (nor en_US.utf8), you have to modify the first line of ~/.scim/global (or /etc/scim/global to have an user-indipendent effect) according to the following example:<br />
<br />
/SupportedUnicodeLocales = en_US.UTF-8,de_CH.UTF-8<br />
<br />
Obviously, you have to put your locale instead of de_CH.UTF-8.<br />
<br />
Note: your locale has to be active (i.e. you have to uncomment it in /etc/locale-gen and then execute locale-gen as root) ''and'' has to be supported by SCIM (most *.UTF-8 locales are).<br />
<br />
If you do not know which locales you have active at the moment, you can check it:<br />
<br />
locale -a<br />
<br />
(alternatively you can look at /etc/locale.gen).<br />
<br />
=== Further troubleshooting with locales ===<br />
<br />
If after you have install scim and the necessary input tables, and scim still doesn't work (click on the system tray, and nothing pops up), then you need to set the '''LC_CTYPE''' environmental variable in '''/etc/profile''' to the locale you plan to use. Simply create an entry for LC_CTYPE in /etc/profile, if there isn't one. <br />
<br />
eg. LC_CTYPE="zh_CN.UTF-8" //if you want to type simplified chinese<br />
<br />
Finally you need to generate the locale using the locale-gen command. Modify the /etc/locale.gen file to uncomment the language and encoding set you wish to use scim with. Then run the following command to generate the locale for your system.<br />
<br />
locale-gen<br />
<br />
<br />
== Executing SCIM ==<br />
<br />
To execute SCIM, you ''usually'' can just execute (but see below):<br />
<br />
scim<br />
<br />
It is common to start SCIM as a daemon, so that you can use your computer/terminal while SCIM is working. '''That is, the normal case is to execute''':<br />
<br />
scim -d<br />
<br />
As above, it is a common practice to put this command into some script file instead of executing it explicitely. As above, usual places are ~/.xinitrc (after environment variables and before DE/WM), /etc/profile (after environment variables) or ~/.config/openbox/autostart.sh (after environment variables and possibly after some sleep command).<br />
<br />
=== Note for GNOME ===<br />
<br />
In case you use GNOME as DE, the command above seems not to work as expected. Instead, you have to execute the following:<br />
<br />
scim -f x11 -c simple -d<br />
<br />
If you want SCIM to start automatically at startup, go to System > Preferences > Session and create a new command with the line above.<br />
<br />
Note: If you use the line scim -f socket -c socket -d instead, the configuration of your SCIM will be unmodifiable.<br />
<br />
=== Note for KDE ===<br />
<br />
In case you use KDE as a DE, the command above seems not to work as expected. Instead, you have to execute the following:<br />
<br />
scim -f socket -c socket -d<br />
<br />
You can also apply following ''optional'' steps:<br />
<br />
1. Install '''skim''' from the [http://aur.archlinux.org/packages.php?ID=22652 AUR].<br />
<br />
2. Start '''SKIM''', right click on the system tray icon and click 'Configure'<br />
<br />
3. Under '''Frontend > X Window''', tick the checkbox for "Start skim automatically when KDE starts"<br />
<br />
4. Logout and restart X server (ctrl+alt+del), then login again<br />
<br />
In any application, press ''ctrl+space'' to activate the input window.<br />
<br />
[http://www.archlinux.org/news/166/ See the official news page for more details].<br />
<br />
[http://www.h4.dion.ne.jp/~apricots/scim-anthy/howto.html Complex SCIM Mandriva howto type Japaneese]</div>Roguededguyhttps://wiki.archlinux.org/index.php?title=Suspending_to_RAM_with_hibernate-script&diff=84485Suspending to RAM with hibernate-script2009-11-19T22:58:28Z<p>Roguededguy: /* Automatic Suspend, the Hard Way */</p>
<hr />
<div>[[Category:Power management (English)]]<br />
[[Category:Laptops (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
====Overview====<br />
In this article we will explain how to accomplish a successful suspension to ram: all the processes are stopped and the current state of your machine is saved to ram. All the devices enter a low-consumption state and it will be very fast to resume the machine.<br />
Suspension to RAM is an acpi state, but the operation is almost never as simple as telling the machine to enter that state. The vast majority of laptops require additional operations and tricks. However, since this is quite an important feature for laptop users, it is worth spending some hours in finding the working combinations of tricks for your machine.<br />
<br />
====Different Methods of Suspending to RAM====<br />
There is an application, called s2ram, which contains a "whitelist" of known laptop models and, according to what has been reported by other owners of these laptops, tries to do the right things for that specific laptop. The whitelisted laptops can therefore use s2ram to suspend to ram "out of the box". Non-whitelisted laptops need to try different command line options of s2ram in order to determine - by trial and error - the appropriate "tricks" needed to make suspend and resume work. Your experience, if reported to the s2ram developers, will contribute to whitelist your machine in the next release of s2ram.<br />
<br />
However, s2ram is not the only resource: the hibernate-script, which is commonly used to accomplish [[Suspend to Disk]] , supports also suspension to RAM and proposes some further tricks which could convince your machine to suspend to ram and resume properly. Moreover, the hibernate-script can automatize other useful operations which you could want/need to do before suspension or after resuming from suspension to ram.<br />
<br />
Thus, the first part of this article will be devoted to s2ram. The second will discuss the use of the hibernate-script in suspension to ram. In particular, we will see how the hibernate-script can be used to suspend to ram your system just with the s2ram, but providing some additional tweakings. Finally, we will mention the possibility to suspend the machine both to ram and to disk.<br />
<br />
===s2ram===<br />
<br />
The s2ram utility is part of the uswsusp collection, which includes also some goodies relative to [[Suspend to Disk]] . You can find uswsusp in the community repositories. <br />
# pacman -S uswsusp<br />
<br />
Read the notes provided by pacman during the ''uswsusp'' package installation. In essence, you will need to:<br />
* edit /etc/suspend.conf to specify the resume device, i.e. your swap partition.<br />
resume device = /dev/sd''XY''<br />
* update /etc/mkinitcpio.conf to include the ''uresume'' hook<br />
HOOKS="base udev autodetect pata scsi sata ''uresume'' filesystems"<br />
* rebuild the ramdisk<br />
mkinitcpio -p kernel26<br />
<br />
=====Testing=====<br />
After installing the uswsusp package, check to see whether s2ram recognizes your machine: <br />
# s2ram -n<br />
<br />
If you see a line that says "Machine matched entry #", then your machine is already whitelisted. You SHOULD be able to suspend and resume properly by simply running s2ram:<br />
<br />
# s2ram<br />
<br />
Please note that the way to trigger resume from a suspended to RAM machine depends from your BIOS settings and is not predictable in general (sometimes it is enough to press a key whatsoever). If s2ram seems to work, but something goes wrong in the suspension cycle, then some driver or some process is causing problems and you should look at the hibernate section to see how the hibernate-script can help you. In the worst case, your machine has been erroneously whitelisted due to an inadequate report from another owner of the same machine. You should then report your case to the suspend-devel@lists.sourceforge.net, so that the previous mistaken report can stand corrected. In this case, you should quote the identification strings provided by s2ram -i.<br />
<br />
If s2ram doesn't match your machine to an entry in its whitelist, it will output some general purpose identification strings for your machine (the same as those provided s2ram -i). In this case, you will have to force s2ram to suspend your machine by using s2ram -f.<br />
<br />
<br />
If '''s2ram -f''' doesn't work, try the different workarounds offered by s2ram. Run s2ram -h to get a list of the possible options:<br />
# s2ram -h<br />
Usage: s2ram [-nhi] [-fspmrav]<br />
<br />
Options:<br />
-h, --help: this text.<br />
-n, --test: test if the machine is in the database.<br />
returns 0 if known and supported<br />
-i, --identify: prints a string that identifies the machine.<br />
-f, --force: force suspending, even on unknown machines.<br />
<br />
The following options are only available with -f/--force:<br />
-s, --vbe_save: save VBE state before suspending and restore after resume.<br />
-p, --vbe_post: VBE POST the graphics card after resume<br />
-m, --vbe_mode: get VBE mode before suspend and set it after resume<br />
-r, --radeontool: turn off the backlight on radeons before suspending.<br />
-a, --acpi_sleep: set the acpi_sleep parameter before suspend<br />
1=s3_bios, 2=s3_mode, 3=both<br />
-v, --pci_save: save the PCI config space for the VGA card.<br />
<br />
Try the following variations:<br />
s2ram -f -a 1<br />
s2ram -f -a 2<br />
s2ram -f -a 3<br />
s2ram -f -p -m<br />
s2ram -f -p -s<br />
s2ram -f -m<br />
s2ram -f -s<br />
s2ram -f -p<br />
s2ram -f -a 1 -m<br />
s2ram -f -a 1 -s<br />
<br />
If none of those combinations work, start again but add the "-v" switch.<br />
<br />
Note that mixing the "-a" options and the vbetool options ("-p", "-m", "-s")<br />
is normally only a measure of last resort, it usually does not make much<br />
sense.<br />
<br />
<br />
If you find several combinations that work (e.g. "s2ram -f -a 3" and "s2ram -f -p -m" both work on your machine),<br />
the in-kernel method ("-a") should be preferred over the userspace methods ("-p", "-m" and "-s").<br />
<br />
Verify all combinations in both cases when reporting success to the s2ram developers:<br />
* when issuing s2ram from console<br />
* when issuing s2ram from X<br />
<br />
<br />
You should really try ANY combination of these options (the only exception is the radeontool one, which can be useuful only if you have a radeon card), until you find a working combination. When you find a working combination, try to reduce it (that is try to see if any of the options are redundant). With any working combination of options, it is crucial to verify that suspension and resuming work fine both if you suspend from X and if you suspend from the plain console. Actually, in many setups the most tricky thing is to suspend and resume properly from the console. In the best case, s2ram -f is enough: this means that your machine does not require any trick to properly suspend and resume.<br />
<br />
There is a trick which does not correspond to a command line option, because it requires additional operations from you. It is marked with NOFB in the whitelist and used for those laptops which suspend and resume properly only if no framebuffer is used. If you verify that no command line option of s2ram works, you can try to disable the framebuffer. In order to do this, you need to edit your grub configuration /boot/grub/menu.lst (or the corresponding lilo file), remove the vga=<foo> value from the kernel line and reboot. This at least if you use the VESAFB framebufeer (as in the arch default kernel). If you use a different framebuffer driver, refer to the documentation of the driver to see how to disable it. <br />
<br />
After you have identified the shortest working combination of options, you should do two things. First, you will want to modify the whitelist for your local copy of s2ram to allow your machine to suspend and resume without any special options. Second, you will want to let the developers of s2ram know what options are needed for your machine so it can be added to the whitelist for future releases s2ram.<br />
<br />
Finally, it may happen that no trick makes s2ram work. In this case - before giving up - you can use some last-resort tricks provided by the hibernation-script discussed later in this article.<br />
<br />
=====Whitelisting=====<br />
To add your machine to the local whitelist for s2ram, you need to customize the package from [[ABS]]. Copy the /var/abs/community/uswsusp folder somewhere then run makepkg -o to download the sources. After this, edit the file src/suspend-0.8/whitelist.c<br />
<br />
You will see something like this: <br />
<br />
struct machine_entry whitelist[] = {<br />
{ "IBM", "", "ThinkPad X32", "", RADEON_OFF|S3_BIOS|S3_MODE },<br />
/* Michael Wagner <michael-wagner@gmx.de> */<br />
{ "4MBOL&S", "7521 *", "REV. A0", "", 0 },<br />
/* Alexander Wirt */<br />
...<br />
<br />
Add a new entry using the same format as the others. The first four fields identify your machine and are provided by:<br />
<br />
# s2ram -i<br />
<br />
E.g.:<br />
<br />
sys_vendor = "Acer, inc."<br />
sys_product = "Aspire 1640 "<br />
sys_version = "Not Applicable"<br />
bios_version = "3A05"<br />
<br />
Copy these values between the first four sets of quotes. The fifth field identifies which tricks are needed for your machine, seperate each of the tricks with a | character, like the other lines in the file. If no tricks were required, set it to 0.<br />
<br />
Now force a recompilation and reinstallation of uswsusp with makepkg -efi (The -e prevents makepkg from overwriting your customized whitelist.c). Your machine should now suspend properly with a plain:<br />
<br />
# s2ram<br />
<br />
You can now report your identification strings and any tricks required to the suspend-devel@lists.sourceforge.net mailing list. Please specify always that everything works both from X and from the plain console.<br />
<br />
=The hibernate-script and suspension to ram=<br />
<br />
The hibernate-script, developed in the field of the tuxonice project for [[Suspend to Disk]], can be used also to suspend your machine to ram. Actually, he can also try to do this directly, performing the required operations before calling the ACPI S3 state. However, the s2ram seems to be the leading method nowadays and, through the named whitelist, should assure in the future that virtually any laptop can suspend to ram without too much hassle. So, the actually best way to use the power of the hibernate-script for suspension to ram is to use it to call s2ram.<br />
<br />
You can edit /etc/hibernate/hibernate.conf to select ususpend-ram.conf as the default action called by:<br />
<br />
# hibernate<br />
<br />
Just put the following as the first uncommented line:<br />
<br />
TryMethod ususpend-ram.conf<br />
<br />
However, may be that you want to use the hibernate-script primarily to suspend to disk. In that case you should resort to the ram-specific configuration file from the command line:<br />
<br />
# hibernate -F /etc/hibernate/ususpend-ram.conf<br />
<br />
Now you should configure the script. Please note that the options that you put in /etc/hibernate/common.conf will be used anytime you call hibernate (that is also for suspension to disk). On the contrary, the options in /etc/hibernate/ususpend-ram.conf will be used only when you suspend to ram with the s2ram method.<br />
<br />
The hibernate-script options are exhaustively described in the man page hibernate.conf.<br />
<br />
First of all, may be that some module is preventing you from accomplishing a proper suspension cycle. In this case, list it in the UnloadModules: it will be unloaded before suspension and reloaded after resuming. Note that the hibernation script already does this for some blacklisted modules, whose list is /etc/hibernate/blacklisted-modules.<br />
<br />
If you discover that a module is guilty, you should report this to the suspend-devel@lists.sourceforge.net, so that the bad behaviour of the module can be fixed.<br />
<br />
May be also that your display is the guilty and that the tricks provided by s2ram are not enough. The hibernate-script has some further tricks:<br />
<br />
The relevant block of options is the following:<br />
<br />
### vbetool<br />
#EnableVbetool yes<br />
#RestoreVbeStateFrom /var/lib/vbetool/vbestate<br />
#VbetoolPost yes<br />
# RestoreVCSAData yes<br />
<br />
### xhacks<br />
#SwitchToTextMode yes<br />
#UseDummyXServer yes<br />
#DummyXServerConfig xorg-dummy.conf<br />
<br />
However, most of these tricks are already attempted by s2ram and you should not duplicate the effort. Only three tricks in this section are specific to the script. The first is to uncomment both the following two lines:<br />
<br />
EnableVbetool yes<br />
RestoreVbeStateFrom /var/lib/vbetool/vbestate<br />
<br />
Please note that, while s2ram uses an internal vbetool component, the hibernate-script relies on the vbetool package in the extra repo, so you should install it. Basically, this combination of options do something similar to the --vbe_save s2ram option, but, instead of restoring the state saved immediately before suspension, it restores a state manually saved by the user in the file /var/lib/vbetool/vbestate (or any other file you have chosen). You can try to save the state in a peculiar safe situation, like immediately after booting, or before any switching from X to console and back. You can save the state with the following command:<br />
<br />
# vbetool vbestate save > /var/lib/vbetool/vbestate<br />
<br />
The second peculiar trick (very often required!) is to uncomment the following line:<br />
<br />
SwitchToTextMode yes<br />
<br />
The script will switch from X to console before suspension and back to X after a successful resuming.<br />
<br />
Finally, the UseDummyXServer trick uses a second XServer, with a minimal safe configuration only during the suspension cycle, restoring the full fledged X server only after a complete resume. This can be useful with cards with problematic proprietary drivers: the dummy xserver will use the standard vesa driver instead. Anyway, this last trick should be seldom useful nowadays, because also proprietary drivers seem to support suspension without too many problems.<br />
<br />
The hibernate-script gives you many other useful possibilities (such as restarting services, unmounting partitions, ejecting pccards, and so on). Read about them in the man pages.<br />
<br />
=s2both=<br />
You can also suspend your machine both to disk and to ram. This is documented in [[Suspend to Disk#Combining suspend to disk with suspend to RAM|a specific section of the wiki page about suspension to disk]].<br />
<br />
=Automatic Suspend and Wakeup=<br />
<br />
Once you have suspend to ram working, you will probably want it to happend automatically e.g., when you close the laptop lid.<br />
<br />
There are several ways to do this. The easiest is to use a high-level power management tool such as KDE's PowerDevil. Another is to create your own ACPI event handler scripts.<br />
<br />
==Automatic Suspend, the Hard Way==<br />
<br />
ACPI events are managed by configuration files in /etc/acpi/events/. (The laptop-mode-tools package contains some examples). A default configuration file called 'anything' is provided by the acpid package, which runs /etc/acpi/handler.sh on every event.<br />
<br />
An simple event configuration file to manage the opening and closing of a laptop lid (that could be called /etc/acpi/events/lid) looks like this:<br />
<br />
event=button[ /]lid<br />
action=/etc/acpi/actions/lid_handler.sh %e<br />
<br />
The first line specifies the names of the events applicable to this file with a regexp. You can get the names of events by enabling event logging in acpid and looking at /var/log/acpid. <br />
<br />
The second line specifies an executable to be run when an applicable event occurs. The '%e' is a variable containing arguments that the event provides. It's a good idea to provide them to the program.<br />
<br />
It's customary to put handling programs in /etc/acpi/actions/. A possible implementation of lid_handler.sh in the previous example could be:<br />
<br />
#!/bin/sh<br />
# check if the lid is open or closed, using the /proc file<br />
if grep closed /proc/acpi/button/lid/LID/state >/dev/null ; then<br />
# if the lid is now closed, save the network state and suspend to ram<br />
netcfg all-suspend<br />
pm-suspend<br />
else<br />
# if the lid is now open, restore the network state.<br />
# (if we are running, a wakeup has already occured!)<br />
netcfg all-resume<br />
fi<br />
<br />
The same example, adapted for wicd instead of netcfg:<br />
#!/bin/sh<br />
# check if the lid is open or closed, using the /proc file<br />
if grep closed /proc/acpi/button/lid/LID/state >/dev/null ; then<br />
# if the lid is now closed, save the network state and suspend to ram<br />
/usr/lib/wicd/suspend.py<br />
pm-suspend<br />
else<br />
# if the lid is now open, restore the network state.<br />
# (if we are running, a wakeup has already occured!)<br />
/usr/lib/wicd/autoconnect.py<br />
fi<br />
<br />
<br />
Remember to make it executable. With some basic knowledge of shell scripting, you have a lot of possibilities.<br />
<br />
==Controlling Wakeup ==<br />
<br />
The ACPI events that trigger wakeup are controlled through the procfile /proc/acpi/wakeup. An example output is:<br />
<br />
root@hex in /proc/acpi $ cat wakeup<br />
Device S-state Status Sysfs node<br />
LID S3 *enabled<br />
PBTN S4 *enabled<br />
MBTN S5 enabled<br />
PCI0 S3 disabled no-bus:pci0000:00<br />
USB0 S0 disabled pci:0000:00:1d.0<br />
USB1 S0 disabled pci:0000:00:1d.1<br />
USB2 S0 disabled pci:0000:00:1d.2<br />
USB3 S0 disabled pci:0000:00:1d.3<br />
EHCI S0 disabled pci:0000:00:1d.7<br />
AZAL S3 disabled pci:0000:00:1b.0<br />
PCIE S4 disabled pci:0000:00:1e.0<br />
RP01 S4 disabled pci:0000:00:1c.0<br />
RP02 S3 disabled<br />
RP03 S3 disabled<br />
RP04 S3 disabled pci:0000:00:1c.3<br />
RP05 S3 disabled<br />
RP06 S3 disabled<br />
<br />
To toggle whether an event will trigger a wakeup, pipe its name into the /proc/acpi/wakeup. (Note that every name in the file must have 4 letters, so if it is shorter e.g. LID, it needs be prepended with spaces). So to prevent opening the laptop lid from triggering a wakeup, you could do:<br />
<br />
root@hex in /proc/acpi $ echo " LID" > wakeup<br />
root@hex in /proc/acpi $ cat wakeup<br />
Device S-state Status Sysfs node<br />
LID S3 *disabled<br />
PBTN S4 *disabled<br />
MBTN S5 disabled<br />
PCI0 S3 disabled no-bus:pci0000:00<br />
...<br />
<br />
Another thing to note is that the PBTN and MBTN events were also toggle with the LID event. Sometimes events are linked, so that all of them will be enable and disabled in unison. Checking the 'dmesg' command can confirm this:<br />
<br />
root@hex in /proc/acpi $ dmesg<br />
...<br />
ACPI: 'PBTN' and 'LID' have the same GPE, can't disable/enable one seperately<br />
ACPI: 'MBTN' and 'LID' have the same GPE, can't disable/enable one seperately<br />
<br />
This may not actually affect the other events. On a Dell Inspiron 6400, for example, the power button always triggers a wake up. Your mileage may vary.<br />
<br />
None of this will persist between boots, so you might want to add the echo command to /etc/rc.local so it is executed on every boot:<br />
<br />
# disable the laptop lid switch<br />
echo " LID" > /proc/acpi/wakeup</div>Roguededguyhttps://wiki.archlinux.org/index.php?title=Wicd&diff=84484Wicd2009-11-19T22:51:08Z<p>Roguededguy: </p>
<hr />
<div>[[Category: Networking (English)]]<br />
[[Category: HOWTOs (English)]]<br />
[[Category: Internet and Email (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Wicd}}<br />
{{i18n_entry|Italiano|Wicd (Italiano)}}<br />
{{i18n_entry|简体中文|Wicd (简体中文)}}<br />
{{i18n_entry|Türkçe|Wicd (Türkçe)}}<br />
{{i18n_links_end}}<br />
<br />
[http://www.wicd.net/ Wicd] is a network connection manager that can manage wireless and wired interfaces, similar and an alternative to [[NetworkManager]]. Wicd is written in [[Python]] and [[GTK+]], requiring fewer dependencies than other network managers.<br />
<br />
==Installation==<br />
If you are not using gnome (or its notification-daemon), you might want to install xfce4-notifyd from extra before you install wicd, or you will most likely end up with the standard notification-daemon pulling a lot of unnecessary packages.<br />
<br />
# pacman -S xfce4-notifyd<br />
<br />
Wicd also is available from the standard repositories:<br />
<br />
# pacman -S wicd<br />
<br />
This will install Wicd and all the necessary dependencies, including ''dbus'', ''python'' and ''gtk2''.<br />
<br />
===Alternative===<br />
The [http://aur.archlinux.org/packages.php?ID=22923 wicd-bzr] buildscript is available from [[AUR]], which should build the latest development branch.<br />
<br />
If you need an alternative version or you just want to roll your own package, you can easily build it using [[ABS]].<br />
<br />
==Getting Started==<br />
<br />
===Initial Setup===<br />
Wicd provides a daemon that must be started. <br />
<br />
{{Warning | Running multiple network managers ''will'' cause problems, so it is important to ''disable all other network management daemons''.}}<br />
<br />
First, stop all previously running network daemons:<br />
<br />
# /etc/rc.d/network stop<br />
# /etc/rc.d/dhcdbd stop<br />
# /etc/rc.d/networkmanager stop<br />
<br />
Now, edit '''/etc/rc.conf''' as root:<br />
<br />
# nano /etc/rc.conf<br />
<br />
Disable (!) any devices in the INTERFACES array that you wish to manage with Wicd. For example:<br />
<br />
INTERFACES=(!eth0 !wlan0)<br />
<br />
Disable (!) any existing network management daemons in the DAEMONS array, including '''network''', '''dhcdbd''', and '''networkmanager'''.<br />
<br />
Now, add '''dbus''' (if not already present) and '''wicd''' to the DAEMONS array, in that order. The DAEMONS array should now look something like this:<br />
<br />
DAEMONS=(syslog-ng '''dbus''' !network !dhcdbd !networkmanager '''wicd''' ...)<br />
<br />
{{Note | If you use '''hal''', replace '''dbus''' with '''hal''' in DAEMONS array, because the Hal daemon will automatically start dbus for you.}}<br />
<br />
Save and close. <br />
<br />
Add your account to '''network''' group:<br />
<br />
# gpasswd -a USERNAME network<br />
<br />
{{Note | The Unix group that dbus allows to access '''wicd''' is subject to change, and may be different than ''network''. Check which policy group is specified in '''/etc/dbus-1/system.d/wicd.conf''', and add your user to that group.}}<br />
<br />
Lastly, reboot your or start the daemons:<br />
# /etc/rc.d/dbus '''or''' hal start<br />
If you added your user to a new group, logout and then login.<br />
<br />
===Running Wicd===<br />
To load Wicd, run:<br />
<br />
$ wicd-client<br />
<br />
Or if your desktop environment does not have a notification area, run:<br />
<br />
$ wicd-client -n<br />
<br />
You can add '''wicd-client''' to your DE/WM startup to have the application start when you log in.<br />
<br />
{{Note | Wicd doesn't prompt you for a passkey. To use encrypted connections (WPA/WEP), expand the network you want to connect to, click '''Advanced''' and enter the needed info.}}<br />
<br />
==Trouble-shooting==<br />
<br />
=== Importing pynotify failed, notifications disabled ===<br />
In case the package did not get installed automatically -- the package's name is "python-notify":<br />
# pacman -S python-notify<br />
<br />
=== Dbus connection error message ===<br />
Make sure to use the following command for your .xinitrc:<br />
exec ck-launch-session [your environment here]<br />
<br />
As an example, mine reads:<br />
exec ck-launch-session openbox-session<br />
<br />
Otherwise you will get dbus error messages and not be able to connect to networks.<br />
<br />
===Note about graphical sudo programs===<br />
If you are receiving an error about wicd failing to find a graphical sudo program, run one of the following commands:<br />
$ ktsuss wicd-client -n<br />
<br />
$ gksudo wicd-client -n<br />
<br />
$ kdesu wicd-client -n<br />
<br />
These programs require the ktsuss (found in the AUR), gksu, and kdesu packages, respectively.<br />
<br />
==External links==<br />
*[http://bbs.archlinux.org/viewtopic.php?id=40337 Note on the network daemon and interfaces]<br />
*[http://www.wicd.net/download.php Note on interfaces at the official site]</div>Roguededguy