https://wiki.archlinux.org/api.php?action=feedcontributions&user=Lagagnon&feedformat=atomArchWiki - User contributions [en]2024-03-19T13:50:24ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=SANE&diff=416472SANE2016-01-20T23:37:33Z<p>Lagagnon: /* Configuration */</p>
<hr />
<div>[[Category:Imaging]]<br />
[[es:SANE]]<br />
[[fr:Sane]]<br />
[[it:SANE]]<br />
[[ja:Sane]]<br />
[[zh-cn:SANE]]<br />
{{Related articles start}}<br />
{{Related|SANE/Scanner-specific problems}}<br />
{{Related|Scanner Button Daemon}}<br />
{{Related articles end}}<br />
<br />
SANE ([[wikipedia:Scanner Access Now Easy|Scanner Access Now Easy]]) provides a library and a command-line tool to use scanners under GNU/Linux.<br />
[http://www.sane-project.org/sane-supported-devices.html Here] you can check if sane supports your scanner.<br />
<br />
== Installation ==<br />
[[Install]] the {{Pkg|sane}} package.<br />
<br />
== Configuration ==<br />
Now you can try to see if sane recognizes your scanner<br />
$ scanimage -L<br />
If that fails, check that your scanner is plugged into the computer. You also might have to unplug/plug your scanner for {{ic|/etc/udev/rules.d/sane.rules}} to recognize your scanner.<br />
<br />
Now you can see if it actually works<br />
$ scanimage --format=tiff > test.tiff<br />
<br />
If the scanning fails with the message {{ic|scanimage: sane_start: Invalid argument}} you may need to specify the device.<br />
{{hc|$ scanimage -L|<br />
device `v4l:/dev/video0' is a Noname Video WebCam virtual device<br />
device `pixma:04A91749_247936' is a CANON Canon PIXMA MG5200 multi-function peripheral}}<br />
<br />
Then you would need to run<br />
$ scanimage --device pixma:04A91749_247936 --format=tiff > test.tiff<br />
<br />
Sane provides many special backend options for numerous scanner types. To see what these are for your device:<br />
$ scanimage -A<br />
<br />
== Installing a scanner driver ==<br />
Most scanners should work out of the box. If yours does not, see [[SANE/Scanner-specific problems]] for installation instructions.<br />
<br />
===Firmware===<br />
{{Note|This section is only needed if you need to upload firmware to your scanner.}}<br />
<br />
Firmwares usually have the '''{{Ic|.bin}}''' extension. <br />
<br />
Firstly you need to put the firmware someplace safe, it is recommended to put it in a subdirectory of {{ic|/usr/share/sane}}.<br />
<br />
Then you need to tell sane where the firmware is:<br />
*Find the name of the backend for your scanner from the [http://www.sane-project.org/sane-supported-devices.html sane supported devices list].<br />
*Open the file {{ic|/etc/sane.d/<backend-name>.conf}}.<br />
*Make sure the firmware entry is uncommented and let the file-path point to where you put the firmware file for your scanner. Be sure that members of the group {{Ic|scanner}} can access the {{ic|/etc/sane.d/<backend-name>.conf}} file.<br />
<br />
If the backend of your scanner is not part of the sane package (such as hpaio.conf which is part of hplip), you need to uncomment the relevant entry in /etc/sane.d/dll.d/hplip.<br />
<br />
==Install a frontend==<br />
Many frontends exist for SANE, a non-exhaustive list of which can be found on the [http://www.sane-project.org/sane-frontends.html sane-project website]. Another way to find them is to use {{ic|pacman}} to [[Pacman#Querying_package_databases|search the repositories]] for keywords such as "sane" or "scanner".<br />
<br />
* {{App|[[Wikipedia:Scanner_Access_Now_Easy#gscan2pdf|gscan2pdf]]|A GTK2-based GUI to produce PDFs, TIFFs or DjVus from scanned documents. It is also able to apply OCR in the process using different engines. Depends on a few Perl packages to build of which some are in the [[AUR]] as well.|http://gscan2pdf.sourceforge.net/|{{AUR|gscan2pdf}}}}<br />
* {{App|[[Wikipedia:Scanner_Access_Now_Easy#Simple_Scan|Simple Scan]]|A simplified GUI that is intended to be easier to use and better integrated into the [[GNOME]] desktop than XSane. It was initially written for Ubuntu and is maintained by Robert Ancell of Canonical Ltd. for GNU/Linux.|http://launchpad.net/simple-scan|{{Pkg|simple-scan}}}}<br />
* {{App|[[Wikipedia:Scanner_Access_Now_Easy#XSane|XSane]]| A full-featured GTK-based frontend looking a bit old but providing extended functionalities.|http://www.xsane.org/|{{Pkg|xsane}}}}<br />
{{Note|Scanning directly to PDF using XSane in 16bit color depth mode is known to produces [https://bugs.launchpad.net/ubuntu/+source/xsane/+bug/539162 corrupted files] and a note in {{ic|pacman}} output warns so. 8bit mode is known to work.}}<br />
<br />
==Network scanning==<br />
=== Sharing your scanner over a network ===<br />
<br />
You can share your scanner with other hosts on your network who use sane, xsane or xsane-enabled Gimp. To set up the server, first indicate which hosts on your network are allowed access.<br />
<br />
Change the {{ic|/etc/sane.d/saned.conf}} file to your liking, for example:<br />
# required<br />
localhost<br />
# allow local subnet<br />
192.168.0.0/24<br />
<br />
If you use iptables, insert the {{ic|nf_conntrack_sane}} module to let the firewall track saned connections.<br />
<br />
Now start/enable {{ic|saned.socket}} [[systemd#Using units|using systemd]]. Your scanner is now available over the network. For more information, see {{ic|man saned}}.<br />
<br />
=== Accessing your scanner from a remote workstation ===<br />
{{Note|Some network scanners require a different approach. See [[SANE/Scanner-specific problems]].}}<br />
You can access your network-enabled scanner from a remote Arch Linux workstation.<br />
<br />
First, specify the server's host name or IP address in the {{ic|/etc/sane.d/net.conf}} file:<br />
# static IP address<br />
192.168.0.1<br />
# or host name<br />
stratus<br />
<br />
Now test your workstation's connection:<br />
$ scanimage -L<br />
<br />
The network scanner should now also show up in any [[#Install a frontend|front-end]].<br />
<br />
==Troubleshooting==<br />
:See also: [[SANE/Scanner-specific problems]]<br />
<br />
===Invalid argument===<br />
If you get an "Invalid argument" error with xsane or another sane front-end, this could be caused by one of the following reasons:<br />
<br />
==== Missing firmware file ====<br />
No firmware file was provided for the used scanner (see above for details).<br />
<br />
==== Wrong firmware file permissions ====<br />
The permissions for the used firmware file are wrong. Correct them using<br />
# chown root:scanner /usr/share/sane/SCANNER_MODEL/FIRMWARE_FILE<br />
# chmod ug+r /usr/share/sane/SCANNER_MODEL/FIRMWARE_FILE<br />
<br />
==== Multiple backends claim scanner ====<br />
It may happen, that multiple backends support (or pretend to support) your scanner, and sane chooses one that doesn't do after all (the scanner won't be displayed by scanimage -L then). This has happend with older Epson scanners and the <code>epson2</code> resp. <code>epson</code> backends. In this case, the solution is to comment out the unwanted backend in <code>/etc/sane.d/dll.conf</code>. In the Epson case, that would be to change<br />
<br />
epson2<br />
#epson<br />
<br />
to <br />
<br />
#epson2<br />
epson<br />
<br />
===Slow startup===<br />
If you encounter slow startup issue (e.g. {{ic|xsane}} or {{ic|scanimage -L}} take a lot to find scanner) it may be that more than one driver supporting it is available. <br />
<br />
Have a look at {{ic|/etc/sane.d/dll.conf}} and try commenting out one (e.g. you may have epson, epson2 and epkowa enabled at the same time, try leaving only epson or epkowa uncommented)<br />
<br />
You can also try to comment out "net" driver, if there are no network scanners.<br />
<br />
===Permission problem===<br />
<br />
{{Out of date|The {{ic|scanner}} and {{ic|lp}} groups are deprecated.}}<br />
<br />
If you see your scanner only when running {{Ic|lsusb}} (as root), you might get it working by adding your user to {{Ic|scanner}} and/or {{Ic|lp}} group.<br />
# gpasswd -a username scanner<br />
# gpasswd -a username lp<br />
This is reported to work on HP all-in-one models (e.g., PSC 1315 and PSC 2355).<br />
<br />
You can also try to change permissions of usb device but this is not recommended, a better solution is to fix the Udev rules so that your scanner is recognized.<br />
<br />
First, as root, check connected usb devices with {{ic|lsusb}}:<br />
#Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
#Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
#Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
#Bus 003 Device 003: ID 04d9:1603 Holtek Semiconductor, Inc. <br />
#Bus 003 Device 002: ID 04fc:0538 Sunplus Technology Co., Ltd <br />
#Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
#Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br />
#Bus 001 Device 006: ID 03f0:2504 Hewlett-Packard <br />
#Bus 001 Device 002: ID 046d:0802 Logitech, Inc. Webcam C200<br />
#Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br />
<br />
In our example we see the scanner: {{ic|Bus 001 Device 006: ID 03f0:2504 Hewlett-Packard}}. Here {{ic|03f0}} is the ''vendorID'' and {{ic|2504}} is the ''productID''.<br />
<br />
Now open {{ic|/usr/lib/udev/rules.d/49-sane.rules}} and see if there is there is a line with the vendorID and productID of your scanner. If there isn't any, create the new file {{ic|/etc/udev/rules.d/49-sane-missing-scanner.rules}}, with the following contents:<br />
ATTRS{idVendor}=="'''vendorID'''", ATTRS{idProduct}=="'''productID'''", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"<br />
<br />
Save the file, plug out and back in your scanner and the file permissions should be now correct.<br />
<br />
{{Accuracy|The scanner needs to be added to the right backend file, {{ic|hp4200.conf}} won't work for any scanner.}}<br />
<br />
Another tip, is that you can add your device (scanner) in backend file:<br />
<br />
Add {{ic|usb 0x03f0 0x2504}} to {{ic|/etc/sane.d/hp4200.conf}} so it looks like this:<br />
#<br />
# Configuration file for the hp4200 backend<br />
#<br />
#<br />
# HP4200<br />
#usb 0x03f0 0x0105<br />
usb 0x03f0 0x2504</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Surfraw&diff=414497Surfraw2016-01-05T23:42:42Z<p>Lagagnon: </p>
<hr />
<div>[[Category:Internet applications]]<br />
[[Category:Search]]<br />
[http://surfraw.alioth.debian.org/ surfraw] provides a fast UNIX command line interface to a variety of popular WWW search engines. Surfraw was originally created by Julian Assange.<br />
<br />
==Installation==<br />
<br />
[[Install]] the {{Pkg|surfraw}} package.<br />
<br />
==Configuration==<br />
<br />
Surfraw uses the default browser to open the result. The behaviour can be customized via {{ic|~/.surfraw.conf}}<br />
<br />
SURFRAW_graphical_browser=/usr/bin/chromium<br />
#SURFRAW_text_browser=/usr/bin/elinks<br />
SURFRAW_graphical=yes<br />
<br />
==Usage==<br />
<br />
Surfraw consists of a collection of shell scripts, called elvi, each of which searches a specific web site.<br />
<br />
To see the list of elvi type:<br />
<br />
$ surfraw -elvi<br />
<br />
You can call surfraw in full, or the shortened form:<br />
<br />
$ sr duckduckgo ''topic_name''<br />
<br />
You can also add surfraw to your {{ic|$PATH}} to call the elvi directly.<br />
<br />
There are over 100 elvi available for searching the web, e.g. from amazon:<br />
<br />
$ surfraw amazon -search=books -country=en -q Stanislaw Lem <br />
<br />
To search the [[AUR]]:<br />
<br />
sr aur ''package_name''<br />
<br />
To search this wiki:<br />
<br />
sr archwiki ''article_name''<br />
<br />
For a full list of web site search scripts see: [http://surfraw.alioth.debian.org/#elvilist List of Elvi]<br />
<br />
== Troubleshooting ==<br />
<br />
=== /usr/bin/surfraw: line 487: <url>: No such file or directory ===<br />
<br />
If you get a error message like this:<br />
<br />
$ sr google foo<br />
<nowiki>/usr/bin/surfraw: line 487: http://www.google.com/search?q=foo&num=30: No such file or directory</nowiki><br />
<br />
That happens because you haven't specified a browser, and you haven't got Firefox (the default) installed. You can configure your browser in the conf file:<br />
<br />
{{hc|~/.config/surfraw/conf|<br />
def SURFRAW_graphical_browser /usr/bin/chromium}}</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Nouveau&diff=410701Nouveau2015-12-01T06:44:23Z<p>Lagagnon: </p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[es:Nouveau]]<br />
[[it:Nouveau]]<br />
[[ja:Nouveau]]<br />
[[ru:Nouveau]]<br />
[[zh-CN:Nouveau]]<br />
{{Related articles start}}<br />
{{Related|NVIDIA}}<br />
{{Related|Xorg}}<br />
{{Related|Bumblebee}}<br />
{{Related articles end}}<br />
<br />
This article covers installing and configuring the [http://nouveau.freedesktop.org/ Nouveau] open-source driver for NVIDIA graphic cards. For information about the official proprietary driver, see [[NVIDIA]].<br />
<br />
Find your card's [http://nouveau.freedesktop.org/wiki/CodeNames codename] (a more detailed list is available on [[Wikipedia:Comparison of Nvidia Graphics Processing Units|Wikipedia]]), and compare it with the [http://nouveau.freedesktop.org/wiki/FeatureMatrix/ feature matrix] for supported features.<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] the {{Pkg|xf86-video-nouveau}} package. It provides the DDX driver for 2D acceleration in [[Xorg]], and pulls in {{Pkg|mesa}} as a dependency which provides the DRI driver for 3D acceleration.<br />
<br />
For OpenGL support, also install {{Pkg|mesa-libgl}}, and {{Pkg|lib32-mesa-libgl}} when using [[multilib]].<br />
<br />
== Loading ==<br />
<br />
The Nouveau kernel module should load automatically on system boot. If it does not happen, then:<br />
<br />
* Make sure you do '''not''' have {{ic|nomodeset}} or {{ic|1=vga=}} as a [[kernel parameter]], since Nouveau requires kernel mode-setting.<br />
* Also, check that you have not disabled Nouveau by using any modprobe blacklisting within {{ic|/etc/modprobe.d/}} or {{ic|/usr/lib/modprobe.d/}}.<br />
* If all above still fails to load nouveau check dmesg for opcode error. Add {{ic|1=nouveau.config=NvBios=PRAMIN}} to your [[Kernel parameters]] to prevent module unloading.[http://nouveau.freedesktop.org/wiki/TroubleShooting/#index10h3]<br />
<br />
=== Enable early KMS ===<br />
<br />
{{Tip|If you have problems with the resolution, check [[Kernel mode setting#Forcing modes and EDID]].}}<br />
<br />
[[Kernel mode setting]] (KMS) is required by the Nouveau driver. By default, the KMS is done after the other kernel modules are loaded. You will see the text "Loading modules" and the size of the text may change, possibly with an undesirable flicker. See the [http://nouveau.freedesktop.org/wiki/KernelModeSetting Nouveau KernelModeSetting page] for more details.<br />
<br />
It is also possible to start the KMS as early as possible in the boot process, when the [[initramfs]] is loaded. <br />
<br />
To do this, add {{ic|nouveau}} to the {{ic|MODULES}} array in {{ic|/etc/mkinitcpio.conf}}: <br />
<br />
MODULES="... nouveau ..."<br />
<br />
If you are using a custom EDID file, you should embed it into initramfs as well:<br />
<br />
{{hc|/etc/mkinitcpio.conf|<br />
2=FILES="/lib/firmware/edid/your_edid.bin"}}<br />
<br />
Re-generate the initial ramdisk image:<br />
<br />
# mkinitcpio -p <kernel preset; e.g. ''linux''><br />
<br />
If you're experiencing troubles with Nouveau leading to rebuild nouveau-drm several times for testing purposes, do not add {{ic|nouveau}} to the initramfs. It is too easy to forget to rebuild the initramfs and it will just make any testing harder. Just use "Late start" until you are confident the system is stable. There might be additional problems with initramfs if you need a custom firmware (generally not advised).<br />
<br />
== Tips and tricks ==<br />
<br />
=== Keep NVIDIA driver installed ===<br />
<br />
If you want to keep the proprietary NVIDIA driver installed, but want to use the Nouveau driver, comment out nouveau blacklisting in {{ic|/etc/modprobe.d/nouveau_blacklist.conf}} or {{ic|/usr/lib/modprobe.d/nvidia.conf}} modifying it as follows:<br />
<br />
#blacklist nouveau<br />
<br />
And tell Xorg to load nouveau instead of nvidia by creating the file {{ic|/etc/X11/xorg.conf.d/20-nouveau.conf}} with the following content:<br />
<br />
Section "Device"<br />
Identifier "Nvidia card"<br />
Driver "nouveau"<br />
EndSection<br />
<br />
{{Tip|You can use [[NVIDIA#Switching_between_NVIDIA_and_nouveau_drivers|these scripts]] if you are switching between open and closed drivers often.}}<br />
<br />
If you already used the NVIDIA driver, and want to test Nouveau without reboot, make sure the 'nvidia' module is no longer loaded:<br />
<br />
# rmmod nvidia<br />
<br />
Then load the 'nouveau' module: <br />
<br />
# modprobe nouveau<br />
<br />
And check that it loaded fine by looking at kernel messages: <br />
<br />
$ dmesg<br />
<br />
=== Installing the latest development packages ===<br />
<br />
You may install the latest -git packages, through AUR:<br />
<br />
* You can use {{AUR|mesa-git}} which will allow the installation of the latest Mesa (including the latest DRI driver).<br />
* You can use {{AUR|xf86-video-nouveau-git}}{{Broken package link|{{aur-mirror|xf86-video-nouveau-git}}}} which will allow the installation of the latest DDX driver.<br />
* You can also try installing a newer kernel version, through packages like {{AUR|linux-mainline}} in which the Nouveau DRM code would allow better performance.<br />
* To get the latest Nouveau improvements, you should use the {{AUR|linux-git}} package from the AUR, edit the PKGBUILD and use Nouveau's own kernel repository, which is currently located at git://anongit.freedesktop.org/git/nouveau/xf86-video-nouveau.<br />
<br />
Upsteam driver sources can be found at the [http://nouveau.freedesktop.org/wiki/Source Nouveau Source page].<br />
<br />
=== Dual Head ===<br />
<br />
Nouveau supports the xrandr extension for modesetting and multiple monitors. See the [[xrandr]] page for tutorials.<br />
<br />
Here is a full sample {{ic|/etc/X11/xorg.conf.d/20-nouveau.conf}} above for running 2 monitors in dual head mode. You may prefer to use a graphical tool to configure monitors like GNOME Control Center's Display panel ({{ic|gnome-control-center display}}).<br />
<br />
{{bc|<br />
# the right one<br />
Section "Monitor"<br />
Identifier "NEC"<br />
Option "PreferredMode" "1280x1024_60.00"<br />
EndSection<br />
<br />
# the left one<br />
Section "Monitor"<br />
Identifier "FUS"<br />
Option "PreferredMode" "1280x1024_60.00"<br />
Option "LeftOf" "NEC"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "nvidia card"<br />
Driver "nouveau"<br />
Option "Monitor-DVI-I-1" "NEC"<br />
Option "Monitor-DVI-I-2" "FUS"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "screen1"<br />
Monitor "NEC"<br />
DefaultDepth 24<br />
SubSection "Display"<br />
Depth 24<br />
Virtual 2560 2048<br />
EndSubSection<br />
Device "nvidia card"<br />
EndSection<br />
<br />
Section "ServerLayout"<br />
Identifier "layout1"<br />
Screen "screen1"<br />
EndSection}}<br />
<br />
=== Setting console resolution ===<br />
<br />
Use the {{Pkg|fbset}} tool to adjust console resolution.<br />
<br />
You can also pass the resolution to nouveau with the {{ic|1=video=}} kernel line option (see [[KMS]]).<br />
<br />
=== Power Management ===<br />
<br />
GPU Scaling is in various stages of readiness depending on the GPU. After kernel 3.18 there's power management available in kernel. If you plan to play games you need to enable the power state on the module configuration by adding {{ic|1=nouveau.pstate=1}} to the module configuration. This will result in higher clocks when required.<br />
<br />
See the [http://nouveau.freedesktop.org/wiki/PowerManagement Nouveau PowerManagement page] for more details.<br />
<br />
==== Fan Control ====<br />
<br />
If it is implemented for you card you can configure fan control via {{ic|/sys}}.<br />
<br />
$ find /sys -name pwm1_enable<br />
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon1/pwm1_enable<br />
$ readlink /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/driver<br />
../../../../bus/pci/drivers/nouveau<br />
<br />
{{ic|pwm1_enable}} can be set to 0, 1 or 2 meaning NONE, MANUAL and AUTO fan control. If set to manual fan control, you can set {{ic|pwm1}} manually, for example to 40 for 40%.<br />
{{Warning|Use at your own risk! Don't overheat your card!}}<br />
<br />
You can also set it by udev rule:<br />
$ cat /etc/udev/rules.d/50-nouveau-hwmon.rules<br />
ACTION=="add", SUBSYSTEM=="hwmon", DRIVERS=="nouveau", ATTR{pwm1_enable}="2"<br />
<br />
Sources:<br />
* http://floppym.blogspot.de/2013/07/fan-control-with-nouveau.html<br />
* https://kalgan.cc/blog/posts/Controlling_nVidia_cards_fans_with_nouveau_in_Debian/<br />
<br />
=== Optimus ===<br />
<br />
You have two solutions to use [[Optimus]] on a laptop (aka hybrid graphics, when you have two GPUs on your laptop): [[bumblebee]] and [[PRIME]]<br />
<br />
== Troubleshooting ==<br />
Add {{ic|1=drm.debug=14}} and {{ic|1=log_buf_len=16M}} to your [[kernel parameters]] to turn on video debugging:<br />
<br />
Create verbose Xorg log:<br />
$ startx -- -logverbose 9 -verbose 9<br />
<br />
View loaded video module parameters and values:<br />
$ modinfo -p video<br />
<br />
====Disable MSI====<br />
If you are still having problems loading the module or starting X server append {{ic|1=nouveau.config=NvMSI=0}} to your [[Kernel parameters]].<br />
<br />
Source: https://bugs.freedesktop.org/show_bug.cgi?id=78441<br />
<br />
====Phantom Output Issue====<br />
<br />
It is possible for the nouveau driver to detect "phantom" outputs. For example, both VGA-1 and LVDS-1 are shown as connected but only LVDS-1 is present.<br />
<br />
This causes display problems and a corrupted screen.<br />
<br />
The problem can be overcome by disabling the phantom output (VGA-1 in the examples given) on the kernel command line of your boot loader. This can be achieved by appending the following:<br />
<br />
video=VGA-1:d<br />
<br />
Where '''d''' = disable.<br />
<br />
The phantom output can also be disabled in X by adding the following to {{ic|/etc/X11/xorg.conf.d/20-nouveau.conf}}:<br />
<br />
Section "Monitor"<br />
Identifier "VGA-1"<br />
Option "Ignore" "1"<br />
EndSection<br />
<br />
Source: http://gentoo-en.vfose.ru/wiki/Nouveau#Phantom_and_unpopulated_output_connector_issues<br />
<br />
====Random Lockups with kernel error messages====<br />
<br />
Specific nVidia chips with Nouveau may give random system lockups and more commonly throw many kernel messages, seen with dmesg. Try adding the kernel parameter boot option:<br />
<br />
nouveau.noaccel=1<br />
<br />
Source: https://fedoraproject.org/wiki/Common_kernel_problems#Systems_with_nVidia_adapters_using_the_nouveau_driver_lock_up_randomly</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Syslinux&diff=281897Syslinux2013-11-07T16:17:24Z<p>Lagagnon: </p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[es:Syslinux]]<br />
[[fr:Syslinux]]<br />
[[it:Syslinux]]<br />
[[ja:Syslinux]]<br />
[[tr:Syslinux]]<br />
[[zh-CN:Syslinux]]<br />
{{Article summary start}}<br />
{{Article summary text|Describes installing and configuring Syslinux, a collection of bootloaders.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Boot process overview}}}}<br />
{{Article summary end}}<br />
[[Wikipedia:SYSLINUX|Syslinux]] is a collection of boot loaders capable of booting from hard drives, CDs, and over the network via PXE. It supports the [[Wikipedia:File Allocation Table|FAT]], [[Wikipedia:ext2|ext2]], [[Ext3|ext3]], [[Ext4|ext4]], and [[Btrfs]] file systems.<br />
<br />
{{Note|1=Syslinux (as of version 6.02, in both BIOS and UEFI) cannot access files from partitions other than its own (unlike [[GRUB]]). This feature (called multi-fs) is yet to be implemented upstream. If you want to help with the multi-fs feature, [http://bugzilla.syslinux.org/show_bug.cgi?id=33 contact upstream].}}<br />
<br />
{{Note|1=Syslinux update (version 6.02-3 to 6.02-4) is a Syslinux BIOS update and may result in your system not booting. To fix this rerun the syslinux install: "# syslinux-install_update -i -a -m". You must do this immediately after the syslinux update, otherwise you may have to use something like the Grub Super Boot CD to reboot into your system to run that command.}}<br />
<br />
== BIOS Systems ==<br />
<br />
=== Syslinux boot process ===<br />
<br />
# '''Load MBR'''. At boot, the computer loads the [[MBR]] ({{ic|/usr/lib/syslinux/bios/mbr.bin}}). <br />
# '''Search active partition'''. The MBR looks for the partition that is marked as active (boot flag). <br />
# '''Execute volume boot record'''. Once found, the volume boot record (VBR) will be executed. In the case of ext2/3/4 and FAT12/16/32, the starting sector of {{ic|ldlinux.sys}} is hard-coded into the VBR.<br />
# '''Execute ldlinux.sys'''. The VBR will execute ({{ic|ldlinux.sys}}). Therefore, if the location of {{ic|ldlinux.sys}} changes, Syslinux will no longer boot. (In the case of Btrfs, the above method will not work since files move around resulting in the sector location of {{ic|ldlinux.sys}} changing. Therefore, the entire Syslinux code needs to be stored outside the filesystem. The code is stored in the sectors following the VBR.) <br />
# '''Search configuration file'''. Once Syslinux is fully loaded, it looks for a configuration file, either {{ic|extlinux.conf}} or {{ic|syslinux.cfg}}. <br />
# '''Load configuration'''. If one is found, the configuration file is loaded. If no configuration file is found, you will be given a Syslinux prompt.<br />
<br />
=== Installation ===<br />
<br />
* Install {{Pkg|syslinux}} package from [[official repositories]]. <br />
<br />
# pacman -S syslinux<br />
<br />
{{Note|<br />
* Since Syslinux 4, Extlinux and Syslinux are the same thing.<br />
* {{Pkg|gptfdisk}} is required for [[wikipedia:GUID_Partition_Table|GPT]] support using the automated script.<br />
* If your boot partition is FAT, you will also need {{Pkg|mtools}}.<br />
}}<br />
<br />
==== Automatic Install ====<br />
<br />
The {{ic|syslinux-install_update}} script will install Syslinux, copy/symlink {{ic|*.c32}} modules to {{ic|/boot/syslinux}}, set the boot flag and install the boot code in the MBR. It can handle [[Master Boot Record|MBR]] and [[GUID Partition Table|GPT]] disks along with software RAID.<br />
<br />
:1. If you use a separate boot partition make sure that it is mounted. Check with {{ic|lsblk}}; if you do not see a {{ic|/boot}} mountpoint, mount it before you go any further.<br />
<br />
:2. Run {{ic|syslinux-install_update}} with flags: {{ic|-i}} (install the files), {{ic|-a}} (mark the partition ''active'' with the ''boot'' flag), {{ic|-m}} (install the ''MBR'' boot code):<br />
# syslinux-install_update -i -a -m<br />
<br />
:3. Create or Edit {{ic|/boot/syslinux/syslinux.cfg}} by following [[#Configuration]].<br />
<br />
{{Note|<br />
* When you reboot your system now, you will have a Syslinux prompt. To automatically boot your system or get a boot menu, you still need to create a configuration file.<br />
* If you have just cloned your disk to say {{ic|/mnt/clone}}, install syslinux by issuing from the Arch installation medium:<br />
# syslinux-install_update.sh -i -a -m -c /mnt/clone<br />
}}<br />
<br />
==== Manual install ====<br />
<br />
{{Note|<br />
* If you are unsure of which partition table you are using (MBR or GPT), you can check using the following command<br />
# blkid -s PTTYPE -o value /dev/sda<br />
gpt<br />
<br />
* If you are trying to rescue an installed system with a live CD, be sure to [[Change_Root|chroot]] into it before executing these commands. If you do not chroot first, you must prepend all file paths (not {{ic|/dev/}} paths) with the mount point.<br />
}}<br />
<br />
Your boot partition, on which you plan to install Syslinux, must contain a FAT, ext2, ext3, ext4, or Btrfs file system. You should install it on a mounted directory—not a {{ic|/dev/sdXY}} device. You do not have to install it on the root directory of a file system, e.g., with device {{ic|/dev/sda1}} mounted on {{ic|/boot}}. You can install Syslinux in the {{ic|syslinux}} directory:<br />
<br />
# mkdir /boot/syslinux<br />
# cp -r /usr/lib/syslinux/bios/* /boot/syslinux<br />
# extlinux --install /boot/syslinux<br />
<br />
After this install the Syslinux boot code ({{ic|mbr.bin}} or {{ic|gptmbr.bin}}) to Master Boot Record 440-byte boot code region (not to be confused with MBR aka msdos partition table) of the disk.<br />
<br />
===== MBR partition table =====<br />
<br />
{{Box||See the main article: [[Master Boot Record]]|#E5E5FF|#FCFCFC}}<br />
<br />
Next you need to mark your boot partition active in your partition table. Applications capable of doing this include {{ic|fdisk}}, {{ic|cfdisk}}, {{ic|sfdisk}}, {{ic|parted/gparted}} ("boot" flag). It should look like this:<br />
{{hc|# fdisk -l /dev/sda|<br />
[...]<br />
Device Boot Start End Blocks Id System<br />
/dev/sda1 * 2048 104447 51200 83 Linux<br />
/dev/sda2 104448 625142447 312519000 83 Linux<br />
}}<br />
<br />
Install the MBR:<br />
# dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/bios/mbr.bin of=/dev/sda<br />
<br />
An alternate MBR which Syslinux provides is: {{ic|altmbr.bin}}. This MBR does ''not'' scan for bootable partitions; instead, the last byte of the MBR is set to a value indicating which partition to boot from. Here is an example of how {{ic|altmbr.bin}} can be copied into position:<br />
# printf '\x5' | cat /usr/lib/syslinux/bios/altmbr.bin - | \<br />
dd bs=440 count=1 iflag=fullblock conv=notrunc of=/dev/sda<br />
<br />
In this case, a single byte of value 5 is appended to the contents of {{ic|altmbr.bin}} and the resulting 440 bytes are written to the MBR on device {{ic|sda}}. Syslinux was installed on the first logical partition ({{ic|/dev/sda5}}) of the disk.<br />
<br />
===== GUID partition table =====<br />
<br />
{{Box||See the main article: [[GUID Partition Table]]|#E5E5FF|#FCFCFC}}<br />
<br />
Bit 2 of the attributes ("legacy_boot" attribute) needs to be set for the {{ic|/boot}} partition:.<br />
# sgdisk /dev/sda --attributes=1:set:2<br />
<br />
This would toggle the attribute ''legacy BIOS bootable'' on partition 1. To check:<br />
{{hc|<nowiki># sgdisk /dev/sda --attributes=1:show</nowiki>|<br />
1:2:1 (legacy BIOS bootable)<br />
}}<br />
<br />
Install the MBR:<br />
# dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/bios/gptmbr.bin of=/dev/sda<br />
<br />
If this does not work you can also try:<br />
# syslinux-install_update -i -m<br />
<br />
== UEFI Systems ==<br />
<br />
{{Note|<br />
* UEFI support is available only from Syslinux 6.xx onwards.<br />
<br />
*{{ic|$esp}} is the mountpoint of the ESP in the below commands.<br />
<br />
* {{ic|efi64}} denotes x86_64 UEFI systems, for IA32 (32-bit) EFI replace {{ic|efi64}} with {{ic|efi32}} in the below commands.<br />
<br />
* For syslinux, kernel and initramfs files need to be in the ESP, as syslinux does not (currently) have the ability to access files outside its own partition (i.e. outside ESP in this case). For this reason, it is recommended to mount ESP at {{ic|/boot}}.<br />
<br />
* The automatic install script {{ic|/usr/bin/syslinux-install_update}} does not support UEFI install.<br />
<br />
* The configuration syntax of {{ic|syslinux.cfg}} for UEFI is same as that of BIOS.<br />
}}<br />
<br />
=== Limitations of UEFI Syslinux ===<br />
<br />
* UEFI Syslinux application {{ic|syslinux.efi}} cannot be signed by {{ic|sbsign}} (from sbsigntool) for UEFI Secure Boot. Bug report - http://bugzilla.syslinux.org/show_bug.cgi?id=8<br />
<br />
* Using TAB to edit kernel parameters in UEFI Syslinux menu lead to garbaged display (text on top of one-another). Bug report - http://bugzilla.syslinux.org/show_bug.cgi?id=9<br />
<br />
* UEFI Syslinux does not support chainloading other EFI applications like {{ic|UEFI Shell}} or {{ic|Windows Boot Manager}}. Bug report - http://bugzilla.syslinux.org/show_bug.cgi?id=17<br />
<br />
* UEFI Syslinux does not boot in Virtual Machines like QEMU/OVMF or VirtualBox or VMware and in some UEFI emulation environments like DUET. Bug reports - http://bugzilla.syslinux.org/show_bug.cgi?id=21 and http://bugzilla.syslinux.org/show_bug.cgi?id=23<br />
<br />
* Memdisk is not available for UEFI. Bug report - http://bugzilla.syslinux.org/show_bug.cgi?id=30<br />
<br />
=== Installation ===<br />
<br />
* Install {{Pkg|syslinux}} package and setup syslinux in the EFI System Partition (ESP) as follows:<br />
<br />
# pacman -S syslinux<br />
<br />
* Copy syslinux files to ESP<br />
<br />
# mkdir -p $esp/EFI/syslinux<br />
# cp -r /usr/lib/syslinux/efi64/* $esp/EFI/syslinux<br />
<br />
* Setup boot entry for Syslinux using [[#Unified_Extensible_Firmware_Interface#efibootmgr|efibootmgr]]:<br />
<br />
# mount -t efivarfs efivarfs /sys/firmware/efi/efivars<br />
# efibootmgr -c -d /dev/sdX -p Y -l /EFI/syslinux/syslinux.efi -L "Syslinux"<br />
<br />
* Create or edit {{ic|$esp/EFI/syslinux/syslinux.cfg}} by following [[#Configuration]].<br />
<br />
{{Note|The config file for UEFI is {{ic|$esp/EFI/syslinux/syslinux.cfg}}, not {{ic|/boot/syslinux/syslinux.cfg}}. Files in {{ic|/boot/syslinux/}} are BIOS specific and not related to UEFI syslinux.}}<br />
<br />
== Configuration ==<br />
<br />
The Syslinux configuration file, {{ic|syslinux.cfg}}, should be created in the same directory where you installed Syslinux. In our case, {{ic|/boot/syslinux/}}.<br />
<br />
The bootloader will look for either {{ic|syslinux.cfg}} (preferred) or {{ic|extlinux.conf}}<br />
<br />
{{Tip|<br />
* Instead of {{ic|LINUX}}, the keyword {{ic|KERNEL}} can also be used. {{ic|KERNEL}} tries to detect the type of the file, while {{ic|LINUX}} always expects a Linux kernel. <br />
* {{ic|TIMEOUT}} value is in units of '''1/10''' of a second.<br />
}}<br />
<br />
=== Examples ===<br />
<br />
==== Basic configuration ====<br />
<br />
This is a simple configuration file that will show a {{ic|boot:}} prompt and automatically boot after 5 seconds.<br />
<br />
{{Note|The partition in question needs to be whatever you have as {{ic|/}} (root), not {{ic|/boot}}.}}<br />
<br />
Configuration:<br />
{{hc|/boot/syslinux/syslinux.cfg|<nowiki><br />
PROMPT 1<br />
TIMEOUT 50<br />
DEFAULT arch<br />
<br />
LABEL arch<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux.img<br />
<br />
LABEL archfallback<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux-fallback.img</nowiki><br />
}}<br />
<br />
If you want to boot directly without seeing a prompt, set {{ic|PROMPT}} to {{ic|0}}.<br />
<br />
If you want to use [[UUID]] for persistent device naming instead of device names, change the {{ic|APPEND}} line to your equivalent {{ic|UUID}} of the root partition:<br />
APPEND root='''UUID='''978e3e81-8048-4ae1-8a06-aa727458e8ff rw<br />
<br />
If you use encryption [[LUKS]] change the {{ic|APPEND}} line to use your encrypted volume:<br />
APPEND root=/dev/mapper/''group''-''name'' cryptdevice=/dev/sda2:''name'' rw<br />
<br />
If you are using software [[Wikipedia:RAID|RAID]] using [http://neil.brown.name/blog/mdadm mdadm], change the {{ic|APPEND}} line to accommodate your RAID arrays. As an example the following accommodates three RAID 1 array's and sets the appropriate one as root:<br />
APPEND root=/dev/md1 rw md=0,/dev/sda2,/dev/sdb2 md=1,/dev/sda3,/dev/sdb3 md=2,/dev/sda4,/dev/sdb4<br />
<br />
If booting from a software raid partition fails using the kernel device node method above an alternative, a more reliable, way is to use partition labels:<br />
APPEND root=LABEL=THEROOTPARTITIONLABEL rw<br />
<br />
==== Text Boot menu ====<br />
<br />
Syslinux also allows you to use a boot menu. To use it, copy the {{ic|menu}} module to your Syslinux directory:<br />
# cp /usr/lib/syslinux/bios/menu.c32 /boot/syslinux/<br />
<br />
Configuration:<br />
{{hc|/boot/syslinux/syslinux.cfg|<nowiki><br />
UI menu.c32<br />
PROMPT 0<br />
<br />
MENU TITLE Boot Menu<br />
TIMEOUT 50<br />
DEFAULT arch<br />
<br />
LABEL arch<br />
MENU LABEL Arch Linux<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux.img<br />
<br />
LABEL archfallback<br />
MENU LABEL Arch Linux Fallback<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux-fallback.img</nowiki><br />
}}<br />
<br />
For more details about the menu system, see [http://git.kernel.org/?p=boot/syslinux/syslinux.git;a=blob;f=doc/menu.txt the Syslinux documentation].<br />
<br />
==== Graphical boot menu ====<br />
<br />
Syslinux also allows you to use a graphical boot menu. To use it, copy the {{ic|vesamenu}} COM32 module to your Syslinux folder:<br />
# cp /usr/lib/syslinux/bios/vesamenu.c32 /boot/syslinux/<br />
<br />
[https://projects.archlinux.org/archiso.git/tree/configs/releng/syslinux This config] uses the same menu design as the Arch Install CD. The background file can be found there too. To make sure that your system can boot with this config, check that it is pointing to the correct partition.<br />
<br />
Configuration:<br />
{{hc|/boot/syslinux/syslinux.cfg|<nowiki><br />
UI vesamenu.c32<br />
DEFAULT arch<br />
PROMPT 0<br />
MENU TITLE Boot Menu<br />
MENU BACKGROUND splash.png<br />
TIMEOUT 50<br />
<br />
MENU WIDTH 78<br />
MENU MARGIN 4<br />
MENU ROWS 5<br />
MENU VSHIFT 10<br />
MENU TIMEOUTROW 13<br />
MENU TABMSGROW 11<br />
MENU CMDLINEROW 11<br />
MENU HELPMSGROW 16<br />
MENU HELPMSGENDROW 29<br />
<br />
# Refer to http://www.syslinux.org/wiki/index.php/Comboot/menu.c32<br />
<br />
MENU COLOR border 30;44 #40ffffff #a0000000 std<br />
MENU COLOR title 1;36;44 #9033ccff #a0000000 std<br />
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all<br />
MENU COLOR unsel 37;44 #50ffffff #a0000000 std<br />
MENU COLOR help 37;40 #c0ffffff #a0000000 std<br />
MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std<br />
MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std<br />
MENU COLOR msg07 37;40 #90ffffff #a0000000 std<br />
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std<br />
<br />
<br />
LABEL arch<br />
MENU LABEL Arch Linux<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux.img<br />
<br />
<br />
LABEL archfallback<br />
MENU LABEL Arch Linux Fallback<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux-fallback.img</nowiki><br />
}}<br />
<br />
Since Syslinux 3.84, {{ic|vesamenu.c32}} supports the {{ic|MENU RESOLUTION $WIDTH $HEIGHT}} directive.<br />
To use it, insert {{ic|MENU RESOLUTION 1440 900}} into your config for a 1440x900 resolution.<br />
The background picture has to have exactly the right resolution, however, as Syslinux will otherwise refuse to load the menu.<br />
<br />
=== Auto boot ===<br />
<br />
If you do not want to see the Syslinux menu at all, comment out all {{ic|UI}} commands and make sure there is a {{ic|DEFAULT}} set in your {{ic|syslinux.cfg}}.<br />
<br />
=== Chainloading ===<br />
<br />
{{Note|Syslinux BIOS cannot directly chainload files from other partitions, however {{ic|chain.c32}} can boot partition boot sector (VBR).}}<br />
<br />
If you want to chainload other operating systems (such as Windows) or boot loaders, copy (or symlink) the {{ic|chain.c32}} module to the Syslinux directory (for details, see the instructions in the previous section). Then create a section in the configuration file:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
...<br />
LABEL windows<br />
MENU LABEL Windows<br />
COM32 chain.c32<br />
APPEND hd0 3<br />
...<br />
}}<br />
<br />
{{ic|hd0 3}} is the third partition on the first BIOS drive - drives are counted from zero, but partitions are counted from one. <br />
<br />
If you are unsure about which drive your BIOS thinks is "first", you can instead use the MBR identifier, or if you are using GPT, the filesystem labels. To use the MBR identifier, run the command<br />
{{hc|# fdisk -l /dev/sdb|<nowiki><br />
Disk /dev/sdb: 128.0 GB, 128035676160 bytes <br />
255 heads, 63 sectors/track, 15566 cylinders, total 250069680 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk identifier: 0xf00f1fd3<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sdb1 2048 4196351 2097152 7 HPFS/NTFS/exFAT<br />
/dev/sdb2 4196352 250066943 122935296 7 HPFS/NTFS/exFAT</nowiki><br />
}}<br />
<br />
replacing {{ic|/dev/sdb}} with the drive you wish to chainload. Using the hexadecimal number under Disk identifier: {{ic|0xf00f1fd3}} in this case, the syntax in {{ic|syslinux.cfg}} is<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
...<br />
LABEL windows<br />
MENU LABEL Windows<br />
COM32 chain.c32<br />
APPEND mbr:0xf00f1fd3<br />
...<br />
}}<br />
<br />
For more details about chainloading, see [http://www.syslinux.org/wiki/index.php/Comboot/chain.c32 the Syslinux wiki].<br />
<br />
If you have [[GRUB]] installed on the same partition, you can chainload it by using: <br />
{{hc|/boot/syslinux/syslinux.cfg|<nowiki><br />
...<br />
LABEL grub2<br />
MENU LABEL Grub2<br />
COM32 chain.c32<br />
append file=../grub/boot.img<br />
...</nowiki><br />
}}<br />
<br />
This may be required for booting from ISO images.<br />
<br />
=== Chainloading other Linux systems ===<br />
<br />
Chainloading another bootloader such as Windows' is pretty obvious, as there is a definite bootloader to chain to. But with Syslinux, it is only able to load files residing on the same partition as the configuration file. Thus, if you have another version of Linux on a separate partition, without a shared {{ic|/boot}}, it becomes necessary to employ Extlinux. Essentially, Extlinux can be installed on the partition superblock and be called as a separate bootloader from the MBR installed by Syslinux. Extlinux is part of the Syslinux project and is included with the {{Pkg|syslinux}} package.<br />
<br />
The following instructions assume you have Syslinux installed already. These instructions will also assume that the typical Arch Linux configuration path of {{ic|/boot/syslinux}} is being used and the chainloaded {{ic|/}} is on {{ic|/dev/sda3}}. <br />
<br />
From a booted Linux (likely the partition that Syslinux is set up to boot), mount the other root partition to your desired mount point. In this example this will be {{ic|/mnt}}. Also, if a separate {{ic|/boot}} partition is used on the second operating system, that will also need to be mounted. The example assumes this is {{ic|/dev/sda2}}.<br />
# mount /dev/sda3 /mnt<br />
# mount /dev/sda2 /mnt/boot (only necessary for separate /boot)<br />
Install Extlinux and copy necessary {{ic|*.c32}} files<br />
# extlinux -i /mnt/boot/syslinux<br />
# cp /usr/lib/syslinux/bios/{chain,menu,libutil,libcom32}.c32 /mnt/boot/syslinux<br />
<br />
Create {{ic|/mnt/boot/syslinux/syslinux.cfg}}. Below is an example:<br />
{{hc|/boot/syslinux/syslinux.cfg '''on /dev/sda3'''|<nowiki><br />
timeout 10<br />
<br />
ui menu.c32<br />
<br />
label Other Linux<br />
linux /boot/vmlinuz-linux<br />
initrd /boot/initramfs-linux.img<br />
append root=/dev/sda3 rw quiet<br />
<br />
label MAIN<br />
com32 chain.c32<br />
append hd0 0</nowiki><br />
}}<br />
<br />
taken from [[User:Djgera|Djgera's user wiki page]].<br />
<br />
=== Using memtest ===<br />
<br />
Install {{Pkg|memtest86+}} from the [[official repositories]].<br />
<br />
Use this {{ic|LABEL}} section to launch [[Wikipedia:Memtest86|memtest]]:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
...<br />
LABEL memtest<br />
MENU LABEL Memtest86+<br />
LINUX ../memtest86+/memtest.bin<br />
...<br />
}}<br />
<br />
=== HDT ===<br />
<br />
[http://hdt-project.org/ HDT (Hardware Detection Tool)] displays hardware information. Like before, the {{ic|.c32}} file has to be copied or symlinked from {{ic|/boot/syslinux/}}.<br />
For PCI info, either copy or symlink {{ic|/usr/share/hwdata/pci.ids}} to {{ic|/boot/syslinux/pci.ids}} and add the following to your configuration file:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
LABEL hdt<br />
MENU LABEL Hardware Info<br />
COM32 hdt.c32<br />
}}<br />
<br />
=== Reboot and power off ===<br />
<br />
Use the following sections to reboot or power off your machine:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
LABEL reboot<br />
MENU LABEL Reboot<br />
COM32 reboot.c32<br />
<br />
LABEL poweroff<br />
MENU LABEL Power Off<br />
COMBOOT poweroff.com<br />
}}<br />
<br />
=== Clear menu ===<br />
<br />
To clear the screen when exiting the menu, add the following line:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
MENU CLEAR<br />
}}<br />
<br />
=== Keyboard remapping ===<br />
<br />
If you often have to edit your boot parameters, you might want to remap your keyboard layout. This allows you to enter "=", "/" and other characters easily on a non-US keyboard.<br />
<br />
First you have to create a compatible keymap (for example a German one):<br />
# cp /usr/share/kbd/keymaps/i386/qwerty/us.map.gz ./<br />
# cp /usr/share/kbd/keymaps/i386/qwertz/de.map.gz ./<br />
# gunzip {de,us}.map.gz<br />
# mv de.{,k}map<br />
# mv us.{,k}map<br />
# keytab-lilo de > de.ktl<br />
<br />
The last command has to be run as root, otherwise it will not work.<br />
<br />
Copy {{ic|de.ktl}} as root to {{ic|/boot/syslinux/}} and set ownership to root:<br />
# chown root:root /boot/syslinux/de.ktl<br />
<br />
Now edit {{ic|syslinux.conf}} and add:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
KBDMAP de.ktl<br />
}}<br />
<br />
=== Hiding the menu ===<br />
<br />
Use the option:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
MENU HIDDEN<br />
}}<br />
to hide the menu while displaying only the timeout. Press any key to bring up the menu.<br />
<br />
=== Pxelinux===<br />
{{Note|Syslinux at present has no UEFI networking stack, so you'll be unable to use {{AUR|syslinux-efi-git}} (as is possible with [[#GRUB]]) and still expect to be able to tftp your kernel and initramfs; pxelinux still works fine for legacy PXE booting}}<br />
<br />
[[Syslinux|Pxelinux]] is provided by {{Pkg|syslinux}}.<br />
<br />
Copy the pxelinux bootloader (provided by the syslinux package) to the boot directory of the client.<br />
<br />
# cp /usr/lib/syslinux/bios/pxelinux.0 "$root/boot"<br />
# mkdir "$root/boot/pxelinux.cfg"<br />
<br />
We also created the {{ic|pxelinux.cfg}} directory, which is where pxelinux searches for configuration files by default. Because we don't want to discriminate between different host MACs, we then create the {{ic|default}} configuration.<br />
<br />
{{hc|# vim "$root/boot/pxelinux.cfg/default"|<nowiki><br />
default linux<br />
<br />
label linux<br />
kernel vmlinuz-linux<br />
append initrd=initramfs-linux.img quiet ip=:::::eth0:dhcp nfsroot=10.0.0.1:/arch<br />
</nowiki>}}<br />
<br />
Or if you are using NBD, use the following append line:<br />
<br />
{{bc|<nowiki>append ro initrd=initramfs-linux.img ip=:::::eth0:dhcp nbd_host=10.0.0.1 nbd_name=arch root=/dev/nbd0</nowiki>}}<br />
<br />
{{Note|You will need to change {{ic|nbd_host}} and/or {{ic|nfsroot}}, respectively, to match your network configuration (the address of the NFS/NBD server)}}<br />
<br />
The pxelinux configuration syntax identical to syslinux; refer to the upstream documentation for more information.<br />
<br />
The kernel and initramfs will be transferred via TFTP, so the paths to those are going to be relative to the TFTP root. Otherwise, the root filesystem is going to be the NFS mount itself, so those are relative to the root of the NFS server.<br />
<br />
To actually load pxelinux, replace {{ic|filename "/grub/i386-pc/core.0";}} in {{ic|/etc/dhcpd.conf}} with {{ic|filename "/pxelinux.0"}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Using the Syslinux prompt===<br />
<br />
You can type in the {{ic|LABEL}} name of the entry that you want to boot (as per your {{ic|syslinux.cfg}}). If you used the example configurations, just type:<br />
boot: arch<br />
<br />
If you get an error that the configuration file could not be loaded, you can pass your needed boot parameters, e.g.:<br />
boot: ../vmlinuz-linux root=/dev/sda2 rw initrd=../initramfs-linux.img<br />
<br />
If you do not have access to {{ic|boot:}} in [[Ramdisk|ramfs]], and therefore temporarily unable to boot kernel again,<br />
:1. Create a temporary directory, in order to mount your root partition (if it does not exist already):<br />
# mkdir -p /new_root<br />
:2. Mount {{ic|/}} under {{ic|/new_root}} (in case {{ic|/boot/}} is on the same partition, otherwise you will need to mount them both):<br />
{{Note|Busybox cannot mount {{ic|/boot}} if it is on its own ext2 partition.}}<br />
# mount /dev/sd[a-z][1-9] /new_root<br />
<br />
:3. Use {{ic|vim}} and edit {{ic|syslinux.cfg}} again to suit your needs and save file.<br />
:4. Reboot.<br />
<br />
=== Fsck fails on root partition ===<br />
<br />
In the case of a badly corrupted root partition (in which the journal is damaged), in the ramfs emergency shell, mount the root file system:<br />
<br />
# mount /dev/''root partition'' /new_root<br />
And grab the tune2fs binary from the root partition (it is not included in Syslinux):<br />
# cp /new_root/sbin/tune2fs /sbin/<br />
<br />
Follow the instructions at [[Fsck#ext2fs_:_no_external_journal|ext2fs: no external journal]] to create a new journal for the root partition.<br />
<br />
=== No Default or UI found on some computers ===<br />
<br />
Certain motherboard manufacturers have less compatibility for booting from USB devices than others. While an ext4 formatted USB drive may boot on a more recent computer, some computers may hang if the boot partition containing the ''kernel'' and ''initrd'' are not on a FAT16 partition. To prevent an older machine from loading {{ic|ldlinux}} and failing to read {{ic|syslinux.cfg}}, use {{ic|cfdisk}} to create a FAT16 partition (<=2GB) and format using {{Pkg|dosfstools}}:<br />
# mkfs.msdos -F 16 /dev/sda1<br />
<br />
then install and configure Syslinux.<br />
<br />
=== Missing operating system ===<br />
<br />
If you get this message, check if the partition that contains {{ic|/boot}} has the boot flag enabled. If the flag is enabled, then perhaps this partition starts at sector 1 rather than sector 63 or 2048. Check this with {{ic|fdisk -l}}. If it starts at sector 1, you can move the partition(s) with {{ic|gparted}} from a rescue disk. Or, if you have a separate boot partition, you can back up {{ic|/boot}} with <br />
# cp -a /boot /boot.bak<br />
and then boot up with the Arch install disk. Next, use {{ic|cfdisk}} to delete the {{ic|/boot}} partition, and recreate it. This time it should begin at the proper sector, '''63'''. Now mount your partitions and {{ic|chroot}} into your mounted system, as described in the beginners guide. Restore {{ic|/boot}} with the command<br />
# cp -a /boot.bak/* /boot<br />
Check if {{ic|/etc/fstab}} is correct, run:<br />
# syslinux-install_update -iam<br />
and reboot.<br />
<br />
You will also get this error if you are trying to boot from a md [[RAID]] 1 array and created the array with a too new version of the metadata that Syslinux doesn't understand. As of August 2013 by default mdadm will create an array with version 1.2 metadata, but Syslinux doesn't understand metadata newer than 1.0. If this is the case you'll need to recreate your [[RAID]] array using the {{ic|1=--metadata=1.0}} flag to mdadm.<br />
<br />
=== Windows boots up, ignoring Syslinux ===<br />
<br />
'''Solution:''' Make sure the partition that contains {{ic|/boot}} has the boot flag enabled. Also, make sure the boot flag is not enabled on the Windows partition. See the installation section above.<br />
<br />
The MBR that comes with Syslinux looks for the first active partition that has the boot flag set. The Windows partition was likely found first and had the boot flag set. If you wanted, you could use the MBR that Windows or MS-DOS {{ic|fdisk}} provides.<br />
<br />
=== Menu entries do nothing ===<br />
<br />
You select a menu entry and it does nothing, it just ''"refreshes"'' the menu. This usually means that you have an error in your {{ic|syslinux.cfg}} file. Hit {{ic|Tab}} to edit your boot parameters. Alternatively, press {{ic|Esc}} and type in the {{ic|LABEL}} of your boot entry (e.g. ''arch'').<br />
<br />
=== Cannot remove ldlinux.sys ===<br />
<br />
The {{ic|ldlinux.sys}} file has the immutable attribute set, which prevents it from being deleted or overwritten. This is because the sector location of the file must not change or else Syslinux has to be reinstalled. To remove it, run:<br />
# chattr -i /boot/syslinux/ldlinux.sys<br />
# rm /boot/syslinux/ldlinux.sys<br />
<br />
=== White block in upper left corner when using vesamenu ===<br />
<br />
Problem:<br />
''As of linux-3.0, the modesetting driver tries to keep the current contents of the screen after changing the resolution (at least it does so with my Intel, when having Syslinux in text mode). It seems that this goes wrong when combined with the vesamenu module in Syslinux (the white block is actually an attempt to keep the Syslinux menu, but the driver fails to capture the picture from vesa graphics mode).''<br />
<br />
If you have a custom resolution and a {{ic|vesamenu}} with early modesetting, try to append the following in {{ic|syslinux.cfg}} to remove the white block and continue in graphics mode:<br />
APPEND root=/dev/sda6 rw 5 '''vga=current''' quiet splash<br />
<br />
=== Chainloading Windows doesn't work, when it is installed on another drive ===<br />
<br />
If Windows is installed on a different drive than Arch and you have trouble chainloading it, try the following configuration:<br />
<br />
LABEL Windows<br />
MENU LABEL Windows<br />
COM32 chain.c32<br />
APPEND mbr:0xdfc1ba9e swap<br />
<br />
replace the mbr code with the one your windows drive has (details [[Syslinux#Chainloading|above]]), and append {{ic|swap}} to the options.<br />
<br />
== See also ==<br />
<br />
* [http://www.syslinux.org Official website]<br />
* [http://www.josephn.net/scrapbook/pxelinux_stuff PXELinux configuration]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Syslinux&diff=281722Syslinux2013-11-06T18:23:10Z<p>Lagagnon: </p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[es:Syslinux]]<br />
[[fr:Syslinux]]<br />
[[it:Syslinux]]<br />
[[ja:Syslinux]]<br />
[[tr:Syslinux]]<br />
[[zh-CN:Syslinux]]<br />
{{Article summary start}}<br />
{{Article summary text|Describes installing and configuring Syslinux, a collection of bootloaders.}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Boot process overview}}}}<br />
{{Article summary end}}<br />
[[Wikipedia:SYSLINUX|Syslinux]] is a collection of boot loaders capable of booting from hard drives, CDs, and over the network via PXE. It supports the [[Wikipedia:File Allocation Table|FAT]], [[Wikipedia:ext2|ext2]], [[Ext3|ext3]], [[Ext4|ext4]], and [[Btrfs]] file systems.<br />
<br />
{{Note|1=Syslinux (as of version 6.02, in both BIOS and UEFI) cannot access files from partitions other than its own (unlike [[GRUB]]). This feature (called multi-fs) is yet to be implemented upstream. If you want to help with the multi-fs feature, [http://bugzilla.syslinux.org/show_bug.cgi?id=33 contact upstream].}}<br />
<br />
{{Note|1=Syslinux update (version 6.02-3 to 6.02-4) is a Syslinux BIOS update and may result in your system not booting. To fix this rerun the syslinux install: "# syslinux-install_update -i -a -m" }}<br />
<br />
== BIOS Systems ==<br />
<br />
=== Syslinux boot process ===<br />
<br />
# '''Load MBR'''. At boot, the computer loads the [[MBR]] ({{ic|/usr/lib/syslinux/bios/mbr.bin}}). <br />
# '''Search active partition'''. The MBR looks for the partition that is marked as active (boot flag). <br />
# '''Execute volume boot record'''. Once found, the volume boot record (VBR) will be executed. In the case of ext2/3/4 and FAT12/16/32, the starting sector of {{ic|ldlinux.sys}} is hard-coded into the VBR.<br />
# '''Execute ldlinux.sys'''. The VBR will execute ({{ic|ldlinux.sys}}). Therefore, if the location of {{ic|ldlinux.sys}} changes, Syslinux will no longer boot. (In the case of Btrfs, the above method will not work since files move around resulting in the sector location of {{ic|ldlinux.sys}} changing. Therefore, the entire Syslinux code needs to be stored outside the filesystem. The code is stored in the sectors following the VBR.) <br />
# '''Search configuration file'''. Once Syslinux is fully loaded, it looks for a configuration file, either {{ic|extlinux.conf}} or {{ic|syslinux.cfg}}. <br />
# '''Load configuration'''. If one is found, the configuration file is loaded. If no configuration file is found, you will be given a Syslinux prompt.<br />
<br />
=== Installation ===<br />
<br />
* Install {{Pkg|syslinux}} package from [[official repositories]]. <br />
<br />
# pacman -S syslinux<br />
<br />
{{Note|<br />
* Since Syslinux 4, Extlinux and Syslinux are the same thing.<br />
* {{Pkg|gptfdisk}} is required for [[wikipedia:GUID_Partition_Table|GPT]] support using the automated script.<br />
* If your boot partition is FAT, you will also need {{Pkg|mtools}}.<br />
}}<br />
<br />
==== Automatic Install ====<br />
<br />
The {{ic|syslinux-install_update}} script will install Syslinux, copy/symlink {{ic|*.c32}} modules to {{ic|/boot/syslinux}}, set the boot flag and install the boot code in the MBR. It can handle [[Master Boot Record|MBR]] and [[GUID Partition Table|GPT]] disks along with software RAID.<br />
<br />
:1. If you use a separate boot partition make sure that it is mounted. Check with {{ic|lsblk}}; if you do not see a {{ic|/boot}} mountpoint, mount it before you go any further.<br />
<br />
:2. Run {{ic|syslinux-install_update}} with flags: {{ic|-i}} (install the files), {{ic|-a}} (mark the partition ''active'' with the ''boot'' flag), {{ic|-m}} (install the ''MBR'' boot code):<br />
# syslinux-install_update -i -a -m<br />
<br />
:3. Create or Edit {{ic|/boot/syslinux/syslinux.cfg}} by following [[#Configuration]].<br />
<br />
{{Note|<br />
* When you reboot your system now, you will have a Syslinux prompt. To automatically boot your system or get a boot menu, you still need to create a configuration file.<br />
* If you have just cloned your disk to say {{ic|/mnt/clone}}, install syslinux by issuing from the Arch installation medium:<br />
# syslinux-install_update.sh -i -a -m -c /mnt/clone<br />
}}<br />
<br />
==== Manual install ====<br />
<br />
{{Note|<br />
* If you are unsure of which partition table you are using (MBR or GPT), you can check using the following command<br />
# blkid -s PTTYPE -o value /dev/sda<br />
gpt<br />
<br />
* If you are trying to rescue an installed system with a live CD, be sure to [[Change_Root|chroot]] into it before executing these commands. If you do not chroot first, you must prepend all file paths (not {{ic|/dev/}} paths) with the mount point.<br />
}}<br />
<br />
Your boot partition, on which you plan to install Syslinux, must contain a FAT, ext2, ext3, ext4, or Btrfs file system. You should install it on a mounted directory—not a {{ic|/dev/sdXY}} device. You do not have to install it on the root directory of a file system, e.g., with device {{ic|/dev/sda1}} mounted on {{ic|/boot}}. You can install Syslinux in the {{ic|syslinux}} directory:<br />
<br />
# mkdir /boot/syslinux<br />
# cp -r /usr/lib/syslinux/bios/* /boot/syslinux<br />
# extlinux --install /boot/syslinux<br />
<br />
After this install the Syslinux boot code ({{ic|mbr.bin}} or {{ic|gptmbr.bin}}) to Master Boot Record 440-byte boot code region (not to be confused with MBR aka msdos partition table) of the disk.<br />
<br />
===== MBR partition table =====<br />
<br />
{{Box||See the main article: [[Master Boot Record]]|#E5E5FF|#FCFCFC}}<br />
<br />
Next you need to mark your boot partition active in your partition table. Applications capable of doing this include {{ic|fdisk}}, {{ic|cfdisk}}, {{ic|sfdisk}}, {{ic|parted/gparted}} ("boot" flag). It should look like this:<br />
{{hc|# fdisk -l /dev/sda|<br />
[...]<br />
Device Boot Start End Blocks Id System<br />
/dev/sda1 * 2048 104447 51200 83 Linux<br />
/dev/sda2 104448 625142447 312519000 83 Linux<br />
}}<br />
<br />
Install the MBR:<br />
# dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/bios/mbr.bin of=/dev/sda<br />
<br />
An alternate MBR which Syslinux provides is: {{ic|altmbr.bin}}. This MBR does ''not'' scan for bootable partitions; instead, the last byte of the MBR is set to a value indicating which partition to boot from. Here is an example of how {{ic|altmbr.bin}} can be copied into position:<br />
# printf '\x5' | cat /usr/lib/syslinux/bios/altmbr.bin - | \<br />
dd bs=440 count=1 iflag=fullblock conv=notrunc of=/dev/sda<br />
<br />
In this case, a single byte of value 5 is appended to the contents of {{ic|altmbr.bin}} and the resulting 440 bytes are written to the MBR on device {{ic|sda}}. Syslinux was installed on the first logical partition ({{ic|/dev/sda5}}) of the disk.<br />
<br />
===== GUID partition table =====<br />
<br />
{{Box||See the main article: [[GUID Partition Table]]|#E5E5FF|#FCFCFC}}<br />
<br />
Bit 2 of the attributes ("legacy_boot" attribute) needs to be set for the {{ic|/boot}} partition:.<br />
# sgdisk /dev/sda --attributes=1:set:2<br />
<br />
This would toggle the attribute ''legacy BIOS bootable'' on partition 1. To check:<br />
{{hc|<nowiki># sgdisk /dev/sda --attributes=1:show</nowiki>|<br />
1:2:1 (legacy BIOS bootable)<br />
}}<br />
<br />
Install the MBR:<br />
# dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/bios/gptmbr.bin of=/dev/sda<br />
<br />
If this does not work you can also try:<br />
# syslinux-install_update -i -m<br />
<br />
== UEFI Systems ==<br />
<br />
{{Note|<br />
* UEFI support is available only from Syslinux 6.xx onwards.<br />
<br />
*{{ic|$esp}} is the mountpoint of the ESP in the below commands.<br />
<br />
* {{ic|efi64}} denotes x86_64 UEFI systems, for IA32 (32-bit) EFI replace {{ic|efi64}} with {{ic|efi32}} in the below commands.<br />
<br />
* For syslinux, kernel and initramfs files need to be in the ESP, as syslinux does not (currently) have the ability to access files outside its own partition (i.e. outside ESP in this case). For this reason, it is recommended to mount ESP at {{ic|/boot}}.<br />
<br />
* The automatic install script {{ic|/usr/bin/syslinux-install_update}} does not support UEFI install.<br />
<br />
* The configuration syntax of {{ic|syslinux.cfg}} for UEFI is same as that of BIOS.<br />
}}<br />
<br />
=== Limitations of UEFI Syslinux ===<br />
<br />
* UEFI Syslinux application {{ic|syslinux.efi}} cannot be signed by {{ic|sbsign}} (from sbsigntool) for UEFI Secure Boot. Bug report - http://bugzilla.syslinux.org/show_bug.cgi?id=8<br />
<br />
* Using TAB to edit kernel parameters in UEFI Syslinux menu lead to garbaged display (text on top of one-another). Bug report - http://bugzilla.syslinux.org/show_bug.cgi?id=9<br />
<br />
* UEFI Syslinux does not support chainloading other EFI applications like {{ic|UEFI Shell}} or {{ic|Windows Boot Manager}}. Bug report - http://bugzilla.syslinux.org/show_bug.cgi?id=17<br />
<br />
* UEFI Syslinux does not boot in Virtual Machines like QEMU/OVMF or VirtualBox or VMware and in some UEFI emulation environments like DUET. Bug reports - http://bugzilla.syslinux.org/show_bug.cgi?id=21 and http://bugzilla.syslinux.org/show_bug.cgi?id=23<br />
<br />
* Memdisk is not available for UEFI. Bug report - http://bugzilla.syslinux.org/show_bug.cgi?id=30<br />
<br />
=== Installation ===<br />
<br />
* Install {{Pkg|syslinux}} package and setup syslinux in the EFI System Partition (ESP) as follows:<br />
<br />
# pacman -S syslinux<br />
<br />
* Copy syslinux files to ESP<br />
<br />
# mkdir -p $esp/EFI/syslinux<br />
# cp -r /usr/lib/syslinux/efi64/* $esp/EFI/syslinux<br />
<br />
* Setup boot entry for Syslinux using [[#Unified_Extensible_Firmware_Interface#efibootmgr|efibootmgr]]:<br />
<br />
# mount -t efivarfs efivarfs /sys/firmware/efi/efivars<br />
# efibootmgr -c -d /dev/sdX -p Y -l /EFI/syslinux/syslinux.efi -L "Syslinux"<br />
<br />
* Create or edit {{ic|$esp/EFI/syslinux/syslinux.cfg}} by following [[#Configuration]].<br />
<br />
{{Note|The config file for UEFI is {{ic|$esp/EFI/syslinux/syslinux.cfg}}, not {{ic|/boot/syslinux/syslinux.cfg}}. Files in {{ic|/boot/syslinux/}} are BIOS specific and not related to UEFI syslinux.}}<br />
<br />
== Configuration ==<br />
<br />
The Syslinux configuration file, {{ic|syslinux.cfg}}, should be created in the same directory where you installed Syslinux. In our case, {{ic|/boot/syslinux/}}.<br />
<br />
The bootloader will look for either {{ic|syslinux.cfg}} (preferred) or {{ic|extlinux.conf}}<br />
<br />
{{Tip|<br />
* Instead of {{ic|LINUX}}, the keyword {{ic|KERNEL}} can also be used. {{ic|KERNEL}} tries to detect the type of the file, while {{ic|LINUX}} always expects a Linux kernel. <br />
* {{ic|TIMEOUT}} value is in units of '''1/10''' of a second.<br />
}}<br />
<br />
=== Examples ===<br />
<br />
==== Basic configuration ====<br />
<br />
This is a simple configuration file that will show a {{ic|boot:}} prompt and automatically boot after 5 seconds.<br />
<br />
{{Note|The partition in question needs to be whatever you have as {{ic|/}} (root), not {{ic|/boot}}.}}<br />
<br />
Configuration:<br />
{{hc|/boot/syslinux/syslinux.cfg|<nowiki><br />
PROMPT 1<br />
TIMEOUT 50<br />
DEFAULT arch<br />
<br />
LABEL arch<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux.img<br />
<br />
LABEL archfallback<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux-fallback.img</nowiki><br />
}}<br />
<br />
If you want to boot directly without seeing a prompt, set {{ic|PROMPT}} to {{ic|0}}.<br />
<br />
If you want to use [[UUID]] for persistent device naming instead of device names, change the {{ic|APPEND}} line to your equivalent {{ic|UUID}} of the root partition:<br />
APPEND root='''UUID='''978e3e81-8048-4ae1-8a06-aa727458e8ff rw<br />
<br />
If you use encryption [[LUKS]] change the {{ic|APPEND}} line to use your encrypted volume:<br />
APPEND root=/dev/mapper/''group''-''name'' cryptdevice=/dev/sda2:''name'' rw<br />
<br />
If you are using software [[Wikipedia:RAID|RAID]] using [http://neil.brown.name/blog/mdadm mdadm], change the {{ic|APPEND}} line to accommodate your RAID arrays. As an example the following accommodates three RAID 1 array's and sets the appropriate one as root:<br />
APPEND root=/dev/md1 rw md=0,/dev/sda2,/dev/sdb2 md=1,/dev/sda3,/dev/sdb3 md=2,/dev/sda4,/dev/sdb4<br />
<br />
If booting from a software raid partition fails using the kernel device node method above an alternative, a more reliable, way is to use partition labels:<br />
APPEND root=LABEL=THEROOTPARTITIONLABEL rw<br />
<br />
==== Text Boot menu ====<br />
<br />
Syslinux also allows you to use a boot menu. To use it, copy the {{ic|menu}} module to your Syslinux directory:<br />
# cp /usr/lib/syslinux/bios/menu.c32 /boot/syslinux/<br />
<br />
Configuration:<br />
{{hc|/boot/syslinux/syslinux.cfg|<nowiki><br />
UI menu.c32<br />
PROMPT 0<br />
<br />
MENU TITLE Boot Menu<br />
TIMEOUT 50<br />
DEFAULT arch<br />
<br />
LABEL arch<br />
MENU LABEL Arch Linux<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux.img<br />
<br />
LABEL archfallback<br />
MENU LABEL Arch Linux Fallback<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux-fallback.img</nowiki><br />
}}<br />
<br />
For more details about the menu system, see [http://git.kernel.org/?p=boot/syslinux/syslinux.git;a=blob;f=doc/menu.txt the Syslinux documentation].<br />
<br />
==== Graphical boot menu ====<br />
<br />
Syslinux also allows you to use a graphical boot menu. To use it, copy the {{ic|vesamenu}} COM32 module to your Syslinux folder:<br />
# cp /usr/lib/syslinux/bios/vesamenu.c32 /boot/syslinux/<br />
<br />
[https://projects.archlinux.org/archiso.git/tree/configs/releng/syslinux This config] uses the same menu design as the Arch Install CD. The background file can be found there too. To make sure that your system can boot with this config, check that it is pointing to the correct partition.<br />
<br />
Configuration:<br />
{{hc|/boot/syslinux/syslinux.cfg|<nowiki><br />
UI vesamenu.c32<br />
DEFAULT arch<br />
PROMPT 0<br />
MENU TITLE Boot Menu<br />
MENU BACKGROUND splash.png<br />
TIMEOUT 50<br />
<br />
MENU WIDTH 78<br />
MENU MARGIN 4<br />
MENU ROWS 5<br />
MENU VSHIFT 10<br />
MENU TIMEOUTROW 13<br />
MENU TABMSGROW 11<br />
MENU CMDLINEROW 11<br />
MENU HELPMSGROW 16<br />
MENU HELPMSGENDROW 29<br />
<br />
# Refer to http://www.syslinux.org/wiki/index.php/Comboot/menu.c32<br />
<br />
MENU COLOR border 30;44 #40ffffff #a0000000 std<br />
MENU COLOR title 1;36;44 #9033ccff #a0000000 std<br />
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all<br />
MENU COLOR unsel 37;44 #50ffffff #a0000000 std<br />
MENU COLOR help 37;40 #c0ffffff #a0000000 std<br />
MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std<br />
MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std<br />
MENU COLOR msg07 37;40 #90ffffff #a0000000 std<br />
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std<br />
<br />
<br />
LABEL arch<br />
MENU LABEL Arch Linux<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux.img<br />
<br />
<br />
LABEL archfallback<br />
MENU LABEL Arch Linux Fallback<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux-fallback.img</nowiki><br />
}}<br />
<br />
Since Syslinux 3.84, {{ic|vesamenu.c32}} supports the {{ic|MENU RESOLUTION $WIDTH $HEIGHT}} directive.<br />
To use it, insert {{ic|MENU RESOLUTION 1440 900}} into your config for a 1440x900 resolution.<br />
The background picture has to have exactly the right resolution, however, as Syslinux will otherwise refuse to load the menu.<br />
<br />
=== Auto boot ===<br />
<br />
If you do not want to see the Syslinux menu at all, comment out all {{ic|UI}} commands and make sure there is a {{ic|DEFAULT}} set in your {{ic|syslinux.cfg}}.<br />
<br />
=== Chainloading ===<br />
<br />
{{Note|Syslinux BIOS cannot directly chainload files from other partitions, however {{ic|chain.c32}} can boot partition boot sector (VBR).}}<br />
<br />
If you want to chainload other operating systems (such as Windows) or boot loaders, copy (or symlink) the {{ic|chain.c32}} module to the Syslinux directory (for details, see the instructions in the previous section). Then create a section in the configuration file:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
...<br />
LABEL windows<br />
MENU LABEL Windows<br />
COM32 chain.c32<br />
APPEND hd0 3<br />
...<br />
}}<br />
<br />
{{ic|hd0 3}} is the third partition on the first BIOS drive - drives are counted from zero, but partitions are counted from one. <br />
<br />
If you are unsure about which drive your BIOS thinks is "first", you can instead use the MBR identifier, or if you are using GPT, the filesystem labels. To use the MBR identifier, run the command<br />
{{hc|# fdisk -l /dev/sdb|<nowiki><br />
Disk /dev/sdb: 128.0 GB, 128035676160 bytes <br />
255 heads, 63 sectors/track, 15566 cylinders, total 250069680 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk identifier: 0xf00f1fd3<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sdb1 2048 4196351 2097152 7 HPFS/NTFS/exFAT<br />
/dev/sdb2 4196352 250066943 122935296 7 HPFS/NTFS/exFAT</nowiki><br />
}}<br />
<br />
replacing {{ic|/dev/sdb}} with the drive you wish to chainload. Using the hexadecimal number under Disk identifier: {{ic|0xf00f1fd3}} in this case, the syntax in {{ic|syslinux.cfg}} is<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
...<br />
LABEL windows<br />
MENU LABEL Windows<br />
COM32 chain.c32<br />
APPEND mbr:0xf00f1fd3<br />
...<br />
}}<br />
<br />
For more details about chainloading, see [http://www.syslinux.org/wiki/index.php/Comboot/chain.c32 the Syslinux wiki].<br />
<br />
If you have [[GRUB]] installed on the same partition, you can chainload it by using: <br />
{{hc|/boot/syslinux/syslinux.cfg|<nowiki><br />
...<br />
LABEL grub2<br />
MENU LABEL Grub2<br />
COM32 chain.c32<br />
append file=../grub/boot.img<br />
...</nowiki><br />
}}<br />
<br />
This may be required for booting from ISO images.<br />
<br />
=== Chainloading other Linux systems ===<br />
<br />
Chainloading another bootloader such as Windows' is pretty obvious, as there is a definite bootloader to chain to. But with Syslinux, it is only able to load files residing on the same partition as the configuration file. Thus, if you have another version of Linux on a separate partition, without a shared {{ic|/boot}}, it becomes necessary to employ Extlinux. Essentially, Extlinux can be installed on the partition superblock and be called as a separate bootloader from the MBR installed by Syslinux. Extlinux is part of the Syslinux project and is included with the {{Pkg|syslinux}} package.<br />
<br />
The following instructions assume you have Syslinux installed already. These instructions will also assume that the typical Arch Linux configuration path of {{ic|/boot/syslinux}} is being used and the chainloaded {{ic|/}} is on {{ic|/dev/sda3}}. <br />
<br />
From a booted Linux (likely the partition that Syslinux is set up to boot), mount the other root partition to your desired mount point. In this example this will be {{ic|/mnt}}. Also, if a separate {{ic|/boot}} partition is used on the second operating system, that will also need to be mounted. The example assumes this is {{ic|/dev/sda2}}.<br />
# mount /dev/sda3 /mnt<br />
# mount /dev/sda2 /mnt/boot (only necessary for separate /boot)<br />
Install Extlinux and copy necessary {{ic|*.c32}} files<br />
# extlinux -i /mnt/boot/syslinux<br />
# cp /usr/lib/syslinux/bios/{chain,menu,libutil,libcom32}.c32 /mnt/boot/syslinux<br />
<br />
Create {{ic|/mnt/boot/syslinux/syslinux.cfg}}. Below is an example:<br />
{{hc|/boot/syslinux/syslinux.cfg '''on /dev/sda3'''|<nowiki><br />
timeout 10<br />
<br />
ui menu.c32<br />
<br />
label Other Linux<br />
linux /boot/vmlinuz-linux<br />
initrd /boot/initramfs-linux.img<br />
append root=/dev/sda3 rw quiet<br />
<br />
label MAIN<br />
com32 chain.c32<br />
append hd0 0</nowiki><br />
}}<br />
<br />
taken from [[User:Djgera|Djgera's user wiki page]].<br />
<br />
=== Using memtest ===<br />
<br />
Install {{Pkg|memtest86+}} from the [[official repositories]].<br />
<br />
Use this {{ic|LABEL}} section to launch [[Wikipedia:Memtest86|memtest]]:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
...<br />
LABEL memtest<br />
MENU LABEL Memtest86+<br />
LINUX ../memtest86+/memtest.bin<br />
...<br />
}}<br />
<br />
=== HDT ===<br />
<br />
[http://hdt-project.org/ HDT (Hardware Detection Tool)] displays hardware information. Like before, the {{ic|.c32}} file has to be copied or symlinked from {{ic|/boot/syslinux/}}.<br />
For PCI info, either copy or symlink {{ic|/usr/share/hwdata/pci.ids}} to {{ic|/boot/syslinux/pci.ids}} and add the following to your configuration file:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
LABEL hdt<br />
MENU LABEL Hardware Info<br />
COM32 hdt.c32<br />
}}<br />
<br />
=== Reboot and power off ===<br />
<br />
Use the following sections to reboot or power off your machine:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
LABEL reboot<br />
MENU LABEL Reboot<br />
COM32 reboot.c32<br />
<br />
LABEL poweroff<br />
MENU LABEL Power Off<br />
COMBOOT poweroff.com<br />
}}<br />
<br />
=== Clear menu ===<br />
<br />
To clear the screen when exiting the menu, add the following line:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
MENU CLEAR<br />
}}<br />
<br />
=== Keyboard remapping ===<br />
<br />
If you often have to edit your boot parameters, you might want to remap your keyboard layout. This allows you to enter "=", "/" and other characters easily on a non-US keyboard.<br />
<br />
First you have to create a compatible keymap (for example a German one):<br />
# cp /usr/share/kbd/keymaps/i386/qwerty/us.map.gz ./<br />
# cp /usr/share/kbd/keymaps/i386/qwertz/de.map.gz ./<br />
# gunzip {de,us}.map.gz<br />
# mv de.{,k}map<br />
# mv us.{,k}map<br />
# keytab-lilo de > de.ktl<br />
<br />
The last command has to be run as root, otherwise it will not work.<br />
<br />
Copy {{ic|de.ktl}} as root to {{ic|/boot/syslinux/}} and set ownership to root:<br />
# chown root:root /boot/syslinux/de.ktl<br />
<br />
Now edit {{ic|syslinux.conf}} and add:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
KBDMAP de.ktl<br />
}}<br />
<br />
=== Hiding the menu ===<br />
<br />
Use the option:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
MENU HIDDEN<br />
}}<br />
to hide the menu while displaying only the timeout. Press any key to bring up the menu.<br />
<br />
=== Pxelinux===<br />
{{Note|Syslinux at present has no UEFI networking stack, so you'll be unable to use {{AUR|syslinux-efi-git}} (as is possible with [[#GRUB]]) and still expect to be able to tftp your kernel and initramfs; pxelinux still works fine for legacy PXE booting}}<br />
<br />
[[Syslinux|Pxelinux]] is provided by {{Pkg|syslinux}}.<br />
<br />
Copy the pxelinux bootloader (provided by the syslinux package) to the boot directory of the client.<br />
<br />
# cp /usr/lib/syslinux/bios/pxelinux.0 "$root/boot"<br />
# mkdir "$root/boot/pxelinux.cfg"<br />
<br />
We also created the {{ic|pxelinux.cfg}} directory, which is where pxelinux searches for configuration files by default. Because we don't want to discriminate between different host MACs, we then create the {{ic|default}} configuration.<br />
<br />
{{hc|# vim "$root/boot/pxelinux.cfg/default"|<nowiki><br />
default linux<br />
<br />
label linux<br />
kernel vmlinuz-linux<br />
append initrd=initramfs-linux.img quiet ip=:::::eth0:dhcp nfsroot=10.0.0.1:/arch<br />
</nowiki>}}<br />
<br />
Or if you are using NBD, use the following append line:<br />
<br />
{{bc|<nowiki>append ro initrd=initramfs-linux.img ip=:::::eth0:dhcp nbd_host=10.0.0.1 nbd_name=arch root=/dev/nbd0</nowiki>}}<br />
<br />
{{Note|You will need to change {{ic|nbd_host}} and/or {{ic|nfsroot}}, respectively, to match your network configuration (the address of the NFS/NBD server)}}<br />
<br />
The pxelinux configuration syntax identical to syslinux; refer to the upstream documentation for more information.<br />
<br />
The kernel and initramfs will be transferred via TFTP, so the paths to those are going to be relative to the TFTP root. Otherwise, the root filesystem is going to be the NFS mount itself, so those are relative to the root of the NFS server.<br />
<br />
To actually load pxelinux, replace {{ic|filename "/grub/i386-pc/core.0";}} in {{ic|/etc/dhcpd.conf}} with {{ic|filename "/pxelinux.0"}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Using the Syslinux prompt===<br />
<br />
You can type in the {{ic|LABEL}} name of the entry that you want to boot (as per your {{ic|syslinux.cfg}}). If you used the example configurations, just type:<br />
boot: arch<br />
<br />
If you get an error that the configuration file could not be loaded, you can pass your needed boot parameters, e.g.:<br />
boot: ../vmlinuz-linux root=/dev/sda2 rw initrd=../initramfs-linux.img<br />
<br />
If you do not have access to {{ic|boot:}} in [[Ramdisk|ramfs]], and therefore temporarily unable to boot kernel again,<br />
:1. Create a temporary directory, in order to mount your root partition (if it does not exist already):<br />
# mkdir -p /new_root<br />
:2. Mount {{ic|/}} under {{ic|/new_root}} (in case {{ic|/boot/}} is on the same partition, otherwise you will need to mount them both):<br />
{{Note|Busybox cannot mount {{ic|/boot}} if it is on its own ext2 partition.}}<br />
# mount /dev/sd[a-z][1-9] /new_root<br />
<br />
:3. Use {{ic|vim}} and edit {{ic|syslinux.cfg}} again to suit your needs and save file.<br />
:4. Reboot.<br />
<br />
=== Fsck fails on root partition ===<br />
<br />
In the case of a badly corrupted root partition (in which the journal is damaged), in the ramfs emergency shell, mount the root file system:<br />
<br />
# mount /dev/''root partition'' /new_root<br />
And grab the tune2fs binary from the root partition (it is not included in Syslinux):<br />
# cp /new_root/sbin/tune2fs /sbin/<br />
<br />
Follow the instructions at [[Fsck#ext2fs_:_no_external_journal|ext2fs: no external journal]] to create a new journal for the root partition.<br />
<br />
=== No Default or UI found on some computers ===<br />
<br />
Certain motherboard manufacturers have less compatibility for booting from USB devices than others. While an ext4 formatted USB drive may boot on a more recent computer, some computers may hang if the boot partition containing the ''kernel'' and ''initrd'' are not on a FAT16 partition. To prevent an older machine from loading {{ic|ldlinux}} and failing to read {{ic|syslinux.cfg}}, use {{ic|cfdisk}} to create a FAT16 partition (<=2GB) and format using {{Pkg|dosfstools}}:<br />
# mkfs.msdos -F 16 /dev/sda1<br />
<br />
then install and configure Syslinux.<br />
<br />
=== Missing operating system ===<br />
<br />
If you get this message, check if the partition that contains {{ic|/boot}} has the boot flag enabled. If the flag is enabled, then perhaps this partition starts at sector 1 rather than sector 63 or 2048. Check this with {{ic|fdisk -l}}. If it starts at sector 1, you can move the partition(s) with {{ic|gparted}} from a rescue disk. Or, if you have a separate boot partition, you can back up {{ic|/boot}} with <br />
# cp -a /boot /boot.bak<br />
and then boot up with the Arch install disk. Next, use {{ic|cfdisk}} to delete the {{ic|/boot}} partition, and recreate it. This time it should begin at the proper sector, '''63'''. Now mount your partitions and {{ic|chroot}} into your mounted system, as described in the beginners guide. Restore {{ic|/boot}} with the command<br />
# cp -a /boot.bak/* /boot<br />
Check if {{ic|/etc/fstab}} is correct, run:<br />
# syslinux-install_update -iam<br />
and reboot.<br />
<br />
You will also get this error if you are trying to boot from a md [[RAID]] 1 array and created the array with a too new version of the metadata that Syslinux doesn't understand. As of August 2013 by default mdadm will create an array with version 1.2 metadata, but Syslinux doesn't understand metadata newer than 1.0. If this is the case you'll need to recreate your [[RAID]] array using the {{ic|1=--metadata=1.0}} flag to mdadm.<br />
<br />
=== Windows boots up, ignoring Syslinux ===<br />
<br />
'''Solution:''' Make sure the partition that contains {{ic|/boot}} has the boot flag enabled. Also, make sure the boot flag is not enabled on the Windows partition. See the installation section above.<br />
<br />
The MBR that comes with Syslinux looks for the first active partition that has the boot flag set. The Windows partition was likely found first and had the boot flag set. If you wanted, you could use the MBR that Windows or MS-DOS {{ic|fdisk}} provides.<br />
<br />
=== Menu entries do nothing ===<br />
<br />
You select a menu entry and it does nothing, it just ''"refreshes"'' the menu. This usually means that you have an error in your {{ic|syslinux.cfg}} file. Hit {{ic|Tab}} to edit your boot parameters. Alternatively, press {{ic|Esc}} and type in the {{ic|LABEL}} of your boot entry (e.g. ''arch'').<br />
<br />
=== Cannot remove ldlinux.sys ===<br />
<br />
The {{ic|ldlinux.sys}} file has the immutable attribute set, which prevents it from being deleted or overwritten. This is because the sector location of the file must not change or else Syslinux has to be reinstalled. To remove it, run:<br />
# chattr -i /boot/syslinux/ldlinux.sys<br />
# rm /boot/syslinux/ldlinux.sys<br />
<br />
=== White block in upper left corner when using vesamenu ===<br />
<br />
Problem:<br />
''As of linux-3.0, the modesetting driver tries to keep the current contents of the screen after changing the resolution (at least it does so with my Intel, when having Syslinux in text mode). It seems that this goes wrong when combined with the vesamenu module in Syslinux (the white block is actually an attempt to keep the Syslinux menu, but the driver fails to capture the picture from vesa graphics mode).''<br />
<br />
If you have a custom resolution and a {{ic|vesamenu}} with early modesetting, try to append the following in {{ic|syslinux.cfg}} to remove the white block and continue in graphics mode:<br />
APPEND root=/dev/sda6 rw 5 '''vga=current''' quiet splash<br />
<br />
=== Chainloading Windows doesn't work, when it is installed on another drive ===<br />
<br />
If Windows is installed on a different drive than Arch and you have trouble chainloading it, try the following configuration:<br />
<br />
LABEL Windows<br />
MENU LABEL Windows<br />
COM32 chain.c32<br />
APPEND mbr:0xdfc1ba9e swap<br />
<br />
replace the mbr code with the one your windows drive has (details [[Syslinux#Chainloading|above]]), and append {{ic|swap}} to the options.<br />
<br />
== See also ==<br />
<br />
* [http://www.syslinux.org Official website]<br />
* [http://www.josephn.net/scrapbook/pxelinux_stuff PXELinux configuration]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Dwb&diff=278115Dwb2013-10-09T13:59:11Z<p>Lagagnon: /* HTML5 audio and video does not work */</p>
<hr />
<div>[[Category:Web Browser]]<br />
{{Article summary start}}<br />
{{Article summary text|This article addresses the steps necessary to run and configure dwb.}}<br />
{{Article summary end}}<br />
[[tr:dwb]]<br />
{{DISPLAYTITLE:dwb}}<br />
[http://portix.bitbucket.org/dwb/ dwb] is an extremely fast, lightweight and flexible web browser using the webkit engine.<br />
It is customizable through its web interface and fully usable with keyboard shortcuts.<br />
<br />
== Installation ==<br />
<br />
The {{Pkg|dwb}} package can be found in the [[official repositories]] and can be installed with [[pacman]]. There are also other versions in the [[AUR]]: {{AUR|dwb-git}}, {{AUR|dwb-gtk3}}, and {{AUR|dwb-gtk3-git}}.<br />
<br />
== Basic usage ==<br />
<br />
Starting from a fresh configuration, use {{ic|Sk}} to open the ''Keys'' page. As you can see from there, most bindings are borrowed from [[Vim]] and [[Emacs]].<br />
<br />
Use {{ic|:}} to access the command prompt. You can use {{ic|Tab}} to auto-complete.<br />
<br />
Read the man page for more details and enable the {{ic|auto-completion}} option in the settings to help you learn the bindings.<br />
<br />
$ man dwb<br />
<br />
=== dwb-specific ===<br />
<br />
o = enter url<br />
O = enter url in new tab<br />
f = spawn hints. Use arrow keys to browse the hints while displaying their URI, or use the hint letters.<br />
F = spawn hints in new tab<br />
;b = spawn hints in new background tab<br />
;r = follow multiple background links rapidly<br />
H = back<br />
L = forward<br />
J = go to next tab<br />
K = go to previous tab<br />
'n'+T = goto 'n' tab<br />
d = close tab<br />
u = undo close tab<br />
ctrl+s = stop<br />
r = reload<br />
R = reload ignoring cache<br />
gi = go to the first input field and enter insert mode<br />
ctrl+e = open editable field in external editor. Useful for forums and wikis.<br />
;d = download via hints<br />
M = save bookmark (bookmarks are saved in ~/.config/dwb/default/bookmarks)<br />
xb = show/hide status bar<br />
gf = toggle source view<br />
+ = zoom_in<br />
- = zoom_out<br />
= = reset to 100%<br />
<br />
=== vim-like ===<br />
<br />
i = toggle_insert_mode (Esc works to go back to normal mode much like Vim)<br />
Esc = back to normal mode (ctrl+n works too)<br />
j = scroll down<br />
k = scroll up<br />
h = scroll left<br />
l = scroll right<br />
gg = go to top<br />
G = go to bottom<br />
/ = find in page<br />
n = repeat find forward<br />
ZZ = save session and exit<br />
<br />
=== Notes ===<br />
<br />
Press {{ic|v}} to switch to caret browsing, then press {{ic|space}} to toggle between caret and visual mode. Press {{ic|Esc}} one or two times to go back to normal mode. While in caret browsing, you can use the arrow keys to browse the different parts of the page. Hold {{ic|Shift}} to select text. Press {{ic|Enter}} to follow links.<br />
<br />
== Configuration ==<br />
<br />
The configuration files are stored in {{ic|$XDG_CONFIG_HOME/dwb/}} (usually {{ic| ~/.config/dwb/}}) and can be easily accessed through the web interface. Type {{ic|Ss}} to open the ''Settings'' page.<br />
<br />
=== Search engines ===<br />
<br />
Open your favorite search engine, type {{ic|gs}} to select the web page's first input field, and then enter a keyword associated with it. <br />
<br />
Now you can use the keyword in the URI prompt to search directly on the corresponding website. Typing queries directly in the address bar will search with the default search engine, which is the first entry in {{ic|$XDG_CONFIG_HOME/dwb/searchengines}}.<br />
<br />
=== Custom keybinds ===<br />
<br />
You can create custom key bindings by editing file {{ic|custom_keys}} in the profile directory. This is<br />
{{ic|~/.config/dwb/default}} by default. All keysyms which don't emit (multi)byte characters, must be enclosed in {{ic|@}}. One keybind can execute multiple ''dwb'' commands. These commands execute in same order as they are defined in bind, and must be separated by {{ic|;;}} separator. If the keybind's chord is already bound by ''dwb'', it might be ignored (behaviour is not consistent). In such case one can try to check, whether there is collison with binds defined in {{ic|~/.config/dwb/keys}} and try to unbind the chord there (eg set it to nothing). Any running ''dwb'' instance will owerwrite {{ic|keys}} file on exit, so remember to do your modifications while ''dwb'' is not runing or use default ''dwb'' interface ({{ic|Sk}}).<br />
<br />
{{hc|~/.config/dwb/default/custom_keys|<nowiki><br />
Control w :close_tab<br />
Control @Page_Up@ :focus_prev<br />
Control @Page_Down@ :focus_next<br />
</nowiki>}}<br />
<br />
== Extensions ==<br />
<br />
''dwb'' features an extension manager as a separate executable, ''dwbem''. To list all officially available extensions, use:<br />
<br />
{{hc|dwbem -a|<br />
Available extensions: Mainstream equivalent:<br />
- adblock_subscriptions Adblock<br />
- autoquvi Video DownloadHelper<br />
- contenthandler (Handle requests based on MIME type, filename extension or URI scheme)<br />
- downloadhandler (Handle downloads based on mimetype or filename extension, useful if 'download-no-confirm' is set)<br />
- formfiller LastPass, Lazarus (Save form data and fill forms with previously saved data, also with gpg-support)<br />
- googlebookmarks GBookmarks, GMarks (Add bookmarks to google bookmarks with a shortcut)<br />
- googledocs Open with Google Docs, Google Docs Viewer<br />
- grabscrolling (Adobe Acrobat style grab and drag mouse scrolling)<br />
- multimarks (Bookmark multiple urls to a single quickmark)<br />
- navtools Opera Fast Forward, IE 10 Flip Ahead<br />
- perdomainsettings (Change webkit-settings automatically on domain or url basis)<br />
- pwdhash PwdHash<br />
- requestpolicy RequestPolicy, Disconnect, Ghostery<br />
- simplyread Readability, Clearly<br />
- speeddial Speed Dial<br />
- supergenpass (Generate domain-based passwords; compatible with the bookmarklet supergenpass but with additional options)<br />
- unique_tabs (Remove duplicate tabs or avoid duplicate tabs by autoswitching to tabs with same url)<br />
- userscripts GreaseMonkey/Stylish<br />
- whitelistshortcuts (Whitelist webkit settings for certain domains with a shortcut)<br />
}}<br />
<br />
For more details, use {{ic|dwbem -I <extension>}} and read the [http://portix.bitbucket.org/dwb/resources/dwb.1.html dwb] and [http://portix.bitbucket.org/dwb/resources/dwbem.1.html dwbem] man pages.<br />
<br />
Below is a list of popular extensions (or add-ons) for which ''dwb'' has a built-in alternative:<br />
<br />
* NoScript/Flashblock: ''dwb'' blocks flash by default and can block javascript.<br />
* Omnibar: just like Chrome, ''dwb'''s address gives quick access to search, history, and bookmarks.<br />
* Download Statusbar: ''dwb'''s displays downloads in a neat status bar by default.<br />
* IE Tab: ''dwb'' can open a page in any external browser with a simple userscript.<br />
* Session Manager: ''dwb'' uses its built-in session manager by default.<br />
* Private browsing: add {{ic|xpp:toggle enable-private-browsing}} to {{ic|custom_keys}} to toggle privacy mode by typing {{ic|xpp}}.<br />
<br />
=== Adblock ===<br />
<br />
''dwb'' features an Adblock extension. Install it with<br />
<br />
$ dwbem -i adblock_subscriptions<br />
<br />
Restart ''dwb'', use the ''adblock_subscribe'' command and choose your favorite filter (avoid using more than one filter to prevent duplicate entries that make the adblocker much slower).<br />
<br />
== Userscripts ==<br />
<br />
''dwb'' can execute .js or .sh scripts put in {{ic|~/.config/dwb/userscripts/}}. Make sure they are executable:<br />
chmod +x ~/.config/dwb/userscripts/myscript.js<br />
<br />
Below are some example scripts, see ''dwb'' [http://portix.bitbucket.org/dwb/snippets/snippets.html userscripts snippets] for more:<br />
<br />
=== defer-loading ===<br />
<br />
Prevents tabs from last session to load all at once at startup.<br />
{{hc|~/.config/dwb/userscripts/defer-loading.js|<nowiki><br />
//!javascript<br />
if (settings.loadOnFocus === false) {<br />
execute('local_set load-on-focus true');<br />
}<br />
Signal.connect('navigation', function(webview) {<br />
if (webview == tabs.current) {<br />
execute('local_set load-on-focus false');<br />
this.disconnect();<br />
}<br />
});</nowiki>}}<br />
<br />
=== fast-forward ===<br />
<br />
Opera features a neat key binding which allows users to load to next/previous logical page. This is very useful for forum threads, documentation, and articles spread over several pages.<br />
<br />
This feature can be implemented with a simple javascript function and bound to custom keys {{ic|<nowiki>}</nowiki>}} and {{ic|{}}:<br />
<br />
{{hc|~/.config/dwb/default/custom_keys|<nowiki><br />
}:exja (function(){var e=document.querySelector("[rel='next']");if(e){location=e.href;}else{var f=document.getElementsByTagName("a");var i=f.length;while((e=f[--i])){if(e.text.search(/(\bnext\b|^>$|^(>>|»)$|^(>|»)|(>|»)$|\bmore\b)/i)>-1){location=e.href; break;}}}})();<br />
{:exja (function(){var e=document.querySelector("[rel='prev']");if(e){location=e.href;}else{var f=document.getElementsByTagName("a");var i=f.length;while((e=f[--i])){if(e.text.search(/(\b(prev|previous)\b|^<$|^(<<|«)$|^(<|«)|(<|«)$)/i)>-1){location=e.href;break;}}}})();<br />
</nowiki>}}<br />
<br />
Alternatively, the {{ic|navtools}} extension provides the same functionality and more, such as going up one directory, or loading the root URI.<br />
<br />
=== open-firefox ===<br />
Opens current page in Firefox with {{ic|xf}} (uses {{Pkg|firefox}} and {{Pkg|notify-send}}).<br />
{{hc|~/.config/dwb/userscripts/open-firefox.sh|<nowiki><br />
#!/bin/bash<br />
# dwb: xf<br />
firefox $DWB_URI &<br />
notify-send -u low "Firefox opening $DWB_URI" #optional notification<br />
</nowiki>}}<br />
<br />
=== startup-noautoreload ===<br />
<br />
Prevents previously-opened tabs from reloading all at once after a restart.<br />
{{hc|~/.config/dwb/userscripts/startup-noautoreload.js|<nowiki><br />
//!javascript<br />
// prevents previously-opened tabs from reloading all at once after a restart.<br />
execute("set load-on-focus true");<br />
<br />
var sigId = Signal.connect("navigation", function(wv) {<br />
if (wv == tabs.current)<br />
{<br />
execute("set load-on-focus false");<br />
Signal.disconnect(sigId);<br />
}<br />
});</nowiki>}}<br />
<br />
=== toggle-stylesheet ===<br />
<br />
Toggles between 2 global stylesheets with {{ic|xg}}.<br />
{{hc|~/.config/dwb/userscripts/toggle-stylesheet.sh|<nowiki><br />
#!/bin/bash<br />
# dwb:xg<br />
<br />
CURRENT_STYLESHEET="$(dwbremote get setting user-stylesheet-uri)"<br />
<br />
STYLESHEET_1="file://$HOME/.config/dwb/stylesheets/foo.css"<br />
STYLESHEET_2="file://$HOME/.config/dwb/stylesheets/bar.css"<br />
<br />
if [[ "${CURRENT_STYLESHEET}" = ${STYLESHEET_1} ]]; then<br />
dwbremote :local_set user-stylesheet-uri "$STYLESHEET_2"<br />
else <br />
dwbremote :local_set user-stylesheet-uri "$STYLESHEET_1"<br />
fi</nowiki>}}<br />
<br />
=== youtube-player ===<br />
<br />
Opens YouTube videos with MPlayer (uses {{Pkg|mplayer}} and {{Pkg|youtube-dl}}).<br />
{{hc|~/.config/dwb/userscripts/youtube-mplayer.js|<nowiki><br />
//!javascript <br />
// opens YouTube videos with mplayer.<br />
var regex = new RegExp("http(.*)://www.youtube.com/watch\\?(.*&)*v=.*");<br />
<br />
signals.connect("navigation", function (wv, frame, request) {<br />
if (wv.mainFrame == frame && regex.test(request.uri)) <br />
system.spawn("sh -c 'mplayer \"$(youtube-dl -g " + request.uri + ")\"'");<br />
return false;<br />
});</nowiki>}}<br />
<br />
== Stylesheet ==<br />
<br />
a global stylesheet can be defined in the Settings, under {{ic|user-stylesheet-uri}} (i.e. {{ic|file:///home/tux/.config/dwb/stylesheet.css}})<br />
<br />
If you browse with the status bar hidden and are annoyed by the the link previews that appear while hovering over links with the mouse, add this to the stylesheet: {{ic|#dwb_hover_element { display:none!important; }}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== HTML5 audio and video does not work ===<br />
<br />
Make sure you have the following GStreamer packages installed:<br />
# pacman -S --needed gstreamer0.10 gstreamer0.10-bad gstreamer0.10-bad-plugins gstreamer0.10-base gstreamer0.10-base-plugins gstreamer0.10-good gstreamer0.10-good-plugins gstreamer0.10-ugly gstreamer0.10-ugly-plugins gstreamer0.10-ffmpeg<br />
<br />
=== Search engines search for ''undefined'' ===<br />
<br />
If you are always searching for ''undefined'' even with the {{ic|searchengine-submit-pattern}} option set, then you should edit {{ic|$XDG_CONFIG_HOME/dwb/searchengines}} and adapt the URIs to match your {{ic|searchengine-submit-pattern}}.<br />
<br />
=== Fuzzy font in Github ===<br />
<br />
Add this in your {{ic|~/.config/fontconfig/fonts.conf}} inside the fontconfig-tags:<br />
<br />
<selectfont><br />
<rejectfont><br />
<pattern><br />
<patelt name="family"><br />
<string>Clean</string><br />
</patelt><br />
</pattern><br />
</rejectfont><br />
</selectfont></div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Talk:Brother_MFC-465CN&diff=277704Talk:Brother MFC-465CN2013-10-05T22:23:55Z<p>Lagagnon: Blanked the page</p>
<hr />
<div></div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Brother_MFC-465CN&diff=277352Brother MFC-465CN2013-10-02T15:52:16Z<p>Lagagnon: /* Required packages */</p>
<hr />
<div>[[Category:Printers]]<br />
<br />
=== Introduction ===<br />
The Brother MFC-465CN is a network capable multi-function printer, first produced in 2007. Brother provides Linux printer and scanner drivers for all its machines, however these are not normally distributed with the usual series of Linux distribution printer driver packages (e.g hplip). Before continuing the user should read the [[CUPS|CUPS wiki]].<br />
<br />
=== Required packages ===<br />
[[pacman|Install]] {{Pkg|cups}}, {{Pkg|cups-filters}}, {{Pkg|ghostscript}}, {{Pkg|gsfonts}}, {{Pkg|foomatic-filters}} and {{Pkg|a2ps}} from [[Official Repositories]].<br />
<br />
[[AUR|Install]] [https://aur.archlinux.org/packages/brother-mfc465cn-cupswrapper/ MFC-465CN Cupswrapper] and [https://aur.archlinux.org/packages/brother-mfc465cn-lpr/ MFC-465CN line printer filters] from the [[AUR]]<br />
<br />
'''Note''': If you use x86_64 (Arch 64 bit), you '''must''' also install {{Pkg|lib32-libcups}} (from the multilibs repository). If not, the printer job queue appears to have been printed successfully, but the printer does nothing and the CUPS logs contain no definitive error messages. (You may need to uncomment the "Multilibs" line in your /etc/pacman.conf file to enable this repository).<br />
<br />
=== Run the "cupswrapper" script ===<br />
As root run the script:<br />
<br />
# /usr/local/brother/Printer/mfc465cn/cupswrapper/cupswrappermfc465cn<br />
<br />
This script will stop the cups daemon if it's running, attempt to find and configure your printer, install the drivers and restart CUPS.<br />
<br />
=== Configure the Printer on the CUPS Server ===<br />
Using your browser navigate to the [http://localhost:631/ CUPS server].<br />
In the Administration category, choose Manage printers. There you should see a MFC-465CN printer automatically installed and configured. It is usually configured to use the USB port. If the printer is used as a network printer you need to modify the printer configuration. Select Brother MFC-465CN in the device list. Then run through these steps: Administration, Modify Printer, Other Network Printing, AppSocket/HP Direct, Connection: . Then enter your IP address, example:<br />
<br />
socket://192.168.0.104:9100<br />
<br />
Your IP address will be different - find it in the LAN configuration on the MFC printer menu. Click to print a test page. If no printing, double-check all packages and steps above have been completed properly, restart CUPS ( #systemctl restart cups.service), restart the printer and ensure the printer's state is Idle, accepting jobs. If still no printing visit the CUPS wiki, Troubleshooting section.<br />
<br />
=== Scanning ===<br />
To scan with the MFC-465CN your must install the brscan2 and brscan-skey packages from the AUR. <br />
[[AUR|Install]] [https://aur.archlinux.org/packages/brscan2/ brscan2] and [https://aur.archlinux.org/packages/brscan-skey/ brscan-skey] from the [[AUR]].<br />
<br />
Then follow these instructions: [https://wiki.archlinux.org/index.php/Scanning#For_Brother_hardware/ brother scanning].<br />
<br />
=== Links ===<br />
[http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html/ Brother Linux website]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Brother_MFC-465CN&diff=277300Brother MFC-465CN2013-10-02T00:03:29Z<p>Lagagnon: </p>
<hr />
<div>[[Category:Printers]]<br />
<br />
=== Introduction ===<br />
The Brother MFC-465CN is a network capable multi-function printer, first produced in 2007. Brother provides Linux printer and scanner drivers for all its machines, however these are not normally distributed with the usual series of Linux distribution printer driver packages (e.g hplip). Before continuing the user should read the [[CUPS|CUPS wiki]].<br />
<br />
=== Required packages ===<br />
[[pacman|Install]] {{Pkg|cups}}, {{Pkg|cups-filters}}, {{Pkg|ghostscript}}, {{Pkg|gsfonts}}, {{Pkg|foomatic-filters}} and {{Pkg|a2ps}} from [[Official Repositories]].<br />
<br />
[[AUR|Install]] [https://aur.archlinux.org/packages/brother-mfc465cn-cupswrapper/ MFC-465CN Cupswrapper] and [https://aur.archlinux.org/packages/brother-mfc465cn-lpr/ MFC-465CN line printer filters] from the [[AUR]]<br />
<br />
'''Note''': If you use x86_64 (Arch 64 bit), you '''must''' also install {{Pkg|lib32-libcups}} (from the multilibs repository). If not, the printer job job queue appears to have been printed successfully, but the printer does nothing and the CUPS logs contain no definitive error messages. (You may need to uncomment the "Multilibs" line in your /etc/pacman.conf file to enable this repository).<br />
<br />
=== Run the "cupswrapper" script ===<br />
As root run the script:<br />
<br />
# /usr/local/brother/Printer/mfc465cn/cupswrapper/cupswrappermfc465cn<br />
<br />
This script will stop the cups daemon if it's running, attempt to find and configure your printer, install the drivers and restart CUPS.<br />
<br />
=== Configure the Printer on the CUPS Server ===<br />
Using your browser navigate to the [http://localhost:631/ CUPS server].<br />
In the Administration category, choose Manage printers. There you should see a MFC-465CN printer automatically installed and configured. It is usually configured to use the USB port. If the printer is used as a network printer you need to modify the printer configuration. Select Brother MFC-465CN in the device list. Then run through these steps: Administration, Modify Printer, Other Network Printing, AppSocket/HP Direct, Connection: . Then enter your IP address, example:<br />
<br />
socket://192.168.0.104:9100<br />
<br />
Your IP address will be different - find it in the LAN configuration on the MFC printer menu. Click to print a test page. If no printing, double-check all packages and steps above have been completed properly, restart CUPS ( #systemctl restart cups.service), restart the printer and ensure the printer's state is Idle, accepting jobs. If still no printing visit the CUPS wiki, Troubleshooting section.<br />
<br />
=== Scanning ===<br />
To scan with the MFC-465CN your must install the brscan2 and brscan-skey packages from the AUR. <br />
[[AUR|Install]] [https://aur.archlinux.org/packages/brscan2/ brscan2] and [https://aur.archlinux.org/packages/brscan-skey/ brscan-skey] from the [[AUR]].<br />
<br />
Then follow these instructions: [https://wiki.archlinux.org/index.php/Scanning#For_Brother_hardware/ brother scanning].<br />
<br />
=== Links ===<br />
[http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html/ Brother Linux website]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Brother_MFC-465CN&diff=277299Brother MFC-465CN2013-10-01T23:57:12Z<p>Lagagnon: </p>
<hr />
<div>[[Category:Printers]]<br />
<br />
=== Introduction ===<br />
The Brother MFC-465CN is a network capable multi-function printer, first produced in 2007. Brother provides Linux printer and scanner drivers for all its machines, however these are not normally distributed with the usual series of Linux distribution printer driver packages (e.g hplip). Before continuing the user should read the [[CUPS|CUPS wiki]].<br />
<br />
=== Required packages ===<br />
[[pacman|Install]] {{Pkg|cups}}, {{Pkg|cups-filters}}, {{Pkg|ghostscript}}, {{Pkg|gsfonts}}, {{Pkg|foomatic-filters}} and {{Pkg|a2ps}} from [[Official Repositories]].<br />
<br />
[[AUR|Install]] [https://aur.archlinux.org/packages/brother-mfc465cn-cupswrapper/ MFC-465CN Cupswrapper] and [https://aur.archlinux.org/packages/brother-mfc465cn-lpr/ MFC-465CN line printer filters] from the [[AUR]]<br />
<br />
'''Note''': If you use x86_64 (Arch 64 bit), you '''must''' also install {{Pkg|lib32-libcups}} (from the multilibs repository). If not, the printer job job queue appears to have been printed successfully, but the printer does nothing and the CUPS logs contain no definitive error messages. (You may need to uncomment the "Multilibs" line in your /etc/pacman.conf file to enable this repository).<br />
<br />
=== Run the "cupswrapper" script ===<br />
As root run the script:<br />
<br />
# /usr/local/brother/Printer/mfc465cn/cupswrapper/cupswrappermfc465cn<br />
<br />
This script will stop the cups daemon if it's running, attempt to find and configure your printer, install the drivers and restart CUPS.<br />
<br />
=== Configure the Printer on the CUPS Server ===<br />
Using your browser navigate to the [http://localhost:631/ CUPS server].<br />
In the Administration category, choose Manage printers. There you should see a MFC-465CN printer automatically installed and configured. It is usually configured to use the USB port. If the printer is used as a network printer you need to modify the printer configuration. Select Brother MFC-465CN in the device list. Then run through these steps: Administration, Modify Printer, Other Network Printing, AppSocket/HP Direct, Connection: . Then enter your IP address, example:<br />
<br />
socket://192.168.0.104:9100<br />
<br />
Your IP address will be different - find it in the LAN configuration on the MFC printer menu. Click to print a test page. If no printing, double-check all packages and steps above have been completed properly, restart CUPS ( #systemctl restart cups.service), restart the printer and ensure the printer's state is Idle, accepting jobs. If still no printing visit the CUPS wiki, Troubleshooting section.<br />
<br />
=== Scanning ===<br />
To scan with the MFC-465CN your must install the brscan2 and brscan-skey packages from the AUR. <br />
[[AUR|Install]] [https://aur.archlinux.org/packages/brscan2/ brscan2] and [https://aur.archlinux.org/packages/brscan-skey/ brscan-skey] [[AUR]].<br />
<br />
Then follow these instructions: [https://wiki.archlinux.org/index.php/Scanning#For_Brother_hardware/ brother scanning].<br />
<br />
=== Links ===<br />
[http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html/ Brother Linux website]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Brother_MFC-465CN&diff=277296Brother MFC-465CN2013-10-01T23:35:29Z<p>Lagagnon: </p>
<hr />
<div>[[Category:Printers]]<br />
<br />
=== Introduction ===<br />
The Brother MFC-465CN is a network capable multi-function printer, first produced in 2007. Brother provides Linux printer and scanner drivers for all its machines, however these are not normally distributed with the usual series of Linux distribution printer driver packages (e.g hplip). Before continuing the user should read the [[CUPS|CUPS wiki]].<br />
<br />
=== Required packages ===<br />
[[pacman|Install]] {{Pkg|cups}}, {{Pkg|cups-filters}}, {{Pkg|ghostscript}}, {{Pkg|gsfonts}}, {{Pkg|foomatic-filters}} and {{Pkg|a2ps}} from [[Official Repositories]].<br />
<br />
[[AUR|Install]] [https://aur.archlinux.org/packages/brother-mfc465cn-cupswrapper/ MFC-465CN Cupswrapper] and [https://aur.archlinux.org/packages/brother-mfc465cn-lpr/ MFC-465CN line printer filters] from the [[AUR]]<br />
<br />
{{Note|1=If you use x86_64, you '''must''' also install {{Pkg|lib32-libcups}} (from the multilibs repository) for this printer driver to work! When {{Ic|lib32-libcups}} is not installed, the printer job job queue appears to have been printed successfully, but the printer does nothing and the CUPS logs contain no definitive error messages.}} You may need to uncomment the "Multilibs" line in your /etc/pacman.conf file.<br />
<br />
=== Run the "cupswrapper" script ===<br />
As root run the script:<br />
<br />
# /usr/local/brother/Printer/mfc465cn/cupswrapper/cupswrappermfc465cn<br />
<br />
This script will stop the cups daemon if it's running, attempt to find and configure your printer, install the drivers and restart CUPS.<br />
<br />
=== Configure the Printer on the CUPS Server ===<br />
Using your browser navigate to the [http://localhost:631/ CUPS server].<br />
In the Administration category, choose Manage printers. There you should see a MFC-465CN printer automatically installed and configured. It is usually configured to use the USB port. If the printer is used as a network printer you need to modify the printer configuration. Choose Modify printer, and select Brother MFC-465CN in the device list. Select Apple/ and enter the printer IP as such:<br />
<br />
, e.g socket://192.168.0.104:9100 . Your IP address will be different - find in the LAN configuration on the printer itself. The rest of the configuration is preset, so just choose continue. Click to print the test page, and you can hear the sweet sound of your printer. If not, try to restart your printer, and make sure the printer's state is Idle, accepting jobs.<br />
<br />
=== Scanning ===<br />
To scan with the MFC-465CN your must install the brscan2 and brscan-skey packages from the AUR. <br />
<br />
== Links ===</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Brother_MFC-465CN&diff=277285Brother MFC-465CN2013-10-01T21:08:38Z<p>Lagagnon: /* Required packages */</p>
<hr />
<div>[[Category:Printers]]<br />
<br />
=== Introduction ===<br />
The Brother MFC-465CN is a network capable multi-function printer, first produced in 2007. Brother provides Linux printer and scanner drivers for all its machines, however these are not normally distributed with the usual series of Linux distribution printer driver packages (e.g hplip). Before continuing the user should read the ArchLinux CUPS wiki.<br />
<br />
=== Required packages ===<br />
[[pacman|Install]] {{Pkg|cups}}, {{Pkg|cups-filters}}, {{Pkg|ghostscript}}, {{Pkg|gsfonts}}, {{Pkg|foomatic-filters}} and {{Pkg|a2ps}} from [[Official Repositories]].<br />
<br />
[[AUR|Install]] [https://aur.archlinux.org/packages/brother-mfc465cn-cupswrapper/ MFC-465CN Cupswrapper] and [https://aur.archlinux.org/packages/brother-mfc465cn-lpr/ MFC-465CN line printer filters] from the [[AUR]]<br />
<br />
{{Note|1=If you use x86_64, you '''must''' also install {{Pkg|lib32-libcups}} (from the multilibs repository) for this printer driver to work! When {{Ic|lib32-libcups}} is not installed, the printer job job queue appears to have been printed successfully, but the printer does nothing and the CUPS logs contain no definitive error messages.}}<br />
<br />
=== Install Brother MFC465 AUR packages ===<br />
Fortunately, a number of ArchLinux users have created Arch packages from the .deb and .rpm packages at Brother's Linux website, which removes at least two fiddly steps.<br />
<br />
=== Run the "cupswrapper" script ===<br />
As root run the script: # /usr/local/brother/Printer/mfc465cn/cupswrapper/cupswrappermfc465cn<br />
This script will stop the cups daemon if it's running, attempt to find and configure your printer, install the drivers and restart CUPS.<br />
<br />
=== Configure the Printer on the CUPS Server ===<br />
Using your browser navigate to the CUPS server: http://localhost:631/<br />
In the Administration category, choose Manage printers. There you should see a MFC-465CN printer automatically installed and configured. It is usually configured to use the USB port.<br />
If the printer is used as a network printer you need to modify the printer configuration. Choose Modify printer, and select Brother MFC-465CN in the device list. If it doesn't exist choose LPD/LPR Host or Printer instead. Then in Device URI you enter the printer IP, e.g lpd://10.0.0.10. You will find the IP address in the LAN configuration on the printer itself. The rest of the configuration is preset, so just choose continue.<br />
Click to print the test page, and you can hear the sweet sound of your printer. If not, try to restart your printer, and make sure the printer's state is Idle, accepting jobs.</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Brother_MFC-465CN&diff=277284Brother MFC-465CN2013-10-01T21:08:10Z<p>Lagagnon: /* Required packages */</p>
<hr />
<div>[[Category:Printers]]<br />
<br />
=== Introduction ===<br />
The Brother MFC-465CN is a network capable multi-function printer, first produced in 2007. Brother provides Linux printer and scanner drivers for all its machines, however these are not normally distributed with the usual series of Linux distribution printer driver packages (e.g hplip). Before continuing the user should read the ArchLinux CUPS wiki.<br />
<br />
=== Required packages ===<br />
[[pacman|Install]] {{Pkg|cups}}, {{Pkgs|cups-filters}}, {{Pkg|ghostscript}}, {{Pkg|gsfonts}}, {{Pkg|foomatic-filters}} and {{Pkg|a2ps}} from [[Official Repositories]].<br />
<br />
[[AUR|Install]] [https://aur.archlinux.org/packages/brother-mfc465cn-cupswrapper/ MFC-465CN Cupswrapper] and [https://aur.archlinux.org/packages/brother-mfc465cn-lpr/ MFC-465CN line printer filters] from the [[AUR]]<br />
<br />
{{Note|1=If you use x86_64, you '''must''' also install {{Pkg|lib32-libcups}} (from the multilibs repository) for this printer driver to work! When {{Ic|lib32-libcups}} is not installed, the printer job job queue appears to have been printed successfully, but the printer does nothing and the CUPS logs contain no definitive error messages.}}<br />
<br />
=== Install Brother MFC465 AUR packages ===<br />
Fortunately, a number of ArchLinux users have created Arch packages from the .deb and .rpm packages at Brother's Linux website, which removes at least two fiddly steps.<br />
<br />
=== Run the "cupswrapper" script ===<br />
As root run the script: # /usr/local/brother/Printer/mfc465cn/cupswrapper/cupswrappermfc465cn<br />
This script will stop the cups daemon if it's running, attempt to find and configure your printer, install the drivers and restart CUPS.<br />
<br />
=== Configure the Printer on the CUPS Server ===<br />
Using your browser navigate to the CUPS server: http://localhost:631/<br />
In the Administration category, choose Manage printers. There you should see a MFC-465CN printer automatically installed and configured. It is usually configured to use the USB port.<br />
If the printer is used as a network printer you need to modify the printer configuration. Choose Modify printer, and select Brother MFC-465CN in the device list. If it doesn't exist choose LPD/LPR Host or Printer instead. Then in Device URI you enter the printer IP, e.g lpd://10.0.0.10. You will find the IP address in the LAN configuration on the printer itself. The rest of the configuration is preset, so just choose continue.<br />
Click to print the test page, and you can hear the sweet sound of your printer. If not, try to restart your printer, and make sure the printer's state is Idle, accepting jobs.</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Brother_MFC-465CN&diff=277283Brother MFC-465CN2013-10-01T21:05:09Z<p>Lagagnon: /* Required packages */</p>
<hr />
<div>[[Category:Printers]]<br />
<br />
=== Introduction ===<br />
The Brother MFC-465CN is a network capable multi-function printer, first produced in 2007. Brother provides Linux printer and scanner drivers for all its machines, however these are not normally distributed with the usual series of Linux distribution printer driver packages (e.g hplip). Before continuing the user should read the ArchLinux CUPS wiki.<br />
<br />
=== Required packages ===<br />
[[pacman|Install]] {{Pkg|ghostscript}}, {{Pkg|gsfonts}}, {{Pkg|foomatic-filters}} and {{Pkg|a2ps}} from [[Official Repositories]].<br />
<br />
[[AUR|Install]] [https://aur.archlinux.org/packages/brother-mfc465cn-cupswrapper/ MFC-465CN Cupswrapper] and [https://aur.archlinux.org/packages/brother-mfc465cn-lpr/ MFC-465CN line printer filters] from the [[AUR]]<br />
<br />
{{Note|1=If you use x86_64, you '''must''' also install {{Pkg|lib32-libcups}} (from the multilibs repository) for this printer driver to work! When {{Ic|lib32-libcups}} is not installed, the printer job job queue appears to have been printed successfully, but the printer does nothing and the CUPS logs contain no definitive error messages.}}<br />
<br />
=== Install Brother MFC465 AUR packages ===<br />
Fortunately, a number of ArchLinux users have created Arch packages from the .deb and .rpm packages at Brother's Linux website, which removes at least two fiddly steps.<br />
<br />
=== Run the "cupswrapper" script ===<br />
As root run the script: # /usr/local/brother/Printer/mfc465cn/cupswrapper/cupswrappermfc465cn<br />
This script will stop the cups daemon if it's running, attempt to find and configure your printer, install the drivers and restart CUPS.<br />
<br />
=== Configure the Printer on the CUPS Server ===<br />
Using your browser navigate to the CUPS server: http://localhost:631/<br />
In the Administration category, choose Manage printers. There you should see a MFC-465CN printer automatically installed and configured. It is usually configured to use the USB port.<br />
If the printer is used as a network printer you need to modify the printer configuration. Choose Modify printer, and select Brother MFC-465CN in the device list. If it doesn't exist choose LPD/LPR Host or Printer instead. Then in Device URI you enter the printer IP, e.g lpd://10.0.0.10. You will find the IP address in the LAN configuration on the printer itself. The rest of the configuration is preset, so just choose continue.<br />
Click to print the test page, and you can hear the sweet sound of your printer. If not, try to restart your printer, and make sure the printer's state is Idle, accepting jobs.</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Talk:Brother_MFC-465CN&diff=277281Talk:Brother MFC-465CN2013-10-01T20:48:50Z<p>Lagagnon: Created page with "NOT COMPLETED YET. Started Oct 1/2013."</p>
<hr />
<div>NOT COMPLETED YET. Started Oct 1/2013.</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Brother_MFC-465CN&diff=277280Brother MFC-465CN2013-10-01T20:48:09Z<p>Lagagnon: Created page with "Category:Printers === Introduction === The Brother MFC-465CN is a network capable multi-function printer, first produced in 2007. Brother provides Linux printer and scann..."</p>
<hr />
<div>[[Category:Printers]]<br />
<br />
=== Introduction ===<br />
The Brother MFC-465CN is a network capable multi-function printer, first produced in 2007. Brother provides Linux printer and scanner drivers for all its machines, however these are not normally distributed with the usual series of Linux distribution printer driver packages (e.g hplip). Before continuing the user should read the ArchLinux CUPS wiki.<br />
<br />
=== Required packages ===<br />
[[AUR|Install]] {{Pkg|ghostscript}}, https://aur.archlinux.org/packages/brother-mfc465cn-cupswrapper/ https://aur.archlinux.org/packages/brother-mfc465cn-lpr/ {{Pkg|gsfonts}}, {{Pkg|foomatic-filters}} and {{Pkg|a2ps}} from [[Official Repositories]].<br />
<br />
{{Note|1=If you use x86_64, you '''must''' also install {{Pkg|lib32-libcups}} (from the multilibs repository) for this printer driver to work! When {{Ic|lib32-libcups}} is not installed, the printer job appears to have been printed successfully, but the printer does nothing and the CUPS logs contain no definitive error message}}<br />
<br />
=== Install Brother MFC465 AUR packages ===<br />
Fortunately, a number of ArchLinux users have created Arch packages from the .deb and .rpm packages at Brother's Linux website, which removes at least two fiddly steps.<br />
<br />
=== Run the "cupswrapper" script ===<br />
As root run the script: # /usr/local/brother/Printer/mfc465cn/cupswrapper/cupswrappermfc465cn<br />
This script will stop the cups daemon if it's running, attempt to find and configure your printer, install the drivers and restart CUPS.<br />
<br />
=== Configure the Printer on the CUPS Server ===<br />
Using your browser navigate to the CUPS server: http://localhost:631/<br />
In the Administration category, choose Manage printers. There you should see a MFC-465CN printer automatically installed and configured. It is usually configured to use the USB port.<br />
If the printer is used as a network printer you need to modify the printer configuration. Choose Modify printer, and select Brother MFC-465CN in the device list. If it doesn't exist choose LPD/LPR Host or Printer instead. Then in Device URI you enter the printer IP, e.g lpd://10.0.0.10. You will find the IP address in the LAN configuration on the printer itself. The rest of the configuration is preset, so just choose continue.<br />
Click to print the test page, and you can hear the sweet sound of your printer. If not, try to restart your printer, and make sure the printer's state is Idle, accepting jobs.</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Wmii&diff=210876Wmii2012-06-21T22:54:42Z<p>Lagagnon: /* See also */</p>
<hr />
<div>[[Category:Dynamic WMs]]<br />
{{DISPLAYTITLE:wmii}}<br />
<br />
[http://wmii.suckless.org/ wmii] (window manager improved 2) is a dynamic window manager for X11. It supports classic and dynamic window management with extended keyboard, mouse, and filesystem based remote control. It replaces the workspace paradigm with a new tagging approach. <br />
<br />
The following tips are intended to help the user get started with wmii. While wmii can be configured in almost any language, this article will focus on using the '''wmiirc''' configuration file, which is simply a shell script. Please see the [[ruby-wmii]] article to see how to configure wmii in ruby.<br />
<br />
==Installation==<br />
wmii is available from the '''extra''' repository. You can install it by issuing the following command:<br />
<br />
pacman -S wmii<br />
<br />
Alternatively, you can get the [https://aur.archlinux.org/packages.php?ID=3497 latest development version] which is available from the [[AUR]].<br />
<br />
Next you will need to edit your '''~/.xinitrc''' to enable you to start wmii with '''startx''':<br />
<br />
exec wmii<br />
<br />
To allow for starting wmii without logging off or killing the X session, add the following in the ~/.xinitrc<br />
until wmii; do<br />
true<br />
done<br />
Upon your first login, you will be greeted with the wmii welcome message, which also includes a short tutorial on wmii. Completing this tutorial will give you a good idea on how wmii works.<br />
{{Box Note|If the welcome message does not show up, make sure you have '''xmessage''' installed from the '''xorg-xmessage''' package. Then you can read the welcome by pressing $MODKEY-a and selecting 'welcome'.}}<br />
<br />
==Configuration==<br />
The easiest way to start configuring wmii, is to copy the default wmiirc file to your home directory and changing it to your needs. For version 3.9,<br />
mkdir ~/.wmii<br />
cp /etc/wmii/wmiirc ~/.wmii/<br />
<br />
Or just create ~/.wmii/wmiirc_local if you want only basic customization such as fonts, colors etc.<br />
<br />
For earlier versions,<br />
mkdir ~/.wmii/wmii-$VERSION<br />
cp /etc/wmii/wmiirc ~/.wmii/wmii-$VERSION/<br />
<br />
By editing this file, you can change things such as color, background, modkey, etc. Keep in mind that wmiirc uses tabbed indentation in case your editor of choice is configured to only produce spaces. Mixing the two indenting styles may cause unexpected behavior.<br />
===Configuration Variables===<br />
# Configuration Variables<br />
MODKEY=Mod1<br />
UP=k<br />
DOWN=j<br />
LEFT=h<br />
RIGHT=l<br />
Change Mod1 to Mod4 if you want to use Windows key instead of Alt. You can also change h, j, k, l, if you like.<br />
<br />
===Window Colors===<br />
# Colors tuples: "<text> <background> <border>"<br />
WMII_NORMCOLORS='#ffffff #000000 #ffffff'<br />
WMII_FOCUSCOLORS='#ffffff #5c0000 #ffffff'<br />
<br />
WMII_BACKGROUND='#333333'<br />
WMII_FONT='fixed'<br />
Colors of unselected window are in NORMCOLORS variable. Colors of selected window are in FOCUSCOLOR variable. You can change the background color (if you use transparent terminal) with the WMII_BACKGROUND variable.<br />
<br />
==Usage==<br />
<br />
If you are not familiar with tiling WMs, it's not really easy to begin with it. You must learn a few basic hotkeys to launch programs and place or resize windows. It is a good idea to write the basic hotkeys on paper and stick these on your monitor until you memorize them. By default, the "Mod" key is Alt. Some default hotkeys are :<br />
* Mod+Enter -> Terminal<br />
* Mod+p -> wimenu : a menu appears, just type the beginning of the name of the application <br />
to open it.<br />
* Mod+d -> default layout : windows are divided on screen<br />
* Mod+s -> stacked layout : the selected window take all the screen, we just see the title <br />
bar of the others.<br />
* Mod+j -> select the window below<br />
* Mod+k -> select the window above<br />
* Shift+Mod+j -> move the window down<br />
* Shift+Mod+k -> move the window up<br />
* Mod+a -> Actions menu : choose "quit" to quit<br />
<br />
N.B. For commonly used programs you can make use of ''history.progs'', Mod+p and up/down arrow keys to select previous entries.<br />
<br />
<br />
By default, only one column is used by the desktop (i.e. the entire screen). It's possible to use several columns with h and l :<br />
<br />
* Mod+Shift+h : move the selected window left<br />
* Mod+Shift+l : move the selected window right<br />
* Mod+h : select the column on the left<br />
* Mod+l : select the column on the right <br />
<br />
Columns are created automatically, with your placements of the windows. You can make them bigger or smaller, clicking beetween two columns.<br />
<br />
===Layouts===<br />
<br />
You begin in "default" layout : all windows take the same space. You can make them bigger or smaller by clicking in the little square in the title bar of a window.<br />
<br />
* "stacked" layout (Mod+s) : the selected window takes the entire column, but you can see <br />
the title bar of other windows.<br />
* "maximum" layout (Mod+m) : the selected window takes the entire column, you do not see <br />
other windows.<br />
* "fullscreen" layout (Mod+f) : the selected window takes runs in full screen.<br />
<br />
If you tend to use multiple clients in stacked view then binding the following allows you to remove all the title bars apart from the one you are viewing, regaining screen estate.<br />
Each client will be numbered in the top right with 1/3, 2/3 etc. <br />
Mod + s or Mod + d will return the view to standard layouts.<br />
* fn Key-$MODKEY-x {wmiir xwrite /tag/sel/ctl colmode sel +max} # rc.wmii.local version<br />
* Key $MODKEY-x<br />
wmiir xwrite /tag/sel/ctl colmode sel +max # wmiirc version<br />
<br />
====Floating layout====<br />
<br />
You can place your windows like a classic window manager. It's called floating layout. It's useful for some applications, like the Gimp, mplayer, vlc etc.<br />
<br />
* Mod+Shift+Space : Move selected window in floating layout.<br />
* Mod+Space : switch between floating layout and normal layout. <br />
<br />
In the floating layout, we can select a window with Mod+j and Mod+k. We can change dimensions of the window, by dragging, like in any other window manager. But we can use hotkeys for that as well :<br />
<br />
* Mod+Left click : move window<br />
* Mod+Right click : change dimensions of the window (you can use it in other layouts too)<br />
<br />
===Views and Tagging===<br />
Tagging in wmii is very similar to the concept of virtual desktops in other window managers. However, tagging is slightly more powerful because it makes it very easy to group windows in multiple ways concurrently. This is made possible by the fact that WMII easily allows each window to have multiple tags. This allows you to group applications for specific use cases and easily switch between them without having to tear down your previous environment by sending applications to another "Desktop".<br />
<br />
By default, when you first start up wmii you will see the word 'nil' in the lower left corner. You are at the 'nil' view. The first application you start (such as a terminal: Mod+Enter) will automatically be tagged with a "1" and you will be automatically switched to view "1". Views can be navigated or changed with built in keybindings:<br />
<br />
* Mod+Shift+2 : tag selected window to view "2"<br />
* Mod+2 : this switches you to view "2" where you can see all windows tagged with "2"<br />
<br />
It's the same thing for all numbers, from 0 to 9. But you can also use names :<br />
<br />
* Mod+t : views menu : you can select a tag with right and left keys, or type the name <br />
of the tag (or just a part of the name, if it was created).<br />
<br />
* Mod+Shift+t : this retags the currently selected window with whatever you type into <br />
the menu.<br />
<br />
* N.B If using plan9port a ''history.tags'' file is generated in .wmii-*/. You can use <br />
up/down arrow keys to recall previous entries for simple re-tagging/window viewing.<br />
<br />
You can tag windows with multiple views by using a '+' between the tag names :<br />
<br />
* Mod+Shift+t foo+bar+2 : this tags the currently selected window to the views "foo",<br />
"bar" and "2".<br />
You can remove a single tag from multi-tagged windows by selecting the one you wish to remove<br />
and using Mod+Shift+t, -tag ''name/number'' ie<br />
Urxvt is multi-tagged on views 1 2 3 and 4, if you jumped to 3 and typed exit, all instances of<br />
urxvt will be terminated, using Mod+Shift+t, -3 will only remove that single view.<br />
<br />
Tags can be set for specific applications in the wmiirc configuration file.<br />
<br />
# Tagging Rules<br />
wmiir write /tagrules <<!<br />
/Firefox.*/ -> ~+2<br />
/Gimp.*/ -> ~+3<br />
/.*/ -> sel<br />
/.*/ -> 1<br />
!<br />
<br />
With the above tag rules, firefox starts in floating mode (~) on view "2". Gimp starts in floating mode on view "3".<br />
<br />
{{Box Note | Applications need to spawn an X-window in order to be automatically assigned tags. Therefore, in order to launch your terminal based programs you will need to prepend something like ''urxvt -e <program>'' if want to make use of this feature.}}<br />
<br />
==WMII filesystem==<br />
<br />
WMII's filesystem is based on the [http://9p.cat-v.org 9P protocol]. Every element (windows, statusbar, ...) is represented as a file. This makes several cool things possible. For example you can display the song you're currently listening to in the statusbar (for example with MPD and MPC).<br />
<br />
{{Box Note|This filesystem is not permanent and you have to set up everything again after reboot. To make your changes "permanent" simply write the right commands into your wmiirc.}}<br />
<br />
You can access the filesystem with the ''wmiir'' command. For instance, you can list the root directory with ''wmiir ls /''<br />
<br />
client/<br />
colrules<br />
ctl<br />
event<br />
keys<br />
lbar/<br />
rbar/<br />
tag/<br />
tagrules<br />
<br />
You can use ''wmiir read'' to look into files: ''wmiir read /tag/sel/index''<br />
<br />
# ~ 1280 785<br />
~ 0x160000d 731 394 486 332 xterm:XTerm:~<br />
# 1 0 1280<br />
1 0x800003 0 785 opera:Opera:Editing Wmii - Preview - ArchWiki - Opera<br />
<br />
So this is the info for the '''sel'''ected (current) tag. As you can see, I've got one floating xterm and Opera running on this tag. The first number in this output indicates the column of the window. ~ is the floating column and 1 ist (obviously) the first column. The second column is the XServer-ID for the client. The next columns are the coordinates and the size of the window. The last column ist the titlebar of the window.<br />
<br />
You can create new files with ''wmiir create'':<br />
<br />
echo Arch is best | wmiir create /rbar/arch<br />
<br />
Now you should see "Arch is best" in your statusbar<br />
<br />
"wmiir create" reads from STDIN. So you can pipe any information you like into your statusbar. "wmiir write" works in a similar fashion but doesn't create new files.<br />
<br />
{{Box Note|Note for /rbar and /lbar:The elements in those status bars are in alphabetical order.}}<br />
<br />
You can remove files with rm or remove<br />
<br />
If you like to have a program on several tags you can use:<br />
echo "3+5+8" | wmiir write /client/0x800003/tags<br />
<br />
Now my Opera window appears on Tags 3,5 and 8.<br />
<br />
But there are easier ways to accomplish this ;)<br />
Just type MOD+shift+t and enter "3+5+8" and you get the same result for the currently selected client.<br />
<br />
{{Box Note| There's also the possibility to mount WMII's filesystem. Have a look at the [http://wmii.suckless.org/9p official documentation]. }}<br />
<br />
==Other nice stuff==<br />
<br />
=== Laptop Status Bar===<br />
<br />
If you are using wmii on a laptop, it may be convenient to display items such as wireless quality, remaining battery time, and load averages in the status bar; the script below requires you to install acpi and gawk:<br />
pacman -S acpi gawk''<br />
{{bc|<nowiki><br />
# Status Bar Info<br />
status() {<br />
echo -n ' Wlan0:' $(iwconfig wlan0 | awk '/Quality/{print $2}' | sed 's/.*=//' | awk -F"/" '{printf("%.0f%%", $1/$2*100)}') '| Bat:' $(acpi -b | sed -n 's/.*\([0-9][0-9]:[0-9][0-9]\):[0-9][0-9].*/\1/p') '|' $(uptime | sed 's/.*: //; s/,//g') '|' $(date '+%c')<br />
}<br />
</nowiki>}}<br />
By default the status bar only shows date and an uptime pager (displays system load average for the last 1, 5, 15 minutes).<br />
<br />
=== Conky Replacement Status Bar===<br />
<br />
Similar to the above status() function any user can essentially replace the functions of the conky system monitor by using the wmii status bar. Below is an example of such to show CPU and GPU temperatures, CPU speeds, /home and / partition sizes, RAM used, system load averages and date/time:<br />
{{bc|<nowiki><br />
# Status Bar Info<br />
status() {<br />
echo -n 'CPUTemp:' `expr $(sensors | grep temp1 | awk '{print $2}' | cut -c2-3) + 15` '|' 'GPUTemp:' $(nvidia-settings -q=GPUCoreTemp | grep eagle | awk '{print $4}' | cut -c1-2 ) '|' 'CPUMHz:' $(cat /proc/cpuinfo | grep MHz | awk '{printf "%.0f\n", $4}') '|' '/home:' $(df -h | grep sda5 | awk '{print $3}') '|' '/:' $(df -h | grep sda1 | awk '{print $3}') '|' 'RAM:' $(free -m | grep -i /cache | awk '{print $3}') 'MB |' $(uptime | sed 's/.*://; s/,//g') '|' $(date +"%a %b %d %H:%M")<br />
}<br />
</nowiki>}}<br />
By judicious use of the info available from common Linux system commands, the /proc filesystem and GNU tools such as grep, awk, sed and cut you can create a highly informational wmii status bar. Note that the above is specific to the author's computer and will have to be edited to suit.<br />
<br />
===Terminal Title===<br />
If you would like to display the current directory in your terminal emulator's titlebar, add this to your .bashrc<br />
WMII_IS_RUNNING=`ps a | grep wmii | awk '/[^"grep"] wmii$/'`<br />
if [ -n "$WMII_IS_RUNNING" ]; then<br />
PROMPT_COMMAND='dirs | wmiir write /client/sel/label'<br />
fi<br />
With this you can shorten you shell prompt and have more horizontal space to type. This test prevents you from getting a "WMII_ADRESS not set" error when you spawn a console.<br />
<br />
===Weechat Highlight Notification===<br />
If you use weechat and want to know when you have been messaged without always having to look at the weechat window, you can use the ''launcher.pl'' script to send a notice to the bar. To get this working, you will need to create a script that sends your desired notice. Here is very simple example:<br />
<br />
#!/bin/bash<br />
echo :: NEW MESSAGE :: | wmiir create /lbar/alert<br />
sleep 8<br />
wmiir remove /lbar/alert<br />
<br />
Then start weechat and load the script.<br />
<br />
/perl load launcher.pl<br />
<br />
Then type the following command into weechat:<br />
<br />
/set plugins.var.perl.launcher.signal.weechat_pv = "/path/to/yourscript"<br />
<br />
If you are experiencing the "/rbar/alert File not Found" error inside the weechat buffer and its messing up your layout you can try the following fix:<br />
<br />
/set plugins.var.perl.launcher.signal.weechat_pv = "/path/to/yourscript >/dev/null 2>&"<br />
<br />
Now, :: NEW MESSAGE :: will appear in the left corner of your bar whenever you have a message highlight. Make sure to place ''launcher.pl'' the perl/autoload directory so that it starts when weechat starts.<br />
<br />
===Mod4 on an old Thinkpad===<br />
<br />
Although Wmii defaults to Mod1, using Mod4 reduces conflicts in keybindings with many terminal applications. There is a snag for old Thinkpad users, however. They do not have a Mod4 key. To get one, another key has to be assigned to it using xmodmap. To do it, make an ''.Xmodmap'' file in your home directory and add this to it:<br />
keycode 64 = Super_L<br />
add Mod4 = Super_L<br />
remove Mod1 = Super_L<br />
<br />
You will need to replace 64 with whatever ''xev'' tells you is the keycode of the key you want to replace. In the above example, I replace left Alt (and use right alt for applications).<br />
<br />
===Nice fonts===<br />
Wmii now supports Xft, just prefix font name with 'xft'. For instance:<br />
export WMII_FONT='xft:Sans-9'<br />
<br />
===Keyboard layouts===<br />
You'd probably like to have its own keyboard layout for each window. However, most of such applications requires system tray while witray is only available in the [https://aur.archlinux.org/packages.php?ID=3497 development version of wmii]. [http://www.archlinux.org/packages/?q=xxkb xxkb] package helps to solve the problem. It has no UI by default. You only need to configure layouts in xorg.conf. Create /etc/X11/xorg.conf.d/20-keyboard.conf and put something like this into it:<br />
Section "InputClass"<br />
Identifier "Keyboard Defaults"<br />
MatchIsKeyboard "yes"<br />
Option "XkbModel" "pc101"<br />
Option "XkbLayout" "us,ru"<br />
Option "XkbOptions" "grp:ctrl_shift_toggle,compose:prsc"<br />
EndSection<br />
Replace layout, options and model to fit your needs. Add<br />
xxkb &<br />
into your wmiirc and it just works.<br />
[https://aur.archlinux.org/packages.php?ID=33298 xkblayout-state] can be used to put layout indicator into the status line:<br />
status() {<br />
echo -n label $(xkblayout-state print "%s") '|' $(date +"%a %b %d %H:%M")<br />
}<br />
<br />
===Note: Version 3.9.2-1===<br />
<br />
If you upgrade from wmii v3.6-4 to v3.9.2-1 you will have to insert any changes you made to your old ~/.wmii-3.5/wmiirc configuration file into the newer config file located at ~/.wmii/wmiirc_local. Note also that there are some slight format and variable name changes between the newer and older versions of /etc/wmii/wmiirc.<br />
<br />
This latest version has some significant enhancements such as easier window dimension changes with the mouse and better handling of small floating windows launched from tiled applications (especially LibreOffice).<br />
<br />
==See also==<br />
* [https://code.google.com/p/wmii/ wmii Website] -- the official website of wmii<br />
* [[dmenu]] -- a simple application launcher which binds well with dwm and wmii<br />
* [http://wmii.googlecode.com/hg/doc/wmii.pdf user guide] -- latest wmii guide (pdf)<br />
*[https://bbs.archlinux.org/viewtopic.php?id=22592 The wmii thread]<br />
* [https://sites.google.com/site/blijvend/home-1/notes/wmiicolor wmii colour themes]<br />
* [http://eigenclass.org/hiki.rb?wmii+ruby ruby-wmii] -- Ruby configuration and scripting for wmii 3.1<br />
* [https://github.com/sunaku/wmiirc sunaku's wmiirc] -- Ruby configuration and scripting for wmii 3.9+ and wmii-hg<br />
* [http://pastebin.com/Xyn0mEjr Ben's wmiirc] -- Simple wmiirc with extra widgets (vol, mpd, mail, clock) and other modifications<br />
* mailing list is dev@suckless.org, see official website<br />
* IRC channel is #wmii on the OFTC IRC network</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Wmii&diff=210275Wmii2012-06-19T01:54:25Z<p>Lagagnon: /* See also */</p>
<hr />
<div>[[Category:Dynamic WMs]]<br />
{{DISPLAYTITLE:wmii}}<br />
<br />
[http://wmii.suckless.org/ wmii] (window manager improved 2) is a dynamic window manager for X11. It supports classic and dynamic window management with extended keyboard, mouse, and filesystem based remote control. It replaces the workspace paradigm with a new tagging approach. <br />
<br />
The following tips are intended to help the user get started with wmii. While wmii can be configured in almost any language, this article will focus on using the '''wmiirc''' configuration file, which is simply a shell script. Please see the [[ruby-wmii]] article to see how to configure wmii in ruby.<br />
<br />
==Installation==<br />
wmii is available from the '''extra''' repository. You can install it by issuing the following command:<br />
<br />
pacman -S wmii<br />
<br />
Alternatively, you can get the [https://aur.archlinux.org/packages.php?ID=3497 latest development version] which is available from the [[AUR]].<br />
<br />
Next you will need to edit your '''~/.xinitrc''' to enable you to start wmii with '''startx''':<br />
<br />
exec wmii<br />
<br />
To allow for starting wmii without logging off or killing the X session, add the following in the ~/.xinitrc<br />
until wmii; do<br />
true<br />
done<br />
Upon your first login, you will be greeted with the wmii welcome message, which also includes a short tutorial on wmii. Completing this tutorial will give you a good idea on how wmii works.<br />
{{Box Note|If the welcome message does not show up, make sure you have '''xmessage''' installed from the '''xorg-xmessage''' package. Then you can read the welcome by pressing $MODKEY-a and selecting 'welcome'.}}<br />
<br />
==Configuration==<br />
The easiest way to start configuring wmii, is to copy the default wmiirc file to your home directory and changing it to your needs. For version 3.9,<br />
mkdir ~/.wmii<br />
cp /etc/wmii/wmiirc ~/.wmii/<br />
<br />
Or just create ~/.wmii/wmiirc_local if you want only basic customization such as fonts, colors etc.<br />
<br />
For earlier versions,<br />
mkdir ~/.wmii/wmii-$VERSION<br />
cp /etc/wmii/wmiirc ~/.wmii/wmii-$VERSION/<br />
<br />
By editing this file, you can change things such as color, background, modkey, etc. Keep in mind that wmiirc uses tabbed indentation in case your editor of choice is configured to only produce spaces. Mixing the two indenting styles may cause unexpected behavior.<br />
===Configuration Variables===<br />
# Configuration Variables<br />
MODKEY=Mod1<br />
UP=k<br />
DOWN=j<br />
LEFT=h<br />
RIGHT=l<br />
Change Mod1 to Mod4 if you want to use Windows key instead of Alt. You can also change h, j, k, l, if you like.<br />
<br />
===Window Colors===<br />
# Colors tuples: "<text> <background> <border>"<br />
WMII_NORMCOLORS='#ffffff #000000 #ffffff'<br />
WMII_FOCUSCOLORS='#ffffff #5c0000 #ffffff'<br />
<br />
WMII_BACKGROUND='#333333'<br />
WMII_FONT='fixed'<br />
Colors of unselected window are in NORMCOLORS variable. Colors of selected window are in FOCUSCOLOR variable. You can change the background color (if you use transparent terminal) with the WMII_BACKGROUND variable.<br />
<br />
==Usage==<br />
<br />
If you are not familiar with tiling WMs, it's not really easy to begin with it. You must learn a few basic hotkeys to launch programs and place or resize windows. It is a good idea to write the basic hotkeys on paper and stick these on your monitor until you memorize them. By default, the "Mod" key is Alt. Some default hotkeys are :<br />
* Mod+Enter -> Terminal<br />
* Mod+p -> wimenu : a menu appears, just type the beginning of the name of the application <br />
to open it.<br />
* Mod+d -> default layout : windows are divided on screen<br />
* Mod+s -> stacked layout : the selected window take all the screen, we just see the title <br />
bar of the others.<br />
* Mod+j -> select the window below<br />
* Mod+k -> select the window above<br />
* Shift+Mod+j -> move the window down<br />
* Shift+Mod+k -> move the window up<br />
* Mod+a -> Actions menu : choose "quit" to quit<br />
<br />
N.B. For commonly used programs you can make use of ''history.progs'', Mod+p and up/down arrow keys to select previous entries.<br />
<br />
<br />
By default, only one column is used by the desktop (i.e. the entire screen). It's possible to use several columns with h and l :<br />
<br />
* Mod+Shift+h : move the selected window left<br />
* Mod+Shift+l : move the selected window right<br />
* Mod+h : select the column on the left<br />
* Mod+l : select the column on the right <br />
<br />
Columns are created automatically, with your placements of the windows. You can make them bigger or smaller, clicking beetween two columns.<br />
<br />
===Layouts===<br />
<br />
You begin in "default" layout : all windows take the same space. You can make them bigger or smaller by clicking in the little square in the title bar of a window.<br />
<br />
* "stacked" layout (Mod+s) : the selected window takes the entire column, but you can see <br />
the title bar of other windows.<br />
* "maximum" layout (Mod+m) : the selected window takes the entire column, you do not see <br />
other windows.<br />
* "fullscreen" layout (Mod+f) : the selected window takes runs in full screen.<br />
<br />
If you tend to use multiple clients in stacked view then binding the following allows you to remove all the title bars apart from the one you are viewing, regaining screen estate.<br />
Each client will be numbered in the top right with 1/3, 2/3 etc. <br />
Mod + s or Mod + d will return the view to standard layouts.<br />
* fn Key-$MODKEY-x {wmiir xwrite /tag/sel/ctl colmode sel +max} # rc.wmii.local version<br />
* Key $MODKEY-x<br />
wmiir xwrite /tag/sel/ctl colmode sel +max # wmiirc version<br />
<br />
====Floating layout====<br />
<br />
You can place your windows like a classic window manager. It's called floating layout. It's useful for some applications, like the Gimp, mplayer, vlc etc.<br />
<br />
* Mod+Shift+Space : Move selected window in floating layout.<br />
* Mod+Space : switch between floating layout and normal layout. <br />
<br />
In the floating layout, we can select a window with Mod+j and Mod+k. We can change dimensions of the window, by dragging, like in any other window manager. But we can use hotkeys for that as well :<br />
<br />
* Mod+Left click : move window<br />
* Mod+Right click : change dimensions of the window (you can use it in other layouts too)<br />
<br />
===Views and Tagging===<br />
Tagging in wmii is very similar to the concept of virtual desktops in other window managers. However, tagging is slightly more powerful because it makes it very easy to group windows in multiple ways concurrently. This is made possible by the fact that WMII easily allows each window to have multiple tags. This allows you to group applications for specific use cases and easily switch between them without having to tear down your previous environment by sending applications to another "Desktop".<br />
<br />
By default, when you first start up wmii you will see the word 'nil' in the lower left corner. You are at the 'nil' view. The first application you start (such as a terminal: Mod+Enter) will automatically be tagged with a "1" and you will be automatically switched to view "1". Views can be navigated or changed with built in keybindings:<br />
<br />
* Mod+Shift+2 : tag selected window to view "2"<br />
* Mod+2 : this switches you to view "2" where you can see all windows tagged with "2"<br />
<br />
It's the same thing for all numbers, from 0 to 9. But you can also use names :<br />
<br />
* Mod+t : views menu : you can select a tag with right and left keys, or type the name <br />
of the tag (or just a part of the name, if it was created).<br />
<br />
* Mod+Shift+t : this retags the currently selected window with whatever you type into <br />
the menu.<br />
<br />
* N.B If using plan9port a ''history.tags'' file is generated in .wmii-*/. You can use <br />
up/down arrow keys to recall previous entries for simple re-tagging/window viewing.<br />
<br />
You can tag windows with multiple views by using a '+' between the tag names :<br />
<br />
* Mod+Shift+t foo+bar+2 : this tags the currently selected window to the views "foo",<br />
"bar" and "2".<br />
You can remove a single tag from multi-tagged windows by selecting the one you wish to remove<br />
and using Mod+Shift+t, -tag ''name/number'' ie<br />
Urxvt is multi-tagged on views 1 2 3 and 4, if you jumped to 3 and typed exit, all instances of<br />
urxvt will be terminated, using Mod+Shift+t, -3 will only remove that single view.<br />
<br />
Tags can be set for specific applications in the wmiirc configuration file.<br />
<br />
# Tagging Rules<br />
wmiir write /tagrules <<!<br />
/Firefox.*/ -> ~+2<br />
/Gimp.*/ -> ~+3<br />
/.*/ -> sel<br />
/.*/ -> 1<br />
!<br />
<br />
With the above tag rules, firefox starts in floating mode (~) on view "2". Gimp starts in floating mode on view "3".<br />
<br />
{{Box Note | Applications need to spawn an X-window in order to be automatically assigned tags. Therefore, in order to launch your terminal based programs you will need to prepend something like ''urxvt -e <program>'' if want to make use of this feature.}}<br />
<br />
==WMII filesystem==<br />
<br />
WMII's filesystem is based on the [http://9p.cat-v.org 9P protocol]. Every element (windows, statusbar, ...) is represented as a file. This makes several cool things possible. For example you can display the song you're currently listening to in the statusbar (for example with MPD and MPC).<br />
<br />
{{Box Note|This filesystem is not permanent and you have to set up everything again after reboot. To make your changes "permanent" simply write the right commands into your wmiirc.}}<br />
<br />
You can access the filesystem with the ''wmiir'' command. For instance, you can list the root directory with ''wmiir ls /''<br />
<br />
client/<br />
colrules<br />
ctl<br />
event<br />
keys<br />
lbar/<br />
rbar/<br />
tag/<br />
tagrules<br />
<br />
You can use ''wmiir read'' to look into files: ''wmiir read /tag/sel/index''<br />
<br />
# ~ 1280 785<br />
~ 0x160000d 731 394 486 332 xterm:XTerm:~<br />
# 1 0 1280<br />
1 0x800003 0 785 opera:Opera:Editing Wmii - Preview - ArchWiki - Opera<br />
<br />
So this is the info for the '''sel'''ected (current) tag. As you can see, I've got one floating xterm and Opera running on this tag. The first number in this output indicates the column of the window. ~ is the floating column and 1 ist (obviously) the first column. The second column is the XServer-ID for the client. The next columns are the coordinates and the size of the window. The last column ist the titlebar of the window.<br />
<br />
You can create new files with ''wmiir create'':<br />
<br />
echo Arch is best | wmiir create /rbar/arch<br />
<br />
Now you should see "Arch is best" in your statusbar<br />
<br />
"wmiir create" reads from STDIN. So you can pipe any information you like into your statusbar. "wmiir write" works in a similar fashion but doesn't create new files.<br />
<br />
{{Box Note|Note for /rbar and /lbar:The elements in those status bars are in alphabetical order.}}<br />
<br />
You can remove files with rm or remove<br />
<br />
If you like to have a program on several tags you can use:<br />
echo "3+5+8" | wmiir write /client/0x800003/tags<br />
<br />
Now my Opera window appears on Tags 3,5 and 8.<br />
<br />
But there are easier ways to accomplish this ;)<br />
Just type MOD+shift+t and enter "3+5+8" and you get the same result for the currently selected client.<br />
<br />
{{Box Note| There's also the possibility to mount WMII's filesystem. Have a look at the [http://wmii.suckless.org/9p official documentation]. }}<br />
<br />
==Other nice stuff==<br />
<br />
=== Laptop Status Bar===<br />
<br />
If you are using wmii on a laptop, it may be convenient to display items such as wireless quality, remaining battery time, and load averages in the status bar; the script below requires you to install acpi and gawk:<br />
pacman -S acpi gawk''<br />
{{bc|<nowiki><br />
# Status Bar Info<br />
status() {<br />
echo -n ' Wlan0:' $(iwconfig wlan0 | awk '/Quality/{print $2}' | sed 's/.*=//' | awk -F"/" '{printf("%.0f%%", $1/$2*100)}') '| Bat:' $(acpi -b | sed -n 's/.*\([0-9][0-9]:[0-9][0-9]\):[0-9][0-9].*/\1/p') '|' $(uptime | sed 's/.*: //; s/,//g') '|' $(date '+%c')<br />
}<br />
</nowiki>}}<br />
By default the status bar only shows date and an uptime pager (displays system load average for the last 1, 5, 15 minutes).<br />
<br />
=== Conky Replacement Status Bar===<br />
<br />
Similar to the above status() function any user can essentially replace the functions of the conky system monitor by using the wmii status bar. Below is an example of such to show CPU and GPU temperatures, CPU speeds, /home and / partition sizes, RAM used, system load averages and date/time:<br />
{{bc|<nowiki><br />
# Status Bar Info<br />
status() {<br />
echo -n 'CPUTemp:' `expr $(sensors | grep temp1 | awk '{print $2}' | cut -c2-3) + 15` '|' 'GPUTemp:' $(nvidia-settings -q=GPUCoreTemp | grep eagle | awk '{print $4}' | cut -c1-2 ) '|' 'CPUMHz:' $(cat /proc/cpuinfo | grep MHz | awk '{printf "%.0f\n", $4}') '|' '/home:' $(df -h | grep sda5 | awk '{print $3}') '|' '/:' $(df -h | grep sda1 | awk '{print $3}') '|' 'RAM:' $(free -m | grep -i /cache | awk '{print $3}') 'MB |' $(uptime | sed 's/.*://; s/,//g') '|' $(date +"%a %b %d %H:%M")<br />
}<br />
</nowiki>}}<br />
By judicious use of the info available from common Linux system commands, the /proc filesystem and GNU tools such as grep, awk, sed and cut you can create a highly informational wmii status bar. Note that the above is specific to the author's computer and will have to be edited to suit.<br />
<br />
===Terminal Title===<br />
If you would like to display the current directory in your terminal emulator's titlebar, add this to your .bashrc<br />
WMII_IS_RUNNING=`ps a | grep wmii | awk '/[^"grep"] wmii$/'`<br />
if [ -n "$WMII_IS_RUNNING" ]; then<br />
PROMPT_COMMAND='dirs | wmiir write /client/sel/label'<br />
fi<br />
With this you can shorten you shell prompt and have more horizontal space to type. This test prevents you from getting a "WMII_ADRESS not set" error when you spawn a console.<br />
<br />
===Weechat Highlight Notification===<br />
If you use weechat and want to know when you have been messaged without always having to look at the weechat window, you can use the ''launcher.pl'' script to send a notice to the bar. To get this working, you will need to create a script that sends your desired notice. Here is very simple example:<br />
<br />
#!/bin/bash<br />
echo :: NEW MESSAGE :: | wmiir create /lbar/alert<br />
sleep 8<br />
wmiir remove /lbar/alert<br />
<br />
Then start weechat and load the script.<br />
<br />
/perl load launcher.pl<br />
<br />
Then type the following command into weechat:<br />
<br />
/set plugins.var.perl.launcher.signal.weechat_pv = "/path/to/yourscript"<br />
<br />
If you are experiencing the "/rbar/alert File not Found" error inside the weechat buffer and its messing up your layout you can try the following fix:<br />
<br />
/set plugins.var.perl.launcher.signal.weechat_pv = "/path/to/yourscript >/dev/null 2>&"<br />
<br />
Now, :: NEW MESSAGE :: will appear in the left corner of your bar whenever you have a message highlight. Make sure to place ''launcher.pl'' the perl/autoload directory so that it starts when weechat starts.<br />
<br />
===Mod4 on an old Thinkpad===<br />
<br />
Although Wmii defaults to Mod1, using Mod4 reduces conflicts in keybindings with many terminal applications. There is a snag for old Thinkpad users, however. They do not have a Mod4 key. To get one, another key has to be assigned to it using xmodmap. To do it, make an ''.Xmodmap'' file in your home directory and add this to it:<br />
keycode 64 = Super_L<br />
add Mod4 = Super_L<br />
remove Mod1 = Super_L<br />
<br />
You will need to replace 64 with whatever ''xev'' tells you is the keycode of the key you want to replace. In the above example, I replace left Alt (and use right alt for applications).<br />
<br />
===Nice fonts===<br />
Wmii now supports Xft, just prefix font name with 'xft'. For instance:<br />
export WMII_FONT='xft:Sans-9'<br />
<br />
===Keyboard layouts===<br />
You'd probably like to have its own keyboard layout for each window. However, most of such applications requires system tray while witray is only available in the [https://aur.archlinux.org/packages.php?ID=3497 development version of wmii]. [http://www.archlinux.org/packages/?q=xxkb xxkb] package helps to solve the problem. It has no UI by default. You only need to configure layouts in xorg.conf. Create /etc/X11/xorg.conf.d/20-keyboard.conf and put something like this into it:<br />
Section "InputClass"<br />
Identifier "Keyboard Defaults"<br />
MatchIsKeyboard "yes"<br />
Option "XkbModel" "pc101"<br />
Option "XkbLayout" "us,ru"<br />
Option "XkbOptions" "grp:ctrl_shift_toggle,compose:prsc"<br />
EndSection<br />
Replace layout, options and model to fit your needs. Add<br />
xxkb &<br />
into your wmiirc and it just works.<br />
[https://aur.archlinux.org/packages.php?ID=33298 xkblayout-state] can be used to put layout indicator into the status line:<br />
status() {<br />
echo -n label $(xkblayout-state print "%s") '|' $(date +"%a %b %d %H:%M")<br />
}<br />
<br />
===Note: Version 3.9.2-1===<br />
<br />
If you upgrade from wmii v3.6-4 to v3.9.2-1 you will have to insert any changes you made to your old ~/.wmii-3.5/wmiirc configuration file into the newer config file located at ~/.wmii/wmiirc_local. Note also that there are some slight format and variable name changes between the newer and older versions of /etc/wmii/wmiirc.<br />
<br />
This latest version has some significant enhancements such as easier window dimension changes with the mouse and better handling of small floating windows launched from tiled applications (especially LibreOffice).<br />
<br />
==See also==<br />
* [https://code.google.com/p/wmii/ wmii Website] -- the official website of wmii<br />
* [[dmenu]] -- a simple application launcher which binds well with dwm and wmii<br />
* [http://wmii.googlecode.com/hg/doc/wmii.pdf user guide] -- latest wmii guide (pdf)<br />
*[https://bbs.archlinux.org/viewtopic.php?id=22592 The wmii thread]<br />
* [http://eigenclass.org/hiki.rb?wmii+ruby ruby-wmii] -- Ruby configuration and scripting for wmii 3.1<br />
* [https://github.com/sunaku/wmiirc sunaku's wmiirc] -- Ruby configuration and scripting for wmii 3.9+ and wmii-hg<br />
* [http://pastebin.com/Xyn0mEjr Ben's wmiirc] -- Simple wmiirc with extra widgets (vol, mpd, mail, clock) and other modifications<br />
* mailing list is dev@suckless.org, see official website<br />
* IRC channel is #wmii on the OFTC IRC network</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Wmii&diff=210273Wmii2012-06-19T01:53:09Z<p>Lagagnon: /* See also */</p>
<hr />
<div>[[Category:Dynamic WMs]]<br />
{{DISPLAYTITLE:wmii}}<br />
<br />
[http://wmii.suckless.org/ wmii] (window manager improved 2) is a dynamic window manager for X11. It supports classic and dynamic window management with extended keyboard, mouse, and filesystem based remote control. It replaces the workspace paradigm with a new tagging approach. <br />
<br />
The following tips are intended to help the user get started with wmii. While wmii can be configured in almost any language, this article will focus on using the '''wmiirc''' configuration file, which is simply a shell script. Please see the [[ruby-wmii]] article to see how to configure wmii in ruby.<br />
<br />
==Installation==<br />
wmii is available from the '''extra''' repository. You can install it by issuing the following command:<br />
<br />
pacman -S wmii<br />
<br />
Alternatively, you can get the [https://aur.archlinux.org/packages.php?ID=3497 latest development version] which is available from the [[AUR]].<br />
<br />
Next you will need to edit your '''~/.xinitrc''' to enable you to start wmii with '''startx''':<br />
<br />
exec wmii<br />
<br />
To allow for starting wmii without logging off or killing the X session, add the following in the ~/.xinitrc<br />
until wmii; do<br />
true<br />
done<br />
Upon your first login, you will be greeted with the wmii welcome message, which also includes a short tutorial on wmii. Completing this tutorial will give you a good idea on how wmii works.<br />
{{Box Note|If the welcome message does not show up, make sure you have '''xmessage''' installed from the '''xorg-xmessage''' package. Then you can read the welcome by pressing $MODKEY-a and selecting 'welcome'.}}<br />
<br />
==Configuration==<br />
The easiest way to start configuring wmii, is to copy the default wmiirc file to your home directory and changing it to your needs. For version 3.9,<br />
mkdir ~/.wmii<br />
cp /etc/wmii/wmiirc ~/.wmii/<br />
<br />
Or just create ~/.wmii/wmiirc_local if you want only basic customization such as fonts, colors etc.<br />
<br />
For earlier versions,<br />
mkdir ~/.wmii/wmii-$VERSION<br />
cp /etc/wmii/wmiirc ~/.wmii/wmii-$VERSION/<br />
<br />
By editing this file, you can change things such as color, background, modkey, etc. Keep in mind that wmiirc uses tabbed indentation in case your editor of choice is configured to only produce spaces. Mixing the two indenting styles may cause unexpected behavior.<br />
===Configuration Variables===<br />
# Configuration Variables<br />
MODKEY=Mod1<br />
UP=k<br />
DOWN=j<br />
LEFT=h<br />
RIGHT=l<br />
Change Mod1 to Mod4 if you want to use Windows key instead of Alt. You can also change h, j, k, l, if you like.<br />
<br />
===Window Colors===<br />
# Colors tuples: "<text> <background> <border>"<br />
WMII_NORMCOLORS='#ffffff #000000 #ffffff'<br />
WMII_FOCUSCOLORS='#ffffff #5c0000 #ffffff'<br />
<br />
WMII_BACKGROUND='#333333'<br />
WMII_FONT='fixed'<br />
Colors of unselected window are in NORMCOLORS variable. Colors of selected window are in FOCUSCOLOR variable. You can change the background color (if you use transparent terminal) with the WMII_BACKGROUND variable.<br />
<br />
==Usage==<br />
<br />
If you are not familiar with tiling WMs, it's not really easy to begin with it. You must learn a few basic hotkeys to launch programs and place or resize windows. It is a good idea to write the basic hotkeys on paper and stick these on your monitor until you memorize them. By default, the "Mod" key is Alt. Some default hotkeys are :<br />
* Mod+Enter -> Terminal<br />
* Mod+p -> wimenu : a menu appears, just type the beginning of the name of the application <br />
to open it.<br />
* Mod+d -> default layout : windows are divided on screen<br />
* Mod+s -> stacked layout : the selected window take all the screen, we just see the title <br />
bar of the others.<br />
* Mod+j -> select the window below<br />
* Mod+k -> select the window above<br />
* Shift+Mod+j -> move the window down<br />
* Shift+Mod+k -> move the window up<br />
* Mod+a -> Actions menu : choose "quit" to quit<br />
<br />
N.B. For commonly used programs you can make use of ''history.progs'', Mod+p and up/down arrow keys to select previous entries.<br />
<br />
<br />
By default, only one column is used by the desktop (i.e. the entire screen). It's possible to use several columns with h and l :<br />
<br />
* Mod+Shift+h : move the selected window left<br />
* Mod+Shift+l : move the selected window right<br />
* Mod+h : select the column on the left<br />
* Mod+l : select the column on the right <br />
<br />
Columns are created automatically, with your placements of the windows. You can make them bigger or smaller, clicking beetween two columns.<br />
<br />
===Layouts===<br />
<br />
You begin in "default" layout : all windows take the same space. You can make them bigger or smaller by clicking in the little square in the title bar of a window.<br />
<br />
* "stacked" layout (Mod+s) : the selected window takes the entire column, but you can see <br />
the title bar of other windows.<br />
* "maximum" layout (Mod+m) : the selected window takes the entire column, you do not see <br />
other windows.<br />
* "fullscreen" layout (Mod+f) : the selected window takes runs in full screen.<br />
<br />
If you tend to use multiple clients in stacked view then binding the following allows you to remove all the title bars apart from the one you are viewing, regaining screen estate.<br />
Each client will be numbered in the top right with 1/3, 2/3 etc. <br />
Mod + s or Mod + d will return the view to standard layouts.<br />
* fn Key-$MODKEY-x {wmiir xwrite /tag/sel/ctl colmode sel +max} # rc.wmii.local version<br />
* Key $MODKEY-x<br />
wmiir xwrite /tag/sel/ctl colmode sel +max # wmiirc version<br />
<br />
====Floating layout====<br />
<br />
You can place your windows like a classic window manager. It's called floating layout. It's useful for some applications, like the Gimp, mplayer, vlc etc.<br />
<br />
* Mod+Shift+Space : Move selected window in floating layout.<br />
* Mod+Space : switch between floating layout and normal layout. <br />
<br />
In the floating layout, we can select a window with Mod+j and Mod+k. We can change dimensions of the window, by dragging, like in any other window manager. But we can use hotkeys for that as well :<br />
<br />
* Mod+Left click : move window<br />
* Mod+Right click : change dimensions of the window (you can use it in other layouts too)<br />
<br />
===Views and Tagging===<br />
Tagging in wmii is very similar to the concept of virtual desktops in other window managers. However, tagging is slightly more powerful because it makes it very easy to group windows in multiple ways concurrently. This is made possible by the fact that WMII easily allows each window to have multiple tags. This allows you to group applications for specific use cases and easily switch between them without having to tear down your previous environment by sending applications to another "Desktop".<br />
<br />
By default, when you first start up wmii you will see the word 'nil' in the lower left corner. You are at the 'nil' view. The first application you start (such as a terminal: Mod+Enter) will automatically be tagged with a "1" and you will be automatically switched to view "1". Views can be navigated or changed with built in keybindings:<br />
<br />
* Mod+Shift+2 : tag selected window to view "2"<br />
* Mod+2 : this switches you to view "2" where you can see all windows tagged with "2"<br />
<br />
It's the same thing for all numbers, from 0 to 9. But you can also use names :<br />
<br />
* Mod+t : views menu : you can select a tag with right and left keys, or type the name <br />
of the tag (or just a part of the name, if it was created).<br />
<br />
* Mod+Shift+t : this retags the currently selected window with whatever you type into <br />
the menu.<br />
<br />
* N.B If using plan9port a ''history.tags'' file is generated in .wmii-*/. You can use <br />
up/down arrow keys to recall previous entries for simple re-tagging/window viewing.<br />
<br />
You can tag windows with multiple views by using a '+' between the tag names :<br />
<br />
* Mod+Shift+t foo+bar+2 : this tags the currently selected window to the views "foo",<br />
"bar" and "2".<br />
You can remove a single tag from multi-tagged windows by selecting the one you wish to remove<br />
and using Mod+Shift+t, -tag ''name/number'' ie<br />
Urxvt is multi-tagged on views 1 2 3 and 4, if you jumped to 3 and typed exit, all instances of<br />
urxvt will be terminated, using Mod+Shift+t, -3 will only remove that single view.<br />
<br />
Tags can be set for specific applications in the wmiirc configuration file.<br />
<br />
# Tagging Rules<br />
wmiir write /tagrules <<!<br />
/Firefox.*/ -> ~+2<br />
/Gimp.*/ -> ~+3<br />
/.*/ -> sel<br />
/.*/ -> 1<br />
!<br />
<br />
With the above tag rules, firefox starts in floating mode (~) on view "2". Gimp starts in floating mode on view "3".<br />
<br />
{{Box Note | Applications need to spawn an X-window in order to be automatically assigned tags. Therefore, in order to launch your terminal based programs you will need to prepend something like ''urxvt -e <program>'' if want to make use of this feature.}}<br />
<br />
==WMII filesystem==<br />
<br />
WMII's filesystem is based on the [http://9p.cat-v.org 9P protocol]. Every element (windows, statusbar, ...) is represented as a file. This makes several cool things possible. For example you can display the song you're currently listening to in the statusbar (for example with MPD and MPC).<br />
<br />
{{Box Note|This filesystem is not permanent and you have to set up everything again after reboot. To make your changes "permanent" simply write the right commands into your wmiirc.}}<br />
<br />
You can access the filesystem with the ''wmiir'' command. For instance, you can list the root directory with ''wmiir ls /''<br />
<br />
client/<br />
colrules<br />
ctl<br />
event<br />
keys<br />
lbar/<br />
rbar/<br />
tag/<br />
tagrules<br />
<br />
You can use ''wmiir read'' to look into files: ''wmiir read /tag/sel/index''<br />
<br />
# ~ 1280 785<br />
~ 0x160000d 731 394 486 332 xterm:XTerm:~<br />
# 1 0 1280<br />
1 0x800003 0 785 opera:Opera:Editing Wmii - Preview - ArchWiki - Opera<br />
<br />
So this is the info for the '''sel'''ected (current) tag. As you can see, I've got one floating xterm and Opera running on this tag. The first number in this output indicates the column of the window. ~ is the floating column and 1 ist (obviously) the first column. The second column is the XServer-ID for the client. The next columns are the coordinates and the size of the window. The last column ist the titlebar of the window.<br />
<br />
You can create new files with ''wmiir create'':<br />
<br />
echo Arch is best | wmiir create /rbar/arch<br />
<br />
Now you should see "Arch is best" in your statusbar<br />
<br />
"wmiir create" reads from STDIN. So you can pipe any information you like into your statusbar. "wmiir write" works in a similar fashion but doesn't create new files.<br />
<br />
{{Box Note|Note for /rbar and /lbar:The elements in those status bars are in alphabetical order.}}<br />
<br />
You can remove files with rm or remove<br />
<br />
If you like to have a program on several tags you can use:<br />
echo "3+5+8" | wmiir write /client/0x800003/tags<br />
<br />
Now my Opera window appears on Tags 3,5 and 8.<br />
<br />
But there are easier ways to accomplish this ;)<br />
Just type MOD+shift+t and enter "3+5+8" and you get the same result for the currently selected client.<br />
<br />
{{Box Note| There's also the possibility to mount WMII's filesystem. Have a look at the [http://wmii.suckless.org/9p official documentation]. }}<br />
<br />
==Other nice stuff==<br />
<br />
=== Laptop Status Bar===<br />
<br />
If you are using wmii on a laptop, it may be convenient to display items such as wireless quality, remaining battery time, and load averages in the status bar; the script below requires you to install acpi and gawk:<br />
pacman -S acpi gawk''<br />
{{bc|<nowiki><br />
# Status Bar Info<br />
status() {<br />
echo -n ' Wlan0:' $(iwconfig wlan0 | awk '/Quality/{print $2}' | sed 's/.*=//' | awk -F"/" '{printf("%.0f%%", $1/$2*100)}') '| Bat:' $(acpi -b | sed -n 's/.*\([0-9][0-9]:[0-9][0-9]\):[0-9][0-9].*/\1/p') '|' $(uptime | sed 's/.*: //; s/,//g') '|' $(date '+%c')<br />
}<br />
</nowiki>}}<br />
By default the status bar only shows date and an uptime pager (displays system load average for the last 1, 5, 15 minutes).<br />
<br />
=== Conky Replacement Status Bar===<br />
<br />
Similar to the above status() function any user can essentially replace the functions of the conky system monitor by using the wmii status bar. Below is an example of such to show CPU and GPU temperatures, CPU speeds, /home and / partition sizes, RAM used, system load averages and date/time:<br />
{{bc|<nowiki><br />
# Status Bar Info<br />
status() {<br />
echo -n 'CPUTemp:' `expr $(sensors | grep temp1 | awk '{print $2}' | cut -c2-3) + 15` '|' 'GPUTemp:' $(nvidia-settings -q=GPUCoreTemp | grep eagle | awk '{print $4}' | cut -c1-2 ) '|' 'CPUMHz:' $(cat /proc/cpuinfo | grep MHz | awk '{printf "%.0f\n", $4}') '|' '/home:' $(df -h | grep sda5 | awk '{print $3}') '|' '/:' $(df -h | grep sda1 | awk '{print $3}') '|' 'RAM:' $(free -m | grep -i /cache | awk '{print $3}') 'MB |' $(uptime | sed 's/.*://; s/,//g') '|' $(date +"%a %b %d %H:%M")<br />
}<br />
</nowiki>}}<br />
By judicious use of the info available from common Linux system commands, the /proc filesystem and GNU tools such as grep, awk, sed and cut you can create a highly informational wmii status bar. Note that the above is specific to the author's computer and will have to be edited to suit.<br />
<br />
===Terminal Title===<br />
If you would like to display the current directory in your terminal emulator's titlebar, add this to your .bashrc<br />
WMII_IS_RUNNING=`ps a | grep wmii | awk '/[^"grep"] wmii$/'`<br />
if [ -n "$WMII_IS_RUNNING" ]; then<br />
PROMPT_COMMAND='dirs | wmiir write /client/sel/label'<br />
fi<br />
With this you can shorten you shell prompt and have more horizontal space to type. This test prevents you from getting a "WMII_ADRESS not set" error when you spawn a console.<br />
<br />
===Weechat Highlight Notification===<br />
If you use weechat and want to know when you have been messaged without always having to look at the weechat window, you can use the ''launcher.pl'' script to send a notice to the bar. To get this working, you will need to create a script that sends your desired notice. Here is very simple example:<br />
<br />
#!/bin/bash<br />
echo :: NEW MESSAGE :: | wmiir create /lbar/alert<br />
sleep 8<br />
wmiir remove /lbar/alert<br />
<br />
Then start weechat and load the script.<br />
<br />
/perl load launcher.pl<br />
<br />
Then type the following command into weechat:<br />
<br />
/set plugins.var.perl.launcher.signal.weechat_pv = "/path/to/yourscript"<br />
<br />
If you are experiencing the "/rbar/alert File not Found" error inside the weechat buffer and its messing up your layout you can try the following fix:<br />
<br />
/set plugins.var.perl.launcher.signal.weechat_pv = "/path/to/yourscript >/dev/null 2>&"<br />
<br />
Now, :: NEW MESSAGE :: will appear in the left corner of your bar whenever you have a message highlight. Make sure to place ''launcher.pl'' the perl/autoload directory so that it starts when weechat starts.<br />
<br />
===Mod4 on an old Thinkpad===<br />
<br />
Although Wmii defaults to Mod1, using Mod4 reduces conflicts in keybindings with many terminal applications. There is a snag for old Thinkpad users, however. They do not have a Mod4 key. To get one, another key has to be assigned to it using xmodmap. To do it, make an ''.Xmodmap'' file in your home directory and add this to it:<br />
keycode 64 = Super_L<br />
add Mod4 = Super_L<br />
remove Mod1 = Super_L<br />
<br />
You will need to replace 64 with whatever ''xev'' tells you is the keycode of the key you want to replace. In the above example, I replace left Alt (and use right alt for applications).<br />
<br />
===Nice fonts===<br />
Wmii now supports Xft, just prefix font name with 'xft'. For instance:<br />
export WMII_FONT='xft:Sans-9'<br />
<br />
===Keyboard layouts===<br />
You'd probably like to have its own keyboard layout for each window. However, most of such applications requires system tray while witray is only available in the [https://aur.archlinux.org/packages.php?ID=3497 development version of wmii]. [http://www.archlinux.org/packages/?q=xxkb xxkb] package helps to solve the problem. It has no UI by default. You only need to configure layouts in xorg.conf. Create /etc/X11/xorg.conf.d/20-keyboard.conf and put something like this into it:<br />
Section "InputClass"<br />
Identifier "Keyboard Defaults"<br />
MatchIsKeyboard "yes"<br />
Option "XkbModel" "pc101"<br />
Option "XkbLayout" "us,ru"<br />
Option "XkbOptions" "grp:ctrl_shift_toggle,compose:prsc"<br />
EndSection<br />
Replace layout, options and model to fit your needs. Add<br />
xxkb &<br />
into your wmiirc and it just works.<br />
[https://aur.archlinux.org/packages.php?ID=33298 xkblayout-state] can be used to put layout indicator into the status line:<br />
status() {<br />
echo -n label $(xkblayout-state print "%s") '|' $(date +"%a %b %d %H:%M")<br />
}<br />
<br />
===Note: Version 3.9.2-1===<br />
<br />
If you upgrade from wmii v3.6-4 to v3.9.2-1 you will have to insert any changes you made to your old ~/.wmii-3.5/wmiirc configuration file into the newer config file located at ~/.wmii/wmiirc_local. Note also that there are some slight format and variable name changes between the newer and older versions of /etc/wmii/wmiirc.<br />
<br />
This latest version has some significant enhancements such as easier window dimension changes with the mouse and better handling of small floating windows launched from tiled applications (especially LibreOffice).<br />
<br />
==See also==<br />
* [https://code.google.com/p/wmii/] -- the official website of wmii<br />
* [[dmenu]] -- a simple application launcher which binds well with dwm and wmii<br />
* [http://wmii.googlecode.com/hg/doc/wmii.pdf user guide] -- latest wmii guide (pdf)<br />
*[https://bbs.archlinux.org/viewtopic.php?id=22592 The wmii thread]<br />
* [http://eigenclass.org/hiki.rb?wmii+ruby ruby-wmii] -- Ruby configuration and scripting for wmii 3.1<br />
* [https://github.com/sunaku/wmiirc sunaku's wmiirc] -- Ruby configuration and scripting for wmii 3.9+ and wmii-hg<br />
* [http://pastebin.com/Xyn0mEjr Ben's wmiirc] -- Simple wmiirc with extra widgets (vol, mpd, mail, clock) and other modifications<br />
* mailing list is dev@suckless.org, see official website<br />
* IRC channel is #wmii on the OFTC IRC network</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Pm-utils&diff=208612Pm-utils2012-06-15T02:18:42Z<p>Lagagnon: </p>
<hr />
<div>[[Category:Power management]]<br />
[[it:Pm-utils]]<br />
[[ru:Pm-utils]]<br />
[[zh-CN:Pm-utils]]<br />
{{DISPLAYTITLE:pm-utils}}<br />
{{Article summary start}}<br />
{{Article summary text|Describes installing, configuring, using and troubleshooting pm-utils, the new suspend and powerstate setting framework.}}<br />
{{Article summary heading|Related articles}}<br />
{{Article summary wiki|Uswsusp}}<br />
{{Article summary wiki|Tuxonice}}<br />
{{Article summary end}}<br />
'''pm-utils''' is the new suspend and powerstate setting framework. It is designed to replace such scripts as those provided by the {{ic|powersave}} package.<br />
<br />
pm-utils can be thought of as a collection of shell scripts that wrap the kernel mode suspend/resume with the various hacks. These hacks are needed to work around bugs in drivers and subsystems that are not yet aware of suspend. It is easily extensible by putting custom hooks into a directory, which can either be done by the system administrator or those hooks can be part of a package, especially if this package needs special attention during a system suspend or power state transition.<br />
<br />
A lesser known feature is one that mimics toggling done by [[Laptop Mode Tools]], although the responsible scripts have been deleted from the Arch Linux package.<br />
<br />
Used in conjunction with the [[cpufrequtils]] package, notebook (and desktop) owners are provided with a complete power management suite.<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] the {{Pkg|pm-utils}} package which is available in the [[Official Repositories|official repositories]].<br />
<br />
{{Note|If you run into issues when resuming video, it might be necessary to also install {{Pkg|vbetool}} from the [[Official Repositories|official repositories]].}}<br />
<br />
{{Note|If you are starting from a clean install, make sure that you have {{Pkg|acpi}} installed.}}<br />
<br />
Run {{ic|pm-suspend}} or {{ic|pm-hibernate}} as root to trigger suspend manually. The suspend scripts write log to {{ic|/var/log/pm-suspend.log}}.<br />
<br />
=== suspend backend ===<br />
<br />
The Arch Linux package ships with support for the following backends:{{ic|kernel}},{{ic|tuxonice}} and {{ic|uswsusp}} which can be seen from command:<br />
pacman -Ql pm-utils | grep module.d<br />
<br />
Suspend backend is specified by the SLEEP_MODULE configuration variable in {{ic|/etc/pm/config.d}} and defaults to the {{ic|kernel}} backend. To use the alternative suspend backends the respective packages need to be installed. Both of these are available in the [[Arch User Repository]]:<br />
* uswsusp - {{AUR|uswsusp-git}}<br />
* tuxonice - {{AUR|linux-ice}} / [[linux-pf]]<br />
<br />
Furthermore, {{Pkg|pm-utils}} ships with its own video quirks database in {{ic|/usr/lib/pm-utils/video-quirks/}}.<br />
<br />
== Basic Configuration ==<br />
=== Standby / Suspend to RAM ===<br />
In the ideal case, running {{ic|sudo pm-suspend}} should initiate suspend to memory, meaning that all running state will be preserved in RAM and all components other than RAM will be shut down to conserve power. Pressing the power button should initiate a resume from this state.<br />
<br />
In some cases, it is possible that running {{ic|pm-suspend}} causes hangs or other issues. This may be due to specific "misbehaving" modules. If you know which modules could cause such issues, adding a SUSPEND_MODULES config to {{Ic|/etc/pm/config.d/modules}} of the form<br />
SUSPEND_MODULES="uhci_hd button ehci_hd"<br />
should cause these modules to be specifically unloaded before suspend and reloaded after resume.<br />
<br />
To configure invoking {{ic|pm-suspend}} automatically on power events like laptop lid close, please refer to [[Acpid]].<br />
<br />
=== Hibernation (suspend2disk) ===<br />
In order for suspend2disk (hibernate) to work, the parameter {{ic|1=resume=/path/to/swap/drive}} has to be passed to the kernel.<br />
These examples are for [[Grub2]], if you use another bootloader, the configuration file will have another name and will look slightly different. Consult your bootloader wiki page.<br />
<br />
You can do this either by modifying either {{ic|/etc/default/grub}}, {{ic|/etc/grub.d/10_linux}} or {{ic|/boot/grub/menu.lst}}.<br />
<br />
==== Modifying ''/boot/grub/menu.lst'' (Grub-Legacy)====<br />
<br />
For this, we need to edit the bootloader configuration {{ic|/boot/grub/menu.lst}} (as root). Add {{ic|1=resume=/path/to/swap/drive}} (e.g. {{ic|/dev/sda2}}) to the kernel options.<br />
<br />
==== Modifying ''/etc/default/grub'' ====<br />
<br />
You can add the line {{ic|1=GRUB_CMDLINE_LINUX="resume=SWAP_PARTITION"}} (where SWAP_PARTITION is either your swap device, i.e. /dev/sdaX, or your swap UUID) to automatically add this command when generating {{ic|grub.cfg}} with {{ic|grub-mkconfig}}. Note that this will only add it to your current distribution, not by those detected by {{ic|os-prober}}.<br />
<br />
==== Modifying ''/etc/grub.d/10_linux'' ====<br />
According to the [http://wiki.debian.org/Grub#Configuring_grub_v2 debian wiki], here is a handy solution that will insert the resume line with the swap device the system is using when running the script :<br />
<br />
Replace (line 141) <br />
{{bc|1=linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} }}<br />
with <br />
{{bc|<nowiki>linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} resume=`swapon -s | grep '/dev/sd.[0-9]' -o`</nowiki>}}<br />
<br />
'''Grub2 config:'''<br />
{{bc|1=menuentry 'Arch Linux' --class archlinux --class gnu-linux --class gnu --class os {<br />
set root='hd0,msdos3'<br />
linux /vmlinuz-linux root=/dev/sda3 '''resume=/dev/sda2''' ro<br />
initrd /initramfs-linux.img}}<br />
<br />
RAID swap example:<br />
{{bc|1=menuentry 'Arch Linux' --class archlinux --class gnu-linux --class gnu --class os {<br />
set root='hd0,msdos2'<br />
linux /vmlinuz-linux root=/dev/md2 resume=/dev/md0 ro md=0,/dev/sda2,/dev/sdb2 md=2,/dev/sda5,/dev/sdb5<br />
initrd /initramfs-linux.img}}<br />
<br />
If you want to use the UUID of the device instead, then use the following example. (The UUID itself can be found out by using the {{ic|blkid}} command as root.):<br />
{{bc|1=menuentry 'Arch Linux' --class archlinux --class gnu-linux --class gnu --class os {<br />
set root='hd0,msdos2'<br />
linux /vmlinuz-linux cryptdevice=/dev/sda2:main root=/dev/mapper/main-root resume=/dev/disk/by-uuid/1d893194-b151-43cd-a89e-6f89bd8b9f99 ro<br />
initrd /initramfs-linux.img}}<br />
<br />
When the machine is placed into hibernation, it will now move all data from RAM to the swap partition.<br />
<br />
For discussion regarding permanence, please refer to [https://bbs.archlinux.org/viewtopic.php?pid=886789#p88678 this thread].<br />
<br />
Even if your swap partition is smaller than RAM, you still have a big chance in hibernating successfully. According to [http://www.mjmwired.net/kernel/Documentation/power/interface.txt kernel documentation], ''{{ic|/sys/power/image_size}} controls the size of the image created by the suspend-to-disk mechanism'', which has a default value of 2/5 of the available RAM. ''The suspend-to-disk mechanism will do its best to ensure the image size will not exceed that number.'' You may either decrease it due to a small swap partition or increase it in purpose of possible hibernation speed up.<br />
<br />
{{Warning|You may have to add the {{ic|resume}} hook to {{ic|/etc/mkinitcpio.conf}}, see [[Pm-utils#Mkinitcpio_Resume_Hook|below]]!}}<br />
<br />
=== Mkinitcpio Resume Hook ===<br />
If your system '''still''' doesn't resume from hibernation, even after you've added the proper lines to your grub config files, your system may require the {{ic|resume}} hook be added to the initrd image (even if you use [[LVM]]), otherwise the kernel will '''not''' resume. You can see if this is happening if the hibernation works fine, no error messages appear in {{ic|/var/log/pm-suspend.log}} and the kernel logs the following message: "PM: Hibernation image not present or could not be loaded." To add the resume hook, edit {{ic|/etc/mkinitcpio.conf}} as root and add {{ic|resume}} to the HOOKS array:<br />
HOOKS="base udev autodetect ide scsi sata lvm2 '''''resume''''' filesystems "<br />
<br />
Note that this is an example, and your HOOKS array may look different.<br />
<br />
{{ic|resume}} must be placed ''after'' {{ic|ide}}, {{ic|scsi}}, {{ic|sata}} and/or {{ic|lvm2}}, but before {{ic|filesystems}}. Of course, there has to be an appropriate {{ic|resume}} file in {{ic|/usr/lib/initcpio/hooks}} (formerly {{ic|/lib/initcpio/hooks}}), but it should already be there, as it is part of the {{ic|mkinitcpio}} package.<br />
<br />
Finally, you must rebuild the initrd image for these changes to take effect:<br />
# mkinitcpio -p linux<br />
<br />
{{Note|If you use a custom kernel, then you might have to change the value of the '-p' option.}}<br />
<br />
=== Suspend/Hibernate as regular user ===<br />
<br />
Three methods are available to suspend without the need for a root password: using [[Udev]], using UPower, and giving the user the appropriate permissions with [[sudo|visudo]].<br />
<br />
==== UPower method ====<br />
<br />
Install {{Pkg|upower}}. To suspend to RAM:<br />
$ dbus-send --system --print-reply --dest="org.freedesktop.UPower" \<br />
/org/freedesktop/UPower org.freedesktop.UPower.Suspend<br />
<br />
To suspend to disk (hibernate):<br />
$ dbus-send --system --print-reply --dest="org.freedesktop.UPower" \<br />
/org/freedesktop/UPower org.freedesktop.UPower.Hibernate<br />
<br />
==== User Permission Method ====<br />
<br />
Because the {{Pkg|pm-utils}} scripts must be run as root, you may want to make the scripts accessible to normal users by running sudo without the root password. To do so, edit the {{ic|/etc/sudoers}} file with {{ic|visudo}} as root. For more information, see [[sudo]].<br />
<br />
Add the following lines, replacing {{ic|''username''}} with your own user name, then save and exit {{ic|visudo}}:<br />
''username'' ALL = NOPASSWD: /usr/sbin/pm-hibernate<br />
''username'' ALL = NOPASSWD: /usr/sbin/pm-suspend<br />
<br />
Or you can enable it for a group, using the following lines, replacing {{ic|''group''}}:<br />
''%group'' ALL = NOPASSWD: /usr/sbin/pm-hibernate<br />
''%group'' ALL = NOPASSWD: /usr/sbin/pm-suspend<br />
<br />
{{Note|These must come after any user privilege specifications, e.g., {{ic|1=username ALL=(ALL) ALL}}, or they will not work.}}<br />
<br />
You can now run the scripts without a password by simply running:<br />
$ sudo pm-hibernate<br />
<br />
or:<br />
<br />
$ sudo pm-suspend<br />
<br />
Also, add yourself to the {{ic|power}} [[Users and Groups|group]] so that way using things like applets to do suspend will work. If you do not do this, when you try to use suspend though things like [[GNOME]]'s shutdown applet, your computer will just play a very annoying loud triple beep and lock the screen.<br />
# gpasswd -a ''username'' power<br />
<br />
You should now be able to use your [[Desktop Environment]]'s power management tools to automatically suspend or hibernate when doing things like closing the laptop lid, running low on battery power, etc.<br />
<br />
===Power saving===<br />
pm-utils supports running commands depending on whether the system is connected to the AC adapter or not; therefore, a script has to be created inside the folder {{ic|/etc/pm/power.d/}}. An example of such a script can be found in the [http://crunchbanglinux.org/forums/post/110148/#p110148 crunchbang forum]. Be aware that upower must be running in order to detect changing AC states [https://bbs.archlinux.org/viewtopic.php?id=132125 (see more information)].<br />
<br />
===Suspend on idle/inactivity===<br />
<br />
One method relies on xautolock program. Add following: {{ic|xautolock -time 30 -locker "sudo pm-suspend" &}} to {{ic|~/.xinitrc}}. This implies that {{ic|pm-suspend}} is called after 30 minutes of inactivity.<br />
<br />
=== Using Swap file instead of regular swap partition ===<br />
<br />
If you want use swap file instead of regular swap patition [[Swap#Swap_file_resuming|read this]].<br />
<br />
== Advanced Configuration ==<br />
The main configuration file is {{ic|/usr/lib/pm-utils/defaults}}. You ''should not edit this file'', since after a package update it might be overwritten with the default settings. Put your config file into {{ic|/etc/pm/config.d/}} instead.<br />
You can just put a simple text file with<br />
SUSPEND_MODULES="button uhci_hcd"<br />
named {{ic|modules}} or {{ic|config}} into {{ic|/etc/pm/config.d}} and it will override the settings in the system-wide configuration file.<br />
<br />
=== Available variables for use in config files ===<br />
;SUSPEND_MODULES="button": the list of modules to be unloaded before suspend<br />
;SLEEP_MODULE="tuxonice uswsusp kernel": the default sleep/wake systems to try<br />
;HIBERNATE_MODE="shutdown": forces the system to shut down rather than reboot<br />
<br />
=== Disabling a hook ===<br />
If a hook is run which you do not like or which you think is not useful or even harmful, we would appreciate a bug report for that.<br />
You can however easily disable hooks by just creating an empty file corresponding to the hook in {{ic|/etc/pm/sleep.d/}}. Say you want to disable the hook {{ic|/usr/lib/pm-utils/sleep.d/45pcmcia}}, you can do this easily by calling<br />
# touch /etc/pm/sleep.d/45pcmcia<br />
Do not set the executable bit on that dummy-hook.<br />
<br />
==== Alternative method ====<br />
Create a file in {{ic|/etc/pm/config.d}} with the modules you want to blacklist in the {{ic|HOOK_BLACKLIST}} variable.<br />
For example, to manage power saving yourself, use:<br />
HOOK_BLACKLIST="hal-cd-polling intel-audio-powersave journal-commit laptop-mode pcie_aspm readahead sata_alpm sched-powersave xfs_buffer wireless"<br />
<br />
=== Creating your own hooks ===<br />
If you want to do something specific to your setup during suspend or hibernate, then you can easily put your own hook into {{ic|/etc/pm/sleep.d}}. The hooks in this directory will be called in alphabetic order during suspend (that is the reason their names all start with 2 digits, to make the ordering explicit) and in the reverse order during resume. The general convention to be followed on number ordering is:.<br />
;00 - 49: User and most package supplied hooks. If a hook assumes that all of the usual services and userspace infrastructure is still running, it should be here.<br />
;50 - 74: Service handling hooks. Hooks that start or stop a service belong in this range. At or before 50, hooks can assume that all services are still enabled.<br />
;75 - 89: Module and non-core hardware handling. If a hook needs to load/unload a module, or if it needs to place non-video hardware that would otherwise break suspend or hibernate into a safe state, it belongs in this range. At or before 75, hooks can assume all modules are still loaded.<br />
;90 - 99: Reserved for critical suspend hooks.<br />
<br />
I am showing a pretty useless demonstration hook here, that will just put some informative lines into your log file:<br />
<br />
#!/bin/bash<br />
case $1 in<br />
hibernate)<br />
echo "Hey guy, we are going to suspend to disk!"<br />
;;<br />
suspend)<br />
echo "Oh, this time we are doing a suspend to RAM. Cool!"<br />
;;<br />
thaw)<br />
echo "Oh, suspend to disk is over, we are resuming..."<br />
;;<br />
resume)<br />
echo "Hey, the suspend to RAM seems to be over..."<br />
;;<br />
*) echo "Somebody is calling me totally wrong."<br />
;;<br />
esac<br />
<br />
Put this into {{ic|/etc/pm/sleep.d/66dummy}}, do a {{ic|chmod +x /etc/pm/sleep.d/66dummy}} and it will spew some useless lines during suspend and resume.<br />
<br />
{{Warning|All the hooks run as root. This means that you need to be careful when creating temporary files, check that the {{ic|PATH}} environment variable is set correctly, etc. to avoid security problems.}}<br />
<br />
== How it works ==<br />
The concept is quite easy: the main script ({{ic|pm-action}}, called via symlinks as either {{ic|pm-suspend}}, {{ic|pm-hibernate}} or {{ic|pm-suspend-hybrid}}) executes so-called "hooks", executable scripts, in the alphabetical sorted order with the parameter {{ic|suspend}} (suspend to RAM) or {{ic|hibernate}} (suspend to disk).<br />
Once all hooks are done, it puts the machine to sleep. After the machine has woken up again, all those hooks are executed in reverse order with the parameter {{ic|resume}} (resume from RAM) or {{ic|thaw}} (resume from disk).<br />
The hooks perform various tasks, such as preparing the bootloader, stopping the Bluetooth subsystem, or unloading of critical modules.<br />
<br />
Both {{ic|pm-suspend}} and {{ic|pm-hibernate}} are usually called from [[Udev]], initiated by desktop applets like {{Pkg|gnome-power-manager}} or {{ic|kpowersave}}.<br />
<br />
{{Note|{{ic|suspend-hybrid}} is a placeholder right now -- it is not completely implemented.}}<br />
<br />
There is also the possibility to set the machine into high-power and low-power mode, the command {{ic|pm-powersave}} is used with an additional parameter of {{ic|true}} or {{ic|false}}. It works basically the same as the suspend framework.<br />
<br />
The hooks for suspend are placed in<br />
;{{ic|/usr/lib/pm-utils/sleep.d}}: distribution / package provided hooks<br />
;{{ic|/etc/pm/sleep.d}}: hooks added by the system administrator<br />
<br />
The hooks for the power state are placed in <br />
;{{ic|/usr/lib/pm-utils/power.d}}: distribution / package provided hooks<br />
;{{ic|/etc/pm/power.d}}: hooks added by the system administrator<br />
<br />
Hooks in {{ic|/etc/pm/}} take precedence over those in {{ic|/usr/lib/pm-utils/}}, so the system administrator can override the defaults provided by the distribution.<br />
<br />
=== Pm-suspend internals ===<br />
<br />
This outlines the internal actions when {{ic|pm-suspend}} is run, describing how {{ic|pm-utils}} gracefully falls back onto the kernel method if the requirements of other methods are not met.<br />
<br />
$ pm-suspend<br />
<br />
The first step is set-up preliminary variables and source parent scripts:<br />
export STASHNAME=pm-suspend<br />
export METHOD="$(echo ${0##*pm-} |tr - _)"<br />
. "/usr/lib/pm-utils/pm-functions"<br />
<br />
The variable {{Ic|METHOD}} is extracted from the executable name, ''suspend'' from {{ic|pm-suspend}} and ''hibernate'' from {{ic|pm-hibernate}}.<br />
<br />
The location of runtime configuration parameters is defined in {{Ic|/usr/lib/pm-utils/pm-functions}} as ''PM_UTILS_RUNDIR="/var/run/pm-utils"'' and ''STORAGEDIR="${PM_UTILS_RUNDIR}/${STASHNAME}/storage"''. Therefore ''STORAGEDIR="/var/run/pm-utils/pm-suspend/storage"''; this is where {{ic|pm-suspend}} will cache its configuration. Disabled hooks are stored as plain text files with the hook name prefixed by "''disable_hook:''". Configuration parameters are appended to the ''parameters'' file:<br />
$ ls -lah /var/run/pm-utils/pm-suspend/storage/<br />
-rw-r--r-- 1 root root 20 May 19 09:57 disable_hook:99video<br />
-rw-r--r-- 1 root root 0 May 19 02:59 parameters<br />
-rw-r--r-- 1 root root 247 May 19 02:59 parameters.rm<br />
-rw-r--r-- 1 root root 9 May 19 02:59 state:cpu0_governor<br />
-rw-r--r-- 1 root root 9 May 19 02:59 state:cpu1_governor<br />
<br />
Then {{Ic|pm-functions}} will source the files located in {{Ic|/etc/pm/config.d/}} in addition to {{Ic|/usr/lib/pm-utils/defaults}}. Upon returning, {{Ic|pm-functions}} will proceed to source the files specified by '''$SLEEP_METHOD''' as {{Ic|/usr/lib/pm-utils/module.d/$SLEEP_METHOD[...]}} if they exist:<br />
for mod in $SLEEP_MODULE; do<br />
mod="${PM_UTILS_LIBDIR}/module.d/${mod}"<br />
[ -f "$mod" ] || continue<br />
. "$mod"<br />
done<br />
<br />
Otherwise, if '''$SLEEP_MODULE''' is empty, {{Ic|do_suspend()}} will be set to the kernel backend as described above:<br />
if [ -z "$SUSPEND_MODULE" ]; then<br />
if grep -q mem /sys/power/state; then<br />
SUSPEND_MODULE="kernel"<br />
do_suspend() { echo -n "mem" >/sys/power/state; }<br />
elif [ -c /dev/pmu ] && pm-pmu --check; then<br />
SUSPEND_MODULE="kernel"<br />
do_suspend() { pm-pmu --suspend; }<br />
elif grep -q standby /sys/power/state; then<br />
SUSPEND_MODULE="kernel"<br />
do_suspend() { echo -n "standby" >/sys/power/state; }<br />
fi<br />
fi<br />
<br />
Assuming '''$SLEEP_MODULE''' is not empty and {{Ic|uswsusp}} is specified, {{Ic|/usr/lib/pm-utils/module.d/uswsusp}} is executed. This script checks several requirements (these are the requirements for being able to use uswsusp):<br />
* [ -z $SUSPEND_MODULE ]<br />
* command_exists s2ram<br />
* grep -q mem /sys/power/state || ( [ -c /dev/pmu ] && pm-pmu --check; );<br />
If these requirements are met, do_suspend() is defined as:<br />
do_suspend()<br />
{<br />
uswsusp_get_quirks<br />
s2ram --force $OPTS<br />
}<br />
Most importantly, the {{Ic|uswsusp}} module runs:<br />
add_before_hooks uswsusp_hooks<br />
add_module_help uswsusp_help<br />
The first function, ''add_before_hook'' disables the '''pm-utils''' hooks '''99video''' since this functionality is subsumed by '''s2ram'''.<br />
The second function, ''add_module_help'', adds uswsusp-module-specific help, which in essence replaces the help function provided by '''99video'''.<br />
<br />
Back to {{Ic|pm-suspend}}:<br />
command_exists "check_$METHOD" && command_exists "do_$METHOD"<br />
"check_$METHOD"<br />
This verifies that the ''check_suspend'' and ''do_suspend'' methods have been defined. The ''check_suspend'' method simply verifies that $SUSPEND_MODULE is not empty:<br />
<br />
check_suspend() { [ -n "$SUSPEND_MODULE" ]; }<br />
<br />
Lastly, {{Ic|pm-suspend}} must run all hooks that have not been disabled, sync file-system buffers, and run ''do_suspend'':<br />
if run_hooks sleep "$ACTION $METHOD"; then<br />
# Sleep only if we know how and if a hook did not inhibit us.<br />
log "$(date): performing $METHOD"<br />
sync<br />
"do_$METHOD" || r=128<br />
log "$(date): Awake."<br />
<br />
The method ''run_hooks'' is a wrapper for ''_run_hooks'', which the case of {{ic|pm-suspend}} is called as ''run_hooks sleep "suspend suspend"''. Given that:<br />
PARAMETERS="${STORAGEDIR}/parameters"<br />
PM_UTILS_LIBDIR="/usr/lib/pm-utils"<br />
PM_UTILS_ETCDIR="/etc/pm"<br />
<br />
The method ''_run_hooks'', will for each hook in ''"${PM_UTILS_LIBDIR}/$1.d"'' and ''"${PM_UTILS_ETCDIR}/$1.d"'', check that sleep has not been inhibited and update the runtime parameters stored in ''$PARAMETERS'' before running each hook via ''run_hook $hook $2''. In the case of Suspend-to-RAM, all the hooks in ''{/usr/lib/pm-utils/sleep.d/,/etc/pm/sleep.d/}'' will be enumerated, and ''run_hook'' will be passed the parameters ''$hook'' and "''suspend suspend''". The method ''run_hook'' uses the ''hook_ok'' function to verify that the hook has not been disabled before executing the hook with the "''suspend suspend''" parameters.<br />
<br />
== Troubleshooting ==<br />
If suspend or hibernate did not work correctly, you will probably find some information in the log file {{ic|/var/log/pm-suspend.log}}. For example, which hooks were run and what the output of them was should be in that log file.<br />
<br />
Also, check the output of the {{ic|pm-is-supported}} command. This command (with the {{ic|--hibernate}} or {{ic|--suspend}} flag) will do some sanity checking and report any errors it finds in your configuration. It will not detect all possible errors, but may still be useful.<br />
<br />
=== Segmentation faults === <br />
If you experience segmentation faults that might result in an unresponsive system and missing keys then try to set the UUID in the resume-path in {{ic|/boot/grub/menu.lst}} as explained [[#Hibernation (suspend2disk)|above]].<br />
<br />
=== Reboot instead of resume from suspend ===<br />
<br />
This problem started when saving NVS area during suspend was introduced (in 2.6.35-rc4) ([http://www.spinics.net/lists/linux-acpi/msg29521.html mailing list post]). However, it is known that this mechanism does not work on all machines, so the kernel developers allow the user to disable it with the help of the {{ic|1=acpi_sleep=nonvs}} kernel command line option. This option could be pass to the kernel through [[GRUB]] options by editing the file {{ic|/boot/grub/menu.lst}} (GRUB 0.97) on the {{ic|kernel}} line.<br />
<br />
=== Resume from suspend shuts down instead of wake up ===<br />
On an Acer Aspire AS3810TG, resuming from suspend shuts down the computer instead of waking it up. If you experience a similar issue, try passing the parameter {{ic|1=i8042.reset=1}} to your kernel. In [[GRUB2]], the line in {{ic|/boot/grub/grub.cfg}} should be something like this:<br />
linux /vmlinuz-linux root=/dev/vg00/root resume=/dev/vg00/swap i8042.reset=1 ro<br />
<br />
Although I have not tested this, you could also set this parameter live without having to restart by doing:<br />
# sysctl -e -w i8042.reset=1<br />
<br />
=== Blank screen when waking from suspend ===<br />
Some laptops (e.g Dell Inspiron Mini 1018) will just show a black screen with no backlight after resuming from suspend. If this happens to you, try going into the BIOS of the laptop and disabling Intel SpeedStep if it is present.<br />
<br />
You could also try, without disabling SpeedStep, creating a quirk in {{ic|/etc/pm/sleep.d/}} with this content (requires {{Pkg|vbetool}}):<br />
{{bc|#!/bin/sh<br />
#<br />
case "$1" in<br />
suspend)<br />
;;<br />
resume)<br />
sleep 5<br />
vbetool dpms off<br />
vbetool dpms on<br />
;;<br />
*) exit $NA<br />
;;<br />
esac}}<br />
save it as you want but with a {{ic|00}} in front of the name so this is called last when resuming; remember to {{ic|chmod +x}} the script.<br />
Try adjusting the {{ic|sleep}} time if the other commands are called too soon, or if it works well, you can also try removing that line.<br />
<br />
=== VirtualBox problems ===<br />
The VirtualBox kernel modules cause {{ic|pm-suspend}} and {{ic|pm-hibernate}} to fail on some laptops. (See [https://bbs.archlinux.org/viewtopic.php?id=123354 this discussion]). Instead of suspending or hibernating, the system freezes and indicator LEDs blink (the suspend indicator in the case of ThinkPads and the Caps Lock and Scroll Lock indicators in the case of the MSI Wind U100). The {{ic|pm-suspend}} and {{ic|pm-hibernate}} logs appear normal.<br />
<br />
The problem can be fixed by removing the modules before suspension or hibernation and reloading them afterwards. That can be accomplished through a script:<br />
{{bc|1=<br />
#!/bin/sh<br />
<br />
rmmod vboxdrv<br />
pm-hibernate<br />
modprobe vboxdrv<br />
}}<br />
<br />
{{Note|Some users reported that it is sufficient to rebuild the kernel module by running {{ic|vboxbuild}} as root.}}<br />
<br />
=== Hibernate with missing swap partition ===<br />
If you try to hibernate without an active swap partition, your system will look like it is going into hibernate, and then immediately resume again. There are no error messages warning you that there is no swap partition, even when verbose logging is activated, so this problem can be very hard to debug. On my system, the swap partition was somehow corrupted and deactivated, so this may happen even if you set up a swap partition during install. If hibernate displays this behaviour, make sure that you actually have a swap partition that is being used as such. The output of the {{ic|blkid}} command should look e.g. like<br />
{{bc|1=<br />
# blkid<br />
/dev/sda1: UUID="00000-000-000-0000000" TYPE="ext2" <br />
/dev/sda2: UUID="00000-000-000-0000000" TYPE="ext4"<br />
/dev/sda3: UUID="00000-000-000-0000000" TYPE="ext4"<br />
/dev/sda4: UUID="00000-000-000-0000000" TYPE="swap"<br />
}}<br />
with one of the lines having {{ic|"swap"}} as the type. If this is not the case, consult [[Swap#Swap partition]] for instructions on re-creating/activating the swap partition.<br />
<br />
=== Black screen with unblinking cursor when trying to suspend ===<br />
If you get a black screen with unblinking cursor when trying to do<br />
$ sudo pm-suspend<br />
have a look at {{ic|/var/log/pm-suspend.log}} and search for "ehci" or "xhci". Some of the names you could find may be "ehci_hd", "xhci_hd" or "ehci_hcd".<br />
<br />
Then as root create the file {{ic|/etc/pm/config.d/modules}} and include this code with the exact name of the ehci or xhci module you found. For example:<br />
SUSPEND_MODULES="ehci_hcd"<br />
Suspend should now be working.<br />
<br />
=== Blank screen issue ===<br />
Some users have reported having issues with their laptops not resuming after a suspend or hibernate. This is due to the {{ic|autodetect}} hook in "HOOKS" array of the {{ic|/etc/mkinitcpio.conf}} file. This can be disabled using the same method for adding the {{ic|resume}} hook. Just remove {{ic|autodetect}} from the list and follow the steps to build the new image. See [[Pm-utils#Mkinitcpio_Resume_Hook|Resume Hook]] for more details on building the new image.<br />
<br />
{{Note|If you are using [[Plymouth|plymouth]] it may be an other reason to this issue. Adding {{ic|resume}} before {{ic|plymouth}} in "HOOKS" array of the {{ic|/etc/mkinitcpio.conf}} file should fix this.}}<br />
<br />
=== Unable to Resume with 64 bit OS ===<br />
Certain motherboards/BIOS combinations (specifically known are some Zotac ITX boards, perhaps others) will not resume properly from suspend if any 64 bit operating system is installed. The solution is the enter your BIOS setup and Disable the "Memory Remapping Hole" in your DRAM configuration page. This will probably fix the suspend to RAM problem but will probably result in your OS not detecting all of your RAM. <br />
<br />
== Tips and Tricks ==<br />
<br />
=== Having the HD power management level automatically set again on resume ===<br />
Do it like this:<br />
{{hc|/etc/pm/sleep.d/50-hdparm_pm|<nowiki><br />
#!/bin/dash<br />
<br />
if [ -n "$1" ] && ([ "$1" = "resume" ] || [ "$1" = "thaw" ]); then<br />
hdparm -B 254 /dev/sda > /dev/null<br />
fi<br />
</nowiki>}}<br />
<br />
Then run:<br />
$ sudo chmod +x /etc/pm/sleep.d/50-hdparm_pm<br />
<br />
If the above [[Bash]] script fails the work, the following may work instead:<br />
{{hc|/etc/pm/sleep.d/50-hdparm_pm|<nowiki><br />
#!/bin/sh<br />
<br />
. "${PM_FUNCTIONS}"<br />
case "$1" in<br />
thaw|resume)<br />
sleep 6<br />
hdparm -B 254 /dev/sda<br />
;;<br />
*)<br />
;;<br />
esac<br />
exit $NA<br />
</nowiki>}}<br />
<br />
Lower {{ic|-B}} switch values may be effective. See [[hdparm]].<br />
<br />
=== Restarting the mouse ===<br />
On some laptops the mouse will hang after an otherwise successful suspend. One way to remedy this is to force a re-initialization of the PS/2 driver (here {{ic|i8042}}) through a hook in {{ic|/etc/pm/hooks}} (see [[#Creating_your_own_hooks|hooks]])<br />
<br />
#!/bin/sh <br />
echo -n "i8042" > /sys/bus/platform/drivers/i8042/unbind<br />
echo -n "i8042" > /sys/bus/platform/drivers/i8042/bind<br />
<br />
=== Add sleep modes to Openbox menu ===<br />
Openbox users can add the new scripts as additional shutdown options within the Openbox menu by adding the items to a new or existing sub-menu in {{ic|~/.config/openbox/menu.xml}}, for example:<br />
<menu id="64" label="Shutdown"><br />
<item label="Lock"> <action name="Execute"> <execute>xscreensaver-command -lock</execute> </action> </item><br />
<item label="Logout"> <action name="Exit"/> </item><br />
<item label="Reboot"> <action name="Execute"> <execute>sudo shutdown -r now</execute> </action> </item><br />
<item label="Poweroff"> <action name="Execute"> <execute>sudo shutdown -h now </execute> </action> </item><br />
'''<item label="Hibernate"> <action name="Execute"> <execute>sudo pm-hibernate</execute> </action> </item>'''<br />
'''<item label="Suspend"> <action name="Execute"> <execute>sudo pm-suspend</execute> </action> </item>'''<br />
</menu><br />
<br />
=== Handling "sleep" and "power" buttons ===<br />
"Sleep" and "power" buttons are handled by {{ic|acpid}} in {{ic|/etc/acpi/handler.sh}} (see "button/power" and "power/sleep" entries). You may want to substitute the default actions with calls to {{ic|pm-suspend}} and {{ic|pm-hibernate}}.<br />
<br />
=== Locking the screen saver on hibernate or suspend ===<br />
It is a good idea to have the system require a password after waking up. One way to do this is to make a script {{ic|/etc/pm/sleep.d/00screensaver-lock}} (making sure it is chmodded to 755 and owned by {{ic|root:root}}, like other similar scripts in this area). Replace '''username''' with your username and add your desired screen locker in between the "" after {{ic|su $USER -c}}.<br />
<br />
{{hc|/etc/pm/sleep.d/00screensaver-lock|<nowiki><br />
#!/bin/sh<br />
#<br />
# 00screensaver-lock: lock workstation on hibernate or suspend<br />
<br />
DBUS=$(ps aux | grep 'dbus-launch' | grep -v root)<br />
if [[ ! -z $DBUS ]];then<br />
USER=$(echo $DBUS | awk '{print $1}')<br />
USERHOME=$(getent passwd $USER | cut -d: -f6)<br />
export XAUTHORITY="$USERHOME/.Xauthority"<br />
for x in /tmp/.X11-unix/*; do<br />
DISPLAYNUM=$(echo $x | sed s#/tmp/.X11-unix/X##)<br />
if [[ -f "$XAUTHORITY" ]]; then<br />
export DISPLAY=":$DISPLAYNUM"<br />
fi<br />
done<br />
else<br />
USER=username<br />
USERHOME=/home/username<br />
export XAUTHORITY="$USERHOME/.Xauthority"<br />
export DISPLAY=":0"<br />
fi<br />
<br />
case "$1" in<br />
hibernate|suspend)<br />
su $USER -c "/usr/bin/slimlock" & # or any other such as /usr/bin/xscreensaver-command -lock<br />
;;<br />
thaw|resume)<br />
;;<br />
*) exit $NA<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
'''Note:''' for the previous script to work TTY lock must be disabled in slimlock. Be sure to set {{ic|tty_lock 0}} in {{ic|/etc/slimlock.conf}} [https://github.com/joelburget/slimlock/issues/4].<br />
<br />
For some the above script might not work, use this one instead:<br />
<br />
{{hc|/etc/pm/sleep.d/00screensaver-lock|<nowiki><br />
#!/bin/sh<br />
#<br />
# 00screensaver-lock: lock workstation on hibernate or suspend<br />
<br />
username= # add your username here, i.e.: username=foobar<br />
<br />
USERHOME=/home/$username<br />
export XAUTHORITY="$USERHOME/.Xauthority"<br />
export DISPLAY=":0"<br />
<br />
case "$1" in<br />
hibernate|suspend)<br />
su $username -c "/usr/bin/slimlock" & # or any other such as /usr/bin/xscreensaver-command -lock<br />
;;<br />
thaw|resume)<br />
;;<br />
*) exit $NA<br />
;;<br />
esac<br />
</nowiki>}}<br />
<br />
== Other Resources ==<br />
* [https://wiki.ubuntu.com/UnderstandingSuspend Understanding Suspend] - Ubuntu article explaining how suspending to RAM works<br />
* [http://www.mjmwired.net/kernel/Documentation/power/basic-pm-debugging.txt#178 PM Debugging] - Basic PM debugging<br />
*[[Cpufrequtils]] - CPU Frequency Scaling and CPU Power schemes<br />
*[[Acpid]] - daemon for delivering ACPI events.<br />
<br />
== Credits ==<br />
''This wiki entry was originally sourced from the [http://en.opensuse.org/SDB:Pm-utils OpenSUSE Wiki] (Licensed under GPL). A big thank you goes to the {{Pkg|pm-utils}} developers and documenters for their time.''</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Fluxbox&diff=192167Fluxbox2012-03-29T23:33:41Z<p>Lagagnon: </p>
<hr />
<div>[[Category:Stacking WMs (English)]]<br />
{{i18n|Fluxbox}}<br />
[[fr:Fluxbox]]<br />
Fluxbox is yet another window manager for X11. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit and there are hundreds of fluxbox "styles" to make your desktop look great. ArchLinux with FluxBox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.<br />
<br />
==Installation==<br />
<br />
Installing Fluxbox is as easy as:<br />
<br />
# pacman -S fluxbox<br />
<br />
== Starting Fluxbox ==<br />
=== Method 1: KDM/GDM/LightDM Login Managers ===<br />
Users of [[KDM]], [[GDM]] or [[Lightdm]] should find a new fluxbox entry added to their session menu automatically. Simply choose the fluxbox option from the session menu when logging in.<br />
<br />
=== Method 2: ~/.xinitrc ===<br />
Edit {{ic|~/.xinitrc}} and add the following code:<br />
<br />
exec startfluxbox <br />
<br />
If you like to have devices automounted (e.g. in Thunar and other file managers), use this code instead:<br />
<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
See [[Xinitrc]] for more details. You then use the "startx" command from a terminal to launch X and your window manager.<br />
<br />
=== Method 3: SLiM Login Manager ===<br />
<br />
SLiM, the Simple Login Manager, is a favourite of many Archlinux users due to its efficiency. SLiM reads ~/.xinitrc, so if you have your .xinitrc correct as above then it should just work. However, if you want to use SLiM to be able to choose between a number of different window managers/desktop environments then edit the sessions variable in {{ic|/etc/slim.conf}} to match the names that trigger the case statement in {{ic|~/.xinitrc}}. See [[Slim]] and [[Xinitrc]].<br />
<br />
== Configuration ==<br />
<br />
System-wide fluxbox configuration files are in {{ic|/usr/share/fluxbox}} while user configuration files are in {{ic|~/.fluxbox}}. The user config files are:<br />
<ul><br />
<li>init: the main fluxbox resource configuration file. See [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file]<br />
<li>menu: the fluxbox menu config. See below and [http://fluxbox-wiki.org/index.php?title=Editing_the_menu Editing the menu file]<br />
<li>keys: the fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/index.php?title=Keyboard_shortcuts here]<br />
<li>startup: where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/index.php?title=Editing_the_startup_file here]<br />
<li>overlay: a config file to override elements of styles. See [http://fluxbox-wiki.org/index.php?title=Style_overlay here].<br />
<li>apps: a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/index.php?title=Editing_the_apps_file here]<br />
<li>windowmenu: a config file for altering the Window Menu itself: [http://fluxbox-wiki.org/index.php?title=Editing_the_windowmenu read this]<br />
</ul><br />
There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.<br />
<br />
=== Menu Management ===<br />
<br />
When you first install fluxbox a very basic applications menu will be created at ~/.fluxbox/menu. You access the menu via a right mouse button click on the desktop. As with other lightweight window managers Fluxbox does not automatically update its menu when you install new applications. It is therefore recommended that you install most of the apps you want on your system first and then re-generate or edit the menu. To enhance the menu and add/edit items there are basically four ways to do it:<br />
<br />
==== fluxbox-generate_menu ====<br />
There is a built-in command provided with fluxbox:<br />
$ fluxbox-generate_menu<br />
This command will auto-generate a {{ic|~/.fluxbox/menu/}} file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by "menumaker" (see immediately below).<br />
<br />
====MenuMaker====<br />
[http://menumaker.sourceforge.net MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Fluxbox. MenuMaker will search your computer for executable programs and create a menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if desired.<br />
<br />
To install MenuMaker:<br />
# pacman -S menumaker<br />
<br />
Once installed, you can generate a complete menu and overwrite the default one by running:<br />
$ mmaker -f FluxBox<br />
<br />
To see MenuMaker options:<br />
$ mmaker --help<br />
<br />
==== Arch Linux Xdg menu ====<br />
Requires [[XdgMenu]] which is available via pacman:<br />
# pacman -S archlinux-xdg-menu<br />
<br />
To then create a fluxbox menu:<br />
$ xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
<br />
More info:<br />
$ xdg_menu --help<br />
<br />
==== Manually create/edit the menu ====<br />
Use your favourite text editor and edit the file: "~/.fluxbox/menu" .<br />
The basic syntax for a menu item to appear is:<br />
[exec] (name) {command} <path to icon><br />
<br />
...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:<br />
[exec] (Firefox Browser) {/usr/bin/firefox} <path to firefox icon><br />
<br />
Note that the "<path to icon>" is optional. If you want to create a submenu the syntax is:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
When done editing save the file and exit. There is no need to restart fluxbox. For more info read [http://fluxbox-wiki.org/index.php?title=Editing_the_menu editing the fluxbox menu].<br />
<br />
===Init===<br />
The ~/.fluxbox/init file is FluxBox's primary configuration resource file. You can change the basic functionality of fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file].<br />
<br />
===Hotkeys===<br />
Fluxbox offers basic hotkeys functionality. The fluxbox hotkey file is located at {{ic|~/.fluxbox/keys}}.<br />
The Control key is represented by "Control". Mod1 corresponds to the Alt key and Mod4 corresponds to Meta (not a standard key but most users map Meta to the "Win" key). When installed and first run Fluxbox will provide you with a very usable, almost complete set of hotkeys. You should peruse and learn the ~/.fluxbox/keys file to enhance your FluxBox experience.<br />
<br />
Example: here is a quick way to control the Master volume:<br />
Control Mod1 Up :Exec amixer set Master,0 5%+ <br />
Control Mod1 Down :Exec amixer set Master,0 5%-<br />
<br />
===Workspaces===<br />
Fluxbox defaults to having four workspaces. These are accessible using Ctrl+F1-F4 shortcuts, or by using the left mouse button to click the arrows on the toolbar. You can also access workspaces via a middle mouse button click on desktop which pops up the Workspaces Menu.<br />
<br />
===Tabbing and Grouping===<br />
With at least two windows visible on your desktop middle click on the upper window tab of one window and drag it into the other open window. The two windows will now be grouped together with window tabs in the upper window tab bar. You may now perform a window operation that will affect the entire window "group".<br />
<br />
===Background (Wallpaper)===<br />
Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The fluxbox-wiki now has an entry for [http://fluxbox-wiki.org/index.php?title=Howto_set_the_background background setting], so please refer to that. <br />
<br />
The easiest way to do it with ArchLinux is to first of all check that you have a background setting application available:<br />
$ fbsetbg -i<br />
<br />
If not, install either feh, esetroot or wmsetbg using pacman. Then add this "fbsetbg" line to your ~/.xinitrc file, before the "exec" line, e.g.:<br />
fbsetbg /path/to/my/image.image<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
====Swapping Multiple Backgrounds Easily====<br />
<br />
Place the following submenu in your fluxbox menu:<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
Then put your background images into {{ic|~/.fluxbox/backgrounds}} or any other folder you specify, they will then appear in the same fashion as your styles.\<br />
<br />
====Using Feh with FluxBox====<br />
Install feh with:<br />
# pacman -S feh<br />
You may add a quick submenu to your {{ic|~/.fluxbox/menu}} file which will allow you to change backgrounds on-the-fly:<br />
[submenu] (Backgrounds)<br />
[backgrounds] (/path/to/your/backgrounds) {feh --bg-scale}<br />
[end]<br />
<br />
To make sure fluxbox will load feh background next time start:<br />
<br />
'''1.''' Make {{ic|.fehbg}} executable:<br />
$ chmod 770 ~/.fehbg<br />
<br />
'''2.''' Then add (or modify) the following line to the file {{ic|~/.fluxbox/init}}:<br />
session.screen0.rootCommand: ~/.fehbg<br />
<br />
'''3.''' or add (or modify) the following line to the file {{ic|~/.fluxbox/startup}}:<br />
~/.fehbg<br />
<br />
===Theming===<br />
To install a fluxbox theme extract the theme archive file to a styles directory. The default directories are:<br />
*global - {{ic|/usr/share/fluxbox/styles}}<br />
*user only - {{ic|~/.fluxbox/styles}}<br />
<br />
The ArchLinux [[AUR]] currently contains a compilation of good looking fluxbox themes called "fluxbox-styles". Get it [https://aur.archlinux.org/packages.php?ID=28743 here] and install this package for more themes than you could possibly use. When installed correctly they will appear in the Fluxbox, Styles section of your Fluxbox menu.<br />
<br />
To create your own Fluxbox styles read [[Fluxbox_Style_Guide]] and this [http://tenr.de/howto/style_fluxbox/style_fluxbox.html style guide].<br />
<br />
===The Slit===<br />
Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit [http://dockapps.org Dockapps.org] <br />
<br />
===Autostarting Applications===<br />
The ArchLinux way to autostart apps is to put all code into {{ic|~/.xinitrc}}. Please read [[Xinitrc]]. However, fluxbox provides functionality to autostart applications on its own. The {{ic|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting fluxbox itself. The # symbol denotes a comment.<br />
<br />
A sample file:<br />
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.<br />
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. <br />
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.<br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> exec is for starting fluxbox itself, do not put an ampersand (&) after this or fluxbox will exit immediately<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:<br />
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Other Menus===<br />
<br />
In the "Menu Management" section (above) we were discussing the main "Applications" Menu, called the "Root" menu in fluxbox lingo. FluxBox also has other menus available to the user:<br />
<ul><br />
<li>Workspaces Menu: middle click on desktop.<br />
<li>Configuration Menu: located within the "Fluxbox" section of the "Root" menu.<br />
<li>Window menu: right click on the titlebar of any window, or its bar if minimized. Can be edited. See fluxbox-menu man page.<br />
<li>Toolbar menu: right click on empty part of toolbar. Also found as a sub-menu within the Configuration Menu.<br />
<li>Slit Menu: found as a sub-menu within the configuration menu.<br />
</ul><br />
<br />
===Transparent rxvt-unicode terminals===<br />
Install urxvt:<br />
# pacman -S rxvt-unicode<br />
<br />
Launch urxvt with these options:<br />
$ urxvt -depth 32 -bg rgba:0000/0000/0000/bbbb -tint grey<br />
<br />
Or you can edit your ~/.Xdefaults file and place the equivalent urxvt commands in that file. See [[Xdefaults]] for more info.<br />
<br />
===True Transparency===<br />
To enable true transparency in fluxbox you need an X compositor. We suggest [[Xcompmgr]]:<br />
# pacman -S xcompmgr<br />
<br />
Then follow the guidelines at the [http://fluxbox-wiki.org/index.php?title=Compositing fluxbox-wiki for xcompmgr].<br />
<br />
===Notifications===<br />
To enable connection notifications on-screen for fluxbox read [https://bbs.archlinux.org/viewtopic.php?id=138616 this Arch forum thread].<br />
<br />
===A life after xorg.conf===<br />
Xorg no longer requires an xorg.conf file. Traditionally this is where you would change your keyboard settings and powersave settings. Luckily there are elegant solutions not using xorg.conf. <br />
<br />
====Setting your keyboard right====<br />
Just add the following line to {{ic|~/.fluxbox/startup}}:<br />
setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)<br />
<br />
Instead of 'us' you can also pass your language code and remove the variant option (ex.: 'us_intl', which works like the command above in some setups). See man setxkbmap for more options.<br />
<br />
To make a help function in your menu, just add in {{ic|~/.fluxbox/menu}}:<br />
[submenu] (Keyboard)<br />
[exec] (normal) {setxkbmap us}<br />
[exec] (international) {setxkbmap us -variant intl}<br />
[end]<br />
<br />
====Disable Powersave====<br />
Do you recognize the problem while watching a movie that the screen goes blank? Congratulations, Xorg just detected that you were doing nothing :). If you do not need these movement exercises, you can disable this feature altogether. You'll just have to remember to manually turn off your monitor if you're not using it.<br />
<br />
Just add the following line at the start of {{ic|~/.fluxbox/startup}}:<br />
xset s off -dpms &<br />
<br />
==Additional Resources==<br />
<br />
* [http://fluxbox.org/ Fluxbox Homepage]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://en.gentoo-wiki.com/wiki/Fluxbox Gentoo Wiki about Fluxbox]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml Gentoo Fluxbox Documentation]<br />
* [http://box-look.org/ Themes for Fluxbox]<br />
* [http://wiki.archlinux.org/index.php/Fluxbox_Style_Guide Fluxbox Style Guide]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox Guide]<br />
* The fluxbox man pages: fluxbox, fluxbox-menu, fluxbox-style, fluxbox-keys, fluxbox-apps, fluxbox-remote, fbsetroot, fbsetbg, fbrun, startfluxbox.<br />
* [https://bbs.archlinux.org/viewtopic.php?id=90260 Archlinux-FluxBox screenshots]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Fluxbox&diff=186038Fluxbox2012-02-24T17:09:41Z<p>Lagagnon: /* Manually create/edit the menu */</p>
<hr />
<div>[[Category:Stacking WMs (English)]]<br />
{{i18n|Fluxbox}}<br />
[[fr:Fluxbox]]<br />
Fluxbox is yet another window manager for X11. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit and there are hundreds of fluxbox "styles" to make your desktop look great. ArchLinux with FluxBox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.<br />
<br />
==Installation==<br />
<br />
Installing Fluxbox is as easy as:<br />
<br />
# pacman -S fluxbox<br />
<br />
== Starting Fluxbox ==<br />
=== Method 1: KDM/GDM/LightDM Login Managers ===<br />
Users of [[KDM]], [[GDM]] or [[Lightdm]] should find a new fluxbox entry added to their session menu automatically. Simply choose the fluxbox option from the session menu when logging in.<br />
<br />
=== Method 2: ~/.xinitrc ===<br />
Edit {{ic|~/.xinitrc}} and add the following code:<br />
<br />
exec startfluxbox <br />
<br />
If you like to have devices automounted (e.g. in Thunar and other file managers), use this code instead:<br />
<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
See [[Xinitrc]] for more details. You then use the "startx" command from a terminal to launch X and your window manager.<br />
<br />
=== Method 3: SLiM Login Manager ===<br />
<br />
SLiM, the Simple Login Manager, is a favourite of many Archlinux users due to its efficiency. SLiM reads ~/.xinitrc, so if you have your .xinitrc correct as above then it should just work. However, if you want to use SLiM to be able to choose between a number of different window managers/desktop environments then edit the sessions variable in {{ic|/etc/slim.conf}} to match the names that trigger the case statement in {{ic|~/.xinitrc}}. See [[Slim]] and [[Xinitrc]].<br />
<br />
== Configuration ==<br />
<br />
System-wide fluxbox configuration files are in {{ic|/usr/share/fluxbox}} while user configuration files are in {{ic|~/.fluxbox}}. The user config files are:<br />
<ul><br />
<li>init: the main fluxbox resource configuration file. See [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file]<br />
<li>menu: the fluxbox menu config. See below and [http://fluxbox-wiki.org/index.php?title=Editing_the_menu Editing the menu file]<br />
<li>keys: the fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/index.php?title=Keyboard_shortcuts here]<br />
<li>startup: where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/index.php?title=Editing_the_startup_file here]<br />
<li>overlay: a config file to override elements of styles. See [http://fluxbox-wiki.org/index.php?title=Style_overlay here].<br />
<li>apps: a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/index.php?title=Editing_the_apps_file here]<br />
<li>windowmenu: a config file for altering the Window Menu itself: [http://fluxbox-wiki.org/index.php?title=Editing_the_windowmenu read this]<br />
</ul><br />
There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.<br />
<br />
=== Menu Management ===<br />
<br />
When you first install fluxbox a very basic applications menu will be created at ~/.fluxbox/menu. You access the menu via a right mouse button click on the desktop. As with other lightweight window managers Fluxbox does not automatically update its menu when you install new applications. It is therefore recommended that you install most of the apps you want on your system first and then re-generate or edit the menu. To enhance the menu and add/edit items there are basically four ways to do it:<br />
<br />
==== fluxbox-generate_menu ====<br />
There is a built-in command provided with fluxbox:<br />
$ fluxbox-generate_menu<br />
This command will auto-generate a {{ic|~/.fluxbox/menu/}} file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by "menumaker" (see immediately below).<br />
<br />
====MenuMaker====<br />
[http://menumaker.sourceforge.net MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Fluxbox. MenuMaker will search your computer for executable programs and create a menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if desired.<br />
<br />
To install MenuMaker:<br />
# pacman -S menumaker<br />
<br />
Once installed, you can generate a complete menu and overwrite the default one by running:<br />
$ mmaker -f FluxBox<br />
<br />
To see MenuMaker options:<br />
$ mmaker --help<br />
<br />
==== Arch Linux Xdg menu ====<br />
Requires [[XdgMenu]] which is available via pacman:<br />
# pacman -S archlinux-xdg-menu<br />
<br />
To then create a fluxbox menu:<br />
$ xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
<br />
More info:<br />
$ xdg_menu --help<br />
<br />
==== Manually create/edit the menu ====<br />
Use your favourite text editor and edit the file: "~/.fluxbox/menu" .<br />
The basic syntax for a menu item to appear is:<br />
[exec] (name) {command} <path to icon><br />
<br />
...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:<br />
[exec] (Firefox Browser) {/usr/bin/firefox} <path to firefox icon><br />
<br />
Note that the "<path to icon>" is optional. If you want to create a submenu the syntax is:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
When done editing save the file and exit. There is no need to restart fluxbox. For more info read [http://fluxbox-wiki.org/index.php?title=Editing_the_menu editing the fluxbox menu].<br />
<br />
===Init===<br />
The ~/.fluxbox/init file is FluxBox's primary configuration resource file. You can change the basic functionality of fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file].<br />
<br />
===Hotkeys===<br />
Fluxbox offers basic hotkeys functionality. The fluxbox hotkey file is located at {{ic|~/.fluxbox/keys}}.<br />
The Control key is represented by "Control". Mod1 corresponds to the Alt key and Mod4 corresponds to Meta (not a standard key but most users map Meta to the "Win" key). When installed and first run Fluxbox will provide you with a very usable, almost complete set of hotkeys. You should peruse and learn the ~/.fluxbox/keys file to enhance your FluxBox experience.<br />
<br />
Example: here is a quick way to control the Master volume:<br />
Control Mod1 Up :Exec amixer set Master,0 5%+ <br />
Control Mod1 Down :Exec amixer set Master,0 5%-<br />
<br />
===Workspaces===<br />
Fluxbox defaults to having four workspaces. These are accessible using Ctrl+F1-F4 shortcuts, or by using the left mouse button to click the arrows on the toolbar. You can also access workspaces via a middle mouse button click on desktop which pops up the Workspaces Menu.<br />
<br />
===Tabbing and Grouping===<br />
With at least two windows visible on your desktop middle click on the upper window tab of one window and drag it into the other open window. The two windows will now be grouped together with window tabs in the upper window tab bar. You may now perform a window operation that will affect the entire window "group".<br />
<br />
===Background (Wallpaper)===<br />
Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The fluxbox-wiki now has an entry for [http://fluxbox-wiki.org/index.php?title=Howto_set_the_background background setting], so please refer to that. <br />
<br />
The easiest way to do it with ArchLinux is to first of all check that you have a background setting application available:<br />
$ fbsetbg -i<br />
<br />
If not, install either feh, esetroot or wmsetbg using pacman. Then add this "fbsetbg" line to your ~/.xinitrc file, before the "exec" line, e.g.:<br />
fbsetbg /path/to/my/image.image<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
====Swapping Multiple Backgrounds Easily====<br />
<br />
Place the following submenu in your fluxbox menu:<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
Then put your background images into {{ic|~/.fluxbox/backgrounds}} or any other folder you specify, they will then appear in the same fashion as your styles.\<br />
<br />
====Using Feh with FluxBox====<br />
Install feh with:<br />
# pacman -S feh<br />
You may add a quick submenu to your {{ic|~/.fluxbox/menu}} file which will allow you to change backgrounds on-the-fly:<br />
[submenu] (Backgrounds)<br />
[backgrounds] (/path/to/your/backgrounds) {feh --bg-scale}<br />
[end]<br />
<br />
To make sure fluxbox will load feh background next time start:<br />
<br />
'''1.''' Make {{ic|.fehbg}} executable:<br />
$ chmod 770 ~/.fehbg<br />
<br />
'''2.''' Then add (or modify) the following line to the file {{ic|~/.fluxbox/init}}:<br />
session.screen0.rootCommand: ~/.fehbg<br />
<br />
'''3.''' or add (or modify) the following line to the file {{ic|~/.fluxbox/startup}}:<br />
~/.fehbg<br />
<br />
===Theming===<br />
To install a fluxbox theme extract the theme archive file to a styles directory. The default directories are:<br />
*global - {{ic|/usr/share/fluxbox/styles}}<br />
*user only - {{ic|~/.fluxbox/styles}}<br />
<br />
The ArchLinux [[AUR]] currently contains a compilation of good looking fluxbox themes called "fluxbox-styles". Get it [http://aur.archlinux.org/packages.php?ID=28743 here] and install this package for more themes than you could possibly use. When installed correctly they will appear in the Fluxbox, Styles section of your Fluxbox menu.<br />
<br />
To create your own Fluxbox styles read [[Fluxbox_Style_Guide]] and this [http://tenr.de/howto/style_fluxbox/style_fluxbox.html style guide].<br />
<br />
===The Slit===<br />
Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit [http://dockapps.org Dockapps.org] <br />
<br />
===Autostarting Applications===<br />
The ArchLinux way to autostart apps is to put all code into {{ic|~/.xinitrc}}. Please read [[Xinitrc]]. However, fluxbox provides functionality to autostart applications on its own. The {{ic|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting fluxbox itself. The # symbol denotes a comment.<br />
<br />
A sample file:<br />
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.<br />
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. <br />
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.<br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> exec is for starting fluxbox itself, do not put an ampersand (&) after this or fluxbox will exit immediately<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:<br />
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Other Menus===<br />
<br />
In the "Menu Management" section (above) we were discussing the main "Applications" Menu, called the "Root" menu in fluxbox lingo. FluxBox also has other menus available to the user:<br />
<ul><br />
<li>Workspaces Menu: middle click on desktop.<br />
<li>Configuration Menu: located within the "Fluxbox" section of the "Root" menu.<br />
<li>Window menu: right click on the titlebar of any window, or its bar if minimized. Can be edited. See fluxbox-menu man page.<br />
<li>Toolbar menu: right click on empty part of toolbar. Also found as a sub-menu within the Configuration Menu.<br />
<li>Slit Menu: found as a sub-menu within the configuration menu.<br />
</ul><br />
<br />
===Transparent rxvt-unicode terminals===<br />
Install urxvt:<br />
# pacman -S rxvt-unicode<br />
<br />
Launch urxvt with these options:<br />
$ urxvt -depth 32 -bg rgba:0000/0000/0000/bbbb -tint grey<br />
<br />
Or you can edit your ~/.Xdefaults file and place the equivalent urxvt commands in that file. See [[Xdefaults]] for more info.<br />
<br />
===True Transparency===<br />
To enable true transparency in fluxbox you need an X compositor. We suggest [[Xcompmgr]]:<br />
# pacman -S xcompmgr<br />
<br />
Then follow the guidelines at the [http://fluxbox-wiki.org/index.php?title=Compositing fluxbox-wiki for xcompmgr].<br />
<br />
===A life after xorg.conf===<br />
Xorg no longer requires an xorg.conf file. Traditionally this is where you would change your keyboard settings and powersave settings. Luckily there are elegant solutions not using xorg.conf. <br />
<br />
====Setting your keyboard right====<br />
Just add the following line to {{ic|~/.fluxbox/startup}}:<br />
setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)<br />
<br />
Instead of 'us' you can also pass your language code and remove the variant option (ex.: 'us_intl', which works like the command above in some setups). See man setxkbmap for more options.<br />
<br />
To make a help function in your menu, just add in {{ic|~/.fluxbox/menu}}:<br />
[submenu] (Keyboard)<br />
[exec] (normal) {setxkbmap us}<br />
[exec] (international) {setxkbmap us -variant intl}<br />
[end]<br />
<br />
====Disable Powersave====<br />
Do you recognize the problem while watching a movie that the screen goes blank? Congratulations, Xorg just detected that you were doing nothing :). If you do not need these movement exercises, you can disable this feature altogether. You'll just have to remember to manually turn off your monitor if you're not using it.<br />
<br />
Just add the following line at the start of {{ic|~/.fluxbox/startup}}:<br />
xset s off -dpms &<br />
<br />
==Additional Resources==<br />
<br />
* [http://fluxbox.org/ Fluxbox Homepage]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://en.gentoo-wiki.com/wiki/Fluxbox Gentoo Wiki about Fluxbox]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml Gentoo Fluxbox Documentation]<br />
* [http://box-look.org/ Themes for Fluxbox]<br />
* [http://wiki.archlinux.org/index.php/Fluxbox_Style_Guide Fluxbox Style Guide]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox Guide]<br />
* The fluxbox man pages: fluxbox, fluxbox-menu, fluxbox-style, fluxbox-keys, fluxbox-apps, fluxbox-remote, fbsetroot, fbsetbg, fbrun, startfluxbox.<br />
* [https://bbs.archlinux.org/viewtopic.php?id=90260 Archlinux-FluxBox screenshots]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Fluxbox&diff=182038Fluxbox2012-02-04T17:12:40Z<p>Lagagnon: </p>
<hr />
<div>[[Category:Stacking WMs (English)]]<br />
{{i18n|Fluxbox}}<br />
[[fr:Fluxbox]]<br />
Fluxbox is yet another window manager for X11. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit and there are hundreds of fluxbox "styles" to make your desktop look great. ArchLinux with FluxBox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.<br />
<br />
==Installation==<br />
<br />
Installing Fluxbox is as easy as:<br />
<br />
# pacman -S fluxbox<br />
<br />
== Starting Fluxbox ==<br />
=== Method 1: KDM/GDM/LightDM Login Managers ===<br />
Users of [[KDM]], [[GDM]] or [[Lightdm]] should find a new fluxbox entry added to their session menu automatically. Simply choose the fluxbox option from the session menu when logging in.<br />
<br />
=== Method 2: ~/.xinitrc ===<br />
Edit {{Filename|~/.xinitrc}} and add the following code:<br />
<br />
exec startfluxbox <br />
<br />
If you like to have devices automounted (e.g. in Thunar and other file managers), use this code instead:<br />
<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
See [[Xinitrc]] for more details. You then use the "startx" command from a terminal to launch X and your window manager.<br />
<br />
=== Method 3: SLiM Login Manager ===<br />
<br />
SLiM, the Simple Login Manager, is a favourite of many Archlinux users due to its efficiency. SLiM reads ~/.xinitrc, so if you have your .xinitrc correct as above then it should just work. However, if you want to use SLiM to be able to choose between a number of different window managers/desktop environments then edit the sessions variable in {{Filename|/etc/slim.conf}} to match the names that trigger the case statement in {{Filename|~/.xinitrc}}. See [[Slim]] and [[Xinitrc]].<br />
<br />
== Configuration ==<br />
<br />
System-wide fluxbox configuration files are in {{Filename|/usr/share/fluxbox}} while user configuration files are in {{Filename|~/.fluxbox}}. The user config files are:<br />
<ul><br />
<li>init: the main fluxbox resource configuration file. See [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file]<br />
<li>menu: the fluxbox menu config. See below and [http://fluxbox-wiki.org/index.php?title=Editing_the_menu Editing the menu file]<br />
<li>keys: the fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/index.php?title=Keyboard_shortcuts here]<br />
<li>startup: where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/index.php?title=Editing_the_startup_file here]<br />
<li>overlay: a config file to override elements of styles. See [http://fluxbox-wiki.org/index.php?title=Style_overlay here].<br />
<li>apps: a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/index.php?title=Editing_the_apps_file here]<br />
<li>windowmenu: a config file for altering the Window Menu itself: [http://fluxbox-wiki.org/index.php?title=Editing_the_windowmenu read this]<br />
</ul><br />
There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.<br />
<br />
=== Menu Management ===<br />
<br />
When you first install fluxbox a very basic applications menu will be created at ~/.fluxbox/menu. You access the menu via a right mouse button click on the desktop. As with other lightweight window managers Fluxbox does not automatically update its menu when you install new applications. It is therefore recommended that you install most of the apps you want on your system first and then re-generate or edit the menu. To enhance the menu and add/edit items there are basically four ways to do it:<br />
<br />
==== fluxbox-generate_menu ====<br />
There is a built-in command provided with fluxbox:<br />
$ fluxbox-generate_menu<br />
This command will auto-generate a {{Filename|~/.fluxbox/menu/}} file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by "menumaker" (see immediately below).<br />
<br />
====MenuMaker====<br />
[http://menumaker.sourceforge.net MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Fluxbox. MenuMaker will search your computer for executable programs and create a menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if desired.<br />
<br />
To install MenuMaker:<br />
# pacman -S menumaker<br />
<br />
Once installed, you can generate a complete menu and overwrite the default one by running:<br />
$ mmaker -f FluxBox<br />
<br />
To see MenuMaker options:<br />
$ mmaker --help<br />
<br />
==== Arch Linux Xdg menu ====<br />
Requires [[XdgMenu]] which is available via pacman:<br />
# pacman -S archlinux-xdg-menu<br />
<br />
To then create a fluxbox menu:<br />
$ xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
<br />
More info:<br />
$ xdg_menu --help<br />
<br />
==== Manually create/edit the menu ====<br />
Use your favourite text editor and edit the file: "~/.fluxbox/menu" .<br />
The basic syntax for a menu item to appear is:<br />
[exec] (name) {command} <path to icon><br />
<br />
...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:<br />
[exec] (Firefox Browser) {/usr/bin/firefox} <path to firefox icon><br />
<br />
If you want to make submenu write:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
When done editing save the file and exit. There is no need to restart fluxbox. For more info read [http://fluxbox-wiki.org/index.php?title=Editing_the_menu editing the fluxbox menu].<br />
<br />
===Init===<br />
The ~/.fluxbox/init file is FluxBox's primary configuration resource file. You can change the basic functionality of fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file].<br />
<br />
===Hotkeys===<br />
Fluxbox offers basic hotkeys functionality. The fluxbox hotkey file is located at {{Filename|~/.fluxbox/keys}}.<br />
The Control key is represented by "Control". Mod1 corresponds to the Alt key and Mod4 corresponds to Meta (not a standard key but most users map Meta to the "Win" key). When installed and first run Fluxbox will provide you with a very usable, almost complete set of hotkeys. You should peruse and learn the ~/.fluxbox/keys file to enhance your FluxBox experience.<br />
<br />
Example: here is a quick way to control the Master volume:<br />
Control Mod1 Up :Exec amixer set Master,0 5%+ <br />
Control Mod1 Down :Exec amixer set Master,0 5%-<br />
<br />
===Workspaces===<br />
Fluxbox defaults to having four workspaces. These are accessible using Ctrl+F1-F4 shortcuts, or by using the left mouse button to click the arrows on the toolbar. You can also access workspaces via a middle mouse button click on desktop which pops up the Workspaces Menu.<br />
<br />
===Tabbing and Grouping===<br />
With at least two windows visible on your desktop middle click on the upper window tab of one window and drag it into the other open window. The two windows will now be grouped together with window tabs in the upper window tab bar. You may now perform a window operation that will affect the entire window "group".<br />
<br />
===Background (Wallpaper)===<br />
Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The fluxbox-wiki now has an entry for [http://fluxbox-wiki.org/index.php?title=Howto_set_the_background background setting], so please refer to that. <br />
<br />
The easiest way to do it with ArchLinux is to first of all check that you have a background setting application available:<br />
$ fbsetbg -i<br />
<br />
If not, install either feh, esetroot or wmsetbg using pacman. Then add this "fbsetbg" line to your ~/.xinitrc file, before the "exec" line, e.g.:<br />
fbsetbg /path/to/my/image.image<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
====Swapping Multiple Backgrounds Easily====<br />
<br />
Place the following submenu in your fluxbox menu:<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
Then put your background images into {{Filename|~/.fluxbox/backgrounds}} or any other folder you specify, they will then appear in the same fashion as your styles.\<br />
<br />
====Using Feh with FluxBox====<br />
Install feh with:<br />
# pacman -S feh<br />
You may add a quick submenu to your {{Filename|~/.fluxbox/menu}} file which will allow you to change backgrounds on-the-fly:<br />
[submenu] (Backgrounds)<br />
[backgrounds] (/path/to/your/backgrounds) {feh --bg-scale}<br />
[end]<br />
<br />
To make sure fluxbox will load feh background next time start:<br />
<br />
'''1.''' Make {{Filename|.fehbg}} executable:<br />
$ chmod 770 ~/.fehbg<br />
<br />
'''2.''' Then add (or modify) the following line to the file {{Filename|~/.fluxbox/init}}:<br />
session.screen0.rootCommand: ~/.fehbg<br />
<br />
'''3.''' or add (or modify) the following line to the file {{Filename|~/.fluxbox/startup}}:<br />
~/.fehbg<br />
<br />
===Theming===<br />
To install a fluxbox theme extract the theme archive file to a styles directory. The default directories are:<br />
*global - {{Filename|/usr/share/fluxbox/styles}}<br />
*user only - {{Filename|~/.fluxbox/styles}}<br />
<br />
The ArchLinux [[AUR]] currently contains a compilation of good looking fluxbox themes called "fluxbox-styles". Get it [http://aur.archlinux.org/packages.php?ID=28743 here] and install this package for more themes than you could possibly use. When installed correctly they will appear in the Fluxbox, Styles section of your Fluxbox menu.<br />
<br />
To create your own Fluxbox styles read [[Fluxbox_Style_Guide]] and this [http://tenr.de/howto/style_fluxbox/style_fluxbox.html style guide].<br />
<br />
===The Slit===<br />
Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit [http://dockapps.org Dockapps.org] <br />
<br />
===Autostarting Applications===<br />
The ArchLinux way to autostart apps is to put all code into {{Filename|~/.xinitrc}}. Please read [[Xinitrc]]. However, fluxbox provides functionality to autostart applications on its own. The {{Filename|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting fluxbox itself. The # symbol denotes a comment.<br />
<br />
A sample file:<br />
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.<br />
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. <br />
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.<br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> exec is for starting fluxbox itself, do not put an ampersand (&) after this or fluxbox will exit immediately<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:<br />
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Other Menus===<br />
<br />
In the "Menu Management" section (above) we were discussing the main "Applications" Menu, called the "Root" menu in fluxbox lingo. FluxBox also has other menus available to the user:<br />
<ul><br />
<li>Workspaces Menu: middle click on desktop.<br />
<li>Configuration Menu: located within the "Fluxbox" section of the "Root" menu.<br />
<li>Window menu: right click on the titlebar of any window, or its bar if minimized. Can be edited. See fluxbox-menu man page.<br />
<li>Toolbar menu: right click on empty part of toolbar. Also found as a sub-menu within the Configuration Menu.<br />
<li>Slit Menu: found as a sub-menu within the configuration menu.<br />
</ul><br />
<br />
===Transparent rxvt-unicode terminals===<br />
Install urxvt:<br />
# pacman -S rxvt-unicode<br />
<br />
Launch urxvt with these options:<br />
$ urxvt -depth 32 -bg rgba:0000/0000/0000/bbbb -tint grey<br />
<br />
Or you can edit your ~/.Xdefaults file and place the equivalent urxvt commands in that file. See [[Xdefaults]] for more info.<br />
<br />
===True Transparency===<br />
To enable true transparency in fluxbox you need an X compositor. We suggest [[Xcompmgr]]:<br />
# pacman -S xcompmgr<br />
<br />
Then follow the guidelines at the [http://http://fluxbox-wiki.org/index.php?title=Compositing fluxbox-wiki for xcompmgr].<br />
<br />
===A life after xorg.conf===<br />
Xorg no longer requires an xorg.conf file. Traditionally this is where you would change your keyboard settings and powersave settings. Luckily there are elegant solutions not using xorg.conf. <br />
<br />
====Setting your keyboard right====<br />
Just add the following line to {{Filename|~/.fluxbox/startup}}:<br />
setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)<br />
<br />
Instead of 'us' you can also pass your language code and remove the variant option (ex.: 'us_intl', which works like the command above in some setups). See man setxkbmap for more options.<br />
<br />
To make a help function in your menu, just add in {{Filename|~/.fluxbox/menu}}:<br />
[submenu] (Keyboard)<br />
[exec] (normal) {setxkbmap us}<br />
[exec] (international) {setxkbmap us -variant intl}<br />
[end]<br />
<br />
====Disable Powersave====<br />
Do you recognize the problem while watching a movie that the screen goes blank? Congratulations, Xorg just detected that you were doing nothing :). If you do not need these movement exercises, you can disable this feature altogether. You'll just have to remember to manually turn off your monitor if you're not using it.<br />
<br />
Just add the following line at the start of {{Filename|~/.fluxbox/startup}}:<br />
xset s off -dpms &<br />
<br />
==Additional Resources==<br />
<br />
* [http://fluxbox.org/ Fluxbox Homepage]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://en.gentoo-wiki.com/wiki/Fluxbox Gentoo Wiki about Fluxbox]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml Gentoo Fluxbox Documentation]<br />
* [http://box-look.org/ Themes for Fluxbox]<br />
* [http://wiki.archlinux.org/index.php/Fluxbox_Style_Guide Fluxbox Style Guide]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox Guide]<br />
* The fluxbox man pages: fluxbox, fluxbox-menu, fluxbox-style, fluxbox-keys, fluxbox-apps, fluxbox-remote, fbsetroot, fbsetbg, fbrun, startfluxbox.<br />
* [https://bbs.archlinux.org/viewtopic.php?id=90260 Archlinux-FluxBox screenshots]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Fluxbox&diff=178410Fluxbox2012-01-14T23:05:18Z<p>Lagagnon: /* Method 1: KDM/GDM Login/Session Managers */</p>
<hr />
<div>[[Category:Stacking WMs (English)]]<br />
{{i18n|Fluxbox}}<br />
[[fr:Fluxbox]]<br />
Fluxbox is yet another window manager for X11. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit and there are hundreds of fluxbox "styles" to make your desktop look great. ArchLinux with FluxBox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.<br />
<br />
==Installation==<br />
<br />
Installing Fluxbox is as easy as:<br />
<br />
# pacman -S fluxbox<br />
<br />
== Starting Fluxbox ==<br />
=== Method 1: KDM/GDM/LightDM Login Managers ===<br />
Users of [[KDM]], [[GDM]] or [[Lightdm]] should find a new fluxbox entry added to their session menu automatically. Simply choose the fluxbox option from the session menu when logging in.<br />
<br />
=== Method 2: ~/.xinitrc ===<br />
Edit {{Filename|~/.xinitrc}} and add the following code:<br />
<br />
exec startfluxbox <br />
<br />
If you like to have devices automounted (e.g. in Thunar and other file managers), use this code instead:<br />
<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
See [[Xinitrc]] for more details. You then use the "startx" command from a terminal to launch X and your window manager.<br />
<br />
=== Method 3: SLiM Login Manager ===<br />
<br />
SLiM, the Simple Login Manager, is a favourite of many Archlinux users due to its efficiency. SLiM reads ~/.xinitrc, so if you have your .xinitrc correct as above then it should just work. However, if you want to use SLiM to be able to choose between a number of different window managers/desktop environments then edit the sessions variable in {{Filename|/etc/slim.conf}} to match the names that trigger the case statement in {{Filename|~/.xinitrc}}. See [[Slim]] and [[Xinitrc]].<br />
<br />
== Configuration ==<br />
<br />
System-wide fluxbox configuration files are in {{Filename|/usr/share/fluxbox}} while user configuration files are in {{Filename|~/.fluxbox}}. The user config files are:<br />
<ul><br />
<li>init: the main fluxbox resource configuration file. See [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file]<br />
<li>menu: the fluxbox menu config. See below and [http://fluxbox-wiki.org/index.php?title=Editing_the_menu Editing the menu file]<br />
<li>keys: the fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/index.php?title=Keyboard_shortcuts here]<br />
<li>startup: where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/index.php?title=Editing_the_startup_file here]<br />
<li>overlay: a config file to override elements of styles. See [http://fluxbox-wiki.org/index.php?title=Style_overlay here].<br />
<li>apps: a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/index.php?title=Editing_the_apps_file here]<br />
<li>windowmenu: a config file for altering the Window Menu itself: [http://fluxbox-wiki.org/index.php?title=Editing_the_windowmenu read this]<br />
</ul><br />
There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.<br />
<br />
=== Menu Management ===<br />
<br />
When you first install fluxbox a very basic applications menu will be created at ~/.fluxbox/menu. You access the menu via a right mouse button click on the desktop. As with other lightweight window managers Fluxbox does not automatically update its menu when you install new applications. It is therefore recommended that you install most of the apps you want on your system first and then re-generate or edit the menu. To enhance the menu and add/edit items there are basically four ways to do it:<br />
<br />
==== fluxbox-generate_menu ====<br />
There is a built-in command provided with fluxbox:<br />
$ fluxbox-generate_menu<br />
This command will auto-generate a {{Filename|~/.fluxbox/menu/}} file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by "menumaker" (see immediately below).<br />
<br />
====MenuMaker====<br />
[http://menumaker.sourceforge.net MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Fluxbox. MenuMaker will search your computer for executable programs and create a menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if desired.<br />
<br />
To install MenuMaker:<br />
# pacman -S menumaker<br />
<br />
Once installed, you can generate a complete menu and overwrite the default one by running:<br />
$ mmaker -f FluxBox<br />
<br />
To see MenuMaker options:<br />
$ mmaker --help<br />
<br />
==== Arch Linux Xdg menu ====<br />
Requires [[XdgMenu]] which is available via pacman:<br />
# pacman -S archlinux-xdg-menu<br />
<br />
To then create a fluxbox menu:<br />
$ xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
<br />
More info:<br />
$ xdg_menu --help<br />
<br />
==== Manually create/edit the menu ====<br />
Use your favourite text editor and edit the file: "~/.fluxbox/menu" .<br />
The basic syntax for a menu item to appear is:<br />
[exec] (name) {command} <path to icon><br />
<br />
...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:<br />
[exec] (Firefox Browser) {/usr/bin/firefox} <path to firefox icon><br />
<br />
If you want to make submenu write:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
When done editing save the file and exit. There is no need to restart fluxbox. For more info read [http://fluxbox-wiki.org/index.php?title=Editing_the_menu editing the fluxbox menu].<br />
<br />
===Init===<br />
The ~/.fluxbox/init file is FluxBox's primary configuration resource file. You can change the basic functionality of fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file].<br />
<br />
===Hotkeys===<br />
Fluxbox offers basic hotkeys functionality. The fluxbox hotkey file is located at {{Filename|~/.fluxbox/keys}}.<br />
The Control key is represented by "Control". Mod1 corresponds to the Alt key and Mod4 corresponds to Meta (not a standard key but most users map Meta to the "Win" key). When installed and first run Fluxbox will provide you with a very usable, almost complete set of hotkeys. You should peruse and learn the ~/.fluxbox/keys file to enhance your FluxBox experience.<br />
<br />
Example: here is a quick way to control the Master volume:<br />
Control Mod1 Up :Exec amixer set Master,0 5%+ <br />
Control Mod1 Down :Exec amixer set Master,0 5%-<br />
<br />
===Workspaces===<br />
Fluxbox defaults to having four workspaces. These are accessible using Ctrl+F1-F4 shortcuts, or by using the left mouse button to click the arrows on the toolbar. You can also access workspaces via a middle mouse button click on desktop which pops up the Workspaces Menu.<br />
<br />
===Tabbing and Grouping===<br />
With at least two windows visible on your desktop middle click on the upper window tab of one window and drag it into the other open window. The two windows will now be grouped together with window tabs in the upper window tab bar. You may now perform a window operation that will affect the entire window "group".<br />
<br />
===Background (Wallpaper)===<br />
Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The fluxbox-wiki now has an entry for [http://fluxbox-wiki.org/index.php?title=Howto_set_the_background background setting], so please refer to that. <br />
<br />
The easiest way to do it with ArchLinux is to first of all check that you have a background setting application available:<br />
$ fbsetbg -i<br />
<br />
If not, install either feh, esetroot or wmsetbg using pacman. Then add this "fbsetbg" line to your ~/.xinitrc file, before the "exec" line, e.g.:<br />
fbsetbg /path/to/my/image.image<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
====Swapping Multiple Backgrounds Easily====<br />
<br />
Place the following submenu in your fluxbox menu:<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
Then put your background images into {{Filename|~/.fluxbox/backgrounds}} or any other folder you specify, they will then appear in the same fashion as your styles.\<br />
<br />
====Using Feh with FluxBox====<br />
Install feh with:<br />
# pacman -S feh<br />
You may add a quick submenu to your {{Filename|~/.fluxbox/menu}} file which will allow you to change backgrounds on-the-fly:<br />
[submenu] (Backgrounds)<br />
[backgrounds] (/path/to/your/backgrounds) {feh --bg-scale}<br />
[end]<br />
<br />
To make sure fluxbox will load feh background next time start:<br />
<br />
'''1.''' Make {{Filename|.fehbg}} executable:<br />
$ chmod 770 ~/.fehbg<br />
<br />
'''2.''' Then add (or modify) the following line to the file {{Filename|~/.fluxbox/init}}:<br />
session.screen0.rootCommand: ~/.fehbg<br />
<br />
'''3.''' or add (or modify) the following line to the file {{Filename|~/.fluxbox/startup}}:<br />
~/.fehbg<br />
<br />
===Theming===<br />
To install a fluxbox theme extract the theme archive file to a styles directory. The default directories are:<br />
*global - {{Filename|/usr/share/fluxbox/styles}}<br />
*user only - {{Filename|~/.fluxbox/styles}}<br />
<br />
The ArchLinux [[AUR]] currently contains a compilation of good looking fluxbox themes called "fluxbox-styles". Get it [http://aur.archlinux.org/packages.php?ID=28743 here] and install this package for more themes than you could possibly use. When installed correctly they will appear in the Fluxbox, Styles section of your Fluxbox menu.<br />
<br />
To create your own Fluxbox styles read [[Fluxbox_Style_Guide]] and this [http://tenr.de/howto/style_fluxbox/style_fluxbox.html style guide].<br />
<br />
===The Slit===<br />
Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit [http://dockapps.org Dockapps.org] <br />
<br />
===Autostarting Applications===<br />
The ArchLinux way to autostart apps is to put all code into {{Filename|~/.xinitrc}}. Please read [[Xinitrc]]. However, fluxbox provides functionality to autostart applications on its own. The {{Filename|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting fluxbox itself. The # symbol denotes a comment.<br />
<br />
A sample file:<br />
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.<br />
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. <br />
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.<br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> exec is for starting fluxbox itself, do not put an ampersand (&) after this or fluxbox will exit immediately<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:<br />
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Other Menus===<br />
<br />
In the "Menu Management" section (above) we were discussing the main "Applications" Menu, called the "Root" menu in fluxbox lingo. FluxBox also has other menus available to the user:<br />
<ul><br />
<li>Workspaces Menu: middle click on desktop.<br />
<li>Configuration Menu: located within the "Fluxbox" section of the "Root" menu.<br />
<li>Window menu: right click on the titlebar of any window, or its bar if minimized. Can be edited. See fluxbox-menu man page.<br />
<li>Toolbar menu: right click on empty part of toolbar. Also found as a sub-menu within the Configuration Menu.<br />
<li>Slit Menu: found as a sub-menu within the configuration menu.<br />
</ul><br />
<br />
===Transparent rxvt-unicode terminals===<br />
Install urxvt:<br />
# pacman -S rxvt-unicode<br />
<br />
Launch urxvt with these options:<br />
$ urxvt -depth 32 -bg rgba:0000/0000/0000/bbbb -tint grey<br />
<br />
Or you can edit your ~/.Xdefaults file and place the equivalent urxvt commands in that file. See [[Xdefaults]] for more info.<br />
<br />
===A life after xorg.conf===<br />
Xorg no longer requires an xorg.conf file. Traditionally this is where you would change your keyboard settings and powersave settings. Luckily there are elegant solutions not using xorg.conf. <br />
<br />
====Setting your keyboard right====<br />
Just add the following line to {{Filename|~/.fluxbox/startup}}:<br />
setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)<br />
<br />
Instead of 'us' you can also pass your language code and remove the variant option (ex.: 'us_intl', which works like the command above in some setups). See man setxkbmap for more options.<br />
<br />
To make a help function in your menu, just add in {{Filename|~/.fluxbox/menu}}:<br />
[submenu] (Keyboard)<br />
[exec] (normal) {setxkbmap us}<br />
[exec] (international) {setxkbmap us -variant intl}<br />
[end]<br />
<br />
====Disable Powersave====<br />
Do you recognize the problem while watching a movie that the screen goes blank? Congratulations, Xorg just detected that you were doing nothing :). If you do not need these movement exercises, you can disable this feature altogether. You'll just have to remember to manually turn off your monitor if you're not using it.<br />
<br />
Just add the following line at the start of {{Filename|~/.fluxbox/startup}}:<br />
xset s off -dpms &<br />
<br />
==Additional Resources==<br />
<br />
* [http://fluxbox.org/ Fluxbox Homepage]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://en.gentoo-wiki.com/wiki/Fluxbox Gentoo Wiki about Fluxbox]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml Gentoo Fluxbox Documentation]<br />
* [http://box-look.org/ Themes for Fluxbox]<br />
* [http://wiki.archlinux.org/index.php/Fluxbox_Style_Guide Fluxbox Style Guide]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox Guide]<br />
* The fluxbox man pages: fluxbox, fluxbox-menu, fluxbox-style, fluxbox-keys, fluxbox-apps, fluxbox-remote, fbsetroot, fbsetbg, fbrun, startfluxbox.<br />
* [https://bbs.archlinux.org/viewtopic.php?id=90260 Archlinux-FluxBox screenshots]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Wmii&diff=177478Wmii2012-01-08T18:42:21Z<p>Lagagnon: /* Note: Version 3.9.2-1 */</p>
<hr />
<div>[[Category:Dynamic WMs (English)]]<br />
{{i18n|Wmii}}{{DISPLAYTITLE:wmii}}<br />
<br />
[http://www.suckless.org/wmii/ wmii] (window manager improved 2) is a dynamic window manager for X11. It supports classic and dynamic window management with extended keyboard, mouse, and filesystem based remote control. It replaces the workspace paradigm with a new tagging approach. <br />
<br />
The following tips are intended to help the user get started with wmii. While wmii can be configured in almost any language, this article will focus on using the '''wmiirc''' configuration file, which is simply a shell script. Please see the [[ruby-wmii]] article to see how to configure wmii in ruby.<br />
<br />
==Installation==<br />
wmii is available from the '''extra''' repository. You can install it by issuing the following command:<br />
<br />
pacman -S wmii<br />
<br />
Alternatively, you can get the [http://aur.archlinux.org/packages.php?ID=3497 latest development version] which is available from the [[AUR]].<br />
<br />
Next you will need to edit your '''~/.xinitrc''' to enable you to start wmii with '''startx''':<br />
<br />
exec wmii<br />
<br />
To allow for starting wmii without logging off or killing the X session, add the following in the ~/.xinitrc<br />
until wmii; do<br />
true<br />
done<br />
Upon your first login, you will be greeted with the wmii welcome message, which also includes a short tutorial on wmii. Completing this tutorial will give you a good idea on how wmii works.<br />
{{Box Note|If the welcome message does not show up, make sure you have '''xmessage''' installed from the '''xorg-xmessage''' package. Then you can read the welcome by pressing $MODKEY-a and selecting 'welcome'.}}<br />
<br />
==Configuration==<br />
The easiest way to start configuring wmii, is to copy the default wmiirc file to your home directory and changing it to your needs. For version 3.9,<br />
mkdir ~/.wmii<br />
cp /etc/wmii/wmiirc ~/.wmii/<br />
<br />
Or just create ~/.wmii/wmiirc_local if you want only basic customization such as fonts, colors etc.<br />
<br />
For earlier versions,<br />
mkdir ~/.wmii/wmii-$VERSION<br />
cp /etc/wmii/wmiirc ~/.wmii/wmii-$VERSION/<br />
<br />
By editing this file, you can change things such as color, background, modkey, etc. Keep in mind that wmiirc uses tabbed indentation in case your editor of choice is configured to only produce spaces. Mixing the two indenting styles may cause unexpected behavior.<br />
===Configuration Variables===<br />
# Configuration Variables<br />
MODKEY=Mod1<br />
UP=k<br />
DOWN=j<br />
LEFT=h<br />
RIGHT=l<br />
Change Mod1 to Mod4 if you want to use Windows key instead of Alt. You can also change h, j, k, l, if you like.<br />
<br />
===Window Colors===<br />
# Colors tuples: "<text> <background> <border>"<br />
WMII_NORMCOLORS='#ffffff #000000 #ffffff'<br />
WMII_FOCUSCOLORS='#ffffff #5c0000 #ffffff'<br />
<br />
WMII_BACKGROUND='#333333'<br />
WMII_FONT='fixed'<br />
Colors of unselected window are in NORMCOLORS variable. Colors of selected window are in FOCUSCOLOR variable. You can change the background color (if you use transparent terminal) with the WMII_BACKGROUND variable.<br />
<br />
==Usage==<br />
<br />
If you are not familiar with tiling WMs, it's not really easy to begin with it. You must learn a few basic hotkeys to launch programs and place or resize windows. It is a good idea to write the basic hotkeys on paper and stick these on your monitor until you memorize them. By default, the "Mod" key is Alt. Some default hotkeys are :<br />
* Mod+Enter -> Terminal<br />
* Mod+p -> wimenu : a menu appears, just type the beginning of the name of the application <br />
to open it.<br />
* Mod+d -> default layout : windows are divided on screen<br />
* Mod+s -> stacked layout : the selected window take all the screen, we just see the title <br />
bar of the others.<br />
* Mod+j -> select the window below<br />
* Mod+k -> select the window above<br />
* Shift+Mod+j -> move the window down<br />
* Shift+Mod+k -> move the window up<br />
* Mod+a -> Actions menu : choose "quit" to quit<br />
<br />
N.B. For commonly used programs you can make use of ''history.progs'', Mod+p and up/down arrow keys to select previous entries.<br />
<br />
<br />
By default, only one column is used by the desktop (i.e. the entire screen). It's possible to use several columns with h and l :<br />
<br />
* Mod+Shift+h : move the selected window left<br />
* Mod+Shift+l : move the selected window right<br />
* Mod+h : select the column on the left<br />
* Mod+l : select the column on the right <br />
<br />
Columns are created automatically, with your placements of the windows. You can make them bigger or smaller, clicking beetween two columns.<br />
<br />
===Layouts===<br />
<br />
You begin in "default" layout : all windows take the same space. You can make them bigger or smaller by clicking in the little square in the title bar of a window.<br />
<br />
* "stacked" layout (Mod+s) : the selected window takes the entire column, but you can see <br />
the title bar of other windows.<br />
* "maximum" layout (Mod+m) : the selected window takes the entire column, you do not see <br />
other windows.<br />
* "fullscreen" layout (Mod+f) : the selected window takes runs in full screen.<br />
<br />
If you tend to use multiple clients in stacked view then binding the following allows you to remove all the title bars apart from the one you are viewing, regaining screen estate.<br />
Each client will be numbered in the top right with 1/3, 2/3 etc. <br />
Mod + s or Mod + d will return the view to standard layouts.<br />
* fn Key-$MODKEY-x {wmiir xwrite /tag/sel/ctl colmode sel +max} # rc.wmii.local version<br />
* Key $MODKEY-x<br />
wmiir xwrite /tag/sel/ctl colmode sel +max # wmiirc version<br />
<br />
====Floating layout====<br />
<br />
You can place your windows like a classic window manager. It's called floating layout. It's useful for some applications, like the Gimp, mplayer, vlc etc.<br />
<br />
* Mod+Shift+Space : Move selected window in floating layout.<br />
* Mod+Space : switch between floating layout and normal layout. <br />
<br />
In the floating layout, we can select a window with Mod+j and Mod+k. We can change dimensions of the window, by dragging, like in any other window manager. But we can use hotkeys for that as well :<br />
<br />
* Mod+Left click : move window<br />
* Mod+Right click : change dimensions of the window (you can use it in other layouts too)<br />
<br />
===Views and Tagging===<br />
Tagging in wmii is very similar to the concept of virtual desktops in other window managers. However, tagging is slightly more powerful because it makes it very easy to group windows in multiple ways concurrently. This is made possible by the fact that WMII easily allows each window to have multiple tags. This allows you to group applications for specific use cases and easily switch between them without having to tear down your previous environment by sending applications to another "Desktop".<br />
<br />
By default, when you first start up wmii you will see the word 'nil' in the lower left corner. You are at the 'nil' view. The first application you start (such as a terminal: Mod+Enter) will automatically be tagged with a "1" and you will be automatically switched to view "1". Views can be navigated or changed with built in keybindings:<br />
<br />
* Mod+Shift+2 : tag selected window to view "2"<br />
* Mod+2 : this switches you to view "2" where you can see all windows tagged with "2"<br />
<br />
It's the same thing for all numbers, from 0 to 9. But you can also use names :<br />
<br />
* Mod+t : views menu : you can select a tag with right and left keys, or type the name <br />
of the tag (or just a part of the name, if it was created).<br />
<br />
* Mod+Shift+t : this retags the currently selected window with whatever you type into <br />
the menu.<br />
<br />
* N.B If using plan9port a ''history.tags'' file is generated in .wmii-*/. You can use <br />
up/down arrow keys to recall previous entries for simple re-tagging/window viewing.<br />
<br />
You can tag windows with multiple views by using a '+' between the tag names :<br />
<br />
* Mod+Shift+t foo+bar+2 : this tags the currently selected window to the views "foo",<br />
"bar" and "2".<br />
You can remove a single tag from multi-tagged windows by selecting the one you wish to remove<br />
and using Mod+Shift+t, -tag ''name/number'' ie<br />
Urxvt is multi-tagged on views 1 2 3 and 4, if you jumped to 3 and typed exit, all instances of<br />
urxvt will be terminated, using Mod+Shift+t, -3 will only remove that single view.<br />
<br />
Tags can be set for specific applications in the wmiirc configuration file.<br />
<br />
# Tagging Rules<br />
wmiir write /tagrules <<!<br />
/Firefox.*/ -> ~+2<br />
/Gimp.*/ -> ~+3<br />
/.*/ -> sel<br />
/.*/ -> 1<br />
!<br />
<br />
With the above tag rules, firefox starts in floating mode (~) on view "2". Gimp starts in floating mode on view "3".<br />
<br />
{{Box Note | Applications need to spawn an X-window in order to be automatically assigned tags. Therefore, in order to launch your terminal based programs you will need to prepend something like ''urxvt -e <program>'' if want to make use of this feature.}}<br />
<br />
==WMII filesystem==<br />
<br />
WMII's filesystem is based on the [http://9p.cat-v.org 9P protocol]. Every element (windows, statusbar, ...) is represented as a file. This makes several cool things possible. For example you can display the song you're currently listening to in the statusbar (for example with MPD and MPC).<br />
<br />
{{Box Note|This filesystem is not permanent and you have to set up everything again after reboot. To make your changes "permanent" simply write the right commands into your wmiirc.}}<br />
<br />
You can access the filesystem with the ''wmiir'' command. For instance, you can list the root directory with ''wmiir ls /''<br />
<br />
client/<br />
colrules<br />
ctl<br />
event<br />
keys<br />
lbar/<br />
rbar/<br />
tag/<br />
tagrules<br />
<br />
You can use ''wmiir read'' to look into files: ''wmiir read /tag/sel/index''<br />
<br />
# ~ 1280 785<br />
~ 0x160000d 731 394 486 332 xterm:XTerm:~<br />
# 1 0 1280<br />
1 0x800003 0 785 opera:Opera:Editing Wmii - Preview - ArchWiki - Opera<br />
<br />
So this is the info for the '''sel'''ected (current) tag. As you can see, I've got one floating xterm and Opera running on this tag. The first number in this output indicates the column of the window. ~ is the floating column and 1 ist (obviously) the first column. The second column is the XServer-ID for the client. The next columns are the coordinates and the size of the window. The last column ist the titlebar of the window.<br />
<br />
You can create new files with ''wmiir create'':<br />
<br />
echo Arch is best | wmiir create /rbar/arch<br />
<br />
Now you should see "Arch is best" in your statusbar<br />
<br />
"wmiir create" reads from STDIN. So you can pipe any information you like into your statusbar. "wmiir write" works in a similar fashion but doesn't create new files.<br />
<br />
{{Box Note|Note for /rbar and /lbar:The elements in those status bars are in alphabetical order.}}<br />
<br />
You can remove files with rm or remove<br />
<br />
If you like to have a program on several tags you can use:<br />
echo "3+5+8" | wmiir write /client/0x800003/tags<br />
<br />
Now my Opera window appears on Tags 3,5 and 8.<br />
<br />
But there are easier ways to accomplish this ;)<br />
Just type MOD+shift+t and enter "3+5+8" and you get the same result for the currently selected client.<br />
<br />
{{Box Note| There's also the possibility to mount WMII's filesystem. Have a look at the [http://wmii.suckless.org/9p official documentation]. }}<br />
<br />
==Other nice stuff==<br />
<br />
=== Laptop Status Bar===<br />
<br />
If you are using wmii on a laptop, it may be convenient to display items such as wireless quality, remaining battery time, and load averages in the status bar; the script below requires you to install acpi and gawk:<br />
pacman -S acpi gawk''<br />
{{bc|<nowiki><br />
# Status Bar Info<br />
status() {<br />
echo -n ' Wlan0:' $(iwconfig wlan0 | awk '/Quality/{print $2}' | sed 's/.*=//' | awk -F"/" '{printf("%.0f%%", $1/$2*100)}') '| Bat:' $(acpi -b | sed -n 's/.*\([0-9][0-9]:[0-9][0-9]\):[0-9][0-9].*/\1/p') '|' $(uptime | sed 's/.*: //; s/,//g') '|' $(date '+%c')<br />
}<br />
</nowiki>}}<br />
By default the status bar only shows date and an uptime pager (displays system load average for the last 1, 5, 15 minutes).<br />
<br />
=== Conky Replacement Status Bar===<br />
<br />
Similar to the above status() function any user can essentially replace the functions of the conky system monitor by using the wmii status bar. Below is an example of such to show CPU and GPU temperatures, CPU speeds, /home and / partition sizes, RAM used, system load averages and date/time:<br />
{{bc|<nowiki><br />
# Status Bar Info<br />
status() {<br />
echo -n 'CPUTemp:' `expr $(sensors | grep temp1 | awk '{print $2}' | cut -c2-3) + 15` '|' 'GPUTemp:' $(nvidia-settings -q=GPUCoreTemp | grep eagle | awk '{print $4}' | cut -c1-2 ) '|' 'CPUMHz:' $(cat /proc/cpuinfo | grep MHz | awk '{printf "%.0f\n", $4}') '|' '/home:' $(df -h | grep sda5 | awk '{print $3}') '|' '/:' $(df -h | grep sda1 | awk '{print $3}') '|' 'RAM:' $(free -m | grep -i /cache | awk '{print $3}') 'MB |' $(uptime | sed 's/.*://; s/,//g') '|' $(date +"%a %b %d %H:%M")<br />
}<br />
</nowiki>}}<br />
By judicious use of the info available from common Linux system commands, the /proc filesystem and GNU tools such as grep, awk, sed and cut you can create a highly informational wmii status bar. Note that the above is specific to the author's computer and will have to be edited to suit.<br />
<br />
===Terminal Title===<br />
If you would like to display the current directory in your terminal emulator's titlebar, add this to your .bashrc<br />
WMII_IS_RUNNING=`ps a | grep wmii | awk '/[^"grep"] wmii$/'`<br />
if [ -n "$WMII_IS_RUNNING" ]; then<br />
PROMPT_COMMAND='dirs | wmiir write /client/sel/label'<br />
fi<br />
With this you can shorten you shell prompt and have more horizontal space to type. This test prevents you from getting a "WMII_ADRESS not set" error when you spawn a console.<br />
<br />
===Weechat Highlight Notification===<br />
If you use weechat and want to know when you have been messaged without always having to look at the weechat window, you can use the ''launcher.pl'' plugin to send a notice to the bar. To get this working, you will need to create a script that sends your desired notice. Here is very simple example:<br />
<br />
#!/bin/bash<br />
echo :: NEW MESSAGE :: | wmiir create /lbar/alert<br />
sleep 8<br />
wmiir remove /lbar/alert<br />
<br />
Then start weechat and load the plugin.<br />
<br />
/perl load launcher.pl<br />
<br />
Then type the following command into weechat:<br />
<br />
/set plugins.var.perl.launcher.signal.weechat_pv = "/path/to/yourscript"<br />
<br />
Now, :: NEW MESSAGE :: will appear in the left corner of your bar whenever you have a message highlight. Make sure to place ''launcher.pl'' the perl/autoload directory so that it starts when weechat starts.<br />
<br />
===Mod4 on an old Thinkpad===<br />
<br />
Although Wmii defaults to Mod1, using Mod4 reduces conflicts in keybindings with many terminal applications. There is a snag for old Thinkpad users, however. They do not have a Mod4 key. To get one, another key has to be assigned to it using xmodmap. To do it, make an ''.Xmodmap'' file in your home directory and add this to it:<br />
keycode 64 = Super_L<br />
add Mod4 = Super_L<br />
remove Mod1 = Super_L<br />
<br />
You will need to replace 64 with whatever ''xev'' tells you is the keycode of the key you want to replace. In the above example, I replace left Alt (and use right alt for applications).<br />
<br />
===Nice fonts===<br />
Wmii now supports Xft, just prefix font name with 'xft'. For instance:<br />
export WMII_FONT='xft:Sans-9'<br />
<br />
===Keyboard layouts===<br />
You'd probably like to have its own keyboard layout for each window. However, most of such applications requires system tray while witray is only available in the [http://aur.archlinux.org/packages.php?ID=3497 development version of wmii]. [http://www.archlinux.org/packages/?q=xxkb xxkb] package helps to solve the problem. It has no UI by default. You only need to configure layouts in xorg.conf. Create /etc/X11/xorg.conf.d/20-keyboard.conf and put something like this into it:<br />
Section "InputClass"<br />
Identifier "Keyboard Defaults"<br />
MatchIsKeyboard "yes"<br />
Option "XkbModel" "pc101"<br />
Option "XkbLayout" "us,ru"<br />
Option "XkbOptions" "grp:ctrl_shift_toggle,compose:prsc"<br />
EndSection<br />
Replace layout, options and model to fit your needs. Add<br />
xxkb &<br />
into your wmiirc and it just works.<br />
[http://aur.archlinux.org/packages.php?ID=33298 xkblayout-state] can be used to put layout indicator into the status line:<br />
status() {<br />
echo -n label $(xkblayout-state print "%s") '|' $(date +"%a %b %d %H:%M")<br />
}<br />
<br />
===Note: Version 3.9.2-1===<br />
<br />
If you upgrade from wmii v3.6-4 to v3.9.2-1 you will have to insert any changes you made to your old ~/.wmii-3.5/wmiirc configuration file into the newer config file located at ~/.wmii/wmiirc_local. Note also that there are some slight format and variable name changes between the newer and older versions of /etc/wmii/wmiirc.<br />
<br />
This latest version has some significant enhancements such as easier window dimension changes with the mouse and better handling of small floating windows launched from tiled applications (especially LibreOffice).<br />
<br />
==Other Resources==<br />
* [http://wmii.suckless.org/ wmii] -- the official website of wmii<br />
* [[dmenu]] -- a simple application launcher which binds well with dwm and wmii<br />
* [http://wmii.googlecode.com/hg/doc/wmii.pdf user guide] -- latest wmii guide (pdf)<br />
* [http://eigenclass.org/hiki.rb?wmii+ruby ruby-wmii] -- Ruby configuration and scripting for wmii 3.1<br />
* [https://github.com/sunaku/wmiirc sunaku's wmiirc] -- Ruby configuration and scripting for wmii 3.9+ and wmii-hg<br />
* [http://pastebin.com/Xyn0mEjr Ben's wmiirc] -- Simple wmiirc with extra widgets (vol, mpd, mail, clock) and other modifications<br />
* mailing list is dev@suckless.org, see official website<br />
* IRC channel is #wmii on the OFTC IRC network</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Wmii&diff=176775Wmii2012-01-03T18:48:49Z<p>Lagagnon: /* Other Resources */</p>
<hr />
<div>[[Category:Dynamic WMs (English)]]<br />
{{i18n|Wmii}}{{DISPLAYTITLE:wmii}}<br />
<br />
[http://www.suckless.org/wmii/ wmii] (window manager improved 2) is a dynamic window manager for X11. It supports classic and dynamic window management with extended keyboard, mouse, and filesystem based remote control. It replaces the workspace paradigm with a new tagging approach. <br />
<br />
The following tips are intended to help the user get started with wmii. While wmii can be configured in almost any language, this article will focus on using the '''wmiirc''' configuration file, which is simply a shell script. Please see the [[ruby-wmii]] article to see how to configure wmii in ruby.<br />
<br />
==Installation==<br />
wmii is available from the '''extra''' repository. You can install it by issuing the following command:<br />
<br />
pacman -S wmii<br />
<br />
Alternatively, you can get the [http://aur.archlinux.org/packages.php?ID=3497 latest development version] which is available from the [[AUR]].<br />
<br />
Next you will need to edit your '''~/.xinitrc''' to enable you to start wmii with '''startx''':<br />
<br />
exec wmii<br />
<br />
To allow for starting wmii without logging off or killing the X session, add the following in the ~/.xinitrc<br />
until wmii; do<br />
true<br />
done<br />
Upon your first login, you will be greeted with the wmii welcome message, which also includes a short tutorial on wmii. Completing this tutorial will give you a good idea on how wmii works.<br />
{{Box Note|If the welcome message does not show up, make sure you have '''xmessage''' installed from the '''xorg-xmessage''' package. Then you can read the welcome by pressing $MODKEY-a and selecting 'welcome'.}}<br />
<br />
==Configuration==<br />
The easiest way to start configuring wmii, is to copy the default wmiirc file to your home directory and changing it to your needs. For version 3.9,<br />
mkdir ~/.wmii<br />
cp /etc/wmii/wmiirc ~/.wmii/<br />
<br />
Or just create ~/.wmii/wmiirc_local if you want only basic customization such as fonts, colors etc.<br />
<br />
For earlier versions,<br />
mkdir ~/.wmii/wmii-$VERSION<br />
cp /etc/wmii/wmiirc ~/.wmii/wmii-$VERSION/<br />
<br />
By editing this file, you can change things such as color, background, modkey, etc. Keep in mind that wmiirc uses tabbed indentation in case your editor of choice is configured to only produce spaces. Mixing the two indenting styles may cause unexpected behavior.<br />
===Configuration Variables===<br />
# Configuration Variables<br />
MODKEY=Mod1<br />
UP=k<br />
DOWN=j<br />
LEFT=h<br />
RIGHT=l<br />
Change Mod1 to Mod4 if you want to use Windows key instead of Alt. You can also change h, j, k, l, if you like.<br />
<br />
===Window Colors===<br />
# Colors tuples: "<text> <background> <border>"<br />
WMII_NORMCOLORS='#ffffff #000000 #ffffff'<br />
WMII_FOCUSCOLORS='#ffffff #5c0000 #ffffff'<br />
<br />
WMII_BACKGROUND='#333333'<br />
WMII_FONT='fixed'<br />
Colors of unselected window are in NORMCOLORS variable. Colors of selected window are in FOCUSCOLOR variable. You can change the background color (if you use transparent terminal) with the WMII_BACKGROUND variable.<br />
<br />
<br />
==Usage==<br />
<br />
If you are not familiar with tiling WMs, it's not really easy to begin with it. You must learn a few basic hotkeys to launch programs and place or resize windows. It is a good idea to write the basic hotkeys on paper and stick these on your monitor until you memorize them. By default, the "Mod" key is Alt. Some default hotkeys are :<br />
* Mod+Enter -> Terminal<br />
* Mod+p -> wimenu : a menu appears, just type the beginning of the name of the application <br />
to open it.<br />
* Mod+d -> default layout : windows are divided on screen<br />
* Mod+s -> stacked layout : the selected window take all the screen, we just see the title <br />
bar of the others.<br />
* Mod+j -> select the window below<br />
* Mod+k -> select the window above<br />
* Shift+Mod+j -> move the window down<br />
* Shift+Mod+k -> move the window up<br />
* Mod+a -> Actions menu : choose "quit" to quit<br />
<br />
N.B. For commonly used programs you can make use of ''history.progs'', Mod+p and up/down arrow keys to select previous entries.<br />
<br />
<br />
By default, only one column is used by the desktop (i.e. the entire screen). It's possible to use several columns with h and l :<br />
<br />
* Mod+Shift+h : move the selected window left<br />
* Mod+Shift+l : move the selected window right<br />
* Mod+h : select the column on the left<br />
* Mod+l : select the column on the right <br />
<br />
Columns are created automatically, with your placements of the windows. You can make them bigger or smaller, clicking beetween two columns.<br />
<br />
===Layouts===<br />
<br />
You begin in "default" layout : all windows take the same space. You can make them bigger or smaller by clicking in the little square in the title bar of a window.<br />
<br />
* "stacked" layout (Mod+s) : the selected window takes the entire column, but you can see <br />
the title bar of other windows.<br />
* "maximum" layout (Mod+m) : the selected window takes the entire column, you do not see <br />
other windows.<br />
* "fullscreen" layout (Mod+f) : the selected window takes runs in full screen.<br />
<br />
If you tend to use multiple clients in stacked view then binding the following allows you to remove all the title bars apart from the one you are viewing, regaining screen estate.<br />
Each client will be numbered in the top right with 1/3, 2/3 etc. <br />
Mod + s or Mod + d will return the view to standard layouts.<br />
* fn Key-$MODKEY-x {wmiir xwrite /tag/sel/ctl colmode sel +max} # rc.wmii.local version<br />
* Key $MODKEY-x<br />
wmiir xwrite /tag/sel/ctl colmode sel +max # wmiirc version<br />
<br />
====Floating layout====<br />
<br />
You can place your windows like a classic window manager. It's called floating layout. It's useful for some applications, like the Gimp, mplayer, vlc etc.<br />
<br />
* Mod+Shift+Space : Move selected window in floating layout.<br />
* Mod+Space : switch between floating layout and normal layout. <br />
<br />
In the floating layout, we can select a window with Mod+j and Mod+k. We can change dimensions of the window, by dragging, like in any other window manager. But we can use hotkeys for that as well :<br />
<br />
* Mod+Left click : move window<br />
* Mod+Right click : change dimensions of the window (you can use it in other layouts too)<br />
<br />
===Views and Tagging===<br />
Tagging in wmii is very similar to the concept of virtual desktops in other window managers. However, tagging is slightly more powerful because it makes it very easy to group windows in multiple ways concurrently. This is made possible by the fact that WMII easily allows each window to have multiple tags. This allows you to group applications for specific use cases and easily switch between them without having to tear down your previous environment by sending applications to another "Desktop".<br />
<br />
By default, when you first start up wmii you will see the word 'nil' in the lower left corner. You are at the 'nil' view. The first application you start (such as a terminal: Mod+Enter) will automatically be tagged with a "1" and you will be automatically switched to view "1". Views can be navigated or changed with built in keybindings:<br />
<br />
* Mod+Shift+2 : tag selected window to view "2"<br />
* Mod+2 : this switches you to view "2" where you can see all windows tagged with "2"<br />
<br />
It's the same thing for all numbers, from 0 to 9. But you can also use names :<br />
<br />
* Mod+t : views menu : you can select a tag with right and left keys, or type the name <br />
of the tag (or just a part of the name, if it was created).<br />
<br />
* Mod+Shift+t : this retags the currently selected window with whatever you type into <br />
the menu.<br />
<br />
* N.B If using plan9port a ''history.tags'' file is generated in .wmii-*/. You can use <br />
up/down arrow keys to recall previous entries for simple re-tagging/window viewing.<br />
<br />
You can tag windows with multiple views by using a '+' between the tag names :<br />
<br />
* Mod+Shift+t foo+bar+2 : this tags the currently selected window to the views "foo",<br />
"bar" and "2".<br />
You can remove a single tag from multi-tagged windows by selecting the one you wish to remove<br />
and using Mod+Shift+t, -tag ''name/number'' ie<br />
Urxvt is multi-tagged on views 1 2 3 and 4, if you jumped to 3 and typed exit, all instances of<br />
urxvt will be terminated, using Mod+Shift+t, -3 will only remove that single view.<br />
<br />
Tags can be set for specific applications in the wmiirc configuration file.<br />
<br />
# Tagging Rules<br />
wmiir write /tagrules <<!<br />
/Firefox.*/ -> ~+2<br />
/Gimp.*/ -> ~+3<br />
/.*/ -> sel<br />
/.*/ -> 1<br />
!<br />
<br />
With the above tag rules, firefox starts in floating mode (~) on view "2". Gimp starts in floating mode on view "3".<br />
<br />
{{Box Note | Applications need to spawn an X-window in order to be automatically assigned tags. Therefore, in order to launch your terminal based programs you will need to prepend something like ''urxvt -e <program>'' if want to make use of this feature.}}<br />
<br />
==WMII filesystem==<br />
<br />
WMII's filesystem is based on the [http://9p.cat-v.org 9P protocol]. Every element (windows, statusbar, ...) is represented as a file. This makes several cool things possible. For example you can display the song you're currently listening to in the statusbar (for example with MPD and MPC).<br />
<br />
{{Box Note|This filesystem is not permanent and you have to set up everything again after reboot. To make your changes "permanent" simply write the right commands into your wmiirc.}}<br />
<br />
You can access the filesystem with the ''wmiir'' command. For instance, you can list the root directory with ''wmiir ls /''<br />
<br />
client/<br />
colrules<br />
ctl<br />
event<br />
keys<br />
lbar/<br />
rbar/<br />
tag/<br />
tagrules<br />
<br />
You can use ''wmiir read'' to look into files: ''wmiir read /tag/sel/index''<br />
<br />
# ~ 1280 785<br />
~ 0x160000d 731 394 486 332 xterm:XTerm:~<br />
# 1 0 1280<br />
1 0x800003 0 785 opera:Opera:Editing Wmii - Preview - ArchWiki - Opera<br />
<br />
So this is the info for the '''sel'''ected (current) tag. As you can see, I've got one floating xterm and Opera running on this tag. The first number in this output indicates the column of the window. ~ is the floating column and 1 ist (obviously) the first column. The second column is the XServer-ID for the client. The next columns are the coordinates and the size of the window. The last column ist the titlebar of the window.<br />
<br />
You can create new files with ''wmiir create'':<br />
<br />
echo Arch is best | wmiir create /rbar/arch<br />
<br />
Now you should see "Arch is best" in your statusbar<br />
<br />
"wmiir create" reads from STDIN. So you can pipe any information you like into your statusbar. "wmiir write" works in a similar fashion but doesn't create new files.<br />
<br />
{{Box Note|Note for /rbar and /lbar:The elements in those status bars are in alphabetical order.}}<br />
<br />
You can remove files with rm or remove<br />
<br />
If you like to have a program on several tags you can use:<br />
echo "3+5+8" | wmiir write /client/0x800003/tags<br />
<br />
Now my Opera window appears on Tags 3,5 and 8.<br />
<br />
But there are easier ways to accomplish this ;)<br />
Just type MOD+shift+t and enter "3+5+8" and you get the same result for the currently selected client.<br />
<br />
{{Box Note| There's also the possibility to mount WMII's filesystem. Have a look at the [http://wmii.suckless.org/9p official documentation]. }}<br />
<br />
==Other nice stuff==<br />
<br />
=== Laptop Status Bar===<br />
<br />
If you are using wmii on a laptop, it may be convenient to display items such as wireless quality, remaining battery time, and load averages in the status bar; the script below requires you to install acpi and gawk:<br />
pacman -S acpi gawk''<br />
<pre style='overflow:auto'><br />
# Status Bar Info<br />
status() {<br />
echo -n ' Wlan0:' $(iwconfig wlan0 | awk '/Quality/{print $2}' | sed 's/.*=//' | awk -F"/" '{printf("%.0f%%", $1/$2*100)}') '| Bat:' $(acpi -b | sed -n 's/.*\([0-9][0-9]:[0-9][0-9]\):[0-9][0-9].*/\1/p') '|' $(uptime | sed 's/.*: //; s/,//g') '|' $(date '+%c')<br />
}<br />
</pre><br />
By default the status bar only shows date and an uptime pager (displays system load average for the last 1, 5, 15 minutes).<br />
<br />
=== Conky Replacement Status Bar===<br />
<br />
Similar to the above status() function any user can essentially replace the functions of the conky system monitor by using the wmii status bar. Below is an example of such to show CPU and GPU temperatures, CPU speeds, /home and / partition sizes, RAM used, system load averages and date/time:<br />
<pre style='overflow:auto'><br />
# Status Bar Info<br />
status() {<br />
echo -n 'CPUTemp:' `expr $(sensors | grep temp1 | awk '{print $2}' | cut -c2-3) + 15` '|' 'GPUTemp:' $(nvidia-settings -q=GPUCoreTemp | grep eagle | awk '{print $4}' | cut -c1-2 ) '|' 'CPUMHz:' $(cat /proc/cpuinfo | grep MHz | awk '{printf "%.0f\n", $4}') '|' '/home:' $(df -h | grep sda5 | awk '{print $3}') '|' '/:' $(df -h | grep sda1 | awk '{print $3}') '|' 'RAM:' $(free -m | grep -i /cache | awk '{print $3}') 'MB |' $(uptime | sed 's/.*://; s/,//g') '|' $(date +"%a %b %d %H:%M")<br />
}<br />
</pre><br />
By judicious use of the info available from common Linux system commands, the /proc filesystem and GNU tools such as grep, awk, sed and cut you can create a highly informational wmii status bar. Note that the above is specific to the author's computer and will have to be edited to suit.<br />
<br />
===Terminal Title===<br />
If you would like to display the current directory in your terminal emulator's titlebar, add this to your .bashrc<br />
WMII_IS_RUNNING=`ps a | grep wmii | awk '/[^"grep"] wmii$/'`<br />
if [ -n "$WMII_IS_RUNNING" ]; then<br />
PROMPT_COMMAND='dirs | wmiir write /client/sel/label'<br />
fi<br />
With this you can shorten you shell prompt and have more horizontal space to type. This test prevents you from getting a "WMII_ADRESS not set" error when you spawn a console.<br />
<br />
===Weechat Highlight Notification===<br />
If you use weechat and want to know when you have been messaged without always having to look at the weechat window, you can use the ''launcher.pl'' plugin to send a notice to the bar. To get this working, you will need to create a script that sends your desired notice. Here is very simple example:<br />
<br />
#!/bin/bash<br />
echo :: NEW MESSAGE :: | wmiir create /lbar/alert<br />
sleep 8<br />
wmiir remove /lbar/alert<br />
<br />
Then start weechat and load the plugin.<br />
<br />
/perl load launcher.pl<br />
<br />
Then type the following command into weechat:<br />
<br />
/set plugins.var.perl.launcher.signal.weechat_pv = "/path/to/yourscript"<br />
<br />
<br />
Now, :: NEW MESSAGE :: will appear in the left corner of your bar whenever you have a message highlight. Make sure to place ''launcher.pl'' the perl/autoload directory so that it starts when weechat starts.<br />
<br />
===Mod4 on an old Thinkpad===<br />
<br />
Although Wmii defaults to Mod1, using Mod4 reduces conflicts in keybindings with many terminal applications. There is a snag for old Thinkpad users, however. They do not have a Mod4 key. To get one, another key has to be assigned to it using xmodmap. To do it, make an ''.Xmodmap'' file in your home directory and add this to it:<br />
keycode 64 = Super_L<br />
add Mod4 = Super_L<br />
remove Mod1 = Super_L<br />
<br />
You will need to replace 64 with whatever ''xev'' tells you is the keycode of the key you want to replace. In the above example, I replace left Alt (and use right alt for applications).<br />
<br />
===Nice fonts===<br />
Wmii now supports Xft, just prefix font name with 'xft'. For instance:<br />
export WMII_FONT='xft:Sans-9'<br />
<br />
===Keyboard layouts===<br />
You'd probably like to have its own keyboard layout for each window. However, most of such applications requires system tray while witray is only available in the [http://aur.archlinux.org/packages.php?ID=3497 development version of wmii]. [http://www.archlinux.org/packages/?q=xxkb xxkb] package helps to solve the problem. It has no UI by default. You only need to configure layouts in xorg.conf. Create /etc/X11/xorg.conf.d/20-keyboard.conf and put something like this into it:<br />
Section "InputClass"<br />
Identifier "Keyboard Defaults"<br />
MatchIsKeyboard "yes"<br />
Option "XkbModel" "pc101"<br />
Option "XkbLayout" "us,ru"<br />
Option "XkbOptions" "grp:ctrl_shift_toggle,compose:prsc"<br />
EndSection<br />
Replace layout, options and model to fit your needs. Add<br />
xxkb &<br />
into your wmiirc and it just works.<br />
[http://aur.archlinux.org/packages.php?ID=33298 xkblayout-state] can be used to put layout indicator into the status line:<br />
status() {<br />
echo -n label $(xkblayout-state print "%s") '|' $(date +"%a %b %d %H:%M")<br />
}<br />
<br />
===Note: Version 3.9.2-1===<br />
<br />
If you upgrade from wmii v3.6-4 to v3.9.2-1 you will have to insert any changes you made to your old ~/.wmii-3.5/wmiirc configuration file into the newer config file located at ~/.wmii/wmiirc_local. Note also that there are some slight format and variable name changes between the newer and older versions of /etc/wmii/wmiirc.<br />
<br />
This latest version has some significant enhancements such as easier window dimension changes with the mouse and better handling of small floating windows launched from tiled applications (especially OpenOffice).<br />
<br />
==Other Resources==<br />
* [http://wmii.suckless.org/ wmii] -- the official website of wmii<br />
* [[dmenu]] -- a simple application launcher which binds well with dwm and wmii<br />
* [http://wmii.googlecode.com/hg/doc/wmii.pdf user guide] -- latest wmii guide (pdf)<br />
* [http://eigenclass.org/hiki.rb?wmii+ruby ruby-wmii] -- Ruby configuration and scripting for wmii 3.1<br />
* [https://github.com/sunaku/wmiirc sunaku's wmiirc] -- Ruby configuration and scripting for wmii 3.9+ and wmii-hg<br />
* [http://pastebin.com/Xyn0mEjr Ben's wmiirc] -- Simple wmiirc with extra widgets (vol, mpd, mail, clock) and other modifications<br />
* mailing list is dev@suckless.org, see official website<br />
* IRC channel is #wmii on the OFTC IRC network</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Wmii&diff=176771Wmii2012-01-03T18:44:39Z<p>Lagagnon: </p>
<hr />
<div>[[Category:Dynamic WMs (English)]]<br />
{{i18n|Wmii}}{{DISPLAYTITLE:wmii}}<br />
<br />
[http://www.suckless.org/wmii/ wmii] (window manager improved 2) is a dynamic window manager for X11. It supports classic and dynamic window management with extended keyboard, mouse, and filesystem based remote control. It replaces the workspace paradigm with a new tagging approach. <br />
<br />
The following tips are intended to help the user get started with wmii. While wmii can be configured in almost any language, this article will focus on using the '''wmiirc''' configuration file, which is simply a shell script. Please see the [[ruby-wmii]] article to see how to configure wmii in ruby.<br />
<br />
==Installation==<br />
wmii is available from the '''extra''' repository. You can install it by issuing the following command:<br />
<br />
pacman -S wmii<br />
<br />
Alternatively, you can get the [http://aur.archlinux.org/packages.php?ID=3497 latest development version] which is available from the [[AUR]].<br />
<br />
Next you will need to edit your '''~/.xinitrc''' to enable you to start wmii with '''startx''':<br />
<br />
exec wmii<br />
<br />
To allow for starting wmii without logging off or killing the X session, add the following in the ~/.xinitrc<br />
until wmii; do<br />
true<br />
done<br />
Upon your first login, you will be greeted with the wmii welcome message, which also includes a short tutorial on wmii. Completing this tutorial will give you a good idea on how wmii works.<br />
{{Box Note|If the welcome message does not show up, make sure you have '''xmessage''' installed from the '''xorg-xmessage''' package. Then you can read the welcome by pressing $MODKEY-a and selecting 'welcome'.}}<br />
<br />
==Configuration==<br />
The easiest way to start configuring wmii, is to copy the default wmiirc file to your home directory and changing it to your needs. For version 3.9,<br />
mkdir ~/.wmii<br />
cp /etc/wmii/wmiirc ~/.wmii/<br />
<br />
Or just create ~/.wmii/wmiirc_local if you want only basic customization such as fonts, colors etc.<br />
<br />
For earlier versions,<br />
mkdir ~/.wmii/wmii-$VERSION<br />
cp /etc/wmii/wmiirc ~/.wmii/wmii-$VERSION/<br />
<br />
By editing this file, you can change things such as color, background, modkey, etc. Keep in mind that wmiirc uses tabbed indentation in case your editor of choice is configured to only produce spaces. Mixing the two indenting styles may cause unexpected behavior.<br />
===Configuration Variables===<br />
# Configuration Variables<br />
MODKEY=Mod1<br />
UP=k<br />
DOWN=j<br />
LEFT=h<br />
RIGHT=l<br />
Change Mod1 to Mod4 if you want to use Windows key instead of Alt. You can also change h, j, k, l, if you like.<br />
<br />
===Window Colors===<br />
# Colors tuples: "<text> <background> <border>"<br />
WMII_NORMCOLORS='#ffffff #000000 #ffffff'<br />
WMII_FOCUSCOLORS='#ffffff #5c0000 #ffffff'<br />
<br />
WMII_BACKGROUND='#333333'<br />
WMII_FONT='fixed'<br />
Colors of unselected window are in NORMCOLORS variable. Colors of selected window are in FOCUSCOLOR variable. You can change the background color (if you use transparent terminal) with the WMII_BACKGROUND variable.<br />
<br />
<br />
==Usage==<br />
<br />
If you are not familiar with tiling WMs, it's not really easy to begin with it. You must learn a few basic hotkeys to launch programs and place or resize windows. It is a good idea to write the basic hotkeys on paper and stick these on your monitor until you memorize them. By default, the "Mod" key is Alt. Some default hotkeys are :<br />
* Mod+Enter -> Terminal<br />
* Mod+p -> wimenu : a menu appears, just type the beginning of the name of the application <br />
to open it.<br />
* Mod+d -> default layout : windows are divided on screen<br />
* Mod+s -> stacked layout : the selected window take all the screen, we just see the title <br />
bar of the others.<br />
* Mod+j -> select the window below<br />
* Mod+k -> select the window above<br />
* Shift+Mod+j -> move the window down<br />
* Shift+Mod+k -> move the window up<br />
* Mod+a -> Actions menu : choose "quit" to quit<br />
<br />
N.B. For commonly used programs you can make use of ''history.progs'', Mod+p and up/down arrow keys to select previous entries.<br />
<br />
<br />
By default, only one column is used by the desktop (i.e. the entire screen). It's possible to use several columns with h and l :<br />
<br />
* Mod+Shift+h : move the selected window left<br />
* Mod+Shift+l : move the selected window right<br />
* Mod+h : select the column on the left<br />
* Mod+l : select the column on the right <br />
<br />
Columns are created automatically, with your placements of the windows. You can make them bigger or smaller, clicking beetween two columns.<br />
<br />
===Layouts===<br />
<br />
You begin in "default" layout : all windows take the same space. You can make them bigger or smaller by clicking in the little square in the title bar of a window.<br />
<br />
* "stacked" layout (Mod+s) : the selected window takes the entire column, but you can see <br />
the title bar of other windows.<br />
* "maximum" layout (Mod+m) : the selected window takes the entire column, you do not see <br />
other windows.<br />
* "fullscreen" layout (Mod+f) : the selected window takes runs in full screen.<br />
<br />
If you tend to use multiple clients in stacked view then binding the following allows you to remove all the title bars apart from the one you are viewing, regaining screen estate.<br />
Each client will be numbered in the top right with 1/3, 2/3 etc. <br />
Mod + s or Mod + d will return the view to standard layouts.<br />
* fn Key-$MODKEY-x {wmiir xwrite /tag/sel/ctl colmode sel +max} # rc.wmii.local version<br />
* Key $MODKEY-x<br />
wmiir xwrite /tag/sel/ctl colmode sel +max # wmiirc version<br />
<br />
====Floating layout====<br />
<br />
You can place your windows like a classic window manager. It's called floating layout. It's useful for some applications, like the Gimp, mplayer, vlc etc.<br />
<br />
* Mod+Shift+Space : Move selected window in floating layout.<br />
* Mod+Space : switch between floating layout and normal layout. <br />
<br />
In the floating layout, we can select a window with Mod+j and Mod+k. We can change dimensions of the window, by dragging, like in any other window manager. But we can use hotkeys for that as well :<br />
<br />
* Mod+Left click : move window<br />
* Mod+Right click : change dimensions of the window (you can use it in other layouts too)<br />
<br />
===Views and Tagging===<br />
Tagging in wmii is very similar to the concept of virtual desktops in other window managers. However, tagging is slightly more powerful because it makes it very easy to group windows in multiple ways concurrently. This is made possible by the fact that WMII easily allows each window to have multiple tags. This allows you to group applications for specific use cases and easily switch between them without having to tear down your previous environment by sending applications to another "Desktop".<br />
<br />
By default, when you first start up wmii you will see the word 'nil' in the lower left corner. You are at the 'nil' view. The first application you start (such as a terminal: Mod+Enter) will automatically be tagged with a "1" and you will be automatically switched to view "1". Views can be navigated or changed with built in keybindings:<br />
<br />
* Mod+Shift+2 : tag selected window to view "2"<br />
* Mod+2 : this switches you to view "2" where you can see all windows tagged with "2"<br />
<br />
It's the same thing for all numbers, from 0 to 9. But you can also use names :<br />
<br />
* Mod+t : views menu : you can select a tag with right and left keys, or type the name <br />
of the tag (or just a part of the name, if it was created).<br />
<br />
* Mod+Shift+t : this retags the currently selected window with whatever you type into <br />
the menu.<br />
<br />
* N.B If using plan9port a ''history.tags'' file is generated in .wmii-*/. You can use <br />
up/down arrow keys to recall previous entries for simple re-tagging/window viewing.<br />
<br />
You can tag windows with multiple views by using a '+' between the tag names :<br />
<br />
* Mod+Shift+t foo+bar+2 : this tags the currently selected window to the views "foo",<br />
"bar" and "2".<br />
You can remove a single tag from multi-tagged windows by selecting the one you wish to remove<br />
and using Mod+Shift+t, -tag ''name/number'' ie<br />
Urxvt is multi-tagged on views 1 2 3 and 4, if you jumped to 3 and typed exit, all instances of<br />
urxvt will be terminated, using Mod+Shift+t, -3 will only remove that single view.<br />
<br />
Tags can be set for specific applications in the wmiirc configuration file.<br />
<br />
# Tagging Rules<br />
wmiir write /tagrules <<!<br />
/Firefox.*/ -> ~+2<br />
/Gimp.*/ -> ~+3<br />
/.*/ -> sel<br />
/.*/ -> 1<br />
!<br />
<br />
With the above tag rules, firefox starts in floating mode (~) on view "2". Gimp starts in floating mode on view "3".<br />
<br />
{{Box Note | Applications need to spawn an X-window in order to be automatically assigned tags. Therefore, in order to launch your terminal based programs you will need to prepend something like ''urxvt -e <program>'' if want to make use of this feature.}}<br />
<br />
==WMII filesystem==<br />
<br />
WMII's filesystem is based on the [http://9p.cat-v.org 9P protocol]. Every element (windows, statusbar, ...) is represented as a file. This makes several cool things possible. For example you can display the song you're currently listening to in the statusbar (for example with MPD and MPC).<br />
<br />
{{Box Note|This filesystem is not permanent and you have to set up everything again after reboot. To make your changes "permanent" simply write the right commands into your wmiirc.}}<br />
<br />
You can access the filesystem with the ''wmiir'' command. For instance, you can list the root directory with ''wmiir ls /''<br />
<br />
client/<br />
colrules<br />
ctl<br />
event<br />
keys<br />
lbar/<br />
rbar/<br />
tag/<br />
tagrules<br />
<br />
You can use ''wmiir read'' to look into files: ''wmiir read /tag/sel/index''<br />
<br />
# ~ 1280 785<br />
~ 0x160000d 731 394 486 332 xterm:XTerm:~<br />
# 1 0 1280<br />
1 0x800003 0 785 opera:Opera:Editing Wmii - Preview - ArchWiki - Opera<br />
<br />
So this is the info for the '''sel'''ected (current) tag. As you can see, I've got one floating xterm and Opera running on this tag. The first number in this output indicates the column of the window. ~ is the floating column and 1 ist (obviously) the first column. The second column is the XServer-ID for the client. The next columns are the coordinates and the size of the window. The last column ist the titlebar of the window.<br />
<br />
You can create new files with ''wmiir create'':<br />
<br />
echo Arch is best | wmiir create /rbar/arch<br />
<br />
Now you should see "Arch is best" in your statusbar<br />
<br />
"wmiir create" reads from STDIN. So you can pipe any information you like into your statusbar. "wmiir write" works in a similar fashion but doesn't create new files.<br />
<br />
{{Box Note|Note for /rbar and /lbar:The elements in those status bars are in alphabetical order.}}<br />
<br />
You can remove files with rm or remove<br />
<br />
If you like to have a program on several tags you can use:<br />
echo "3+5+8" | wmiir write /client/0x800003/tags<br />
<br />
Now my Opera window appears on Tags 3,5 and 8.<br />
<br />
But there are easier ways to accomplish this ;)<br />
Just type MOD+shift+t and enter "3+5+8" and you get the same result for the currently selected client.<br />
<br />
{{Box Note| There's also the possibility to mount WMII's filesystem. Have a look at the [http://wmii.suckless.org/9p official documentation]. }}<br />
<br />
==Other nice stuff==<br />
<br />
=== Laptop Status Bar===<br />
<br />
If you are using wmii on a laptop, it may be convenient to display items such as wireless quality, remaining battery time, and load averages in the status bar; the script below requires you to install acpi and gawk:<br />
pacman -S acpi gawk''<br />
<pre style='overflow:auto'><br />
# Status Bar Info<br />
status() {<br />
echo -n ' Wlan0:' $(iwconfig wlan0 | awk '/Quality/{print $2}' | sed 's/.*=//' | awk -F"/" '{printf("%.0f%%", $1/$2*100)}') '| Bat:' $(acpi -b | sed -n 's/.*\([0-9][0-9]:[0-9][0-9]\):[0-9][0-9].*/\1/p') '|' $(uptime | sed 's/.*: //; s/,//g') '|' $(date '+%c')<br />
}<br />
</pre><br />
By default the status bar only shows date and an uptime pager (displays system load average for the last 1, 5, 15 minutes).<br />
<br />
=== Conky Replacement Status Bar===<br />
<br />
Similar to the above status() function any user can essentially replace the functions of the conky system monitor by using the wmii status bar. Below is an example of such to show CPU and GPU temperatures, CPU speeds, /home and / partition sizes, RAM used, system load averages and date/time:<br />
<pre style='overflow:auto'><br />
# Status Bar Info<br />
status() {<br />
echo -n 'CPUTemp:' `expr $(sensors | grep temp1 | awk '{print $2}' | cut -c2-3) + 15` '|' 'GPUTemp:' $(nvidia-settings -q=GPUCoreTemp | grep eagle | awk '{print $4}' | cut -c1-2 ) '|' 'CPUMHz:' $(cat /proc/cpuinfo | grep MHz | awk '{printf "%.0f\n", $4}') '|' '/home:' $(df -h | grep sda5 | awk '{print $3}') '|' '/:' $(df -h | grep sda1 | awk '{print $3}') '|' 'RAM:' $(free -m | grep -i /cache | awk '{print $3}') 'MB |' $(uptime | sed 's/.*://; s/,//g') '|' $(date +"%a %b %d %H:%M")<br />
}<br />
</pre><br />
By judicious use of the info available from common Linux system commands, the /proc filesystem and GNU tools such as grep, awk, sed and cut you can create a highly informational wmii status bar. Note that the above is specific to the author's computer and will have to be edited to suit.<br />
<br />
===Terminal Title===<br />
If you would like to display the current directory in your terminal emulator's titlebar, add this to your .bashrc<br />
WMII_IS_RUNNING=`ps a | grep wmii | awk '/[^"grep"] wmii$/'`<br />
if [ -n "$WMII_IS_RUNNING" ]; then<br />
PROMPT_COMMAND='dirs | wmiir write /client/sel/label'<br />
fi<br />
With this you can shorten you shell prompt and have more horizontal space to type. This test prevents you from getting a "WMII_ADRESS not set" error when you spawn a console.<br />
<br />
===Weechat Highlight Notification===<br />
If you use weechat and want to know when you have been messaged without always having to look at the weechat window, you can use the ''launcher.pl'' plugin to send a notice to the bar. To get this working, you will need to create a script that sends your desired notice. Here is very simple example:<br />
<br />
#!/bin/bash<br />
echo :: NEW MESSAGE :: | wmiir create /lbar/alert<br />
sleep 8<br />
wmiir remove /lbar/alert<br />
<br />
Then start weechat and load the plugin.<br />
<br />
/perl load launcher.pl<br />
<br />
Then type the following command into weechat:<br />
<br />
/set plugins.var.perl.launcher.signal.weechat_pv = "/path/to/yourscript"<br />
<br />
<br />
Now, :: NEW MESSAGE :: will appear in the left corner of your bar whenever you have a message highlight. Make sure to place ''launcher.pl'' the perl/autoload directory so that it starts when weechat starts.<br />
<br />
===Mod4 on an old Thinkpad===<br />
<br />
Although Wmii defaults to Mod1, using Mod4 reduces conflicts in keybindings with many terminal applications. There is a snag for old Thinkpad users, however. They do not have a Mod4 key. To get one, another key has to be assigned to it using xmodmap. To do it, make an ''.Xmodmap'' file in your home directory and add this to it:<br />
keycode 64 = Super_L<br />
add Mod4 = Super_L<br />
remove Mod1 = Super_L<br />
<br />
You will need to replace 64 with whatever ''xev'' tells you is the keycode of the key you want to replace. In the above example, I replace left Alt (and use right alt for applications).<br />
<br />
===Nice fonts===<br />
Wmii now supports Xft, just prefix font name with 'xft'. For instance:<br />
export WMII_FONT='xft:Sans-9'<br />
<br />
===Keyboard layouts===<br />
You'd probably like to have its own keyboard layout for each window. However, most of such applications requires system tray while witray is only available in the [http://aur.archlinux.org/packages.php?ID=3497 development version of wmii]. [http://www.archlinux.org/packages/?q=xxkb xxkb] package helps to solve the problem. It has no UI by default. You only need to configure layouts in xorg.conf. Create /etc/X11/xorg.conf.d/20-keyboard.conf and put something like this into it:<br />
Section "InputClass"<br />
Identifier "Keyboard Defaults"<br />
MatchIsKeyboard "yes"<br />
Option "XkbModel" "pc101"<br />
Option "XkbLayout" "us,ru"<br />
Option "XkbOptions" "grp:ctrl_shift_toggle,compose:prsc"<br />
EndSection<br />
Replace layout, options and model to fit your needs. Add<br />
xxkb &<br />
into your wmiirc and it just works.<br />
[http://aur.archlinux.org/packages.php?ID=33298 xkblayout-state] can be used to put layout indicator into the status line:<br />
status() {<br />
echo -n label $(xkblayout-state print "%s") '|' $(date +"%a %b %d %H:%M")<br />
}<br />
<br />
===Note: Version 3.9.2-1===<br />
<br />
If you upgrade from wmii v3.6-4 to v3.9.2-1 you will have to insert any changes you made to your old ~/.wmii-3.5/wmiirc configuration file into the newer config file located at ~/.wmii/wmiirc_local. Note also that there are some slight format and variable name changes between the newer and older versions of /etc/wmii/wmiirc.<br />
<br />
This latest version has some significant enhancements such as easier window dimension changes with the mouse and better handling of small floating windows launched from tiled applications (especially OpenOffice).<br />
<br />
==Other Resources==<br />
* [http://wmii.suckless.org/ wmii] -- the official website of wmii<br />
* [[dmenu]] -- a simple application launcher which binds well with dwm and wmii<br />
* [http://wmii.googlecode.com/hg/doc/wmii.pdf user guide] -- latest wmii guide (pdf)<br />
* [http://eigenclass.org/hiki.rb?wmii+ruby ruby-wmii] -- Ruby configuration and scripting for wmii 3.1<br />
* [https://github.com/sunaku/wmiirc sunaku's wmiirc] -- Ruby configuration and scripting for wmii 3.9+ and wmii-hg<br />
* [http://pastebin.com/Xyn0mEjr Ben's wmiirc] -- Simple wmiirc with extra widgets (vol, mpd, mail, clock) and other modifications</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Wmii&diff=176356Wmii2011-12-31T22:56:52Z<p>Lagagnon: /* Conky Replacement Status Bar */</p>
<hr />
<div>[[Category:Dynamic WMs (English)]]<br />
{{i18n|Wmii}}{{DISPLAYTITLE:wmii}}<br />
<br />
[http://www.suckless.org/wmii/ wmii] (window manager improved 2) is a dynamic window manager for X11. It supports classic and dynamic window management with extended keyboard, mouse, and filesystem based remote control. It replaces the workspace paradigm with a new tagging approach. <br />
<br />
The following tips are intended to help the user get started with wmii. While wmii can be configured in almost any language, this article will focus on using the '''wmiirc''' configuration file, which is simply a shell script. Please see the [[ruby-wmii]] article to see how to configure wmii in ruby.<br />
<br />
==Installation==<br />
wmii is available from the '''extra''' repository. You can install it by issuing the following command:<br />
<br />
pacman -S wmii<br />
<br />
Alternatively, you can get the [http://aur.archlinux.org/packages.php?ID=3497 latest development version] which is available from the [[AUR]].<br />
<br />
Next you will need to edit your '''~/.xinitrc''' to enable you to start wmii with '''startx''':<br />
<br />
exec wmii<br />
<br />
To allow for starting wmii without logging off or killing the X session, add the following in the ~/.xinitrc<br />
until wmii; do<br />
true<br />
done<br />
Upon your first login, you will be greeted with the wmii welcome message, which also includes a short tutorial on wmii. Completing this tutorial will give you a good idea on how wmii works.<br />
{{Box Note|If the welcome message does not show up, make sure you have '''xmessage''' installed from the '''xorg-xmessage''' package. Then you can read the welcome by pressing $MODKEY-a and selecting 'welcome'.}}<br />
<br />
==Configuration==<br />
The easiest way to start configuring wmii, is to copy the default wmiirc file to your home directory and changing it to your needs. For version 3.9,<br />
mkdir ~/.wmii<br />
cp /etc/wmii/wmiirc ~/.wmii/<br />
<br />
Or just create ~/.wmii/wmiirc_local if you want only basic customization such as fonts, colors etc.<br />
<br />
For earlier versions,<br />
mkdir ~/.wmii/wmii-$VERSION<br />
cp /etc/wmii/wmiirc ~/.wmii/wmii-$VERSION/<br />
<br />
By editing this file, you can change things such as color, background, modkey, etc. Keep in mind that wmiirc uses tabbed indentation in case your editor of choice is configured to only produce spaces. Mixing the two indenting styles may cause unexpected behavior.<br />
====Configuration Variables====<br />
# Configuration Variables<br />
MODKEY=Mod1<br />
UP=k<br />
DOWN=j<br />
LEFT=h<br />
RIGHT=l<br />
Change Mod1 to Mod4 if you want to use Windows key instead of Alt. You can also change h, j, k, l, if you like.<br />
<br />
====Window Colors====<br />
# Colors tuples: "<text> <background> <border>"<br />
WMII_NORMCOLORS='#ffffff #000000 #ffffff'<br />
WMII_FOCUSCOLORS='#ffffff #5c0000 #ffffff'<br />
<br />
WMII_BACKGROUND='#333333'<br />
WMII_FONT='fixed'<br />
Colors of unselected window are in NORMCOLORS variable. Colors of selected window are in FOCUSCOLOR variable. You can change the background color (if you use transparent terminal) with the WMII_BACKGROUND variable.<br />
<br />
==== Laptop Status Bar====<br />
<br />
If you are using wmii on a laptop, it may be convenient to display items such as wireless quality, remaining battery time, and load averages in the status bar; the script below requires you to install acpi and gawk:<br />
pacman -S acpi gawk''<br />
<pre style='overflow:auto'><br />
# Status Bar Info<br />
status() {<br />
echo -n ' Wlan0:' $(iwconfig wlan0 | awk '/Quality/{print $2}' | sed 's/.*=//' | awk -F"/" '{printf("%.0f%%", $1/$2*100)}') '| Bat:' $(acpi -b | sed -n 's/.*\([0-9][0-9]:[0-9][0-9]\):[0-9][0-9].*/\1/p') '|' $(uptime | sed 's/.*: //; s/,//g') '|' $(date '+%c')<br />
}<br />
</pre><br />
By default the status bar only shows date and an uptime pager (displays system load average for the last 1, 5, 15 minutes).<br />
<br />
==== Conky Replacement Status Bar====<br />
<br />
Similar to the above status() function any user can essentially replace the functions of the conky system monitor by using the wmii status bar. Below is an example of such to show CPU and GPU temperatures, CPU speeds, /home and / partition sizes, RAM used, system load averages and date/time:<br />
<pre style='overflow:auto'><br />
# Status Bar Info<br />
status() {<br />
echo -n 'CPUTemp:' `expr $(sensors | grep temp1 | awk '{print $2}' | cut -c2-3) + 15` '|' 'GPUTemp:' $(nvidia-settings -q=GPUCoreTemp | grep eagle | awk '{print $4}' | cut -c1-2 ) '|' 'CPUMHz:' $(cat /proc/cpuinfo | grep MHz | awk '{printf "%.0f\n", $4}') '|' '/home:' $(df -h | grep sda5 | awk '{print $3}') '|' '/:' $(df -h | grep sda1 | awk '{print $3}') '|' 'RAM:' $(free -m | grep -i /cache | awk '{print $3}') 'MB |' $(uptime | sed 's/.*://; s/,//g') '|' $(date +"%a %b %d %H:%M")<br />
}<br />
</pre><br />
By judicious use of the info available from common Linux system commands, the /proc filesystem and GNU tools such as grep, awk, sed and cut you can create a highly informational wmii status bar. Note that the above is specific to the author's computer and will have to be edited to suit.<br />
<br />
==Usage==<br />
<br />
If you are not familiar with tiling WMs, it's not really easy to begin with it. You must learn a few basic hotkeys to launch programs and place or resize windows. It is a good idea to write the basic hotkeys on paper and stick these on your monitor until you memorize them. By default, the "Mod" key is Alt. Some default hotkeys are :<br />
* Mod+Enter -> Terminal<br />
* Mod+p -> wimenu : a menu appears, just type the beginning of the name of the application <br />
to open it.<br />
* Mod+d -> default layout : windows are divided on screen<br />
* Mod+s -> stacked layout : the selected window take all the screen, we just see the title <br />
bar of the others.<br />
* Mod+j -> select the window below<br />
* Mod+k -> select the window above<br />
* Shift+Mod+j -> move the window down<br />
* Shift+Mod+k -> move the window up<br />
* Mod+a -> Actions menu : choose "quit" to quit<br />
<br />
N.B. For commonly used programs you can make use of ''history.progs'', Mod+p and up/down arrow keys to select previous entries.<br />
<br />
<br />
By default, only one column is used by the desktop (i.e. the entire screen). It's possible to use several columns with h and l :<br />
<br />
* Mod+Shift+h : move the selected window left<br />
* Mod+Shift+l : move the selected window right<br />
* Mod+h : select the column on the left<br />
* Mod+l : select the column on the right <br />
<br />
Columns are created automatically, with your placements of the windows. You can make them bigger or smaller, clicking beetween two columns.<br />
<br />
===Layouts===<br />
<br />
You begin in "default" layout : all windows take the same space. You can make them bigger or smaller by clicking in the little square in the title bar of a window.<br />
<br />
* "stacked" layout (Mod+s) : the selected window takes the entire column, but you can see <br />
the title bar of other windows.<br />
* "maximum" layout (Mod+m) : the selected window takes the entire column, you do not see <br />
other windows.<br />
* "fullscreen" layout (Mod+f) : the selected window takes runs in full screen.<br />
<br />
If you tend to use multiple clients in stacked view then binding the following allows you to remove all the title bars apart from the one you are viewing, regaining screen estate.<br />
Each client will be numbered in the top right with 1/3, 2/3 etc. <br />
Mod + s or Mod + d will return the view to standard layouts.<br />
* fn Key-$MODKEY-x {wmiir xwrite /tag/sel/ctl colmode sel +max} # rc.wmii.local version<br />
* Key $MODKEY-x<br />
wmiir xwrite /tag/sel/ctl colmode sel +max # wmiirc version<br />
<br />
====Floating layout====<br />
<br />
You can place your windows like a classic window manager. It's called floating layout. It's useful for some applications, like the Gimp, mplayer, vlc etc.<br />
<br />
* Mod+Shift+Space : Move selected window in floating layout.<br />
* Mod+Space : switch between floating layout and normal layout. <br />
<br />
In the floating layout, we can select a window with Mod+j and Mod+k. We can change dimensions of the window, by dragging, like in any other window manager. But we can use hotkeys for that as well :<br />
<br />
* Mod+Left click : move window<br />
* Mod+Right click : change dimensions of the window (you can use it in other layouts too)<br />
<br />
===Views and Tagging===<br />
Tagging in wmii is very similar to the concept of virtual desktops in other window managers. However, tagging is slightly more powerful because it makes it very easy to group windows in multiple ways concurrently. This is made possible by the fact that WMII easily allows each window to have multiple tags. This allows you to group applications for specific use cases and easily switch between them without having to tear down your previous environment by sending applications to another "Desktop".<br />
<br />
By default, when you first start up wmii you will see the word 'nil' in the lower left corner. You are at the 'nil' view. The first application you start (such as a terminal: Mod+Enter) will automatically be tagged with a "1" and you will be automatically switched to view "1". Views can be navigated or changed with built in keybindings:<br />
<br />
* Mod+Shift+2 : tag selected window to view "2"<br />
* Mod+2 : this switches you to view "2" where you can see all windows tagged with "2"<br />
<br />
It's the same thing for all numbers, from 0 to 9. But you can also use names :<br />
<br />
* Mod+t : views menu : you can select a tag with right and left keys, or type the name <br />
of the tag (or just a part of the name, if it was created).<br />
<br />
* Mod+Shift+t : this retags the currently selected window with whatever you type into <br />
the menu.<br />
<br />
* N.B If using plan9port a ''history.tags'' file is generated in .wmii-*/. You can use <br />
up/down arrow keys to recall previous entries for simple re-tagging/window viewing.<br />
<br />
You can tag windows with multiple views by using a '+' between the tag names :<br />
<br />
* Mod+Shift+t foo+bar+2 : this tags the currently selected window to the views "foo",<br />
"bar" and "2".<br />
You can remove a single tag from multi-tagged windows by selecting the one you wish to remove<br />
and using Mod+Shift+t, -tag ''name/number'' ie<br />
Urxvt is multi-tagged on views 1 2 3 and 4, if you jumped to 3 and typed exit, all instances of<br />
urxvt will be terminated, using Mod+Shift+t, -3 will only remove that single view.<br />
<br />
Tags can be set for specific applications in the wmiirc configuration file.<br />
<br />
# Tagging Rules<br />
wmiir write /tagrules <<!<br />
/Firefox.*/ -> ~+2<br />
/Gimp.*/ -> ~+3<br />
/.*/ -> sel<br />
/.*/ -> 1<br />
!<br />
<br />
With the above tag rules, firefox starts in floating mode (~) on view "2". Gimp starts in floating mode on view "3".<br />
<br />
{{Box Note | Applications need to spawn an X-window in order to be automatically assigned tags. Therefore, in order to launch your terminal based programs you will need to prepend something like ''urxvt -e <program>'' if want to make use of this feature.}}<br />
<br />
==WMII filesystem==<br />
<br />
WMII's filesystem is based on the [http://9p.cat-v.org 9P protocol]. Every element (windows, statusbar, ...) is represented as a file. This makes several cool things possible. For example you can display the song you're currently listening to in the statusbar (for example with MPD and MPC).<br />
<br />
{{Box Note|This filesystem is not permanent and you have to set up everything again after reboot. To make your changes "permanent" simply write the right commands into your wmiirc.}}<br />
<br />
You can access the filesystem with the ''wmiir'' command. For instance, you can list the root directory with ''wmiir ls /''<br />
<br />
client/<br />
colrules<br />
ctl<br />
event<br />
keys<br />
lbar/<br />
rbar/<br />
tag/<br />
tagrules<br />
<br />
You can use ''wmiir read'' to look into files: ''wmiir read /tag/sel/index''<br />
<br />
# ~ 1280 785<br />
~ 0x160000d 731 394 486 332 xterm:XTerm:~<br />
# 1 0 1280<br />
1 0x800003 0 785 opera:Opera:Editing Wmii - Preview - ArchWiki - Opera<br />
<br />
So this is the info for the '''sel'''ected (current) tag. As you can see, I've got one floating xterm and Opera running on this tag. The first number in this output indicates the column of the window. ~ is the floating column and 1 ist (obviously) the first column. The second column is the XServer-ID for the client. The next columns are the coordinates and the size of the window. The last column ist the titlebar of the window.<br />
<br />
You can create new files with ''wmiir create'':<br />
<br />
echo Arch is best | wmiir create /rbar/arch<br />
<br />
Now you should see "Arch is best" in your statusbar<br />
<br />
"wmiir create" reads from STDIN. So you can pipe any information you like into your statusbar. "wmiir write" works in a similar fashion but doesn't create new files.<br />
<br />
{{Box Note|Note for /rbar and /lbar:The elements in those status bars are in alphabetical order.}}<br />
<br />
You can remove files with rm or remove<br />
<br />
If you like to have a program on several tags you can use:<br />
echo "3+5+8" | wmiir write /client/0x800003/tags<br />
<br />
Now my Opera window appears on Tags 3,5 and 8.<br />
<br />
But there are easier ways to accomplish this ;)<br />
Just type MOD+shift+t and enter "3+5+8" and you get the same result for the currently selected client.<br />
<br />
{{Box Note| There's also the possibility to mount WMII's filesystem. Have a look at the [http://wmii.suckless.org/9p official documentation]. }}<br />
<br />
==Other nice stuff==<br />
<br />
===Terminal Title===<br />
If you would like to display the current directory in your terminal emulator's titlebar, add this to your .bashrc<br />
WMII_IS_RUNNING=`ps a | grep wmii | awk '/[^"grep"] wmii$/'`<br />
if [ -n "$WMII_IS_RUNNING" ]; then<br />
PROMPT_COMMAND='dirs | wmiir write /client/sel/label'<br />
fi<br />
With this you can shorten you shell prompt and have more horizontal space to type. This test prevents you from getting a "WMII_ADRESS not set" error when you spawn a console.<br />
<br />
===Weechat Highlight Notification===<br />
If you use weechat and want to know when you have been messaged without always having to look at the weechat window, you can use the ''launcher.pl'' plugin to send a notice to the bar. To get this working, you will need to create a script that sends your desired notice. Here is very simple example:<br />
<br />
#!/bin/bash<br />
echo :: NEW MESSAGE :: | wmiir create /lbar/alert<br />
sleep 8<br />
wmiir remove /lbar/alert<br />
<br />
Then start weechat and load the plugin.<br />
<br />
/perl load launcher.pl<br />
<br />
Then type the following command into weechat:<br />
<br />
/set plugins.var.perl.launcher.signal.weechat_pv = "/path/to/yourscript"<br />
<br />
<br />
Now, :: NEW MESSAGE :: will appear in the left corner of your bar whenever you have a message highlight. Make sure to place ''launcher.pl'' the perl/autoload directory so that it starts when weechat starts.<br />
<br />
===Mod4 on an old Thinkpad===<br />
<br />
Although Wmii defaults to Mod1, using Mod4 reduces conflicts in keybindings with many terminal applications. There is a snag for old Thinkpad users, however. They do not have a Mod4 key. To get one, another key has to be assigned to it using xmodmap. To do it, make an ''.Xmodmap'' file in your home directory and add this to it:<br />
keycode 64 = Super_L<br />
add Mod4 = Super_L<br />
remove Mod1 = Super_L<br />
<br />
You will need to replace 64 with whatever ''xev'' tells you is the keycode of the key you want to replace. In the above example, I replace left Alt (and use right alt for applications).<br />
<br />
===Nice fonts===<br />
Wmii now supports Xft, just prefix font name with 'xft'. For instance:<br />
export WMII_FONT='xft:Sans-9'<br />
<br />
===Keyboard layouts===<br />
You'd probably like to have its own keyboard layout for each window. However, most of such applications requires system tray while witray is only available in the [http://aur.archlinux.org/packages.php?ID=3497 development version of wmii]. [http://www.archlinux.org/packages/?q=xxkb xxkb] package helps to solve the problem. It has no UI by default. You only need to configure layouts in xorg.conf. Create /etc/X11/xorg.conf.d/20-keyboard.conf and put something like this into it:<br />
Section "InputClass"<br />
Identifier "Keyboard Defaults"<br />
MatchIsKeyboard "yes"<br />
Option "XkbModel" "pc101"<br />
Option "XkbLayout" "us,ru"<br />
Option "XkbOptions" "grp:ctrl_shift_toggle,compose:prsc"<br />
EndSection<br />
Replace layout, options and model to fit your needs. Add<br />
xxkb &<br />
into your wmiirc and it just works.<br />
[http://aur.archlinux.org/packages.php?ID=33298 xkblayout-state] can be used to put layout indicator into the status line:<br />
status() {<br />
echo -n label $(xkblayout-state print "%s") '|' $(date +"%a %b %d %H:%M")<br />
}<br />
<br />
===Note: Version 3.9.2-1===<br />
<br />
If you upgrade from wmii v3.6-4 to v3.9.2-1 you will have to insert any changes you made to your old ~/.wmii-3.5/wmiirc configuration file into the newer config file located at ~/.wmii/wmiirc_local. Note also that there are some slight format and variable name changes between the newer and older versions of /etc/wmii/wmiirc.<br />
<br />
This latest version has some significant enhancements such as easier window dimension changes with the mouse and better handling of small floating windows launched from tiled applications (especially OpenOffice).<br />
<br />
==Other Resources==<br />
* [http://wmii.suckless.org/ wmii] -- the official website of wmii<br />
* [[dmenu]] -- a simple application launcher which binds well with dwm and wmii<br />
* [http://wmii.googlecode.com/hg/doc/wmii.pdf user guide] -- latest wmii guide (pdf)<br />
* [http://eigenclass.org/hiki.rb?wmii+ruby ruby-wmii] -- Ruby configuration and scripting for wmii 3.1<br />
* [https://github.com/sunaku/wmiirc sunaku's wmiirc] -- Ruby configuration and scripting for wmii 3.9+ and wmii-hg<br />
* [http://pastebin.com/Xyn0mEjr Ben's wmiirc] -- Simple wmiirc with extra widgets (vol, mpd, mail, clock) and other modifications</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Wmii&diff=176354Wmii2011-12-31T22:39:12Z<p>Lagagnon: /* For Laptop Users */</p>
<hr />
<div>[[Category:Dynamic WMs (English)]]<br />
{{i18n|Wmii}}{{DISPLAYTITLE:wmii}}<br />
<br />
[http://www.suckless.org/wmii/ wmii] (window manager improved 2) is a dynamic window manager for X11. It supports classic and dynamic window management with extended keyboard, mouse, and filesystem based remote control. It replaces the workspace paradigm with a new tagging approach. <br />
<br />
The following tips are intended to help the user get started with wmii. While wmii can be configured in almost any language, this article will focus on using the '''wmiirc''' configuration file, which is simply a shell script. Please see the [[ruby-wmii]] article to see how to configure wmii in ruby.<br />
<br />
==Installation==<br />
wmii is available from the '''extra''' repository. You can install it by issuing the following command:<br />
<br />
pacman -S wmii<br />
<br />
Alternatively, you can get the [http://aur.archlinux.org/packages.php?ID=3497 latest development version] which is available from the [[AUR]].<br />
<br />
Next you will need to edit your '''~/.xinitrc''' to enable you to start wmii with '''startx''':<br />
<br />
exec wmii<br />
<br />
To allow for starting wmii without logging off or killing the X session, add the following in the ~/.xinitrc<br />
until wmii; do<br />
true<br />
done<br />
Upon your first login, you will be greeted with the wmii welcome message, which also includes a short tutorial on wmii. Completing this tutorial will give you a good idea on how wmii works.<br />
{{Box Note|If the welcome message does not show up, make sure you have '''xmessage''' installed from the '''xorg-xmessage''' package. Then you can read the welcome by pressing $MODKEY-a and selecting 'welcome'.}}<br />
<br />
==Configuration==<br />
The easiest way to start configuring wmii, is to copy the default wmiirc file to your home directory and changing it to your needs. For version 3.9,<br />
mkdir ~/.wmii<br />
cp /etc/wmii/wmiirc ~/.wmii/<br />
<br />
Or just create ~/.wmii/wmiirc_local if you want only basic customization such as fonts, colors etc.<br />
<br />
For earlier versions,<br />
mkdir ~/.wmii/wmii-$VERSION<br />
cp /etc/wmii/wmiirc ~/.wmii/wmii-$VERSION/<br />
<br />
By editing this file, you can change things such as color, background, modkey, etc. Keep in mind that wmiirc uses tabbed indentation in case your editor of choice is configured to only produce spaces. Mixing the two indenting styles may cause unexpected behavior.<br />
====Configuration Variables====<br />
# Configuration Variables<br />
MODKEY=Mod1<br />
UP=k<br />
DOWN=j<br />
LEFT=h<br />
RIGHT=l<br />
Change Mod1 to Mod4 if you want to use Windows key instead of Alt. You can also change h, j, k, l, if you like.<br />
<br />
====Window Colors====<br />
# Colors tuples: "<text> <background> <border>"<br />
WMII_NORMCOLORS='#ffffff #000000 #ffffff'<br />
WMII_FOCUSCOLORS='#ffffff #5c0000 #ffffff'<br />
<br />
WMII_BACKGROUND='#333333'<br />
WMII_FONT='fixed'<br />
Colors of unselected window are in NORMCOLORS variable. Colors of selected window are in FOCUSCOLOR variable. You can change the background color (if you use transparent terminal) with the WMII_BACKGROUND variable.<br />
<br />
==== Laptop Status Bar====<br />
<br />
If you are using wmii on a laptop, it may be convenient to display items such as wireless quality, remaining battery time, and load averages in the status bar; the script below requires you to install acpi and gawk:<br />
pacman -S acpi gawk''<br />
<pre style='overflow:auto'><br />
# Status Bar Info<br />
status() {<br />
echo -n ' Wlan0:' $(iwconfig wlan0 | awk '/Quality/{print $2}' | sed 's/.*=//' | awk -F"/" '{printf("%.0f%%", $1/$2*100)}') '| Bat:' $(acpi -b | sed -n 's/.*\([0-9][0-9]:[0-9][0-9]\):[0-9][0-9].*/\1/p') '|' $(uptime | sed 's/.*: //; s/,//g') '|' $(date '+%c')<br />
}<br />
</pre><br />
By default the status bar only shows date and an uptime pager (displays system load average for the last 1, 5, 15 minutes).<br />
<br />
==== Conky Replacement Status Bar====<br />
<br />
Similar to the above status() function any user can essentially replace the functions of the conky system monitor by using the wmii status bar. Below is an example of such to show CPU and GPU temperatures, CPU speeds, /home and / partition sizes, RAM used, system load averages and date/time:<br />
<pre style='overflow:auto'><br />
# Status Bar Info<br />
status() {<br />
echo -n 'CPUTemp:' `expr $(sensors | grep temp1 | awk '{print $2}' | cut -c2-3) + 15` '|' 'GPUTemp:' $(nvidia-settings -q=GPUCoreTemp | grep eagle | awk '{print $4}' | cut -c1-2 ) '|' 'CPUMHz:' $(cat /proc/cpuinfo | grep MHz | awk '{printf "%.0f\n", $4}') '|' '/home:' $(df -h | grep sda5 | awk '{print $3}') '|' '/:' $(df -h | grep sda1 | awk '{print $3}') '|' 'RAM:' $(free -m | grep -i /cache | awk '{print $3}') 'MB |' $(uptime | sed 's/.*://; s/,//g') '|' $(date +"%a %b %d %H:%M")<br />
}<br />
</pre><br />
By judicious use of the info available from common Linux system commands plus GNU tools such as grep, awk, sed and cut you can create a highly informational wmii status bar.<br />
<br />
==Usage==<br />
<br />
If you are not familiar with tiling WMs, it's not really easy to begin with it. You must learn a few basic hotkeys to launch programs and place or resize windows. It is a good idea to write the basic hotkeys on paper and stick these on your monitor until you memorize them. By default, the "Mod" key is Alt. Some default hotkeys are :<br />
* Mod+Enter -> Terminal<br />
* Mod+p -> wimenu : a menu appears, just type the beginning of the name of the application <br />
to open it.<br />
* Mod+d -> default layout : windows are divided on screen<br />
* Mod+s -> stacked layout : the selected window take all the screen, we just see the title <br />
bar of the others.<br />
* Mod+j -> select the window below<br />
* Mod+k -> select the window above<br />
* Shift+Mod+j -> move the window down<br />
* Shift+Mod+k -> move the window up<br />
* Mod+a -> Actions menu : choose "quit" to quit<br />
<br />
N.B. For commonly used programs you can make use of ''history.progs'', Mod+p and up/down arrow keys to select previous entries.<br />
<br />
<br />
By default, only one column is used by the desktop (i.e. the entire screen). It's possible to use several columns with h and l :<br />
<br />
* Mod+Shift+h : move the selected window left<br />
* Mod+Shift+l : move the selected window right<br />
* Mod+h : select the column on the left<br />
* Mod+l : select the column on the right <br />
<br />
Columns are created automatically, with your placements of the windows. You can make them bigger or smaller, clicking beetween two columns.<br />
<br />
===Layouts===<br />
<br />
You begin in "default" layout : all windows take the same space. You can make them bigger or smaller by clicking in the little square in the title bar of a window.<br />
<br />
* "stacked" layout (Mod+s) : the selected window takes the entire column, but you can see <br />
the title bar of other windows.<br />
* "maximum" layout (Mod+m) : the selected window takes the entire column, you do not see <br />
other windows.<br />
* "fullscreen" layout (Mod+f) : the selected window takes runs in full screen.<br />
<br />
If you tend to use multiple clients in stacked view then binding the following allows you to remove all the title bars apart from the one you are viewing, regaining screen estate.<br />
Each client will be numbered in the top right with 1/3, 2/3 etc. <br />
Mod + s or Mod + d will return the view to standard layouts.<br />
* fn Key-$MODKEY-x {wmiir xwrite /tag/sel/ctl colmode sel +max} # rc.wmii.local version<br />
* Key $MODKEY-x<br />
wmiir xwrite /tag/sel/ctl colmode sel +max # wmiirc version<br />
<br />
====Floating layout====<br />
<br />
You can place your windows like a classic window manager. It's called floating layout. It's useful for some applications, like the Gimp, mplayer, vlc etc.<br />
<br />
* Mod+Shift+Space : Move selected window in floating layout.<br />
* Mod+Space : switch between floating layout and normal layout. <br />
<br />
In the floating layout, we can select a window with Mod+j and Mod+k. We can change dimensions of the window, by dragging, like in any other window manager. But we can use hotkeys for that as well :<br />
<br />
* Mod+Left click : move window<br />
* Mod+Right click : change dimensions of the window (you can use it in other layouts too)<br />
<br />
===Views and Tagging===<br />
Tagging in wmii is very similar to the concept of virtual desktops in other window managers. However, tagging is slightly more powerful because it makes it very easy to group windows in multiple ways concurrently. This is made possible by the fact that WMII easily allows each window to have multiple tags. This allows you to group applications for specific use cases and easily switch between them without having to tear down your previous environment by sending applications to another "Desktop".<br />
<br />
By default, when you first start up wmii you will see the word 'nil' in the lower left corner. You are at the 'nil' view. The first application you start (such as a terminal: Mod+Enter) will automatically be tagged with a "1" and you will be automatically switched to view "1". Views can be navigated or changed with built in keybindings:<br />
<br />
* Mod+Shift+2 : tag selected window to view "2"<br />
* Mod+2 : this switches you to view "2" where you can see all windows tagged with "2"<br />
<br />
It's the same thing for all numbers, from 0 to 9. But you can also use names :<br />
<br />
* Mod+t : views menu : you can select a tag with right and left keys, or type the name <br />
of the tag (or just a part of the name, if it was created).<br />
<br />
* Mod+Shift+t : this retags the currently selected window with whatever you type into <br />
the menu.<br />
<br />
* N.B If using plan9port a ''history.tags'' file is generated in .wmii-*/. You can use <br />
up/down arrow keys to recall previous entries for simple re-tagging/window viewing.<br />
<br />
You can tag windows with multiple views by using a '+' between the tag names :<br />
<br />
* Mod+Shift+t foo+bar+2 : this tags the currently selected window to the views "foo",<br />
"bar" and "2".<br />
You can remove a single tag from multi-tagged windows by selecting the one you wish to remove<br />
and using Mod+Shift+t, -tag ''name/number'' ie<br />
Urxvt is multi-tagged on views 1 2 3 and 4, if you jumped to 3 and typed exit, all instances of<br />
urxvt will be terminated, using Mod+Shift+t, -3 will only remove that single view.<br />
<br />
Tags can be set for specific applications in the wmiirc configuration file.<br />
<br />
# Tagging Rules<br />
wmiir write /tagrules <<!<br />
/Firefox.*/ -> ~+2<br />
/Gimp.*/ -> ~+3<br />
/.*/ -> sel<br />
/.*/ -> 1<br />
!<br />
<br />
With the above tag rules, firefox starts in floating mode (~) on view "2". Gimp starts in floating mode on view "3".<br />
<br />
{{Box Note | Applications need to spawn an X-window in order to be automatically assigned tags. Therefore, in order to launch your terminal based programs you will need to prepend something like ''urxvt -e <program>'' if want to make use of this feature.}}<br />
<br />
==WMII filesystem==<br />
<br />
WMII's filesystem is based on the [http://9p.cat-v.org 9P protocol]. Every element (windows, statusbar, ...) is represented as a file. This makes several cool things possible. For example you can display the song you're currently listening to in the statusbar (for example with MPD and MPC).<br />
<br />
{{Box Note|This filesystem is not permanent and you have to set up everything again after reboot. To make your changes "permanent" simply write the right commands into your wmiirc.}}<br />
<br />
You can access the filesystem with the ''wmiir'' command. For instance, you can list the root directory with ''wmiir ls /''<br />
<br />
client/<br />
colrules<br />
ctl<br />
event<br />
keys<br />
lbar/<br />
rbar/<br />
tag/<br />
tagrules<br />
<br />
You can use ''wmiir read'' to look into files: ''wmiir read /tag/sel/index''<br />
<br />
# ~ 1280 785<br />
~ 0x160000d 731 394 486 332 xterm:XTerm:~<br />
# 1 0 1280<br />
1 0x800003 0 785 opera:Opera:Editing Wmii - Preview - ArchWiki - Opera<br />
<br />
So this is the info for the '''sel'''ected (current) tag. As you can see, I've got one floating xterm and Opera running on this tag. The first number in this output indicates the column of the window. ~ is the floating column and 1 ist (obviously) the first column. The second column is the XServer-ID for the client. The next columns are the coordinates and the size of the window. The last column ist the titlebar of the window.<br />
<br />
You can create new files with ''wmiir create'':<br />
<br />
echo Arch is best | wmiir create /rbar/arch<br />
<br />
Now you should see "Arch is best" in your statusbar<br />
<br />
"wmiir create" reads from STDIN. So you can pipe any information you like into your statusbar. "wmiir write" works in a similar fashion but doesn't create new files.<br />
<br />
{{Box Note|Note for /rbar and /lbar:The elements in those status bars are in alphabetical order.}}<br />
<br />
You can remove files with rm or remove<br />
<br />
If you like to have a program on several tags you can use:<br />
echo "3+5+8" | wmiir write /client/0x800003/tags<br />
<br />
Now my Opera window appears on Tags 3,5 and 8.<br />
<br />
But there are easier ways to accomplish this ;)<br />
Just type MOD+shift+t and enter "3+5+8" and you get the same result for the currently selected client.<br />
<br />
{{Box Note| There's also the possibility to mount WMII's filesystem. Have a look at the [http://wmii.suckless.org/9p official documentation]. }}<br />
<br />
==Other nice stuff==<br />
<br />
===Terminal Title===<br />
If you would like to display the current directory in your terminal emulator's titlebar, add this to your .bashrc<br />
WMII_IS_RUNNING=`ps a | grep wmii | awk '/[^"grep"] wmii$/'`<br />
if [ -n "$WMII_IS_RUNNING" ]; then<br />
PROMPT_COMMAND='dirs | wmiir write /client/sel/label'<br />
fi<br />
With this you can shorten you shell prompt and have more horizontal space to type. This test prevents you from getting a "WMII_ADRESS not set" error when you spawn a console.<br />
<br />
===Weechat Highlight Notification===<br />
If you use weechat and want to know when you have been messaged without always having to look at the weechat window, you can use the ''launcher.pl'' plugin to send a notice to the bar. To get this working, you will need to create a script that sends your desired notice. Here is very simple example:<br />
<br />
#!/bin/bash<br />
echo :: NEW MESSAGE :: | wmiir create /lbar/alert<br />
sleep 8<br />
wmiir remove /lbar/alert<br />
<br />
Then start weechat and load the plugin.<br />
<br />
/perl load launcher.pl<br />
<br />
Then type the following command into weechat:<br />
<br />
/set plugins.var.perl.launcher.signal.weechat_pv = "/path/to/yourscript"<br />
<br />
<br />
Now, :: NEW MESSAGE :: will appear in the left corner of your bar whenever you have a message highlight. Make sure to place ''launcher.pl'' the perl/autoload directory so that it starts when weechat starts.<br />
<br />
===Mod4 on an old Thinkpad===<br />
<br />
Although Wmii defaults to Mod1, using Mod4 reduces conflicts in keybindings with many terminal applications. There is a snag for old Thinkpad users, however. They do not have a Mod4 key. To get one, another key has to be assigned to it using xmodmap. To do it, make an ''.Xmodmap'' file in your home directory and add this to it:<br />
keycode 64 = Super_L<br />
add Mod4 = Super_L<br />
remove Mod1 = Super_L<br />
<br />
You will need to replace 64 with whatever ''xev'' tells you is the keycode of the key you want to replace. In the above example, I replace left Alt (and use right alt for applications).<br />
<br />
===Nice fonts===<br />
Wmii now supports Xft, just prefix font name with 'xft'. For instance:<br />
export WMII_FONT='xft:Sans-9'<br />
<br />
===Keyboard layouts===<br />
You'd probably like to have its own keyboard layout for each window. However, most of such applications requires system tray while witray is only available in the [http://aur.archlinux.org/packages.php?ID=3497 development version of wmii]. [http://www.archlinux.org/packages/?q=xxkb xxkb] package helps to solve the problem. It has no UI by default. You only need to configure layouts in xorg.conf. Create /etc/X11/xorg.conf.d/20-keyboard.conf and put something like this into it:<br />
Section "InputClass"<br />
Identifier "Keyboard Defaults"<br />
MatchIsKeyboard "yes"<br />
Option "XkbModel" "pc101"<br />
Option "XkbLayout" "us,ru"<br />
Option "XkbOptions" "grp:ctrl_shift_toggle,compose:prsc"<br />
EndSection<br />
Replace layout, options and model to fit your needs. Add<br />
xxkb &<br />
into your wmiirc and it just works.<br />
[http://aur.archlinux.org/packages.php?ID=33298 xkblayout-state] can be used to put layout indicator into the status line:<br />
status() {<br />
echo -n label $(xkblayout-state print "%s") '|' $(date +"%a %b %d %H:%M")<br />
}<br />
<br />
===Note: Version 3.9.2-1===<br />
<br />
If you upgrade from wmii v3.6-4 to v3.9.2-1 you will have to insert any changes you made to your old ~/.wmii-3.5/wmiirc configuration file into the newer config file located at ~/.wmii/wmiirc_local. Note also that there are some slight format and variable name changes between the newer and older versions of /etc/wmii/wmiirc.<br />
<br />
This latest version has some significant enhancements such as easier window dimension changes with the mouse and better handling of small floating windows launched from tiled applications (especially OpenOffice).<br />
<br />
==Other Resources==<br />
* [http://wmii.suckless.org/ wmii] -- the official website of wmii<br />
* [[dmenu]] -- a simple application launcher which binds well with dwm and wmii<br />
* [http://wmii.googlecode.com/hg/doc/wmii.pdf user guide] -- latest wmii guide (pdf)<br />
* [http://eigenclass.org/hiki.rb?wmii+ruby ruby-wmii] -- Ruby configuration and scripting for wmii 3.1<br />
* [https://github.com/sunaku/wmiirc sunaku's wmiirc] -- Ruby configuration and scripting for wmii 3.9+ and wmii-hg<br />
* [http://pastebin.com/Xyn0mEjr Ben's wmiirc] -- Simple wmiirc with extra widgets (vol, mpd, mail, clock) and other modifications</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Fluxbox&diff=163420Fluxbox2011-10-03T15:24:25Z<p>Lagagnon: /* Menu Management */</p>
<hr />
<div>[[Category:Stacking WMs (English)]]<br />
{{i18n|Fluxbox}}<br />
[[fr:Fluxbox]]<br />
Fluxbox is yet another window manager for X11. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit and there are hundreds of fluxbox "styles" to make your desktop look great. ArchLinux with FluxBox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.<br />
<br />
==Installation==<br />
<br />
Installing Fluxbox is as easy as:<br />
<br />
# pacman -S fluxbox<br />
<br />
== Starting Fluxbox ==<br />
=== Method 1: KDM/GDM Login/Session Managers ===<br />
Users of [[KDM]] or [[GDM]] will find a new fluxbox entry added to their session menu automatically. Simply choose the fluxbox option from the session menu when logging in.<br />
<br />
=== Method 2: ~/.xinitrc ===<br />
Edit {{Filename|~/.xinitrc}} and add the following code:<br />
<br />
exec startfluxbox <br />
<br />
If you like to have devices automounted (e.g. in Thunar and other file managers), use this code instead:<br />
<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
See [[Xinitrc]] for more details. You then use the "startx" command from a terminal to launch X and your window manager.<br />
<br />
=== Method 3: SLiM Login Manager ===<br />
<br />
SLiM, the Simple Login Manager, is a favourite of many Archlinux users due to its efficiency. SLiM reads ~/.xinitrc, so if you have your .xinitrc correct as above then it should just work. However, if you want to use SLiM to be able to choose between a number of different window managers/desktop environments then edit the sessions variable in {{Filename|/etc/slim.conf}} to match the names that trigger the case statement in {{Filename|~/.xinitrc}}. See [[Slim]] and [[Xinitrc]].<br />
<br />
== Configuration ==<br />
<br />
System-wide fluxbox configuration files are in {{Filename|/usr/share/fluxbox}} while user configuration files are in {{Filename|~/.fluxbox}}. The user config files are:<br />
<ul><br />
<li>init: the main fluxbox resource configuration file. See [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file]<br />
<li>menu: the fluxbox menu config. See below and [http://fluxbox-wiki.org/index.php?title=Editing_the_menu Editing the menu file]<br />
<li>keys: the fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/index.php?title=Keyboard_shortcuts here]<br />
<li>startup: where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/index.php?title=Editing_the_startup_file here]<br />
<li>overlay: a config file to override elements of styles. See [http://fluxbox-wiki.org/index.php?title=Style_overlay here].<br />
<li>apps: a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/index.php?title=Editing_the_apps_file here]<br />
<li>windowmenu: a config file for altering the Window Menu itself: [http://fluxbox-wiki.org/index.php?title=Editing_the_windowmenu read this]<br />
</ul><br />
There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.<br />
<br />
=== Menu Management ===<br />
<br />
When you first install fluxbox a very basic applications menu will be created at ~/.fluxbox/menu. You access the menu via a right mouse button click on the desktop. As with other lightweight window managers Fluxbox does not automatically update its menu when you install new applications. It is therefore recommended that you install most of the apps you want on your system first and then re-generate or edit the menu. To enhance the menu and add/edit items there are basically four ways to do it:<br />
<br />
==== fluxbox-generate_menu ====<br />
There is a built-in command provided with fluxbox:<br />
$ fluxbox-generate_menu<br />
This command will auto-generate a {{Filename|~/.fluxbox/menu/}} file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by "menumaker" (see immediately below).<br />
<br />
====MenuMaker====<br />
[http://menumaker.sourceforge.net MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Fluxbox. MenuMaker will search your computer for executable programs and create a menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if desired.<br />
<br />
To install MenuMaker:<br />
# pacman -S menumaker<br />
<br />
Once installed, you can generate a complete menu and overwrite the default one by running:<br />
$ mmaker -f FluxBox<br />
<br />
To see MenuMaker options:<br />
$ mmaker --help<br />
<br />
==== Arch Linux Xdg menu ====<br />
Requires [[XdgMenu]] which is available via pacman:<br />
# pacman -S archlinux-xdg-menu<br />
<br />
To then create a fluxbox menu:<br />
$ xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
<br />
More info:<br />
$ xdg_menu --help<br />
<br />
==== Manually create/edit the menu ====<br />
Use your favourite text editor and edit the file: "~/.fluxbox/menu" .<br />
The basic syntax for a menu item to appear is:<br />
[exec] (name) {command} <path to icon><br />
<br />
...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:<br />
[exec] (Firefox Browser) {/usr/bin/firefox} <path to firefox icon><br />
<br />
If you want to make submenu write:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
When done editing save the file and exit. There is no need to restart fluxbox. For more info read [http://fluxbox-wiki.org/index.php?title=Editing_the_menu editing the fluxbox menu].<br />
<br />
===Init===<br />
The ~/.fluxbox/init file is FluxBox's primary configuration resource file. You can change the basic functionality of fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file].<br />
<br />
===Hotkeys===<br />
Fluxbox offers basic hotkeys functionality. The fluxbox hotkey file is located at {{Filename|~/.fluxbox/keys}}.<br />
The Control key is represented by "Control". Mod1 corresponds to the Alt key and Mod4 corresponds to Meta (not a standard key but most users map Meta to the "Win" key). When installed and first run Fluxbox will provide you with a very usable, almost complete set of hotkeys. You should peruse and learn the ~/.fluxbox/keys file to enhance your FluxBox experience.<br />
<br />
Example: here is a quick way to control the Master volume:<br />
Control Mod1 Up :Exec amixer set Master,0 5%+ <br />
Control Mod1 Down :Exec amixer set Master,0 5%-<br />
<br />
===Workspaces===<br />
Fluxbox defaults to having four workspaces. These are accessible using Ctrl+F1-F4 shortcuts, or by using the left mouse button to click the arrows on the toolbar. You can also access workspaces via a middle mouse button click on desktop which pops up the Workspaces Menu.<br />
<br />
===Tabbing and Grouping===<br />
With at least two windows visible on your desktop middle click on the upper window tab of one window and drag it into the other open window. The two windows will now be grouped together with window tabs in the upper window tab bar. You may now perform a window operation that will affect the entire window "group".<br />
<br />
===Background (Wallpaper)===<br />
Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The fluxbox-wiki now has an entry for [http://fluxbox-wiki.org/index.php?title=Howto_set_the_background background setting], so please refer to that. <br />
<br />
The easiest way to do it with ArchLinux is to first of all check that you have a background setting application available:<br />
$ fbsetbg -i<br />
<br />
If not, install either feh, esetroot or wmsetbg using pacman. Then add this "fbsetbg" line to your ~/.xinitrc file, before the "exec" line, e.g.:<br />
fbsetbg /path/to/my/image.image<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
====Swapping Multiple Backgrounds Easily====<br />
<br />
Place the following submenu in your fluxbox menu:<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
Then put your background images into {{Filename|~/.fluxbox/backgrounds}} or any other folder you specify, they will then appear in the same fashion as your styles.\<br />
<br />
====Using Feh with FluxBox====<br />
Install feh with:<br />
# pacman -S feh<br />
You may add a quick submenu to your {{Filename|~/.fluxbox/menu}} file which will allow you to change backgrounds on-the-fly:<br />
[submenu] (Backgrounds)<br />
[backgrounds] (/path/to/your/backgrounds) {feh --bg-scale}<br />
[end]<br />
<br />
To make sure fluxbox will load feh background next time start:<br />
<br />
'''1.''' Make {{Filename|.fehbg}} executable:<br />
$ chmod 770 ~/.fehbg<br />
<br />
'''2.''' Then add (or modify) the following line to the file {{Filename|~/.fluxbox/init}}:<br />
session.screen0.rootCommand: ~/.fehbg<br />
<br />
'''3.''' or add (or modify) the following line to the file {{Filename|~/.fluxbox/startup}}:<br />
~/.fehbg<br />
<br />
===Theming===<br />
To install a fluxbox theme extract the theme archive file to a styles directory. The default directories are:<br />
*global - {{Filename|/usr/share/fluxbox/styles}}<br />
*user only - {{Filename|~/.fluxbox/styles}}<br />
<br />
The ArchLinux [[AUR]] currently contains a compilation of good looking fluxbox themes called "fluxbox-styles". Get it [http://aur.archlinux.org/packages.php?ID=28743 here] and install this package for more themes than you could possibly use. When installed correctly they will appear in the Fluxbox, Styles section of your Fluxbox menu.<br />
<br />
To create your own Fluxbox styles read [[Fluxbox_Style_Guide]] and this [http://tenr.de/howto/style_fluxbox/style_fluxbox.html style guide].<br />
<br />
===The Slit===<br />
Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit [http://dockapps.org Dockapps.org] <br />
<br />
===Autostarting Applications===<br />
The ArchLinux way to autostart apps is to put all code into {{Filename|~/.xinitrc}}. Please read [[Xinitrc]]. However, fluxbox provides functionality to autostart applications on its own. The {{Filename|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting fluxbox itself. The # symbol denotes a comment.<br />
<br />
A sample file:<br />
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.<br />
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. <br />
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.<br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> exec is for starting fluxbox itself, don't put an ampersand (&) after this or fluxbox will exit immediately<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:<br />
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Other Menus===<br />
<br />
In the "Menu Management" section (above) we were discussing the main "Applications" Menu, called the "Root" menu in fluxbox lingo. FluxBox also has other menus available to the user:<br />
<ul><br />
<li>Workspaces Menu: middle click on desktop.<br />
<li>Configuration Menu: located within the "Fluxbox" section of the "Root" menu.<br />
<li>Window menu: right click on the titlebar of any window, or its bar if minimized. Can be edited. See fluxbox-menu man page.<br />
<li>Toolbar menu: right click on empty part of toolbar. Also found as a sub-menu within the Configuration Menu.<br />
<li>Slit Menu: found as a sub-menu within the configuration menu.<br />
</ul><br />
<br />
===Transparent rxvt-unicode terminals===<br />
Install urxvt:<br />
# pacman -S rxvt-unicode<br />
<br />
Launch urxvt with these options:<br />
$ urxvt -depth 32 -bg rgba:0000/0000/0000/bbbb -tint grey<br />
<br />
Or you can edit your ~/.Xdefaults file and place the equivalent urxvt commands in that file. See [[Xdefaults]] for more info.<br />
<br />
===A life after xorg.conf===<br />
Xorg no longer requires an xorg.conf file. Traditionally this is where you would change your keyboard settings and powersave settings. Luckily there are elegant solutions not using xorg.conf. <br />
<br />
====Setting your keyboard right====<br />
Just add the following line to {{Filename|~/.fluxbox/startup}}:<br />
setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)<br />
<br />
Instead of 'us' you can also pass your language code and remove the variant option (ex.: 'us_intl', which works like the command above in some setups). See man setxkbmap for more options.<br />
<br />
To make a help function in your menu, just add in {{Filename|~/.fluxbox/menu}}:<br />
[submenu] (Keyboard)<br />
[exec] (normal) {setxkbmap us}<br />
[exec] (international) {setxkbmap us -variant intl}<br />
[end]<br />
<br />
====Disable Powersave====<br />
Do you recognize the problem while watching a movie that the screen goes blank? Congratulations, Xorg just detected that you were doing nothing :). If you don't need these movement exercises, you can disable this feature altogether. You'll just have to remember to manually turn off your monitor if you're not using it.<br />
<br />
Just add the following line at the start of {{Filename|~/.fluxbox/startup}}:<br />
xset s off -dpms &<br />
<br />
==Additional Resources==<br />
<br />
* [http://fluxbox.org/ Fluxbox Homepage]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://en.gentoo-wiki.com/wiki/Fluxbox Gentoo Wiki about Fluxbox]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml Gentoo Fluxbox Documentation]<br />
* [http://box-look.org/ Themes for Fluxbox]<br />
* [http://wiki.archlinux.org/index.php/Fluxbox_Style_Guide Fluxbox Style Guide]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox Guide]<br />
* The fluxbox man pages: fluxbox, fluxbox-menu, fluxbox-style, fluxbox-keys, fluxbox-apps, fluxbox-remote, fbsetroot, fbsetbg, fbrun, startfluxbox.<br />
* [https://bbs.archlinux.org/viewtopic.php?id=90260 Archlinux-FluxBox screenshots]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Fluxbox&diff=163229Fluxbox2011-10-01T23:31:05Z<p>Lagagnon: </p>
<hr />
<div>[[Category:Stacking WMs (English)]]<br />
{{i18n|Fluxbox}}<br />
[[fr:Fluxbox]]<br />
Fluxbox is yet another window manager for X11. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit and there are hundreds of fluxbox "styles" to make your desktop look great. ArchLinux with FluxBox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.<br />
<br />
==Installation==<br />
<br />
Installing Fluxbox is as easy as:<br />
<br />
# pacman -S fluxbox<br />
<br />
== Starting Fluxbox ==<br />
=== Method 1: KDM/GDM Login/Session Managers ===<br />
Users of [[KDM]] or [[GDM]] will find a new fluxbox entry added to their session menu automatically. Simply choose the fluxbox option from the session menu when logging in.<br />
<br />
=== Method 2: ~/.xinitrc ===<br />
Edit {{Filename|~/.xinitrc}} and add the following code:<br />
<br />
exec startfluxbox <br />
<br />
If you like to have devices automounted (e.g. in Thunar and other file managers), use this code instead:<br />
<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
See [[Xinitrc]] for more details. You then use the "startx" command from a terminal to launch X and your window manager.<br />
<br />
=== Method 3: SLiM Login Manager ===<br />
<br />
SLiM, the Simple Login Manager, is a favourite of many Archlinux users due to its efficiency. SLiM reads ~/.xinitrc, so if you have your .xinitrc correct as above then it should just work. However, if you want to use SLiM to be able to choose between a number of different window managers/desktop environments then edit the sessions variable in {{Filename|/etc/slim.conf}} to match the names that trigger the case statement in {{Filename|~/.xinitrc}}. See [[Slim]] and [[Xinitrc]].<br />
<br />
== Configuration ==<br />
<br />
System-wide fluxbox configuration files are in {{Filename|/usr/share/fluxbox}} while user configuration files are in {{Filename|~/.fluxbox}}. The user config files are:<br />
<ul><br />
<li>init: the main fluxbox resource configuration file. See [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file]<br />
<li>menu: the fluxbox menu config. See below and [http://fluxbox-wiki.org/index.php?title=Editing_the_menu Editing the menu file]<br />
<li>keys: the fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/index.php?title=Keyboard_shortcuts here]<br />
<li>startup: where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/index.php?title=Editing_the_startup_file here]<br />
<li>overlay: a config file to override elements of styles. See [http://fluxbox-wiki.org/index.php?title=Style_overlay here].<br />
<li>apps: a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/index.php?title=Editing_the_apps_file here]<br />
<li>windowmenu: a config file for altering the Window Menu itself: [http://fluxbox-wiki.org/index.php?title=Editing_the_windowmenu read this]<br />
</ul><br />
There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.<br />
<br />
=== Menu Management ===<br />
<br />
When you first install fluxbox a very basic applications menu will be created at ~/.fluxbox/menu. You access the menu via a right mouse button click on the desktop. To enhance the menu and add/edit items there are basically four ways to do it:<br />
<br />
==== fluxbox-generate_menu ====<br />
There is a built-in command provided with fluxbox:<br />
$ fluxbox-generate_menu<br />
This command will auto-generate a {{Filename|~/.fluxbox/menu/}} file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by "menumaker" (see immediately below).<br />
<br />
====MenuMaker====<br />
[http://menumaker.sourceforge.net MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Fluxbox. MenuMaker will search your computer for executable programs and create a menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if desired.<br />
<br />
To install MenuMaker:<br />
# pacman -S menumaker<br />
<br />
Once installed, you can generate a complete menu and overwrite the default one by running:<br />
$ mmaker -f FluxBox<br />
<br />
To see MenuMaker options:<br />
$ mmaker --help<br />
<br />
==== Arch Linux Xdg menu ====<br />
Requires [[XdgMenu]] which is available via pacman:<br />
# pacman -S archlinux-xdg-menu<br />
<br />
To then create a fluxbox menu:<br />
$ xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
<br />
More info:<br />
$ xdg_menu --help<br />
<br />
==== Manually create/edit the menu ====<br />
Use your favourite text editor and edit the file: "~/.fluxbox/menu" .<br />
The basic syntax for a menu item to appear is:<br />
[exec] (name) {command} <path to icon><br />
<br />
...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:<br />
[exec] (Firefox Browser) {/usr/bin/firefox} <path to firefox icon><br />
<br />
If you want to make submenu write:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
When done editing save the file and exit. There is no need to restart fluxbox. For more info read [http://fluxbox-wiki.org/index.php?title=Editing_the_menu editing the fluxbox menu].<br />
<br />
===Init===<br />
The ~/.fluxbox/init file is FluxBox's primary configuration resource file. You can change the basic functionality of fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file].<br />
<br />
===Hotkeys===<br />
Fluxbox offers basic hotkeys functionality. The fluxbox hotkey file is located at {{Filename|~/.fluxbox/keys}}.<br />
The Control key is represented by "Control". Mod1 corresponds to the Alt key and Mod4 corresponds to Meta (not a standard key but most users map Meta to the "Win" key). When installed and first run Fluxbox will provide you with a very usable, almost complete set of hotkeys. You should peruse and learn the ~/.fluxbox/keys file to enhance your FluxBox experience.<br />
<br />
Example: here is a quick way to control the Master volume:<br />
Control Mod1 Up :Exec amixer set Master,0 5%+ <br />
Control Mod1 Down :Exec amixer set Master,0 5%-<br />
<br />
===Workspaces===<br />
Fluxbox defaults to having four workspaces. These are accessible using Ctrl+F1-F4 shortcuts, or by using the left mouse button to click the arrows on the toolbar. You can also access workspaces via a middle mouse button click on desktop which pops up the Workspaces Menu.<br />
<br />
===Tabbing and Grouping===<br />
With at least two windows visible on your desktop middle click on the upper window tab of one window and drag it into the other open window. The two windows will now be grouped together with window tabs in the upper window tab bar. You may now perform a window operation that will affect the entire window "group".<br />
<br />
===Background (Wallpaper)===<br />
Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The fluxbox-wiki now has an entry for [http://fluxbox-wiki.org/index.php?title=Howto_set_the_background background setting], so please refer to that. <br />
<br />
The easiest way to do it with ArchLinux is to first of all check that you have a background setting application available:<br />
$ fbsetbg -i<br />
<br />
If not, install either feh, esetroot or wmsetbg using pacman. Then add this "fbsetbg" line to your ~/.xinitrc file, before the "exec" line, e.g.:<br />
fbsetbg /path/to/my/image.image<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
====Swapping Multiple Backgrounds Easily====<br />
<br />
Place the following submenu in your fluxbox menu:<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
Then put your background images into {{Filename|~/.fluxbox/backgrounds}} or any other folder you specify, they will then appear in the same fashion as your styles.\<br />
<br />
====Using Feh with FluxBox====<br />
Install feh with:<br />
# pacman -S feh<br />
You may add a quick submenu to your {{Filename|~/.fluxbox/menu}} file which will allow you to change backgrounds on-the-fly:<br />
[submenu] (Backgrounds)<br />
[backgrounds] (/path/to/your/backgrounds) {feh --bg-scale}<br />
[end]<br />
<br />
To make sure fluxbox will load feh background next time start:<br />
<br />
'''1.''' Make {{Filename|.fehbg}} executable:<br />
$ chmod 770 ~/.fehbg<br />
<br />
'''2.''' Then add (or modify) the following line to the file {{Filename|~/.fluxbox/init}}:<br />
session.screen0.rootCommand: ~/.fehbg<br />
<br />
'''3.''' or add (or modify) the following line to the file {{Filename|~/.fluxbox/startup}}:<br />
~/.fehbg<br />
<br />
===Theming===<br />
To install a fluxbox theme extract the theme archive file to a styles directory. The default directories are:<br />
*global - {{Filename|/usr/share/fluxbox/styles}}<br />
*user only - {{Filename|~/.fluxbox/styles}}<br />
<br />
The ArchLinux [[AUR]] currently contains a compilation of good looking fluxbox themes called "fluxbox-styles". Get it [http://aur.archlinux.org/packages.php?ID=28743 here] and install this package for more themes than you could possibly use. When installed correctly they will appear in the Fluxbox, Styles section of your Fluxbox menu.<br />
<br />
To create your own Fluxbox styles read [[Fluxbox_Style_Guide]] and this [http://tenr.de/howto/style_fluxbox/style_fluxbox.html style guide].<br />
<br />
===The Slit===<br />
Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit [http://dockapps.org Dockapps.org] <br />
<br />
===Autostarting Applications===<br />
The ArchLinux way to autostart apps is to put all code into {{Filename|~/.xinitrc}}. Please read [[Xinitrc]]. However, fluxbox provides functionality to autostart applications on its own. The {{Filename|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting fluxbox itself. The # symbol denotes a comment.<br />
<br />
A sample file:<br />
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.<br />
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. <br />
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.<br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> exec is for starting fluxbox itself, don't put an ampersand (&) after this or fluxbox will exit immediately<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:<br />
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Other Menus===<br />
<br />
In the "Menu Management" section (above) we were discussing the main "Applications" Menu, called the "Root" menu in fluxbox lingo. FluxBox also has other menus available to the user:<br />
<ul><br />
<li>Workspaces Menu: middle click on desktop.<br />
<li>Configuration Menu: located within the "Fluxbox" section of the "Root" menu.<br />
<li>Window menu: right click on the titlebar of any window, or its bar if minimized. Can be edited. See fluxbox-menu man page.<br />
<li>Toolbar menu: right click on empty part of toolbar. Also found as a sub-menu within the Configuration Menu.<br />
<li>Slit Menu: found as a sub-menu within the configuration menu.<br />
</ul><br />
<br />
===Transparent rxvt-unicode terminals===<br />
Install urxvt:<br />
# pacman -S rxvt-unicode<br />
<br />
Launch urxvt with these options:<br />
$ urxvt -depth 32 -bg rgba:0000/0000/0000/bbbb -tint grey<br />
<br />
Or you can edit your ~/.Xdefaults file and place the equivalent urxvt commands in that file. See [[Xdefaults]] for more info.<br />
<br />
===A life after xorg.conf===<br />
Xorg no longer requires an xorg.conf file. Traditionally this is where you would change your keyboard settings and powersave settings. Luckily there are elegant solutions not using xorg.conf. <br />
<br />
====Setting your keyboard right====<br />
Just add the following line to {{Filename|~/.fluxbox/startup}}:<br />
setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)<br />
<br />
Instead of 'us' you can also pass your language code and remove the variant option (ex.: 'us_intl', which works like the command above in some setups). See man setxkbmap for more options.<br />
<br />
To make a help function in your menu, just add in {{Filename|~/.fluxbox/menu}}:<br />
[submenu] (Keyboard)<br />
[exec] (normal) {setxkbmap us}<br />
[exec] (international) {setxkbmap us -variant intl}<br />
[end]<br />
<br />
====Disable Powersave====<br />
Do you recognize the problem while watching a movie that the screen goes blank? Congratulations, Xorg just detected that you were doing nothing :). If you don't need these movement exercises, you can disable this feature altogether. You'll just have to remember to manually turn off your monitor if you're not using it.<br />
<br />
Just add the following line at the start of {{Filename|~/.fluxbox/startup}}:<br />
xset s off -dpms &<br />
<br />
==Additional Resources==<br />
<br />
* [http://fluxbox.org/ Fluxbox Homepage]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://en.gentoo-wiki.com/wiki/Fluxbox Gentoo Wiki about Fluxbox]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml Gentoo Fluxbox Documentation]<br />
* [http://box-look.org/ Themes for Fluxbox]<br />
* [http://wiki.archlinux.org/index.php/Fluxbox_Style_Guide Fluxbox Style Guide]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox Guide]<br />
* The fluxbox man pages: fluxbox, fluxbox-menu, fluxbox-style, fluxbox-keys, fluxbox-apps, fluxbox-remote, fbsetroot, fbsetbg, fbrun, startfluxbox.<br />
* [https://bbs.archlinux.org/viewtopic.php?id=90260 Archlinux-FluxBox screenshots]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Fluxbox&diff=163223Fluxbox2011-10-01T20:53:30Z<p>Lagagnon: /* Background (Wallpaper) */</p>
<hr />
<div>[[Category:Stacking WMs (English)]]<br />
{{i18n|Fluxbox}}<br />
[[fr:Fluxbox]]<br />
Fluxbox is yet another window manager for X. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit and there are hundreds of fluxbox "styles" to make your desktop look great. ArchLinux with FluxBox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.<br />
<br />
==Installation==<br />
<br />
Installing Fluxbox is as easy as:<br />
<br />
# pacman -S fluxbox<br />
<br />
== Starting Fluxbox ==<br />
=== Method 1: KDM/GDM Login/Session Managers ===<br />
Users of [[KDM]] or [[GDM]] will find a new fluxbox entry added to their session menu automatically. Simply choose the fluxbox option from the session menu when logging in.<br />
<br />
=== Method 2: ~/.xinitrc ===<br />
Edit {{Filename|~/.xinitrc}} and add the following code:<br />
<br />
exec startfluxbox <br />
<br />
If you like to have devices automounted (e.g. in Thunar and other file managers), use this code instead:<br />
<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
See [[Xinitrc]] for more details. You then use the "startx" command from a terminal to launch X and your window manager.<br />
<br />
=== Method 3: SLiM Login Manager ===<br />
<br />
SLiM, the Simple Login Manager, is a favourite of many Archlinux users due to its efficiency. SLiM reads ~/.xinitrc, so if you have your .xinitrc correct as above then it should just work. However, if you want to use SLiM to be able to choose between a number of different window managers/desktop environments then edit the sessions variable in {{Filename|/etc/slim.conf}} to match the names that trigger the case statement in {{Filename|~/.xinitrc}}. See [[Slim]] and [[Xinitrc]].<br />
<br />
== Configuration ==<br />
<br />
System-wide fluxbox configuration files are in {{Filename|/usr/share/fluxbox}} while user configuration files are in {{Filename|~/.fluxbox}}. The user config files are:<br />
<ul><br />
<li>init: the main fluxbox resource configuration file. See [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file]<br />
<li>menu: the fluxbox menu config. See below and [http://fluxbox-wiki.org/index.php?title=Editing_the_menu Editing the menu file]<br />
<li>keys: the fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/index.php?title=Keyboard_shortcuts here]<br />
<li>startup: where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/index.php?title=Editing_the_startup_file here]<br />
<li>overlay: a config file to override elements of styles. See [http://fluxbox-wiki.org/index.php?title=Style_overlay here].<br />
<li>apps: a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/index.php?title=Editing_the_apps_file here]<br />
<li>windowmenu: a config file for altering the Window Menu itself: [http://fluxbox-wiki.org/index.php?title=Editing_the_windowmenu read this]<br />
</ul><br />
There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.<br />
<br />
=== Menu Management ===<br />
<br />
When you first install fluxbox a very basic applications menu will be created at ~/.fluxbox/menu. You access the menu via a right mouse button click on the desktop. To enhance the menu and add/edit items there are basically four ways to do it:<br />
<br />
==== fluxbox-generate_menu ====<br />
There is a built-in command provided with fluxbox:<br />
$ fluxbox-generate_menu<br />
This command will auto-generate a {{Filename|~/.fluxbox/menu/}} file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by "menumaker" (see immediately below).<br />
<br />
====MenuMaker====<br />
[http://menumaker.sourceforge.net MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Fluxbox. MenuMaker will search your computer for executable programs and create a menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if desired.<br />
<br />
To install MenuMaker:<br />
# pacman -S menumaker<br />
<br />
Once installed, you can generate a complete menu and overwrite the default one by running:<br />
$ mmaker -f FluxBox<br />
<br />
To see MenuMaker options:<br />
$ mmaker --help<br />
<br />
==== Arch Linux Xdg menu ====<br />
Requires [[XdgMenu]] which is available via pacman:<br />
# pacman -S archlinux-xdg-menu<br />
<br />
To then create a fluxbox menu:<br />
$ xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
<br />
More info:<br />
$ xdg_menu --help<br />
<br />
==== Manually create/edit the menu ====<br />
Use your favourite text editor and edit the file: "~/.fluxbox/menu" .<br />
The basic syntax for a menu item to appear is:<br />
[exec] (name) {command}<br />
<br />
...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:<br />
[exec] (Firefox Browser) {/usr/bin/firefox}<br />
<br />
If you want to make submenu write:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
When done editing save the file and exit. There is no need to restart fluxbox. For more info read [http://fluxbox-wiki.org/index.php?title=Editing_the_menu editing the fluxbox menu].<br />
<br />
===Init===<br />
The ~/.fluxbox/init file is FluxBox's primary configuration resource file. You can change the basic functionality of fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file].<br />
<br />
===Hotkeys===<br />
Fluxbox offers basic hotkeys functionality. The fluxbox hotkey file is located at {{Filename|~/.fluxbox/keys}}.<br />
The Control key is represented by "Control". Mod1 corresponds to the Alt key and Mod4 corresponds to Meta (not a standard key but most users map Meta to the "Win" key). When installed and first run Fluxbox will provide you with a very usable, almost complete set of hotkeys. You should peruse and learn the ~/.fluxbox/keys file to enhance your FluxBox experience.<br />
<br />
Example: here is a quick way to control the Master volume:<br />
Control Mod1 Up :Exec amixer set Master,0 5%+ <br />
Control Mod1 Down :Exec amixer set Master,0 5%-<br />
<br />
===Workspaces===<br />
Fluxbox defaults to having four workspaces. These are accessible using Ctrl+F1-F4 shortcuts, or by using the left mouse button to click the arrows on the toolbar. You can also access workspaces via a middle mouse button click on desktop which pops up the Workspaces Menu.<br />
<br />
===Tabbing and Grouping===<br />
With at least two windows visible on your desktop middle click on the upper window tab of one window and drag it into the other open window. The two windows will now be grouped together with window tabs in the upper window tab bar. You may now perform a window operation that will affect the entire window "group".<br />
<br />
===Background (Wallpaper)===<br />
Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The fluxbox-wiki now has an entry for [http://fluxbox-wiki.org/index.php?title=Howto_set_the_background background setting], so please refer to that. <br />
<br />
The easiest way to do it with ArchLinux is to first of all check that you have a background setting application available:<br />
$ fbsetbg -i<br />
<br />
If not, install either feh, esetroot or wmsetbg using pacman. Then add this "fbsetbg" line to your ~/.xinitrc file, before the "exec" line, e.g.:<br />
fbsetbg /path/to/my/image.image<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
====Swapping Multiple Backgrounds Easily====<br />
<br />
Place the following submenu in your fluxbox menu:<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
Then put your background images into {{Filename|~/.fluxbox/backgrounds}} or any other folder you specify, they will then appear in the same fashion as your styles.\<br />
<br />
====Using Feh with FluxBox====<br />
Install feh with:<br />
# pacman -S feh<br />
You may add a quick submenu to your {{Filename|~/.fluxbox/menu}} file which will allow you to change backgrounds on-the-fly:<br />
[submenu] (Backgrounds)<br />
[backgrounds] (/path/to/your/backgrounds) {feh --bg-scale}<br />
[end]<br />
<br />
To make sure fluxbox will load feh background next time start:<br />
<br />
'''1.''' Make {{Filename|.fehbg}} executable:<br />
$ chmod 770 ~/.fehbg<br />
<br />
'''2.''' Then add (or modify) the following line to the file {{Filename|~/.fluxbox/init}}:<br />
session.screen0.rootCommand: ~/.fehbg<br />
<br />
'''3.''' or add (or modify) the following line to the file {{Filename|~/.fluxbox/startup}}:<br />
~/.fehbg<br />
<br />
===Theming===<br />
To install a fluxbox theme extract the theme archive file to a styles directory. The default directories are:<br />
*global - {{Filename|/usr/share/fluxbox/styles}}<br />
*user only - {{Filename|~/.fluxbox/styles}}<br />
<br />
The ArchLinux [[AUR]] currently contains a compilation of good looking fluxbox themes called "fluxbox-styles". Get it [http://aur.archlinux.org/packages.php?ID=28743 here] and install this package for more themes than you could possibly use. When installed correctly they will appear in the Fluxbox, Styles section of your Fluxbox menu.<br />
<br />
To create your own Fluxbox styles read [[Fluxbox_Style_Guide]] and this [http://tenr.de/howto/style_fluxbox/style_fluxbox.html style guide].<br />
<br />
===The Slit===<br />
Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit [http://dockapps.org Dockapps.org] <br />
<br />
===Autostarting Applications===<br />
The ArchLinux way to autostart apps is to put all code into {{Filename|~/.xinitrc}}. Please read [[Xinitrc]]. However, fluxbox provides functionality to autostart applications on its own. The {{Filename|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting fluxbox itself. The # symbol denotes a comment.<br />
<br />
A sample file:<br />
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.<br />
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. <br />
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.<br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> exec is for starting fluxbox itself, don't put an ampersand (&) after this or fluxbox will exit immediately<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:<br />
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Other Menus===<br />
<br />
In the "Menu Management" section (above) we were discussing the main "Applications" Menu, called the "Root" menu in fluxbox lingo. FluxBox also has other menus available to the user:<br />
<ul><br />
<li>Workspaces Menu: middle click on desktop.<br />
<li>Configuration Menu: located within the "Fluxbox" section of the "Root" menu.<br />
<li>Window menu: right click on the titlebar of any window, or its bar if minimized. Can be edited. See fluxbox-menu man page.<br />
<li>Toolbar menu: right click on empty part of toolbar. Also found as a sub-menu within the Configuration Menu.<br />
<li>Slit Menu: found as a sub-menu within the configuration menu.<br />
</ul><br />
<br />
===Transparent rxvt-unicode terminals===<br />
Install urxvt:<br />
# pacman -S rxvt-unicode<br />
<br />
Launch urxvt with these options:<br />
$ urxvt -depth 32 -bg rgba:0000/0000/0000/bbbb -tint grey<br />
<br />
Or you can edit your ~/.Xdefaults file and place the equivalent urxvt commands in that file. See [[Xdefaults]] for more info.<br />
<br />
===A life after xorg.conf===<br />
Xorg no longer requires an xorg.conf file. Traditionally this is where you would change your keyboard settings and powersave settings. Luckily there are elegant solutions not using xorg.conf. <br />
<br />
====Setting your keyboard right====<br />
Just add the following line to {{Filename|~/.fluxbox/startup}}:<br />
setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)<br />
<br />
Instead of 'us' you can also pass your language code and remove the variant option (ex.: 'us_intl', which works like the command above in some setups). See man setxkbmap for more options.<br />
<br />
To make a help function in your menu, just add in {{Filename|~/.fluxbox/menu}}:<br />
[submenu] (Keyboard)<br />
[exec] (normal) {setxkbmap us}<br />
[exec] (international) {setxkbmap us -variant intl}<br />
[end]<br />
<br />
====Disable Powersave====<br />
Do you recognize the problem while watching a movie that the screen goes blank? Congratulations, Xorg just detected that you were doing nothing :). If you don't need these movement exercises, you can disable this feature altogether. You'll just have to remember to manually turn off your monitor if you're not using it.<br />
<br />
Just add the following line at the start of {{Filename|~/.fluxbox/startup}}:<br />
xset s off -dpms &<br />
<br />
==Additional Resources==<br />
<br />
* [http://fluxbox.org/ Fluxbox Homepage]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://en.gentoo-wiki.com/wiki/Fluxbox Gentoo Wiki about Fluxbox]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml Gentoo Fluxbox Documentation]<br />
* [http://box-look.org/ Themes for Fluxbox]<br />
* [http://wiki.archlinux.org/index.php/Fluxbox_Style_Guide Fluxbox Style Guide]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox Guide]<br />
* The fluxbox man pages: fluxbox, fluxbox-menu, fluxbox-style, fluxbox-keys, fluxbox-apps, fluxbox-remote, fbsetroot, fbsetbg, fbrun, startfluxbox.<br />
* [https://bbs.archlinux.org/viewtopic.php?id=90260 Archlinux-FluxBox screenshots]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Fluxbox&diff=163222Fluxbox2011-10-01T20:49:30Z<p>Lagagnon: /* Method 3: SLiM Login Manager */</p>
<hr />
<div>[[Category:Stacking WMs (English)]]<br />
{{i18n|Fluxbox}}<br />
[[fr:Fluxbox]]<br />
Fluxbox is yet another window manager for X. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit and there are hundreds of fluxbox "styles" to make your desktop look great. ArchLinux with FluxBox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.<br />
<br />
==Installation==<br />
<br />
Installing Fluxbox is as easy as:<br />
<br />
# pacman -S fluxbox<br />
<br />
== Starting Fluxbox ==<br />
=== Method 1: KDM/GDM Login/Session Managers ===<br />
Users of [[KDM]] or [[GDM]] will find a new fluxbox entry added to their session menu automatically. Simply choose the fluxbox option from the session menu when logging in.<br />
<br />
=== Method 2: ~/.xinitrc ===<br />
Edit {{Filename|~/.xinitrc}} and add the following code:<br />
<br />
exec startfluxbox <br />
<br />
If you like to have devices automounted (e.g. in Thunar and other file managers), use this code instead:<br />
<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
See [[Xinitrc]] for more details. You then use the "startx" command from a terminal to launch X and your window manager.<br />
<br />
=== Method 3: SLiM Login Manager ===<br />
<br />
SLiM, the Simple Login Manager, is a favourite of many Archlinux users due to its efficiency. SLiM reads ~/.xinitrc, so if you have your .xinitrc correct as above then it should just work. However, if you want to use SLiM to be able to choose between a number of different window managers/desktop environments then edit the sessions variable in {{Filename|/etc/slim.conf}} to match the names that trigger the case statement in {{Filename|~/.xinitrc}}. See [[Slim]] and [[Xinitrc]].<br />
<br />
== Configuration ==<br />
<br />
System-wide fluxbox configuration files are in {{Filename|/usr/share/fluxbox}} while user configuration files are in {{Filename|~/.fluxbox}}. The user config files are:<br />
<ul><br />
<li>init: the main fluxbox resource configuration file. See [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file]<br />
<li>menu: the fluxbox menu config. See below and [http://fluxbox-wiki.org/index.php?title=Editing_the_menu Editing the menu file]<br />
<li>keys: the fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/index.php?title=Keyboard_shortcuts here]<br />
<li>startup: where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/index.php?title=Editing_the_startup_file here]<br />
<li>overlay: a config file to override elements of styles. See [http://fluxbox-wiki.org/index.php?title=Style_overlay here].<br />
<li>apps: a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/index.php?title=Editing_the_apps_file here]<br />
<li>windowmenu: a config file for altering the Window Menu itself: [http://fluxbox-wiki.org/index.php?title=Editing_the_windowmenu read this]<br />
</ul><br />
There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.<br />
<br />
=== Menu Management ===<br />
<br />
When you first install fluxbox a very basic applications menu will be created at ~/.fluxbox/menu. You access the menu via a right mouse button click on the desktop. To enhance the menu and add/edit items there are basically four ways to do it:<br />
<br />
==== fluxbox-generate_menu ====<br />
There is a built-in command provided with fluxbox:<br />
$ fluxbox-generate_menu<br />
This command will auto-generate a {{Filename|~/.fluxbox/menu/}} file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by "menumaker" (see immediately below).<br />
<br />
====MenuMaker====<br />
[http://menumaker.sourceforge.net MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Fluxbox. MenuMaker will search your computer for executable programs and create a menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if desired.<br />
<br />
To install MenuMaker:<br />
# pacman -S menumaker<br />
<br />
Once installed, you can generate a complete menu and overwrite the default one by running:<br />
$ mmaker -f FluxBox<br />
<br />
To see MenuMaker options:<br />
$ mmaker --help<br />
<br />
==== Arch Linux Xdg menu ====<br />
Requires [[XdgMenu]] which is available via pacman:<br />
# pacman -S archlinux-xdg-menu<br />
<br />
To then create a fluxbox menu:<br />
$ xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
<br />
More info:<br />
$ xdg_menu --help<br />
<br />
==== Manually create/edit the menu ====<br />
Use your favourite text editor and edit the file: "~/.fluxbox/menu" .<br />
The basic syntax for a menu item to appear is:<br />
[exec] (name) {command}<br />
<br />
...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:<br />
[exec] (Firefox Browser) {/usr/bin/firefox}<br />
<br />
If you want to make submenu write:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
When done editing save the file and exit. There is no need to restart fluxbox. For more info read [http://fluxbox-wiki.org/index.php?title=Editing_the_menu editing the fluxbox menu].<br />
<br />
===Init===<br />
The ~/.fluxbox/init file is FluxBox's primary configuration resource file. You can change the basic functionality of fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file].<br />
<br />
===Hotkeys===<br />
Fluxbox offers basic hotkeys functionality. The fluxbox hotkey file is located at {{Filename|~/.fluxbox/keys}}.<br />
The Control key is represented by "Control". Mod1 corresponds to the Alt key and Mod4 corresponds to Meta (not a standard key but most users map Meta to the "Win" key). When installed and first run Fluxbox will provide you with a very usable, almost complete set of hotkeys. You should peruse and learn the ~/.fluxbox/keys file to enhance your FluxBox experience.<br />
<br />
Example: here is a quick way to control the Master volume:<br />
Control Mod1 Up :Exec amixer set Master,0 5%+ <br />
Control Mod1 Down :Exec amixer set Master,0 5%-<br />
<br />
===Workspaces===<br />
Fluxbox defaults to having four workspaces. These are accessible using Ctrl+F1-F4 shortcuts, or by using the left mouse button to click the arrows on the toolbar. You can also access workspaces via a middle mouse button click on desktop which pops up the Workspaces Menu.<br />
<br />
===Tabbing and Grouping===<br />
With at least two windows visible on your desktop middle click on the upper window tab of one window and drag it into the other open window. The two windows will now be grouped together with window tabs in the upper window tab bar. You may now perform a window operation that will affect the entire window "group".<br />
<br />
===Background (Wallpaper)===<br />
Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The fluxbox-wiki now has an entry for [http://fluxbox-wiki.org/index.php?title=Howto_set_the_background background setting], so please refer to that. <br />
<br />
The easiest way to do it with ArchLinux is to first of all check that you have a background setting application available:<br />
$ fbsetbg -i<br />
<br />
If not, install either feh, esetroot or wmsetbg using pacman. Then add this line to your ~/.xinitrc file, e.g.:<br />
fbsetbg /path/to/my/image.image<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
====Swapping Multiple Backgrounds Easily====<br />
<br />
Place the following submenu in your fluxbox menu:<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
Then put your background images into {{Filename|~/.fluxbox/backgrounds}} or any other folder you specify, they will then appear in the same fashion as your styles.\<br />
<br />
====Using Feh with FluxBox====<br />
Install feh with:<br />
# pacman -S feh<br />
You may add a quick submenu to your {{Filename|~/.fluxbox/menu}} file which will allow you to change backgrounds on-the-fly:<br />
[submenu] (Backgrounds)<br />
[backgrounds] (/path/to/your/backgrounds) {feh --bg-scale}<br />
[end]<br />
<br />
To make sure fluxbox will load feh background next time start:<br />
<br />
'''1.''' Make {{Filename|.fehbg}} executable:<br />
$ chmod 770 ~/.fehbg<br />
<br />
'''2.''' Then add (or modify) the following line to the file {{Filename|~/.fluxbox/init}}:<br />
session.screen0.rootCommand: ~/.fehbg<br />
<br />
'''3.''' or add (or modify) the following line to the file {{Filename|~/.fluxbox/startup}}:<br />
~/.fehbg<br />
<br />
===Theming===<br />
To install a fluxbox theme extract the theme archive file to a styles directory. The default directories are:<br />
*global - {{Filename|/usr/share/fluxbox/styles}}<br />
*user only - {{Filename|~/.fluxbox/styles}}<br />
<br />
The ArchLinux [[AUR]] currently contains a compilation of good looking fluxbox themes called "fluxbox-styles". Get it [http://aur.archlinux.org/packages.php?ID=28743 here] and install this package for more themes than you could possibly use. When installed correctly they will appear in the Fluxbox, Styles section of your Fluxbox menu.<br />
<br />
To create your own Fluxbox styles read [[Fluxbox_Style_Guide]] and this [http://tenr.de/howto/style_fluxbox/style_fluxbox.html style guide].<br />
<br />
===The Slit===<br />
Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit [http://dockapps.org Dockapps.org] <br />
<br />
===Autostarting Applications===<br />
The ArchLinux way to autostart apps is to put all code into {{Filename|~/.xinitrc}}. Please read [[Xinitrc]]. However, fluxbox provides functionality to autostart applications on its own. The {{Filename|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting fluxbox itself. The # symbol denotes a comment.<br />
<br />
A sample file:<br />
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.<br />
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. <br />
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.<br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> exec is for starting fluxbox itself, don't put an ampersand (&) after this or fluxbox will exit immediately<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:<br />
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Other Menus===<br />
<br />
In the "Menu Management" section (above) we were discussing the main "Applications" Menu, called the "Root" menu in fluxbox lingo. FluxBox also has other menus available to the user:<br />
<ul><br />
<li>Workspaces Menu: middle click on desktop.<br />
<li>Configuration Menu: located within the "Fluxbox" section of the "Root" menu.<br />
<li>Window menu: right click on the titlebar of any window, or its bar if minimized. Can be edited. See fluxbox-menu man page.<br />
<li>Toolbar menu: right click on empty part of toolbar. Also found as a sub-menu within the Configuration Menu.<br />
<li>Slit Menu: found as a sub-menu within the configuration menu.<br />
</ul><br />
<br />
===Transparent rxvt-unicode terminals===<br />
Install urxvt:<br />
# pacman -S rxvt-unicode<br />
<br />
Launch urxvt with these options:<br />
$ urxvt -depth 32 -bg rgba:0000/0000/0000/bbbb -tint grey<br />
<br />
Or you can edit your ~/.Xdefaults file and place the equivalent urxvt commands in that file. See [[Xdefaults]] for more info.<br />
<br />
===A life after xorg.conf===<br />
Xorg no longer requires an xorg.conf file. Traditionally this is where you would change your keyboard settings and powersave settings. Luckily there are elegant solutions not using xorg.conf. <br />
<br />
====Setting your keyboard right====<br />
Just add the following line to {{Filename|~/.fluxbox/startup}}:<br />
setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)<br />
<br />
Instead of 'us' you can also pass your language code and remove the variant option (ex.: 'us_intl', which works like the command above in some setups). See man setxkbmap for more options.<br />
<br />
To make a help function in your menu, just add in {{Filename|~/.fluxbox/menu}}:<br />
[submenu] (Keyboard)<br />
[exec] (normal) {setxkbmap us}<br />
[exec] (international) {setxkbmap us -variant intl}<br />
[end]<br />
<br />
====Disable Powersave====<br />
Do you recognize the problem while watching a movie that the screen goes blank? Congratulations, Xorg just detected that you were doing nothing :). If you don't need these movement exercises, you can disable this feature altogether. You'll just have to remember to manually turn off your monitor if you're not using it.<br />
<br />
Just add the following line at the start of {{Filename|~/.fluxbox/startup}}:<br />
xset s off -dpms &<br />
<br />
==Additional Resources==<br />
<br />
* [http://fluxbox.org/ Fluxbox Homepage]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://en.gentoo-wiki.com/wiki/Fluxbox Gentoo Wiki about Fluxbox]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml Gentoo Fluxbox Documentation]<br />
* [http://box-look.org/ Themes for Fluxbox]<br />
* [http://wiki.archlinux.org/index.php/Fluxbox_Style_Guide Fluxbox Style Guide]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox Guide]<br />
* The fluxbox man pages: fluxbox, fluxbox-menu, fluxbox-style, fluxbox-keys, fluxbox-apps, fluxbox-remote, fbsetroot, fbsetbg, fbrun, startfluxbox.<br />
* [https://bbs.archlinux.org/viewtopic.php?id=90260 Archlinux-FluxBox screenshots]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Pacman/Pacnew_and_Pacsave&diff=162511Pacman/Pacnew and Pacsave2011-09-26T18:31:36Z<p>Lagagnon: /* Locating .pac* Files */</p>
<hr />
<div>[[Category:Package management (English)]]<br />
{{i18n|Pacnew and Pacsave Files}}<br />
{{Merge|pacman}}<br />
<br />
== Getting Started ==<br />
<br />
During package upgrades or removal [[Pacman]] will inform you of files (usually configurations in <code>/etc</code>) that are being installed with a {{Filename|.pacnew}} extension or backed up with a {{Filename|.pacsave}} extension.<br />
<br />
A {{Filename|.pacnew}} file may be created during a package upgrade ({{Codeline|pacman -Syu}}, {{Codeline|pacman -Su}} or {{Codeline|pacman -U}}) to avoid overwriting a file which already exists and was previously modified by the user. When this happens a message like the following will appear in the output of pacman:<br />
<br />
warning: /etc/pam.d/usermod installed as /etc/pam.d/usermod.pacnew<br />
<br />
A {{Filename|.pacsave}} file may be created during a package removal ({{Codeline|pacman -R}}), or by a package upgrade (the package must be removed first). When the pacman database has record that a certain file owned by the package should be backed up it will create a {{Filename|.pacsave}} file. When this happens pacman outputs a message like the following:<br />
<br />
warning: /etc/pam.d/usermod saved as /etc/pam.d/usermod.pacsave<br />
<br />
These files require manual intervention from the user and it is good practice to handle them right after every package upgrade or removal. If left unhandled, improper configurations can result in improper function of the software, or the software being unable to run altogether.<br />
<br />
== Package <code>backup</code> files ==<br />
<br />
A package's <code>PKGBUILD</code> file specifies which files should be preserved or backed up when the package is upgraded or removed. For example, the <code>PKGBUILD</code> for <code>pulseaudio</code> contains the following line:<br />
<br />
backup=('etc/pulse/client.conf' 'etc/pulse/daemon.conf' 'etc/pulse/default.pa')<br />
<br />
== Types Explained ==<br />
<br />
The different types of *.pac* files.<br />
<br />
===.pacnew===<br />
<br />
For each <code>backup</code> file in a package being upgraded, pacman cross-compares three [http://en.wikipedia.org/wiki/Md5sum md5sums] generated from the file's contents: one sum for the version originally installed by the package, one for the version currently in the filesystem, and one for the version in the new package. If the version of the file currently in the filesystem has been modified from the version originally installed by the package, pacman cannot know how to merge those changes with the new version of the file. Therefore, instead of overwriting the modified file when upgrading, pacman saves the new version with a <code>.pacnew</code> extension and leaves the modified version untouched.<br />
<br />
Going into further detail, the 3-way MD5 sum comparison results in one of the following outcomes:<br />
<br />
; original = ''X'', current = ''X'', new = ''X'' : All three versions of the file have identical contents, so overwriting is not a problem. Overwrite the current version with the new version and do not notify the user. (Although the file contents are the same, this overwrite will update the filesystem's information regarding the file's installed, modified, and accessed times, as well as ensure that any file permission changes are applied.)<br />
<br />
; original = ''X'', current = ''X'', new = ''Y'' : The current version's contents are identical to the original's, but the new version is different. Since the user hasn't modified the current version and the new version may contain improvements or bugfixes, overwrite the current version with the new version and do not notify the user. This is the only auto-merging of new changes that pacman is capable of performing.<br />
<br />
; original = ''X'', current = ''Y'', new = ''X'' : The original package and the new package both contain exactly the same version of the file, but the version currently in the filesystem has been modified. Leave the current version in place and discard the new version without notifying the user.<br />
<br />
; original = ''X'', current = ''Y'', new = ''Y'' : The new version is identical to the current version. Overwrite the current version with the new version and do not notify the user. (Although the file contents are the same, this overwrite will update the filesystem's information regarding the file's installed, modified, and accessed times, as well as ensure that any file permission changes are applied.)<br />
<br />
; original = ''X'', current = ''Y'', new = ''Z'' : All three versions are different, so leave the current version in place, install the new version with a <code>.pacnew</code> extension and warn the user about the new version. The user will be expected to manually merge any changes necessary from the new version into the current version.<br />
<br />
===.pacsave===<br />
<br />
If the user has modified one of the files specified in <code>backup</code> then that file will be renamed with a <code>.pacsave</code> extension and will remain in the filesystem after the rest of the package is removed.<br />
<br />
{{Box Note | Use of the <code>-n</code> option with <code>pacman -R</code> will result in complete removal of ''all'' files in the specified package, therefore no <code>.pacsave</code> files will be created.}}<br />
<br />
===.pacorig===<br />
<br />
When a file (usually a configuration found in <code>/etc</code>) is encountered during package installation or upgrade that doesn't belong to any installed package but is listed in <code>backup</code> for the package in the current operation, it will be saved with a <code>'''.pacorig'''</code> extension and replaced with the version of the file from the package. Usually this happens when a configuration file has been moved from one package to another. If such a file were not listed in <code>backup</code>, pacman would abort with a file conflict error.<br />
<br />
{{Box Note | Because <code>.pacorig</code> files tend to be created for special circumstances, there is no universal method for handling them. It may be helpful to consult the [http://www.archlinux.org/news/ Arch News] for handling instructions if it is a known case.}}<br />
<br />
== Locating .pac* Files==<br />
<br />
Arch Linux doesn't provide official utilities for {{Filename|.pacnew}} files. You'll need to maintain these yourself; a few tools are presented in the next section. To do this manually, first you will need to locate them. When upgrading or removing a large number of packages, updated *.pac* files may be missed. To discover whether any {{Filename|*.pac*}} files have been installed:<br />
<br />
To just search where most global configurations are stored:<br />
<br />
find /etc -name "*.pac*"<br />
<br />
or the entire disk:<br />
<br />
find / -name "*.pac*"<br />
<br />
Or use [[locate]] if you have installed it. First re-index the database:<br />
<br />
sudo updatedb<br />
<br />
Then:<br />
<br />
locate -e --regex "\.pac"<br />
<br />
Or use pacman's log to find them:<br />
<br />
egrep "pac(new|orig|save)" /var/log/pacman.log<br />
<br />
Note that the log doesn't keep track of which files are currently in the filesystem nor of which files have already been removed.<br />
<br />
== Managing .pacnew Files==<br />
<br />
Once all existing {{Filename|.pacnew}} files have been located, the user may handle them manually using common merge tools such as [http://wiki.archlinux.org/index.php/Vim#Merging_Files_.28Vimdiff.29 vimdiff], ediff (part of [[Emacs|emacs]]), {{Package Official|meld}} (a Gnome GUI tool), sdiff (part of {{Package Official|diffutils}}, or {{Package Official|Kompare}} (a KDE GUI gui tool), then deleting the {{Filename|.pacnew}} files afterwards.<br />
<br />
A few third-party utilities providing various levels of automation for these tasks are available from the [[AUR_User_Guidelines#.5Bcommunity.5D|community repository]] and [[ArchLinux User-community Repository (AUR)|user repository (AUR)]].<br />
<br />
*{{Package AUR|pacmerge-git}} - CLI interactive merge program<br />
*[[Dotpac]] - Basic interactive script with ncurses-based text interface and helpful walkthrough. No merging or auto-merging features.<br />
*pacdiff - Very minimal and undocumented CLI script. Part of the {{Package Official|pacman-contrib}} package in the <code>community</code> repo.<br />
*pacdiffviewer - Full-featured interactive CLI script with auto-merging capability. Part of the [[Yaourt|<code>yaourt</code>]] package.<br />
*{{Package AUR|diffpac}} - Standalone pacdiffviewer replacement<br />
*[[Yaourt]] - A package manager that supports the AUR repository. Use <code>yaourt -C</code> to compare, replace and merge configuration files..<br />
<br />
=== Using Meld to Update Differences ===<br />
<br />
Using meld in a loop can be used to update configuration files. This script will loop through the files one by one so you can make differences.<br />
<br />
<pre>#!/bin/bash<br />
# pacnew-update - merge *.pacnew files with original configurations with meld<br />
<br />
pacnew=$(find /etc -type f -name "*.pacnew")<br />
<br />
for config in $pacnew; do<br />
# Merge with meld<br />
kdesu meld ${config%\.*} $config &<br />
wait<br />
done</pre><br />
<br />
The above script uses KDE's {{Codeline|kdesu}} for graphical sudo permissions. Use {{Codeline|gksudo}} for Gnome/XFCE desktop environments. Optionally you can add {{Codeline|sudo rm -i $config}} to remove the files after you've edited them, but this will require system-wide privileges (likely). A better way to do this is to enter root after you have edited all your files and delete the {{Filename|*.pacnew}} files by:<br />
<br />
find /etc -type f -name "*.pacnew" -exec rm {} \;<br />
<br />
== Resources ==<br />
<br />
*Arch Linux Forums: [http://bbs.archlinux.org/viewtopic.php?id=53532 Dealing With .pacnew Files]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Toshiba_Satellite_L300&diff=161915Toshiba Satellite L3002011-09-24T01:46:44Z<p>Lagagnon: </p>
<hr />
<div>[[Category:Toshiba (English)]]<br />
This document applies in particular to Arch Linux on a Toshiba Satellite L300-OG1. It also applies to the entire L300 series on any modern Linux distribution (which uses at least kernel 2.6.36), and dependent upon what BIOS your system has. <br />
<br />
If your laptop has a BIOS version older than v2.20 you probably <b>will</b> have fan control problems and the "Fn" key and PC speaker probably will not work. See below for a method to upgrade your BIOS.<br />
<br />
Contact the author of this wiki with any problems or suggestions (lagagnon at gmail.com) (English or Spanish).<br />
<br />
==Specification==<br />
<br />
This laptop has a dual core Pentium T3400 CPU, 2GB RAM, 15.4" WXGA glossy LCD screen 1280x800, 250GB hard drive, DVD+ RW optical drive, PCMCIA, wireless, ethernet, modem, SD card slot, 3 USB ports, VGA out port, webcam, trackpad. Chip details from "lspci" are:<br />
<code><pre><br />
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)<br />
00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express PCI Express Root Port (rev 03)<br />
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)<br />
00:1c.00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)<br />
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)<br />
00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)<br />
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)<br />
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)<br />
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)<br />
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)<br />
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)<br />
00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)<br />
00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 03)<br />
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)<br />
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)<br />
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)<br />
00:1d.3 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)<br />
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)<br />
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)<br />
00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)<br />
00:1f.2 SATA controller: Intel Corporation ICH9M/M-E SATA AHCI Controller (rev 03)<br />
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)<br />
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)<br />
03:00.0 Network controller: Atheros Communications Inc. AR928X Wireless Network Adapter (PCI-Express) (rev 01)<br />
</pre></code><br />
<br />
==What Works Without Any Configuration?==<br />
<br />
Ethernet, Wireless, Microphone, Synaptic TouchPad, WebCam, USB ports, Card Reader, DVD optical drive, external video port (if booted with video device attached), CPU frequency scaling.<br />
<br />
==What Works With Minimal Configuration?==<br />
<br />
Suspend, Hibernate, Fan speed, Video tweaks, Audio, Function Keys (see below for configuring these)<br />
<br />
==What Does Not Work?==<br />
<br />
The Fn key and fan control after suspend/hibernate <i>if</i> your BIOS version is less than version 2.20. If you update your BIOS you will not have these problems.<br />
<br />
==Not Tested==<br />
<br />
PCMCIA, Modem.<br />
<br />
==Configurations== <br />
<br />
'''Video:''' Follow the [[Intel]] wiki entry for Intel video. Edit your /boot/grub/menu.lst kernel boot line. See below. If these suggested changes to /boot/grub/menu.lst and /etc/X11/xorg.conf are not made you may not be able to resume from suspend, will get flickering video on shutdown and other minor video faults, but your screen will generally work OK. Here is a suggested /etc/X11/xorg.conf file for reference:<br />
<code><pre><br />
Section "ServerLayout"<br />
Identifier "X.org Configured"<br />
Screen 0 "Screen0" 0 0<br />
InputDevice "Mouse0" "CorePointer"<br />
InputDevice "Keyboard0" "CoreKeyboard"<br />
EndSection<br />
<br />
Section "Files"<br />
ModulePath "/usr/lib/xorg/modules"<br />
FontPath "/usr/share/fonts/misc"<br />
FontPath "/usr/share/fonts/100dpi:unscaled"<br />
FontPath "/usr/share/fonts/75dpi:unscaled"<br />
FontPath "/usr/share/fonts/TTF"<br />
FontPath "/usr/share/fonts/Type1"<br />
EndSection<br />
<br />
Section "Module"<br />
Load "glx"<br />
Load "dri2"<br />
Load "dri"<br />
Load "extmod"<br />
Load "dbe"<br />
EndSection<br />
<br />
Section "InputDevice"<br />
Identifier "Keyboard0"<br />
Driver "kbd"<br />
EndSection<br />
<br />
Section "InputDevice"<br />
Identifier "Mouse0"<br />
Driver "mouse"<br />
Option "Protocol" "auto"<br />
Option "Device" "/dev/input/mice"<br />
Option "ZAxisMapping" "4 5 6 7"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
VendorName "Monitor Vendor"<br />
ModelName "Monitor Model"<br />
EndSection<br />
<br />
Section "Device"<br />
Option "DRI" "True"<br />
Option "NoDDC" "True"<br />
#Option "XAANoOffscreenPixmaps" "True"<br />
Option "EnablePageFlip" "True"<br />
Option "RenderAccel" "True"<br />
Option "AccelMethod" "UXA"<br />
Option "Tiling" "False"<br />
Identifier "Card0"<br />
Driver "intel"<br />
VendorName "Intel Corporation"<br />
BoardName "Mobile 4 Series Chipset Integrated Graphics Controller"<br />
BusID "PCI:0:2:0"<br />
EndSection<br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0"<br />
Monitor "Monitor0"<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 1<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 4<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 8<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 15<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 16<br />
EndSubSection<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
</pre></code><br />
<br />
<b>kernel boot parameters (/boot/grub/menu.lst):</b> Heed the [[Intel]] video changes and boot manager kernel parameters should include:<br />
<br />
<code> kernel /vmlinuz-linux root=/dev/disk/by-uuid/your_UUID_here acpi_osi="Linux" ro i915.modeset=1 resume=/dev/sda3<br />
</code><br />
<br />
The important kernel parameters above are: <i>acpi_osi="Linux"</i> (fan will not function correctly without), <i>resume=/dev/sda3</i> (this is the swap partition, without which hibernate will not work) and <i>i915.modeset=1</i>, necessary for KMS video on the Intel graphics chip.<br />
<br />
<b>Suspend/Hibernate:</b> The "pm-suspend" and "pm-hibernate" scripts from the pm-utils package work <i>but</i> ACPI fan control after any suspend or hibernate will only function properly with BIOS version 2.20 or higher.<br />
<br />
<b>Function Keys:</b> To get the "Fn" key to work one may need to upgrade your BIOS (see below). With a working Fn key the Num Lock key will function. However, you will still have to bind the hardware function key combinations to specific Linux facilities depending on what desktop environment you use. For instance "Fn+F4" is the "hibernate" facility. You have to bind the hibernate script that you specifically use to that key combo. The same goes for screen brightness, suspend, etc. This is not done automatically in Linux. The old "toshiba_acpi" and "fnfx" modules do not work with the InsydeH2O BIOS, they only work with Toshiba-written BIOSes.<br />
<br />
For information on how to bind keycodes (e.g. Fn+F4) read [[Extra Keyboard Keys]]. E.G.: bind these following key combinations to their keycodes and then to the following scripts:<br />
<ul><br />
<li>Fn+F1 - xscreensaver-command -lock<br />
<li>Fn+F2 - sleep 1 && xset dpms force off<br />
<li>Fn+F3 - sudo pm-suspend<br />
<li>Fn+F4 - sudo pm-hibernate<br />
<li>Fn+F6 - xbacklight -dec 80<br />
<li>Fn+F7 - xbacklight -inc 80<br />
<li>Fn+F9 - (see the "Software Toggle" here): [[Touchpad Synaptics]]<br />
</ul><br />
<b>Audio:</b> Should just work, but ensure by using "alsamixer", that the "Front" mixer is set to max, or near max. By default it may be set at zero. Read [https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture#Restore_ALSA_Mixer_settings_at_startup restoring alsa settings] to find out how to store alsamixer settings between reboots.<br />
<br />
<b>Bluetooth:</b> This laptop does not have in-built Bluetooth, but works just great with any bluetooth dongle via USB if you follow these [[Bluetooth]] instructions.<br />
<br />
==Upgrading your BIOS==<br />
<br />
It seems that most of the L300 and L305 series laptops come with the InsydeH2O BIOS version 1.50. This BIOS is faulty with Linux and results in a dead Fn key and an improperly controlled fan. It is vital to get the fan working properly especially if you wish to use suspend and/or hibernate. The dead Fn key problem however is not a show stopper. The upgraded BIOS will also mean the PC speaker will start working! Toshiba Canada has the latest BIOS version (v2.2 at January 2011) here: http://support.toshiba.ca/support/Download/ln_byModel.asp . Ensure you get the correct file for your specific model. This file is a Windows-only executable - it does not contain anything usable under DOS. Nor can this BIOS be flashed using the Linux "flashrom" application. There are only two ways to flash the ROM with that file:<br />
<ol><br />
<li>Run the file as an executable under a Microsoft Windows environment that you are dual booting with Linux, or, </li><br />
<li>Use the undocumented "brick" repair method (below) proposed by Toshiba</li><br />
</ol><br />
As the first method is straightforward it will not be discussed here. Below is the alternate method outlined for Linux users (<b>Note</b>: you do this at your own risk - if done improperly you may permanently "brick" your laptop):<br />
<ol><br />
<li>the .exe file is a 7z compressed file. Use the command "7z e filename.exe" to extract. You may have to install a 7z package first.</li><br />
<li>the only important file in the extract is the .fd file. Rename that file to "BIOS.fd"</li><br />
<li>copy the BIOS.fd file onto the root directory of a USB flash drive<br />
<li>remove any inserted CD, the power cord, the battery, and the hard drive from your laptop</li><br />
<li>insert the USB flash drive into a USB port on your laptop</li><br />
<li>simultaneously hold down the "Fn" and "F" keys</li><br />
<li>plug in the power cord to the laptop while still holding Fn+F<br />
<li>press Power On button of laptop while still holding Fn+F<br />
<li>USB flash drive light should start to flash. You may now release the Fn+F keys after a few seconds<br />
<li>leave laptop for about 1 minute. The ROM is being flashed. Your laptop will eventually turn itself off and it may reboot.<br />
<li>you may turn off laptop now if it has rebooted successfully. If it just turned itself off then continue...<br />
<li>unplug power cord, remove USB flash drive, replace laptop hard drive and laptop battery. Replug power cord.<br />
<li> reboot laptop and enter the BIOS setup using "F2". You should see that it has successfully upgraded your BIOS.<br />
</ol></div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Fluxbox&diff=161733Fluxbox2011-09-23T00:25:58Z<p>Lagagnon: /* Installation */</p>
<hr />
<div>[[Category:Stacking WMs (English)]]<br />
{{i18n|Fluxbox}}<br />
[[fr:Fluxbox]]<br />
Fluxbox is yet another window manager for X. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit and there are hundreds of fluxbox "styles" to make your desktop look great. ArchLinux with FluxBox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.<br />
<br />
==Installation==<br />
<br />
Install Fluxbox is as easy as:<br />
<br />
# pacman -S fluxbox<br />
<br />
== Starting Fluxbox ==<br />
=== Method 1: KDM/GDM Login/Session Managers ===<br />
Users of [[KDM]] or [[GDM]] will find a new fluxbox entry added to their session menu automatically. Simply choose the fluxbox option from the session menu when logging in.<br />
<br />
=== Method 2: ~/.xinitrc ===<br />
Edit {{Filename|~/.xinitrc}} and add the following code:<br />
<br />
exec startfluxbox <br />
<br />
If you like to have devices automounted (e.g. in Thunar and other file managers), use this code instead:<br />
<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
See [[Xinitrc]] for more details. You then use the "startx" command from a terminal to launch X and your window manager.<br />
<br />
=== Method 3: SLiM Login Manager ===<br />
<br />
SLiM, the Simple Login Manager, is a favourite of many Archlinux users due to its efficiency. SLiM reads ~/.xinitrc, so if you have your .xninitrc correct as above then it should just work. However, if you want to use SLiM to be able to choose between a number of different window managers/desktop environments then edit the sessions variable in {{Filename|/etc/slim.conf}} to match the names that trigger the case statement in {{Filename|~/.xinitrc}}. See [[Slim]] and [[Xinitrc]].<br />
<br />
== Configuration ==<br />
<br />
System-wide fluxbox configuration files are in {{Filename|/usr/share/fluxbox}} while user configuration files are in {{Filename|~/.fluxbox}}. The user config files are:<br />
<ul><br />
<li>init: the main fluxbox resource configuration file. See [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file]<br />
<li>menu: the fluxbox menu config. See below and [http://fluxbox-wiki.org/index.php?title=Editing_the_menu Editing the menu file]<br />
<li>keys: the fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/index.php?title=Keyboard_shortcuts here]<br />
<li>startup: where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/index.php?title=Editing_the_startup_file here]<br />
<li>overlay: a config file to override elements of styles. See [http://fluxbox-wiki.org/index.php?title=Style_overlay here].<br />
<li>apps: a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/index.php?title=Editing_the_apps_file here]<br />
<li>windowmenu: a config file for altering the Window Menu itself: [http://fluxbox-wiki.org/index.php?title=Editing_the_windowmenu read this]<br />
</ul><br />
There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.<br />
<br />
=== Menu Management ===<br />
<br />
When you first install fluxbox a very basic applications menu will be created at ~/.fluxbox/menu. You access the menu via a right mouse button click on the desktop. To enhance the menu and add/edit items there are basically four ways to do it:<br />
<br />
==== fluxbox-generate_menu ====<br />
There is a built-in command provided with fluxbox:<br />
$ fluxbox-generate_menu<br />
This command will auto-generate a {{Filename|~/.fluxbox/menu/}} file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by "menumaker" (see immediately below).<br />
<br />
====MenuMaker====<br />
[http://menumaker.sourceforge.net MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Fluxbox. MenuMaker will search your computer for executable programs and create a menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if desired.<br />
<br />
To install MenuMaker:<br />
# pacman -S menumaker<br />
<br />
Once installed, you can generate a complete menu and overwrite the default one by running:<br />
$ mmaker -f FluxBox<br />
<br />
To see MenuMaker options:<br />
$ mmaker --help<br />
<br />
==== Arch Linux Xdg menu ====<br />
Requires [[XdgMenu]] which is available via pacman:<br />
# pacman -S archlinux-xdg-menu<br />
<br />
To then create a fluxbox menu:<br />
$ xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
<br />
More info:<br />
$ xdg_menu --help<br />
<br />
==== Manually create/edit the menu ====<br />
Use your favourite text editor and edit the file: "~/.fluxbox/menu" .<br />
The basic syntax for a menu item to appear is:<br />
[exec] (name) {command}<br />
<br />
...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:<br />
[exec] (Firefox Browser) {/usr/bin/firefox}<br />
<br />
If you want to make submenu write:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
When done editing save the file and exit. There is no need to restart fluxbox. For more info read [http://fluxbox-wiki.org/index.php?title=Editing_the_menu editing the fluxbox menu].<br />
<br />
===Init===<br />
The ~/.fluxbox/init file is FluxBox's primary configuration resource file. You can change the basic functionality of fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file].<br />
<br />
===Hotkeys===<br />
Fluxbox offers basic hotkeys functionality. The fluxbox hotkey file is located at {{Filename|~/.fluxbox/keys}}.<br />
The Control key is represented by "Control". Mod1 corresponds to the Alt key and Mod4 corresponds to Meta (not a standard key but most users map Meta to the "Win" key). When installed and first run Fluxbox will provide you with a very usable, almost complete set of hotkeys. You should peruse and learn the ~/.fluxbox/keys file to enhance your FluxBox experience.<br />
<br />
Example: here is a quick way to control the Master volume:<br />
Control Mod1 Up :Exec amixer set Master,0 5%+ <br />
Control Mod1 Down :Exec amixer set Master,0 5%-<br />
<br />
===Workspaces===<br />
Fluxbox defaults to having four workspaces. These are accessible using Ctrl+F1-F4 shortcuts, or by using the left mouse button to click the arrows on the toolbar. You can also access workspaces via a middle mouse button click on desktop which pops up the Workspaces Menu.<br />
<br />
===Tabbing and Grouping===<br />
With at least two windows visible on your desktop middle click on the upper window tab of one window and drag it into the other open window. The two windows will now be grouped together with window tabs in the upper window tab bar. You may now perform a window operation that will affect the entire window "group".<br />
<br />
===Background (Wallpaper)===<br />
Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The fluxbox-wiki now has an entry for [http://fluxbox-wiki.org/index.php?title=Howto_set_the_background background setting], so please refer to that. <br />
<br />
The easiest way to do it with ArchLinux is to first of all check that you have a background setting application available:<br />
$ fbsetbg -i<br />
<br />
If not, install either feh, esetroot or wmsetbg using pacman. Then add this line to your ~/.xinitrc file, e.g.:<br />
fbsetbg /path/to/my/image.image<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
====Swapping Multiple Backgrounds Easily====<br />
<br />
Place the following submenu in your fluxbox menu:<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
Then put your background images into {{Filename|~/.fluxbox/backgrounds}} or any other folder you specify, they will then appear in the same fashion as your styles.\<br />
<br />
====Using Feh with FluxBox====<br />
Install feh with:<br />
# pacman -S feh<br />
You may add a quick submenu to your {{Filename|~/.fluxbox/menu}} file which will allow you to change backgrounds on-the-fly:<br />
[submenu] (Backgrounds)<br />
[backgrounds] (/path/to/your/backgrounds) {feh --bg-scale}<br />
[end]<br />
<br />
To make sure fluxbox will load feh background next time start:<br />
<br />
'''1.''' Make {{Filename|.fehbg}} executable:<br />
$ chmod 770 ~/.fehbg<br />
<br />
'''2.''' Then add (or modify) the following line to the file {{Filename|~/.fluxbox/init}}:<br />
session.screen0.rootCommand: ~/.fehbg<br />
<br />
'''3.''' or add (or modify) the following line to the file {{Filename|~/.fluxbox/startup}}:<br />
~/.fehbg<br />
<br />
===Theming===<br />
To install a fluxbox theme extract the theme archive file to a styles directory. The default directories are:<br />
*global - {{Filename|/usr/share/fluxbox/styles}}<br />
*user only - {{Filename|~/.fluxbox/styles}}<br />
<br />
The ArchLinux [[AUR]] currently contains a compilation of good looking fluxbox themes called "fluxbox-styles". Get it [http://aur.archlinux.org/packages.php?ID=28743 here] and install this package for more themes than you could possibly use. When installed correctly they will appear in the Fluxbox, Styles section of your Fluxbox menu.<br />
<br />
To create your own Fluxbox styles read [[Fluxbox_Style_Guide]] and this [http://tenr.de/howto/style_fluxbox/style_fluxbox.html style guide].<br />
<br />
===The Slit===<br />
Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit [http://dockapps.org Dockapps.org] <br />
<br />
===Autostarting Applications===<br />
The ArchLinux way to autostart apps is to put all code into {{Filename|~/.xinitrc}}. Please read [[Xinitrc]]. However, fluxbox provides functionality to autostart applications on its own. The {{Filename|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting fluxbox itself. The # symbol denotes a comment.<br />
<br />
A sample file:<br />
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.<br />
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. <br />
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.<br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> exec is for starting fluxbox itself, don't put an ampersand (&) after this or fluxbox will exit immediately<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:<br />
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Other Menus===<br />
<br />
In the "Menu Management" section (above) we were discussing the main "Applications" Menu, called the "Root" menu in fluxbox lingo. FluxBox also has other menus available to the user:<br />
<ul><br />
<li>Workspaces Menu: middle click on desktop.<br />
<li>Configuration Menu: located within the "Fluxbox" section of the "Root" menu.<br />
<li>Window menu: right click on the titlebar of any window, or its bar if minimized. Can be edited. See fluxbox-menu man page.<br />
<li>Toolbar menu: right click on empty part of toolbar. Also found as a sub-menu within the Configuration Menu.<br />
<li>Slit Menu: found as a sub-menu within the configuration menu.<br />
</ul><br />
<br />
===Transparent rxvt-unicode terminals===<br />
Install urxvt:<br />
# pacman -S rxvt-unicode<br />
<br />
Launch urxvt with these options:<br />
$ urxvt -depth 32 -bg rgba:0000/0000/0000/bbbb -tint grey<br />
<br />
Or you can edit your ~/.Xdefaults file and place the equivalent urxvt commands in that file. See [[Xdefaults]] for more info.<br />
<br />
===A life after xorg.conf===<br />
Xorg no longer requires an xorg.conf file. Traditionally this is where you would change your keyboard settings and powersave settings. Luckily there are elegant solutions not using xorg.conf. <br />
<br />
====Setting your keyboard right====<br />
Just add the following line to {{Filename|~/.fluxbox/startup}}:<br />
setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)<br />
<br />
Instead of 'us' you can also pass your language code and remove the variant option (ex.: 'us_intl', which works like the command above in some setups). See man setxkbmap for more options.<br />
<br />
To make a help function in your menu, just add in {{Filename|~/.fluxbox/menu}}:<br />
[submenu] (Keyboard)<br />
[exec] (normal) {setxkbmap us}<br />
[exec] (international) {setxkbmap us -variant intl}<br />
[end]<br />
<br />
====Disable Powersave====<br />
Do you recognize the problem while watching a movie that the screen goes blank? Congratulations, Xorg just detected that you were doing nothing :). If you don't need these movement exercises, you can disable this feature altogether. You'll just have to remember to manually turn off your monitor if you're not using it.<br />
<br />
Just add the following line at the start of {{Filename|~/.fluxbox/startup}}:<br />
xset s off -dpms &<br />
<br />
==Additional Resources==<br />
<br />
* [http://fluxbox.org/ Fluxbox Homepage]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://en.gentoo-wiki.com/wiki/Fluxbox Gentoo Wiki about Fluxbox]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml Gentoo Fluxbox Documentation]<br />
* [http://box-look.org/ Themes for Fluxbox]<br />
* [http://wiki.archlinux.org/index.php/Fluxbox_Style_Guide Fluxbox Style Guide]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox Guide]<br />
* The fluxbox man pages: fluxbox, fluxbox-menu, fluxbox-style, fluxbox-keys, fluxbox-apps, fluxbox-remote, fbsetroot, fbsetbg, fbrun, startfluxbox.<br />
* [https://bbs.archlinux.org/viewtopic.php?id=90260 Archlinux-FluxBox screenshots]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=HP_Pavilion_ze5600&diff=161569HP Pavilion ze56002011-09-22T17:59:12Z<p>Lagagnon: /* News Flash, September 2011 */</p>
<hr />
<div>[[Category:HP (English)]]<br />
This document applies in particular to ArchLinux on an HP Pavilion ze5615CA laptop. It also applies to the entire ze5600 series on any modern Linux distribution that uses kernel 2.6.39 or later. Feel free to contact the author with problems or suggestions (lagagnon at gmail.com , English or Spanish).<br />
<br />
==Specifications==<br />
<br />
The ze5600 has as standard an Intel Celeron 2800MHz CPU, 512MB RAM (of which 446MB are available due to video chip RAM sharing), 40GB IDE hard drive, wireless, modem, DVD ROM optical drive, 2 PCMCIA ports, touchpad, multimedia keys, 15" LCD screen, 3 USB ports, S-video and VGA out ports, parallel port, PS/2 port, IR sensor. Chip details from lspci:<br />
<br />
<code><pre><br />
00:00.0 Host bridge: ATI Technologies Inc RS200/RS200M AGP Bridge [IGP 340M] (rev 02)<br />
00:01.0 PCI bridge: ATI Technologies Inc PCI Bridge [IGP 340M]<br />
00:06.0 Multimedia audio controller: ALi Corporation M5451 PCI AC-Link Controller Audio Device (rev 02)<br />
00:07.0 ISA bridge: ALi Corporation M1533/M1535/M1543 PCI to ISA Bridge [Aladdin IV/V/V+]<br />
00:08.0 Modem: ALi Corporation M5457 AC'97 Modem Controller<br />
00:09.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 02)<br />
00:0a.0 CardBus bridge: O2 Micro, Inc. OZ601/6912/711E0 CardBus/SmartCardBus Controller<br />
00:0b.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 50)<br />
00:0b.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 50)<br />
00:0b.2 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 51)<br />
00:10.0 IDE interface: ALi Corporation M5229 IDE (rev c4)<br />
00:11.0 Bridge: ALi Corporation M7101 Power Management Controller [PMU]<br />
00:12.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller<br />
01:05.0 VGA compatible controller: ATI Technologies Inc Radeon IGP 330M/340M/350M<br />
</pre></code><br />
<br />
==What Works Without Configuration?==<br />
<br />
Ethernet, video, audio, microphone, touchpad, USB ports, optical drive, external video port (if booted with video device attached), CPU frequency scaling, screen brightness keys.<br />
<br />
==What Requires Configuration?==<br />
<br />
Wireless<br />
<br />
==What Does Not Work?==<br />
<br />
Three of the upper multimedia keys (2nd, 4th and 5th from left), fn+f12, wireless off switch at front right of laptop and audio mute switch at right front side of laptop. The IR port also probably does not work as it is not detected by "lspci" nor by "lshw".<br />
<br />
==Not Tested==<br />
<br />
PCMCIA, Modem, IR Port, S-Video port, parallel port.<br />
<br />
==Configurations== <br />
<br />
<b>Wireless:</b> The older Broadcom wireless chip in this laptop requires the <b>b43legacy</b> module to function properly. Also, you must specifically follow the instructions on how to install the firmware - this is explained here: https://wiki.archlinux.org/index.php/Broadcom_wireless#b43.2Fb43legacy . The wireless off hardware switch at right front of laptop does not work but you can do almost the equivalent with:<br />
<code>sudo iwconfig wlan0 txpower off</code><br />
<br />
<b>Video:</b> The older ATI IGP 330M video chip in this laptop requires the xf86-video-ati <b>radeon</b> open-source driver. Apparently the latest "catalyst" drivers from ATI do not work with this chip, but have not been tested. The radeon driver, however, works well, but runs a bit hot (see below). <br />
<br />
<b>Kernel boot parameters:</b> It <i>might</i> make some difference to your power consumption if you add the following kernel parameters to the "kernel" line of your boot manager configuration file (for those using grub this is /boot/grub/menu.lst):<br />
<br />
<code>acpi_enforce_resources=lax pcie_aspm=force</code><br />
<br />
<b>Suspend/Hibernate:</b> The "pm-suspend" and "pm-hibernate" scripts from the [[pm-utils]] package work well but you need to bind keyboard shortcuts (see [[Extra Keyboard Keys]] ) to access these scripts because fn+f12 has no scancode.<br />
<br />
<b>Function Keys:</b> Only two of the upper keyboard silver multimedia keys have scancodes. For information on how to bind keycodes please read [[Extra Keyboard Keys]]. <br />
<br />
<b>CPU Temperature:</b> The [[Lm sensors]] package utility "sensors-detect" does not find any sensor chips. Instead, read the file:<br />
<br />
<code>/sys/devices/LNXSYSTM:00/device:13/LNXTHERM:00/thermal_zone/temp</code><br />
<br />
in order to get the CPU temperature. Using ArchLinux with kernel 2.6.39 I find that this laptop runs quite hot. It starts at about 32degC and then continues to climb to 47deg C, with the fan on past 47degC, even at idle, with less than 2% CPU activity. Energy saving tools as per [[Laptop]] have been used, but to little avail. The laptop consumes about 25 watts at idle with the screen on at about mid brightness. It is possible that some of the heat may be generated by the video chip as the "radeon" module apparently can run the video chip hotter than necessary. The author had no success getting energy saving features of this video chip activated as per https://wiki.archlinux.org/index.php/Ati#With_KMS_enabled because those particular systems files are not present, which suggest that this older ATI chip does not have these features. The author would be interested to learn if other owners have success in dropping the power usage and temperature level of this laptop.<br />
<br />
==Considerations==<br />
<br />
The ze5600 is now older hardware. Out of the box it has only 446MB RAM available. It is suggested that if you wish to use either the Gnome or KDE desktop environments that you install a further 512MB RAM memory chip, otherwise you will be using your swap partition and you can therefore expect sluggishness. The author uses the Fluxbox window manager so 446MB of RAM is plenty and the ArchLinux system boots from cold button press to a ready desktop in just 35 seconds, including a SLiM graphical login page. It shuts down in about 7 seconds and resumes from suspend in about 2 seconds. Immediately after desktop ready and with one urxvt terminal open it has used just 47MB, excluding buffers and cache! The Opera browser launches from cold within 9 seconds. Some modern laptops running Windows 7 perform much worse than this. Have fun with it, it is still an incredibly usable laptop with the right operating system and a lightweight window manager installed. <br />
<br />
Also, many owners have commented how annoying all those bright blue multimedia key LED lights are, being as they are located immediately beneath the screen. Place black electrical tape over them and then with a razor knife cut around the tape to form the tape to the grill edges and reading the screen will be much easier on the eyes.<br />
<br />
Any of the upper multimedia keys can be used as an on/off switch and a resume from suspend/hibernate key. This is useful because the default on/off button for this laptop is poorly designed and often fails or requires significant pressure to work properly.<br />
<br />
On the laptop base there are 4 L-shaped rubber feet. These often go astray on older poorly-treated laptops. They are essential for keeping the laptop cool as they allow free air flow into the fans which suck from the bottom. You can replace them with an appropriate length of black mouse cord and contact cement if necessary.<br />
<br />
As these are now old laptops it is likely the battery can no longer be charged to default capacity. Reasonable quality Li-Ion batteries for this laptop can be purchased from China, including shipping, for about $USD34 (eBay).<br />
<br />
The age of these laptops is approaching 9 years. The CPU heat sink compound had deteriorated on the author's laptop. Renewing the heat sink compound (thermal grease) reduced CPU temperature quite significantly and also reduced the amount of time and the speed at which the fans run. If you wish to do this to your laptop you need the service manual, a link to which can be found here: http://archlinux.me/kcirick/category/systems/ze5600/ .<br />
<br />
==BIOS Flashing Concerns==<br />
<br />
It is possible that a BIOS upgrade may fix some of the missing key scancodes and missing hardware control function as listed above. But probably not ;-). Nonetheless if you wish to upgrade your BIOS this is how to do it in Linux. The BIOS upgrade download at the HP support website ( http://tinyurl.com/629wd38 ) is a Windows only executable file and is designed to create a bootable floppy disk. This is about as useless as tits on a bull because this laptop has no floppy drive! To get it to flash under Linux you need to:<br />
<ol><br />
<li>Run the Windows BIOS upgrade file as an executable using any computer running MS Windows<br />
<li>Rather than inserting a floppy when requested to do so use Windows Explorer to navigate to the directory where the extracted image file (rom.img) was stored.<br />
<li>Copy the rom.img file to a USB thumb drive and then copy that file from the thumb drive into your Linux system<br />
<li>Using "unetbootin" ( http://unetbootin.sourceforge.net ) create a bootable FreeDOS USB thumb drive with that image file<br />
<li>Set the BIOS to boot first from a USB device<br />
<li>Boot your laptop from the USB thumb drive<br />
<li>The BIOS flashing software (Phoenix Phlash) should start automatically<br />
</ol><br />
This procedure should be foolproof yet did not work for the author. The Phlash software started up but hangs at reading the .bin file. It is possible that "Phlash" balks at reading data from USB. Someone needs to test this with an external floppy drive device and see if a BIOS flash upgrade really does work on this laptop.</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Improving_performance&diff=160728Improving performance2011-09-19T20:13:52Z<p>Lagagnon: /* Preload */</p>
<hr />
<div>[[Category:Hardware (English)]]<br />
[[Category:Software (English)]]<br />
{{i18n|Maximizing Performance}}<br />
This article is a retrospective analysis and basic rundown about gaining performance in Arch Linux.<br />
<br />
==The basics==<br />
<br />
===Know your system===<br />
The best way to tune a system is to target the bottlenecks, that is the subsystems that limit the overall speed. They usually can be identified by knowing the specifications of the system, but there are some basic indications:<br />
* If the computer becomes slow when big applications, like OpenOffice.org and Firefox, are running at the same time, then there is a good chance the amount of RAM is insufficient. To verify available RAM, use this command, and check for the line beginning with -/+buffers:<br />
$ free -m<br />
* If boot time is really slow, and if applications take a lot of time to load the first time they are launched, but run fine afterwards, then the hard drive is probably too slow. The speed of a hard drive can be measured using the hdparm command:<br />
$ hdparm -t /dev/harddrive<br />
This is only the pure read speed of the hard drive, and is not a valid benchmark, but a value superior to 40MB/s (assuming drive tested while idle) can be considered decent on an average system.<br />
* If the CPU load is consistently high even when RAM is available, then lowering CPU usage should be a priority. CPU load can be monitored in many ways, like using the top command:<br />
$ top<br />
* If the only applications lagging are the ones using direct rendering, meaning they use the graphic card, like video players and games, then improving the graphic performance should help. First step would be to verify if direct rendering simply is not enabled. This is indicated by the glxinfo command:<br />
$ glxinfo | grep direct<br />
<br />
===The first thing to do===<br />
The simplest and most efficient way of improving overall performance is to run lightweight environments and applications.<br />
* Use a [[Window Manager|window manager]] instead of a [[Desktop Environment]]. Choices include [[dwm]], [[wmii]], [[Awesome]], [[Openbox]], [[Fluxbox]] and [[JWM]].<br />
* Choose a minimal Desktop Environment over [[GNOME]] and [[KDE]]. Choices include [[LXDE]] and [[Xfce]].<br />
* Using lightweight applications. See [[Lightweight Software]] and the Light and Fast Applications Awards threads in the forum: [http://bbs.archlinux.org/viewtopic.php?id=41168 2007], [http://bbs.archlinux.org/viewtopic.php?id=67951 2008], [http://bbs.archlinux.org/viewtopic.php?id=78490 2009],[http://bbs.archlinux.org/viewtopic.php?id=88515 2010], and [http://bbs.archlinux.org/viewtopic.php?id=111878 2011].<br />
* Remove unnecessary [[daemons]] and background what daemons you can in {{Filename|/etc/rc.conf}}.<br />
<br />
===Compromise===<br />
Almost all tuning brings drawbacks. Lighter applications usually come with less features and some tweaks may make a system unstable, or simply require time to implement and maintain. This page tries to highlight those drawbacks, but the final judgment rests on the user.<br />
<br />
===Benchmarking===<br />
The effects of optimization are often difficult to judge. They can however be measured by [[benchmarking]] tools<br />
<br />
==Storage devices==<br />
===Choosing and tuning your filesystem===<br />
Choosing the best filesystem for a specific system is very important because each has its own strengths. The [[Beginner's Guide#Filesystem Types|beginner's guide]] provides a short summary of the most popular ones. You can also find relevant articles [[:Category:File systems (English)|here]].<br />
<br />
====Summary====<br />
*XFS: Excellent performance with large files. Low speed with small files. A good choice for /home.<br />
*Reiserfs: Excellent performance with small files. A good choice for /var.<br />
*Ext3: Average performance, reliable.<br />
*Ext4: Great overall performance, reliable, has performance issues with sqlite and some other databases.<br />
*JFS: Good overall performance, very low CPU usage, extremely fast resume after power failure.<br />
*Btrfs: Great overall performance (better than ext4), reliable (once it becomes stable). Lots of features. Still in heavy development and considered as unstable. Do not use this filesystem yet unless you know what you are doing and are prepared for potential data loss.<br />
<br />
====Mount options====<br />
Mount options offer an easy way to improve speed without reformatting. They can be set using the mount command:<br />
$ mount -o option1,option2 /dev/partition /mnt/partition<br />
To set them permanently, you can modify /etc/fstab to make the relevant line look like this:<br />
/dev/partition /mnt/partition partitiontype option1,option2 0 0<br />
A couple of mount options improving performance on almost all file-systems is {{Codeline|noatime,nodiratime}}. The former is a superset of the latter (which applies to directories only -- {{Codeline|noatime}} applies to both files and directories). In rare cases, for example if you use mutt, it can cause minor problems. You can instead use the {{Codeline|relatime}} option (NB relatime is the default in >2.6.30)<br />
<br />
====Ext3====<br />
See [[Ext3 Filesystem Tips]].<br />
<br />
====Ext4====<br />
See the [[Ext4#Improving performance | Ext4 wiki page]].<br />
<br />
====JFS====<br />
See [[JFS Filesystem#Optimizations| JFS Filesystem]].<br />
<br />
====XFS====<br />
For optimal speed, create an XFS file-system with:<br />
$ mkfs.xfs -l internal,lazy-count=1,size=128m -d agcount=2 /dev/thetargetpartition<br />
An XFS specific mount option that may increase performance is {{Codeline|<nowiki>logbufs=8</nowiki>}}. <br />
<br />
#/etc/fstab<br />
LABEL=XFSHOME /home xfs noatime,logbufs=8 0 1<br />
<br />
==== Reiserfs ====<br />
<br />
The {{Codeline|<nowiki>data=writeback</nowiki>}} mount option improves speed, but may corrupt data during power loss. The {{Codeline|notail}} mount option increases the space used by the filesystem by about 5%, but also improves overall speed. You can also reduce disk load by putting the journal and data on separate drives. This is be done when creating the filesystem: <br />
<br />
$ mkreiserfs –j /dev/hda1 /dev/hdb1<br />
<br />
Replace /dev/hda1 with the partition reserved for the journal, and /dev/hdb1 with the partition for data. You can learn more about reiserfs with this [http://www.funtoo.org/en/articles/linux/ffg/2/ article].<br />
<br />
====BTRFS====<br />
See [[Btrfs#Compression|compression]].<br />
<br />
===Compressing {{Filename|/usr}}===<br />
A way to speed up reading from the hard drive is to compress the data, because there is less data to be read. It must however be decompressed, which means a greater CPU load. Some filesystems support transparent compression, most notably btrfs and reiserfs4, but their compression ratio is limited by the 4k block size. A good alternative is to compress {{Filename|/usr}} in a squashfs file, with a 64k(128k) block size, as instructed in this [http://forums.gentoo.org/viewtopic-t-646289.html Gentoo forums thread]. What this tutorial does is basically to compress the {{Filename|/usr}} folder into a compressed squashfs file-system, then mounts it with aufs. A lot of space is saved, usually two thirds of the original size of {{Filename|/usr}}, and applications load faster. However, each time an application is installed or reinstalled, it is written uncompressed, so {{Filename|/usr}} must be re-compressed periodically. Squashfs is already in the kernel, and aufs2 is in the extra repository, so no kernel compilation is needed if using the stock kernel.<br />
Since the linked guide is for Gentoo the next commands outline the steps especially for Arch. Basically we have got install two packages to get it working:<br />
# pacman -S aufs2 squashfs-tools<br />
This command installs the aufs-modules and some userspace-tools for the squash-filesystem.<br />
Now we need some extra directories where we can store the archive of {{Filename|/usr}} as read-only and another folder where we can store the data changed after the last compression as writeable:<br />
# mkdir -p /squashed/usr/{ro,rw}<br />
Now that we got a rough setup you should perform a complete system-upgrade since every change of content in {{Filename|/usr}} after the compression will be excluded from this speedup. If you use prelink you should also perform a complete prelink before creating the archive. Now it is time to invoke the command to compress {{Filename|/usr}}:<br />
# mksquashfs /usr /squashed/usr/usr.sfs -b 65536<br />
These parameters/options are the ones suggested by the Gentoo link but there might be some room for improvement using some of the options described [http://www.tldp.org/HOWTO/SquashFS-HOWTO/mksqoverview.html#mksqusing here].<br />
Now to get the archive mounted together with the writeable folder it is necessary to edit {{Filename|/etc/fstab}}:<br />
# nano /etc/fstab<br />
Add the following lines:<br />
/squashed/usr/usr.sfs /squashed/usr/ro squashfs loop,ro 0 0 <br />
usr /usr aufs udba=reval,br:/squashed/usr/rw:/squashed/usr/ro 0 0<br />
Now you should be done and able to reboot. The original Author suggests to delete all the old content of {{Filename|/usr}}, but this might cause some problems if anything goes wrong during some later re-compression. It is more safe to leave the old files in place just to be on the safe side.<br />
<br />
A [http://bbs.archlinux.org/viewtopic.php?pid=714052 bash script] has been created that will automate the process of re-compressing (read updating) the archive since the tutorial is meant for Gentoo and some options do not correlate to what they should be in Arch.<br />
<br />
===Tuning for an SSD===<br />
[[SSD#Tips_for_Maximizing_SSD_Performance]]<br />
<br />
==CPU==<br />
The only way to directly improve CPU speed is overclocking. As it is a complicated and risky task, it is not recommended for anyone except experts. The best way to overclock is through the BIOS. When purchasing your system, keep in mind that most Intel motherboards are notorious for disabling the capacity to overclock.<br />
<br />
A way to modify performance ([http://lkml.org/lkml/2009/9/6/136 ref]) is to use Con Kolivas' desktop-centric kernel patchset, which, among other things, replaces the Completely Fair Scheduler (CFS) with the Brain Fuck Scheduler (BFS).<br />
<br />
Kernel PKGBUILDs that include the BFS patch can be installed from the [[AUR]] or [[Unofficial_User_Repositories]]. See the respective pages for {{Package AUR|linux-ck}} and [https://wiki.archlinux.org/index.php/Linux-ck linux-ck wiki page], {{Package AUR|linus-bfs}} or {{Package AUR|linux-pf}} for more information on their additional patches.<br />
<br />
{{Note|BFS/CK are designed for desktop/laptop use and not servers. They provide low latency and work well for 16 CPUs or less. Also, Con Kolivas suggests setting HZ to 1000. For more information, see the [http://ck.kolivas.org/patches/bfs/bfs-faq.txt BFS FAQ] and [http://www.kernel.org/pub/linux/kernel/people/ck/patches/2.6/2.6.37/2.6.37-ck1/patches/ ck patches].}}<br />
<br />
===Verynice===<br />
[[Verynice]] is a daemon, available on [http://aur.archlinux.org/packages.php?ID=6403 AUR], for dynamically adjusting the nice levels of executables. The nice level represent the priority of the executable when allocating CPU resources. Simply define executables for which responsiveness is important, like X or multimedia applications, as ''goodexe'' in {{filename|/etc/verynice.conf}}. Similarly, CPU-hungry executables running in the background, like make, can be defined as ''badexe''. This prioritization greatly improves system responsiveness under heavy load.<br />
<br />
===Ulatencyd===<br />
[[Ulatencyd]] is a daemon that controls how the Linux kernel will spend its resources on the running processes. It uses dynamic cgroups to give the kernel hints and limitations on processes.<br />
<br />
==Network==<br />
See relevant section in [[General Recommendations#Networking|General Recommendations]].<br />
<br />
==Graphics==<br />
<br />
===Xorg.conf configuration===<br />
Graphic performance heavily depends on the settings in {{Filename|/etc/X11/xorg.conf}}. There are tutorials for [[Nvidia]], [[ATI]] and [[Intel]] cards. Improper settings may stop Xorg from working, so caution is advised.<br />
<br />
===Driconf===<br />
Driconf is a small utility that allows you to change the direct rendering settings for open source drivers. Enabling HyperZ can drastically improve performance.<br />
<br />
===GPU Overclocking===<br />
Overclocking a graphics card is typically more expedient than with a CPU, since there are readily accessible software packages which allow for on-the-fly GPU clock adjustments. For ATI users, get [http://aur.archlinux.org/packages.php?ID=2128 rovclock], and Nvidia users should get nvclock in the extra repository. Intel chipsets users can install [http://www.gmabooster.com/ GMABooster] from [http://aur.archlinux.org/packages.php?ID=28197 AUR]<br />
<br />
The changes can be made permanent by running the appropriate command after X boots, for example by adding it to {{Filename|~/.xinitrc}}. A safer approach would be to only apply the overclocked settings when needed.<br />
<br />
==RAM and swap==<br />
<br />
=== Swappiness ===<br />
<br />
The swappiness represent how much the kernel prefers swap to RAM. Setting it to a very low value, meaning the kernel will almost always use RAM, is known to improve responsiveness on many systems. To do that, simply add those line to {{Filename|/etc/sysctl.conf}}:<br />
<br />
vm.swappiness=20<br />
vm.vfs_cache_pressure=50<br />
<br />
To test and more on why this may work, take a look at this [http://rudd-o.com/en/linux-and-free-software/tales-from-responsivenessland-why-linux-feels-slow-and-how-to-fix-that article].<br />
<br />
===Compcache===<br />
[http://code.google.com/p/compcache/ Compcache], also known as the zram kernel module, creates a swap device in RAM and compresses it. That means that part of the RAM can hold much more information but uses more CPU. Still, it is much quicker than swapping to a hard drive. If a system often falls back to swap, this could improve responsiveness. Zram is in mainline staging (therefore its not stable yet, use with caution).<br />
<br />
modprobe zram<br />
<br />
It is also possible (and recommended) to tell compcache to fall back on the hard drive swap when full. To do this, define a backing swap device in the configuration file. This swap device must not be in use when zram is started, so remove it from your {{Filename|/etc/fstab}}!<br />
<br />
This is also a good way to reduce disk read/write cycles due to swap on SSDs.<br />
<br />
===Mounting /tmp to RAM===<br />
This will make your system a tiny bit faster, but will take up some of your RAM. It also reduces disk read/write cycles, and is therefore a good choice if using an SSD or if you have RAM to spare. Simply add this line to {{Filename|/etc/fstab}} and reboot:<br />
tmpfs /tmp tmpfs defaults,noatime,nodev,nosuid,mode=1777 0 0<br />
<br />
===Using the graphic card's RAM===<br />
In the unlikely case that you have very little RAM and a surplus of video RAM, you can use the latter as swap. See [[Swap on video ram]].<br />
<br />
=== Preloading ===<br />
Preloading is the action of putting and keeping target files into the RAM. The practical use is that preloaded applications always start very quickly, because reading from the RAM is always quicker than from the hard drive. However, part of your RAM will be dedicated to this task, but no more than if you kept the application open. Therefore, preloading is best used with heavy, often-used applications, like firefox and openoffice.<br />
==== Go-preload ====<br />
[http://aur.archlinux.org/packages.php?ID=34207 Go-preload] is a small daemon created in the [http://forums.gentoo.org/viewtopic-t-789818-view-next.html?sid=5457cff93039fc7d4a3e445ef90f9821 gentoo forum]. To use it, first run this command in a terminal for each program you want to preload at boot:<br />
# gopreload-prepare program<br />
Then, as instructed, press enter when the program is fully loaded. This will add a list of files needed by the program in {{Filename|/usr/share/gopreload/enabled}}. To load all lists at boot, simply add gopreload to your DAEMONS array in {{Filename|/etc/rc.conf}}. To disable the loading of a program, remove the appropriate list in {{Filename|/usr/share/gopreload/enabled}}, or move it to {{Filename|/usr/share/gopreload/disabled}}.<br />
====Preload====<br />
A more automated, albeit less KISS, approach is used by [[Preload]]. All you have to do is add it to your DAEMONS array in {{Filename|/etc/rc.conf}}. It will monitor the most used files on your system, and with time build its own list of files to preload at boot.<br />
<br />
====E4rat====<br />
[[E4rat]] is a preload system for those using the ext4 filesystem. Can be very effective at reducing overall boot times and reducing wait on loading startup applications.<br />
<br />
====Readahead====<br />
[[Readahead]] is a tool that can cache files before needed and help you accelerating program loading.<br />
<br />
==Boot time==<br />
You can find tutorials with good tips in the article [[Improve Boot Performance]].<br />
<br />
===Suspend to ram===<br />
The best way to reduce boot time is not booting at all. Consider [[Suspend to RAM|suspending your system to ram]] instead.<br />
<br />
===Kernel boot options===<br />
Some boot options can decrease kernel boot time. The {{Codeline|fastboot}} option usually can take off one second or so. Also, if you see a message saying "Waiting 8s for device XXX" at boot, adding {{Codeline|<nowiki>rootdelay=1</nowiki>}} can reduce the waiting time, but be careful, as it may break the booting process. Those options are set in {{Filename|/boot/grub/menu.lst}} or {{Filename|/etc/lilo.conf}}, depending on which bootloader you use.<br />
<br />
===Custom kernel===<br />
Compiling a custom kernel will reduce boot time and memory usage, but can be long, complicated and even painful. It usually is not worth the effort, but can be very interesting and a great learning experience. If you really know what you are doing, start [[Kernel Compilation|here]].<br />
<br />
==Application-specific tips==<br />
===Firefox===<br />
The [[Firefox]] article offers good tips; most notably [[Firefox Tips and Tweaks#Improve rendering by disabling pango |disabling pango]], [[Firefox Tips and Tweaks#Defragment the profile's SQLite databases|cleaning the sqlite database]], and using [[Firefox#Firefox customized for speed|firefox-pgo]]. See also: [[Speed-up Firefox using tmpfs]], and [[Firefox Tips and Tweaks#Turning off anti-phishing|Turning off anti-phishing]].<br />
<br />
===Gcc/Makepkg===<br />
See [[Ccache]].<br />
<br />
===Mkinitcpio===<br />
User josh_ from the forum has made impressive changes to the mkinitcpio script, making it two or three times faster. While waiting for these changes to be implemented, you can get them [http://bbs.archlinux.org/viewtopic.php?id=79898 here].<br />
<br />
===LibreOffice===<br />
See [[LibreOffice#Speed up LibreOffice|Speed up LibreOffice]].<br />
<br />
===Pacman===<br />
See [[Improve Pacman Performance]].<br />
<br />
===SSH===<br />
See [[SSH#Speed up SSH|Speed up SSH]].<br />
<br />
==Laptops==<br />
See [[Laptop]].</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Improving_performance&diff=160726Improving performance2011-09-19T20:07:59Z<p>Lagagnon: /* The first thing to do */</p>
<hr />
<div>[[Category:Hardware (English)]]<br />
[[Category:Software (English)]]<br />
{{i18n|Maximizing Performance}}<br />
This article is a retrospective analysis and basic rundown about gaining performance in Arch Linux.<br />
<br />
==The basics==<br />
<br />
===Know your system===<br />
The best way to tune a system is to target the bottlenecks, that is the subsystems that limit the overall speed. They usually can be identified by knowing the specifications of the system, but there are some basic indications:<br />
* If the computer becomes slow when big applications, like OpenOffice.org and Firefox, are running at the same time, then there is a good chance the amount of RAM is insufficient. To verify available RAM, use this command, and check for the line beginning with -/+buffers:<br />
$ free -m<br />
* If boot time is really slow, and if applications take a lot of time to load the first time they are launched, but run fine afterwards, then the hard drive is probably too slow. The speed of a hard drive can be measured using the hdparm command:<br />
$ hdparm -t /dev/harddrive<br />
This is only the pure read speed of the hard drive, and is not a valid benchmark, but a value superior to 40MB/s (assuming drive tested while idle) can be considered decent on an average system.<br />
* If the CPU load is consistently high even when RAM is available, then lowering CPU usage should be a priority. CPU load can be monitored in many ways, like using the top command:<br />
$ top<br />
* If the only applications lagging are the ones using direct rendering, meaning they use the graphic card, like video players and games, then improving the graphic performance should help. First step would be to verify if direct rendering simply is not enabled. This is indicated by the glxinfo command:<br />
$ glxinfo | grep direct<br />
<br />
===The first thing to do===<br />
The simplest and most efficient way of improving overall performance is to run lightweight environments and applications.<br />
* Use a [[Window Manager|window manager]] instead of a [[Desktop Environment]]. Choices include [[dwm]], [[wmii]], [[Awesome]], [[Openbox]], [[Fluxbox]] and [[JWM]].<br />
* Choose a minimal Desktop Environment over [[GNOME]] and [[KDE]]. Choices include [[LXDE]] and [[Xfce]].<br />
* Using lightweight applications. See [[Lightweight Software]] and the Light and Fast Applications Awards threads in the forum: [http://bbs.archlinux.org/viewtopic.php?id=41168 2007], [http://bbs.archlinux.org/viewtopic.php?id=67951 2008], [http://bbs.archlinux.org/viewtopic.php?id=78490 2009],[http://bbs.archlinux.org/viewtopic.php?id=88515 2010], and [http://bbs.archlinux.org/viewtopic.php?id=111878 2011].<br />
* Remove unnecessary [[daemons]] and background what daemons you can in {{Filename|/etc/rc.conf}}.<br />
<br />
===Compromise===<br />
Almost all tuning brings drawbacks. Lighter applications usually come with less features and some tweaks may make a system unstable, or simply require time to implement and maintain. This page tries to highlight those drawbacks, but the final judgment rests on the user.<br />
<br />
===Benchmarking===<br />
The effects of optimization are often difficult to judge. They can however be measured by [[benchmarking]] tools<br />
<br />
==Storage devices==<br />
===Choosing and tuning your filesystem===<br />
Choosing the best filesystem for a specific system is very important because each has its own strengths. The [[Beginner's Guide#Filesystem Types|beginner's guide]] provides a short summary of the most popular ones. You can also find relevant articles [[:Category:File systems (English)|here]].<br />
<br />
====Summary====<br />
*XFS: Excellent performance with large files. Low speed with small files. A good choice for /home.<br />
*Reiserfs: Excellent performance with small files. A good choice for /var.<br />
*Ext3: Average performance, reliable.<br />
*Ext4: Great overall performance, reliable, has performance issues with sqlite and some other databases.<br />
*JFS: Good overall performance, very low CPU usage, extremely fast resume after power failure.<br />
*Btrfs: Great overall performance (better than ext4), reliable (once it becomes stable). Lots of features. Still in heavy development and considered as unstable. Do not use this filesystem yet unless you know what you are doing and are prepared for potential data loss.<br />
<br />
====Mount options====<br />
Mount options offer an easy way to improve speed without reformatting. They can be set using the mount command:<br />
$ mount -o option1,option2 /dev/partition /mnt/partition<br />
To set them permanently, you can modify /etc/fstab to make the relevant line look like this:<br />
/dev/partition /mnt/partition partitiontype option1,option2 0 0<br />
A couple of mount options improving performance on almost all file-systems is {{Codeline|noatime,nodiratime}}. The former is a superset of the latter (which applies to directories only -- {{Codeline|noatime}} applies to both files and directories). In rare cases, for example if you use mutt, it can cause minor problems. You can instead use the {{Codeline|relatime}} option (NB relatime is the default in >2.6.30)<br />
<br />
====Ext3====<br />
See [[Ext3 Filesystem Tips]].<br />
<br />
====Ext4====<br />
See the [[Ext4#Improving performance | Ext4 wiki page]].<br />
<br />
====JFS====<br />
See [[JFS Filesystem#Optimizations| JFS Filesystem]].<br />
<br />
====XFS====<br />
For optimal speed, create an XFS file-system with:<br />
$ mkfs.xfs -l internal,lazy-count=1,size=128m -d agcount=2 /dev/thetargetpartition<br />
An XFS specific mount option that may increase performance is {{Codeline|<nowiki>logbufs=8</nowiki>}}. <br />
<br />
#/etc/fstab<br />
LABEL=XFSHOME /home xfs noatime,logbufs=8 0 1<br />
<br />
==== Reiserfs ====<br />
<br />
The {{Codeline|<nowiki>data=writeback</nowiki>}} mount option improves speed, but may corrupt data during power loss. The {{Codeline|notail}} mount option increases the space used by the filesystem by about 5%, but also improves overall speed. You can also reduce disk load by putting the journal and data on separate drives. This is be done when creating the filesystem: <br />
<br />
$ mkreiserfs –j /dev/hda1 /dev/hdb1<br />
<br />
Replace /dev/hda1 with the partition reserved for the journal, and /dev/hdb1 with the partition for data. You can learn more about reiserfs with this [http://www.funtoo.org/en/articles/linux/ffg/2/ article].<br />
<br />
====BTRFS====<br />
See [[Btrfs#Compression|compression]].<br />
<br />
===Compressing {{Filename|/usr}}===<br />
A way to speed up reading from the hard drive is to compress the data, because there is less data to be read. It must however be decompressed, which means a greater CPU load. Some filesystems support transparent compression, most notably btrfs and reiserfs4, but their compression ratio is limited by the 4k block size. A good alternative is to compress {{Filename|/usr}} in a squashfs file, with a 64k(128k) block size, as instructed in this [http://forums.gentoo.org/viewtopic-t-646289.html Gentoo forums thread]. What this tutorial does is basically to compress the {{Filename|/usr}} folder into a compressed squashfs file-system, then mounts it with aufs. A lot of space is saved, usually two thirds of the original size of {{Filename|/usr}}, and applications load faster. However, each time an application is installed or reinstalled, it is written uncompressed, so {{Filename|/usr}} must be re-compressed periodically. Squashfs is already in the kernel, and aufs2 is in the extra repository, so no kernel compilation is needed if using the stock kernel.<br />
Since the linked guide is for Gentoo the next commands outline the steps especially for Arch. Basically we have got install two packages to get it working:<br />
# pacman -S aufs2 squashfs-tools<br />
This command installs the aufs-modules and some userspace-tools for the squash-filesystem.<br />
Now we need some extra directories where we can store the archive of {{Filename|/usr}} as read-only and another folder where we can store the data changed after the last compression as writeable:<br />
# mkdir -p /squashed/usr/{ro,rw}<br />
Now that we got a rough setup you should perform a complete system-upgrade since every change of content in {{Filename|/usr}} after the compression will be excluded from this speedup. If you use prelink you should also perform a complete prelink before creating the archive. Now it is time to invoke the command to compress {{Filename|/usr}}:<br />
# mksquashfs /usr /squashed/usr/usr.sfs -b 65536<br />
These parameters/options are the ones suggested by the Gentoo link but there might be some room for improvement using some of the options described [http://www.tldp.org/HOWTO/SquashFS-HOWTO/mksqoverview.html#mksqusing here].<br />
Now to get the archive mounted together with the writeable folder it is necessary to edit {{Filename|/etc/fstab}}:<br />
# nano /etc/fstab<br />
Add the following lines:<br />
/squashed/usr/usr.sfs /squashed/usr/ro squashfs loop,ro 0 0 <br />
usr /usr aufs udba=reval,br:/squashed/usr/rw:/squashed/usr/ro 0 0<br />
Now you should be done and able to reboot. The original Author suggests to delete all the old content of {{Filename|/usr}}, but this might cause some problems if anything goes wrong during some later re-compression. It is more safe to leave the old files in place just to be on the safe side.<br />
<br />
A [http://bbs.archlinux.org/viewtopic.php?pid=714052 bash script] has been created that will automate the process of re-compressing (read updating) the archive since the tutorial is meant for Gentoo and some options do not correlate to what they should be in Arch.<br />
<br />
===Tuning for an SSD===<br />
[[SSD#Tips_for_Maximizing_SSD_Performance]]<br />
<br />
==CPU==<br />
The only way to directly improve CPU speed is overclocking. As it is a complicated and risky task, it is not recommended for anyone except experts. The best way to overclock is through the BIOS. When purchasing your system, keep in mind that most Intel motherboards are notorious for disabling the capacity to overclock.<br />
<br />
A way to modify performance ([http://lkml.org/lkml/2009/9/6/136 ref]) is to use Con Kolivas' desktop-centric kernel patchset, which, among other things, replaces the Completely Fair Scheduler (CFS) with the Brain Fuck Scheduler (BFS).<br />
<br />
Kernel PKGBUILDs that include the BFS patch can be installed from the [[AUR]] or [[Unofficial_User_Repositories]]. See the respective pages for {{Package AUR|linux-ck}} and [https://wiki.archlinux.org/index.php/Linux-ck linux-ck wiki page], {{Package AUR|linus-bfs}} or {{Package AUR|linux-pf}} for more information on their additional patches.<br />
<br />
{{Note|BFS/CK are designed for desktop/laptop use and not servers. They provide low latency and work well for 16 CPUs or less. Also, Con Kolivas suggests setting HZ to 1000. For more information, see the [http://ck.kolivas.org/patches/bfs/bfs-faq.txt BFS FAQ] and [http://www.kernel.org/pub/linux/kernel/people/ck/patches/2.6/2.6.37/2.6.37-ck1/patches/ ck patches].}}<br />
<br />
===Verynice===<br />
[[Verynice]] is a daemon, available on [http://aur.archlinux.org/packages.php?ID=6403 AUR], for dynamically adjusting the nice levels of executables. The nice level represent the priority of the executable when allocating CPU resources. Simply define executables for which responsiveness is important, like X or multimedia applications, as ''goodexe'' in {{filename|/etc/verynice.conf}}. Similarly, CPU-hungry executables running in the background, like make, can be defined as ''badexe''. This prioritization greatly improves system responsiveness under heavy load.<br />
<br />
===Ulatencyd===<br />
[[Ulatencyd]] is a daemon that controls how the Linux kernel will spend its resources on the running processes. It uses dynamic cgroups to give the kernel hints and limitations on processes.<br />
<br />
==Network==<br />
See relevant section in [[General Recommendations#Networking|General Recommendations]].<br />
<br />
==Graphics==<br />
<br />
===Xorg.conf configuration===<br />
Graphic performance heavily depends on the settings in {{Filename|/etc/X11/xorg.conf}}. There are tutorials for [[Nvidia]], [[ATI]] and [[Intel]] cards. Improper settings may stop Xorg from working, so caution is advised.<br />
<br />
===Driconf===<br />
Driconf is a small utility that allows you to change the direct rendering settings for open source drivers. Enabling HyperZ can drastically improve performance.<br />
<br />
===GPU Overclocking===<br />
Overclocking a graphics card is typically more expedient than with a CPU, since there are readily accessible software packages which allow for on-the-fly GPU clock adjustments. For ATI users, get [http://aur.archlinux.org/packages.php?ID=2128 rovclock], and Nvidia users should get nvclock in the extra repository. Intel chipsets users can install [http://www.gmabooster.com/ GMABooster] from [http://aur.archlinux.org/packages.php?ID=28197 AUR]<br />
<br />
The changes can be made permanent by running the appropriate command after X boots, for example by adding it to {{Filename|~/.xinitrc}}. A safer approach would be to only apply the overclocked settings when needed.<br />
<br />
==RAM and swap==<br />
<br />
=== Swappiness ===<br />
<br />
The swappiness represent how much the kernel prefers swap to RAM. Setting it to a very low value, meaning the kernel will almost always use RAM, is known to improve responsiveness on many systems. To do that, simply add those line to {{Filename|/etc/sysctl.conf}}:<br />
<br />
vm.swappiness=20<br />
vm.vfs_cache_pressure=50<br />
<br />
To test and more on why this may work, take a look at this [http://rudd-o.com/en/linux-and-free-software/tales-from-responsivenessland-why-linux-feels-slow-and-how-to-fix-that article].<br />
<br />
===Compcache===<br />
[http://code.google.com/p/compcache/ Compcache], also known as the zram kernel module, creates a swap device in RAM and compresses it. That means that part of the RAM can hold much more information but uses more CPU. Still, it is much quicker than swapping to a hard drive. If a system often falls back to swap, this could improve responsiveness. Zram is in mainline staging (therefore its not stable yet, use with caution).<br />
<br />
modprobe zram<br />
<br />
It is also possible (and recommended) to tell compcache to fall back on the hard drive swap when full. To do this, define a backing swap device in the configuration file. This swap device must not be in use when zram is started, so remove it from your {{Filename|/etc/fstab}}!<br />
<br />
This is also a good way to reduce disk read/write cycles due to swap on SSDs.<br />
<br />
===Mounting /tmp to RAM===<br />
This will make your system a tiny bit faster, but will take up some of your RAM. It also reduces disk read/write cycles, and is therefore a good choice if using an SSD or if you have RAM to spare. Simply add this line to {{Filename|/etc/fstab}} and reboot:<br />
tmpfs /tmp tmpfs defaults,noatime,nodev,nosuid,mode=1777 0 0<br />
<br />
===Using the graphic card's RAM===<br />
In the unlikely case that you have very little RAM and a surplus of video RAM, you can use the latter as swap. See [[Swap on video ram]].<br />
<br />
=== Preloading ===<br />
Preloading is the action of putting and keeping target files into the RAM. The practical use is that preloaded applications always start very quickly, because reading from the RAM is always quicker than from the hard drive. However, part of your RAM will be dedicated to this task, but no more than if you kept the application open. Therefore, preloading is best used with heavy, often-used applications, like firefox and openoffice.<br />
==== Go-preload ====<br />
[http://aur.archlinux.org/packages.php?ID=34207 Go-preload] is a small daemon created in the [http://forums.gentoo.org/viewtopic-t-789818-view-next.html?sid=5457cff93039fc7d4a3e445ef90f9821 gentoo forum]. To use it, first run this command in a terminal for each program you want to preload at boot:<br />
# gopreload-prepare program<br />
Then, as instructed, press enter when the program is fully loaded. This will add a list of files needed by the program in {{Filename|/usr/share/gopreload/enabled}}. To load all lists at boot, simply add gopreload to your DAEMONS array in {{Filename|/etc/rc.conf}}. To disable the loading of a program, remove the appropriate list in {{Filename|/usr/share/gopreload/enabled}}, or move it to {{Filename|/usr/share/gopreload/disabled}}.<br />
====Preload====<br />
A more automated, albeit less KISS, approach is used by [[Preload]]. All you have to do is add it to your DAEMONS array in {{Filename|/etc/rc.conf}}. It will monitor the most used files on your system, and with time build its own list of files to preload at boot.<br />
====Readahead====<br />
[[Readahead]] is a tool that can cache files before needed and help you accelerating program loading.<br />
<br />
==Boot time==<br />
You can find tutorials with good tips in the article [[Improve Boot Performance]].<br />
<br />
===Suspend to ram===<br />
The best way to reduce boot time is not booting at all. Consider [[Suspend to RAM|suspending your system to ram]] instead.<br />
<br />
===Kernel boot options===<br />
Some boot options can decrease kernel boot time. The {{Codeline|fastboot}} option usually can take off one second or so. Also, if you see a message saying "Waiting 8s for device XXX" at boot, adding {{Codeline|<nowiki>rootdelay=1</nowiki>}} can reduce the waiting time, but be careful, as it may break the booting process. Those options are set in {{Filename|/boot/grub/menu.lst}} or {{Filename|/etc/lilo.conf}}, depending on which bootloader you use.<br />
<br />
===Custom kernel===<br />
Compiling a custom kernel will reduce boot time and memory usage, but can be long, complicated and even painful. It usually is not worth the effort, but can be very interesting and a great learning experience. If you really know what you are doing, start [[Kernel Compilation|here]].<br />
<br />
==Application-specific tips==<br />
===Firefox===<br />
The [[Firefox]] article offers good tips; most notably [[Firefox Tips and Tweaks#Improve rendering by disabling pango |disabling pango]], [[Firefox Tips and Tweaks#Defragment the profile's SQLite databases|cleaning the sqlite database]], and using [[Firefox#Firefox customized for speed|firefox-pgo]]. See also: [[Speed-up Firefox using tmpfs]], and [[Firefox Tips and Tweaks#Turning off anti-phishing|Turning off anti-phishing]].<br />
<br />
===Gcc/Makepkg===<br />
See [[Ccache]].<br />
<br />
===Mkinitcpio===<br />
User josh_ from the forum has made impressive changes to the mkinitcpio script, making it two or three times faster. While waiting for these changes to be implemented, you can get them [http://bbs.archlinux.org/viewtopic.php?id=79898 here].<br />
<br />
===LibreOffice===<br />
See [[LibreOffice#Speed up LibreOffice|Speed up LibreOffice]].<br />
<br />
===Pacman===<br />
See [[Improve Pacman Performance]].<br />
<br />
===SSH===<br />
See [[SSH#Speed up SSH|Speed up SSH]].<br />
<br />
==Laptops==<br />
See [[Laptop]].</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Connecting_your_MP3_Player&diff=160718Connecting your MP3 Player2011-09-19T18:42:20Z<p>Lagagnon: /* Players Accessible With Native Protocols */</p>
<hr />
<div>[[Category:Other hardware (English)]]<br />
<br />
There are different kinds of MP3-Players around.<br />
<br />
====Players Accessible as usb-storage====<br />
*creative<br />
**Creative MuVo<br />
***Note that with some (older) models of MuVo deleting settings.dat from the stick renders it useless, newer models don't have the file.<br />
*iriver<br />
**All iriver players with "UMS Mode" firmware are recognized as usb-storage<br />
*Cowon<br />
**iAudio U2 MP3 Player<br />
*NextCom<br />
**flash drive + mp3-player<br />
*MPIO<br />
**MPIO HD300<br />
<br />
====Players Accessible With Native Protocols====<br />
*iriver<br />
**all iriver players with "Manager Mode" firmware need the [[ifp-line iRiver Manager]]<br />
<br />
*creative<br />
**creative players, probably all that don't support usb-storage, should be supported by [http://aur.archlinux.org/packages.php?ID=9899 gnomad2]<br />
<br />
*Sony<br />
**Sony Walkman MP3 players released prior to mid 2007 require Sony's proprietary "SonicStage" software to transfer files. Unfortunately, this software is only available for Windows. However, you are better off to use the [http://symphonic.sourceforge.net/page.php?4 JSymphonic] open source software anyway, as you will have more control over your player. JSymphonic is available in the [http://aur.archlinux.org/packages.php?ID=21374 AUR].<br />
<br />
==UUID Player Mounting==<br />
<br />
Mounting your mp3 player(in this example an ipod) is very easy. But without the "proper" set up, it can be problematic. The following steps can be used for any mp3 player or usb mass storage device.<br />
<br />
* Every drive creates a [http://en.wikipedia.org/wiki/UUID UUID] (Universally Unique Identifier), these identifiers can be used to track individual drive no matter their device node (ie {{filename|/dev/sda}}).<br />
<br />
To find the current UUIDs execute:<br />
# blkid<br />
<br />
''' At this point you should see a list of your system drives and a long strings of characters. These long strings are the uuids.'''<br />
<br />
* Now plug in your mp3 player to a usb port . . . wait for a few seconds . . . <br />
<br />
* Reexecute '''blkid'''<br />
''' Notice a new device and UUID? That's your mp3 player!'''<br />
<br />
* The player likely has a label. If not use the device node path. Execute '''as superuser''':<br />
# blkid | grep YOURLABEL >> /etc/fstab<br />
<br />
* Now create an easy to remember directory listing for the device:<br />
# mkdir /media/ipod<br />
<br />
''If you don't have an ipod or have Your drives somewhere else, just rename the directory to something that you like. ({{filename|/mnt/mp3player}})''<br />
<br />
* And now edit the last line in {{filename|/etc/fstab}} from someting like:<br />
/dev/sdd: LABEL="Ipod" UUID="E8F1-5438" TYPE="vfat"<br />
to<br />
UUID=E8F1-5438 /media/ipod vfat user,noauto,noexec 0 0<br />
<br />
''Further questions can be answered with the man page for fstab.''<br />
''The autor does not own any Idevices, so the Label could be wrong.''<br />
<br />
* Remove your device from the usb port . . . wait a second . . .<br />
* Reinsert your device<br />
* Mount with the following command<br />
# mount /media/ipod<br />
<br />
'''Now no matter what, your device will always mount under the same directory!'''<br />
<br />
===Alternative way===<br />
If 'blkid' doesn't work as aspected, You can look for the UUIDs in {{filename|/dev/disk/by-uuid/}}.<br />
# ls -lF /dev/disk/by-uuid/<br />
<br />
==udev Player Mounting==<br />
''Alternatively you can use udev to do the same thing. I have not tried this yet (the above works fine for me), but here's the basics:<br />
<br />
* Edit your {{filename|/etc/udev/rules.d/00.rules}}<br />
## iPod<br />
BUS="scsi", SYSFS{model}="iPod*", NAME="ipod"</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Wmii&diff=160696Wmii2011-09-19T15:05:57Z<p>Lagagnon: /* Usage */</p>
<hr />
<div>[[Category:Dynamic WMs (English)]]<br />
{{i18n|Wmii}}{{DISPLAYTITLE:wmii}}<br />
<br />
[http://www.suckless.org/wmii/ wmii] (window manager improved 2) is a dynamic window manager for X11. It supports classic and dynamic window management with extended keyboard, mouse, and filesystem based remote control. It replaces the workspace paradigm with a new tagging approach. <br />
<br />
The following tips are intended to help the user get started with wmii. While wmii can be configured in almost any language, this article will focus on using the '''wmiirc''' configuration file, which is simply a shell script. Please see the [[ruby-wmii]] article to see how to configure wmii in ruby.<br />
<br />
==Installation==<br />
wmii is available from the '''extra''' repository. You can install it by issuing the following command:<br />
<br />
pacman -S wmii<br />
<br />
Alternatively, you can get the [http://aur.archlinux.org/packages.php?ID=3497 latest development version] which is available from the [[AUR]].<br />
<br />
Next you will need to edit your '''~/.xinitrc''' to enable you to start wmii with '''startx''':<br />
<br />
exec wmii<br />
<br />
To allow for starting wmii without logging off or killing the X session, add the following in the ~/.xinitrc<br />
until wmii; do<br />
true<br />
done<br />
Upon your first login, you will be greeted with the wmii welcome message, which also includes a short tutorial on wmii. Completing this tutorial will give you a good idea on how wmii works.<br />
{{Box Note|If the welcome message does not show up, make sure you have '''xmessage''' installed from the '''xorg-xmessage''' package. Then you can read the welcome by pressing $MODKEY-a and selecting 'welcome'.}}<br />
<br />
==Configuration==<br />
The easiest way to start configuring wmii, is to copy the default wmiirc file to your home directory and changing it to your needs. For version 3.9,<br />
mkdir ~/.wmii<br />
cp /etc/wmii/wmiirc ~/.wmii/<br />
<br />
Or just create ~/.wmii/wmiirc_local if you want only basic customization such as fonts, colors etc.<br />
<br />
For earlier versions,<br />
mkdir ~/.wmii/wmii-$VERSION<br />
cp /etc/wmii/wmiirc ~/.wmii/wmii-$VERSION/<br />
<br />
By editing this file, you can change things such as color, background, modkey, etc. Keep in mind that wmiirc uses tabbed indentation in case your editor of choice is configured to only produce spaces. Mixing the two indenting styles may cause unexpected behavior.<br />
====Configuration Variables====<br />
# Configuration Variables<br />
MODKEY=Mod1<br />
UP=k<br />
DOWN=j<br />
LEFT=h<br />
RIGHT=l<br />
Change Mod1 to Mod4 if you want to use Windows key instead of Alt. You can also change h, j, k, l, if you like.<br />
<br />
====Window Colors====<br />
# Colors tuples: "<text> <background> <border>"<br />
WMII_NORMCOLORS='#ffffff #000000 #ffffff'<br />
WMII_FOCUSCOLORS='#ffffff #5c0000 #ffffff'<br />
<br />
WMII_BACKGROUND='#333333'<br />
WMII_FONT='fixed'<br />
Colors of unselected window are in NORMCOLORS variable. Colors of selected window are in FOCUSCOLOR variable. You can change the background color (if you use transparent terminal) with the WMII_BACKGROUND variable.<br />
<br />
==== For Laptop Users====<br />
<br />
If you are using wmii on laptop, it may be convenient to display useful items such as battery charge percentage, wireless quality, and cpu frequency in the status bar.<br />
<br />
''note: this requires you to install acpi<br />
pacman -S acpi''<br />
<br />
# Status Bar Info<br />
status() {<br />
echo -n ' Wlan0:' $(iwconfig wlan0 | sed 's/ /\n/g' | grep Quality) '|' $(acpi -b | sed 's/.*, \{0,2\}\([0-9]\{1,3\}%\),.*/Bat: \1 | /') ' Core MHz:' $(cat /proc/cpuinfo | grep 'cpu MHz' | sed 's/.*: //g; s/\..*//g;') '|' $(uptime |<br />
sed 's/.*://; s/,//g') '|' $(date) <br />
}<br />
<br />
By default the status bar only shows date and an uptime pager (displays system load average for the last 1, 5, 15 minutes).<br />
<br />
==Usage==<br />
<br />
If you are not familiar with tiling WMs, it's not really easy to begin with it. You must learn a few basic hotkeys to launch programs and place or resize windows. It is a good idea to write the basic hotkeys on paper and stick these on your monitor until you memorize them. By default, the "Mod" key is Alt. Some default hotkeys are :<br />
* Mod+Enter -> Terminal<br />
* Mod+p -> wimenu : a menu appears, just type the beginning of the name of the application <br />
to open it.<br />
* Mod+d -> default layout : windows are divided on screen<br />
* Mod+s -> stacked layout : the selected window take all the screen, we just see the title <br />
bar of the others.<br />
* Mod+j -> select the window below<br />
* Mod+k -> select the window above<br />
* Shift+Mod+j -> move the window down<br />
* Shift+Mod+k -> move the window up<br />
* Mod+a -> Actions menu : choose "quit" to quit<br />
<br />
N.B. For commonly used programs you can make use of ''history.progs'', Mod+p and up/down arrow keys to select revious entries.<br />
<br />
<br />
By default, only one column is used by the desktop (i.e. the entire screen). It's possible to use several columns with h and l :<br />
<br />
* Mod+Shift+h : move the selected window left<br />
* Mod+Shift+l : move the selected window right<br />
* Mod+h : select the column on the left<br />
* Mod+l : select the column on the right <br />
<br />
Columns are created automatically, with your placements of the windows. You can make them bigger or smaller, clicking beetween two columns.<br />
<br />
===Layouts===<br />
<br />
You begin in "default" layout : all windows take the same space. You can make them bigger or smaller by clicking in the little square in the title bar of a window.<br />
<br />
* "stacked" layout (Mod+s) : the selected window takes the entire column, but you can see <br />
the title bar of other windows.<br />
* "maximum" layout (Mod+m) : the selected window takes the entire column, you don't see <br />
other windows.<br />
* "fullscreen" layout (Mod+f) : the selected window takes runs in full screen.<br />
<br />
If you tend to use multiple clients in stacked view then binding the following allows you to remove all the title bars apart from the one you are viewing, regaining screen estate.<br />
Each client will be numbered in the top right with 1/3, 2/3 etc. <br />
Mod + s or Mod + d will return the view to standard layouts.<br />
* fn Key-$MODKEY-x {wmiir xwrite /tag/sel/ctl colmode sel +max} # rc.wmii.local version<br />
* Key $MODKEY-x<br />
wmiir xwrite /tag/sel/ctl colmode sel +max # wmiirc version<br />
<br />
====Floating layout====<br />
<br />
You can place your windows like a classic window manager. It's called floating layout. It's useful for some applications, like the Gimp, mplayer, vlc etc.<br />
<br />
* Mod+Shift+Space : Move selected window in floating layout.<br />
* Mod+Space : switch between floating layout and normal layout. <br />
<br />
In the floating layout, we can select a window with Mod+j and Mod+k. We can change dimensions of the window, by dragging, like in any other window manager. But we can use hotkeys for that as well :<br />
<br />
* Mod+Left click : move window<br />
* Mod+Right click : change dimensions of the window (you can use it in other layouts too)<br />
<br />
===Views and Tagging===<br />
Tagging in wmii is very similar to the concept of virtual desktops in other window managers. However, tagging is slightly more powerful because it makes it very easy to group windows in multiple ways concurrently. This is made possible by the fact that WMII easily allows each window to have multiple tags. This allows you to group applications for specific use cases and easily switch between them without having to tear down your previous environment by sending applications to another "Desktop".<br />
<br />
By default, when you first start up wmii you will see the word 'nil' in the lower left corner. You are at the 'nil' view. The first application you start (such as a terminal: Mod+Enter) will automatically be tagged with a "1" and you will be automatically switched to view "1". Views can be navigated or changed with built in keybindings:<br />
<br />
* Mod+Shift+2 : tag selected window to view "2"<br />
* Mod+2 : this switches you to view "2" where you can see all windows tagged with "2"<br />
<br />
It's the same thing for all numbers, from 0 to 9. But you can also use names :<br />
<br />
* Mod+t : views menu : you can select a tag with right and left keys, or type the name <br />
of the tag (or just a part of the name, if it was created).<br />
<br />
* Mod+Shift+t : this retags the currently selected window with whatever you type into <br />
the menu.<br />
<br />
* N.B If using plan9port a ''history.tags'' file is generated in .wmii-*/. You can use <br />
up/down arrow keys to recall previous entries for simple re-tagging/window viewing.<br />
<br />
You can tag windows with multiple views by using a '+' between the tag names :<br />
<br />
* Mod+Shift+t foo+bar+2 : this tags the currently selected window to the views "foo",<br />
"bar" and "2".<br />
You can remove a single tag from multi-tagged windows by selecting the one you wish to remove<br />
and using Mod+Shift+t, -tag ''name/number'' ie<br />
Urxvt is multi-tagged on views 1 2 3 and 4, if you jumped to 3 and typed exit, all instances of<br />
urxvt will be terminated, using Mod+Shift+t, -3 will only remove that single view.<br />
<br />
Tags can be set for specific applications in the wmiirc configuration file.<br />
<br />
# Tagging Rules<br />
wmiir write /tagrules <<!<br />
/Firefox.*/ -> ~+2<br />
/Gimp.*/ -> ~+3<br />
/.*/ -> sel<br />
/.*/ -> 1<br />
!<br />
<br />
With the above tag rules, firefox starts in floating mode (~) on view "2". Gimp starts in floating mode on view "3".<br />
<br />
{{Box Note | Applications need to spawn an X-window in order to be automatically assigned tags. Therefore, in order to launch your terminal based programs you will need to prepend something like ''urxvt -e <program>'' if want to make use of this feature.}}<br />
<br />
==WMII filesystem==<br />
<br />
WMII's filesystem is based on the [http://9p.cat-v.org 9P protocol]. Every element (windows, statusbar, ...) is represented as a file. This makes several cool things possible. For example you can display the song you're currently listening to in the statusbar (for example with MPD and MPC).<br />
<br />
{{Box Note|This filesystem is not permanent and you have to set up everything again after reboot. To make your changes "permanent" simply write the right commands into your wmiirc.}}<br />
<br />
You can access the filesystem with the ''wmiir'' command. For instance, you can list the root directory with ''wmiir ls /''<br />
<br />
client/<br />
colrules<br />
ctl<br />
event<br />
keys<br />
lbar/<br />
rbar/<br />
tag/<br />
tagrules<br />
<br />
You can use ''wmiir read'' to look into files: ''wmiir read /tag/sel/index''<br />
<br />
# ~ 1280 785<br />
~ 0x160000d 731 394 486 332 xterm:XTerm:~<br />
# 1 0 1280<br />
1 0x800003 0 785 opera:Opera:Editing Wmii - Preview - ArchWiki - Opera<br />
<br />
So this is the info for the '''sel'''ected (current) tag. As you can see, I've got one floating xterm and Opera running on this tag. The first number in this output indicates the column of the window. ~ is the floating column and 1 ist (obviously) the first column. The second column is the XServer-ID for the client. The next columns are the coordinates and the size of the window. The last column ist the titlebar of the window.<br />
<br />
You can create new files with ''wmiir create'':<br />
<br />
echo Arch is best | wmiir create /rbar/arch<br />
<br />
Now you should see "Arch is best" in your statusbar<br />
<br />
"wmiir create" reads from STDIN. So you can pipe any information you like into your statusbar. "wmiir write" works in a similar fashion but doesn't create new files.<br />
<br />
{{Box Note|Note for /rbar and /lbar:The elements in those status bars are in alphabetical order.}}<br />
<br />
You can remove files with rm or remove<br />
<br />
If you like to have a program on several tags you can use:<br />
echo "3+5+8" | wmiir write /client/0x800003/tags<br />
<br />
Now my Opera window appears on Tags 3,5 and 8.<br />
<br />
But there are easier ways to accomplish this ;)<br />
Just type MOD+shift+t and enter "3+5+8" and you get the same result for the currently selected client.<br />
<br />
{{Box Note| There's also the possibility to mount WMII's filesystem. Have a look at the [http://wmii.suckless.org/9p official documentation]. }}<br />
<br />
==Other nice stuff==<br />
<br />
===Terminal Title===<br />
If you would like to display the current directory in your terminal emulator's titlebar, add this to your .bashrc<br />
WMII_IS_RUNNING=`ps a | grep wmii | awk '/[^"grep"] wmii$/'`<br />
if [ -n "$WMII_IS_RUNNING" ]; then<br />
PROMPT_COMMAND='dirs | wmiir write /client/sel/label'<br />
fi<br />
With this you can shorten you shell prompt and have more horizontal space to type. This test prevents you from getting a "WMII_ADRESS not set" error when you spawn a console.<br />
<br />
===Weechat Highlight Notification===<br />
If you use weechat and want to know when you have been messaged without always having to look at the weechat window, you can use the ''launcher.pl'' plugin to send a notice to the bar. To get this working, you will need to create a script that sends your desired notice. Here is very simple example:<br />
<br />
#!/bin/bash<br />
echo :: NEW MESSAGE :: | wmiir create /lbar/alert<br />
sleep 8<br />
wmiir remove /lbar/alert<br />
<br />
Then start weechat and load the plugin.<br />
<br />
/perl load launcher.pl<br />
<br />
Then type the following command into weechat:<br />
<br />
/set plugins.var.perl.launcher.signal.weechat_pv = "/path/to/yourscript"<br />
<br />
<br />
Now, :: NEW MESSAGE :: will appear in the left corner of your bar whenever you have a message highlight. Make sure to place ''launcher.pl'' the perl/autoload directory so that it starts when weechat starts.<br />
<br />
===Mod4 on an old Thinkpad===<br />
<br />
Although Wmii defaults to Mod1, using Mod4 reduces conflicts in keybindings with many terminal applications. There is a snag for old Thinkpad users, however. They don't have a Mod4 key. To get one, another key has to be assigned to it using xmodmap. To do it, make an ''.Xmodmap'' file in your home directory and add this to it:<br />
keycode 64 = Super_L<br />
add Mod4 = Super_L<br />
remove Mod1 = Super_L<br />
<br />
You will need to replace 64 with whatever ''xev'' tells you is the keycode of the key you want to replace. In the above example, I replace left Alt (and use right alt for applications).<br />
<br />
===Nice fonts===<br />
Wmii now supports Xft, just prefix font name with 'xft'. For instance:<br />
export WMII_FONT='xft:Sans-9'<br />
<br />
===Keyboard layouts===<br />
You'd probably like to have its own keyboard layout for each window. However, most of such applications requires system tray while witray is only available in the [http://aur.archlinux.org/packages.php?ID=3497 development version of wmii]. [http://www.archlinux.org/packages/?q=xxkb xxkb] package helps to solve the problem. It has no UI by default. You only need to configure layouts in xorg.conf. Create /etc/X11/xorg.conf.d/20-keyboard.conf and put something like this into it:<br />
Section "InputClass"<br />
Identifier "Keyboard Defaults"<br />
MatchIsKeyboard "yes"<br />
Option "XkbModel" "pc101"<br />
Option "XkbLayout" "us,ru"<br />
Option "XkbOptions" "grp:ctrl_shift_toggle,compose:prsc"<br />
EndSection<br />
Replace layout, options and model to fit your needs. Add<br />
xxkb &<br />
into your wmiirc and it just works.<br />
[http://aur.archlinux.org/packages.php?ID=33298 xkblayout-state] can be used to put layout indicator into the status line:<br />
status() {<br />
echo -n label $(xkblayout-state print "%s") '|' $(date +"%a %b %d %H:%M")<br />
}<br />
<br />
===Note: Version 3.9.2-1===<br />
<br />
If you upgrade from wmii v3.6-4 to v3.9.2-1 you will have to insert any changes you made to your old ~/.wmii-3.5/wmiirc configuration file into the newer config file located at ~/.wmii/wmiirc_local. Note also that there are some slight format and variable name changes between the newer and older versions of /etc/wmii/wmiirc.<br />
<br />
This latest version has some significant enhancements such as easier window dimension changes with the mouse and better handling of small floating windows launched from tiled applications (especially OpenOffice).<br />
<br />
==Other Resources==<br />
* [http://wmii.suckless.org/ wmii] -- the official website of wmii<br />
* [[dmenu]] -- a simple application launcher which binds well with dwm and wmii<br />
* [http://wmii.googlecode.com/hg/doc/wmii.pdf user guide] -- latest wmii guide (pdf)<br />
* [http://eigenclass.org/hiki.rb?wmii+ruby ruby-wmii] -- Ruby configuration and scripting for wmii 3.1 and older<br />
* [https://github.com/sunaku/wmiirc ruby wmiirc] -- Ruby configuration and scripting for wmii 3.9 and newer<br />
* [http://pastebin.com/Xyn0mEjr Ben's wmiirc] -- Simple wmiirc with extra widgets (vol, mpd, mail, clock) and other modifications</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Irssi&diff=160646Irssi2011-09-19T01:47:17Z<p>Lagagnon: /* Basic Usage */</p>
<hr />
<div>{{i18n|Irssi}}<br />
[[Category:Internet Applications (English)]]<br />
<br />
[[fr:Irssi]]<br />
<br />
[http://www.irssi.org/ irssi] is a modular, ncurses based IRC (Internet Relay Chat) client for UNIX systems. It also supports SILC and ICB protocols via plugins.<br />
<br />
==Installation==<br />
Simply run as root:<br />
# pacman -S irssi<br />
<br />
==Configuration==<br />
The configuration file should be located at {{filename|~/.irssi/config}}. Otherwise, you can start irssi with an alternate config file using the {{Codeline|--config}} flag:<br />
$ irssi --config=FILE<br />
<br />
* You can also at anytime use /save to save your current configuration to the config file.<br />
<br />
* You can save the location of your currently opened windows by entering<br />
<br />
/layout save<br />
<br />
* It sometimes might happen that umlauts are not correctly displayed. To fix this problem you have to set the right encoding with the following commands directly in irssi.<br />
<br />
/set recode_autodetect_utf8 ON <br />
/set recode_fallback CP1252<br />
/save<br />
<br />
=====Auto-connect to #archlinux on irssi startup=====<br />
start irssi and then type the following in it:<br />
/server add -auto -network fn irc.freenode.net<br />
fn is for freenode but you can choose some different word e.g foo. <br />
Now to automatically identify your nick for a given password, type:<br />
/network add -nick user123 -autosendcmd "/^msg nickserv IDENTIFY *******" fn<br />
where user123 is the nick with which you registered to nickserv and ******* is the password for that nick, replace fn with the word that you used in the first command (e.g foo) if that is the case.<br />
{{Note|Password will be visible when you type it and also it can be seen in ~/.irssi/config, so you can omit this step if you want to.}}<br />
/channel add -auto #archlinux fn<br />
/channel add -auto #archlinux-offtopic fn<br />
/save<br />
/quit<br />
<br />
=====set irssi not to show joins,parts,quits=====<br />
In order to ignore showing of joining,leaving,quiting of users for all channels type the following in irssi:<br />
/ignore * joins<br />
/ignore * parts<br />
/ignore * quits<br />
/save<br />
<br />
==Basic Usage==<br />
{{Note|This assumes you already know IRC and have used other clients in the past.}}<br />
<br />
* Running irssi from a terminal.<br />
<br />
$ irssi<br />
<br />
* Many people prefer to use screen in conjunction with irssi. Some scripts like the [http://wouter.coekaerts.be/site/irssi/nicklist nicklist.pl] script are dependent on screen. I'd take this opportunity to start learning screen if you don't know it already.<br />
<br />
<br />
* There are 3 connection-related commands:<br />
<br />
/server<br />
/s<br />
These change the server of the current network.<br />
<br />
/connect<br />
/c<br />
These open a new connection to a server. This is what you want to use in order to connect to multiple servers simultaneously (Ctrl+X switches between multiple servers).<br />
<br />
/disconnect<br />
/dc<br />
These close the current connection to a server.<br />
<br />
<br />
* ALT+(1-0,q-p,etc) changes the currently active window. Or use Ctrl+n for the next window or Ctrl+p for the previous window. Now that you can switch windows, here are a few other window management commands:<br />
<br />
/window 1<br />
/w 1<br />
Takes you to the first window. Windows go from are numbered across the top of your keyboard (1-0) and then start on the next row down (q-p).<br />
<br />
/window close<br />
/wc<br />
These close the current window.<br />
<br />
/window move 1<br />
/w move 1<br />
These move the current window to the first window position.<br />
<br />
/save layouts<br />
This will save the current window positions for the next time you start irssi.<br />
<br />
<br />
The only other miscellaneous commands you really need to know are:<br />
<br />
/set<br />
This shows a list of all your current settings.<br />
<br />
/help<br />
This provides a helpful description/explanation for whatever parameter provided.<br />
<br />
/alias<br />
Lets you create your own shortcuts.<br />
<br />
==Installing a Script==<br />
* Let's install the spell checking script<br />
* In a terminal<br />
# pacman -S ispell<br />
$ mkdir -p ~/.irssi/scripts/autorun<br />
$ cd ~/.irssi/scripts<br />
$ wget http://scripts.irssi.org/scripts/spell.pl .<br />
# perl -MCPAN -e 'install Lingua::Ispell' '''# make sure your are root'''<br />
$ irssi<br />
* If you don't want to use CPAN; http://search.cpan.org/~jdporter/Lingua-Ispell-0.07/lib/Lingua/Ispell.pm <br />
* Also, [[bauerbill]] can install archlinux packages directly from CPAN:<br />
{{Warning|''Bauerbill'' development has been officially discontinued: its latest version does not work with ''pacman>&#61;3.5''. See [https://bbs.archlinux.org/viewtopic.php?id&#61;115660].}}<br />
$ sudo bauerbill -S --cpan perl-lingua-ispell<br />
*In irssi<br />
/script load spell.pl<br />
* If it worked, it should look like this:<br />
- - Irssi: Loaded script spell<br />
/bind meta-s /_spellcheck<br />
<br />
* Alt + s will now spell check your current line.<br />
<br />
* If you want to autorun the script when you start irssi, just link the script into the autorun folder.<br />
$ cd ~/.irssi/scripts/autorun<br />
$ ln -s ../spell.pl .<br />
<br />
==Proxy==<br />
<br />
To use ''irssi'' behind a HTTP proxy, the following commands are required:<br />
/SET use_proxy ON<br />
/SET proxy_address <Proxy host address><br />
/SET proxy_port <Proxy port><br />
/SET -clear proxy_string<br />
/SET proxy_string_after conn %s %d<br />
/EVAL SET proxy_string CONNECT %s:%d HTTP/1.0\n\n<br />
<br />
''irssi'' should then alter its config file correspondingly; if the proxy is not required, just set use_proxy to OFF.<br />
<br />
Should the proxy require a password, try:<br />
<br />
/SET proxy_password your_pass<br />
<br />
Otherwise:<br />
<br />
/SET -clear proxy_password<br />
<br />
{{Note|SSL behind a proxy will fail with these settings.}}<br />
<br />
== Additional Information ==<br />
<br />
* [http://linuxtidbits.wordpress.com/2008/01/09/setting-up-irssi/ Setting up Irssi]<br />
* [http://quadpoint.org/articles/irssi Guide to Efficiently Using Irssi & Screen]<br />
* [http://scripts.irssi.org/ Irssi Scripts]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Irssi&diff=160645Irssi2011-09-19T01:46:34Z<p>Lagagnon: /* Basic Usage */</p>
<hr />
<div>{{i18n|Irssi}}<br />
[[Category:Internet Applications (English)]]<br />
<br />
[[fr:Irssi]]<br />
<br />
[http://www.irssi.org/ irssi] is a modular, ncurses based IRC (Internet Relay Chat) client for UNIX systems. It also supports SILC and ICB protocols via plugins.<br />
<br />
==Installation==<br />
Simply run as root:<br />
# pacman -S irssi<br />
<br />
==Configuration==<br />
The configuration file should be located at {{filename|~/.irssi/config}}. Otherwise, you can start irssi with an alternate config file using the {{Codeline|--config}} flag:<br />
$ irssi --config=FILE<br />
<br />
* You can also at anytime use /save to save your current configuration to the config file.<br />
<br />
* You can save the location of your currently opened windows by entering<br />
<br />
/layout save<br />
<br />
* It sometimes might happen that umlauts are not correctly displayed. To fix this problem you have to set the right encoding with the following commands directly in irssi.<br />
<br />
/set recode_autodetect_utf8 ON <br />
/set recode_fallback CP1252<br />
/save<br />
<br />
=====Auto-connect to #archlinux on irssi startup=====<br />
start irssi and then type the following in it:<br />
/server add -auto -network fn irc.freenode.net<br />
fn is for freenode but you can choose some different word e.g foo. <br />
Now to automatically identify your nick for a given password, type:<br />
/network add -nick user123 -autosendcmd "/^msg nickserv IDENTIFY *******" fn<br />
where user123 is the nick with which you registered to nickserv and ******* is the password for that nick, replace fn with the word that you used in the first command (e.g foo) if that is the case.<br />
{{Note|Password will be visible when you type it and also it can be seen in ~/.irssi/config, so you can omit this step if you want to.}}<br />
/channel add -auto #archlinux fn<br />
/channel add -auto #archlinux-offtopic fn<br />
/save<br />
/quit<br />
<br />
=====set irssi not to show joins,parts,quits=====<br />
In order to ignore showing of joining,leaving,quiting of users for all channels type the following in irssi:<br />
/ignore * joins<br />
/ignore * parts<br />
/ignore * quits<br />
/save<br />
<br />
==Basic Usage==<br />
{{Note|This assumes you already know IRC and have used other clients in the past.}}<br />
<br />
* Running irssi from a terminal.<br />
<br />
$ irssi<br />
<br />
* Many people prefer to use screen in conjunction with irssi. Some scripts like the [http://wouter.coekaerts.be/site/irssi/nicklist nicklist.pl] script are dependent on screen. I'd take this opportunity to start learning screen if you don't know it already.<br />
<br />
<br />
* There are 3 connection-related commands:<br />
<br />
/server<br />
/s<br />
These change the server of the current network.<br />
<br />
/connect<br />
/c<br />
These open a new connection to a server. This is what you want to use in order to connect to multiple servers simultaneously (Ctrl+X switches between multiple servers).<br />
<br />
/disconnect<br />
/dc<br />
These close the current connection to a server.<br />
<br />
<br />
* ALT+(1-0,q-p,etc) changes the currently active window. Or use Ctrl+N for the next window or Ctrl+P for the previous window. Now that you can switch windows, here are a few other window management commands:<br />
<br />
/window 1<br />
/w 1<br />
Takes you to the first window. Windows go from are numbered across the top of your keyboard (1-0) and then start on the next row down (q-p).<br />
<br />
/window close<br />
/wc<br />
These close the current window.<br />
<br />
/window move 1<br />
/w move 1<br />
These move the current window to the first window position.<br />
<br />
/save layouts<br />
This will save the current window positions for the next time you start irssi.<br />
<br />
<br />
The only other miscellaneous commands you really need to know are:<br />
<br />
/set<br />
This shows a list of all your current settings.<br />
<br />
/help<br />
This provides a helpful description/explanation for whatever parameter provided.<br />
<br />
/alias<br />
Lets you create your own shortcuts.<br />
<br />
==Installing a Script==<br />
* Let's install the spell checking script<br />
* In a terminal<br />
# pacman -S ispell<br />
$ mkdir -p ~/.irssi/scripts/autorun<br />
$ cd ~/.irssi/scripts<br />
$ wget http://scripts.irssi.org/scripts/spell.pl .<br />
# perl -MCPAN -e 'install Lingua::Ispell' '''# make sure your are root'''<br />
$ irssi<br />
* If you don't want to use CPAN; http://search.cpan.org/~jdporter/Lingua-Ispell-0.07/lib/Lingua/Ispell.pm <br />
* Also, [[bauerbill]] can install archlinux packages directly from CPAN:<br />
{{Warning|''Bauerbill'' development has been officially discontinued: its latest version does not work with ''pacman>&#61;3.5''. See [https://bbs.archlinux.org/viewtopic.php?id&#61;115660].}}<br />
$ sudo bauerbill -S --cpan perl-lingua-ispell<br />
*In irssi<br />
/script load spell.pl<br />
* If it worked, it should look like this:<br />
- - Irssi: Loaded script spell<br />
/bind meta-s /_spellcheck<br />
<br />
* Alt + s will now spell check your current line.<br />
<br />
* If you want to autorun the script when you start irssi, just link the script into the autorun folder.<br />
$ cd ~/.irssi/scripts/autorun<br />
$ ln -s ../spell.pl .<br />
<br />
==Proxy==<br />
<br />
To use ''irssi'' behind a HTTP proxy, the following commands are required:<br />
/SET use_proxy ON<br />
/SET proxy_address <Proxy host address><br />
/SET proxy_port <Proxy port><br />
/SET -clear proxy_string<br />
/SET proxy_string_after conn %s %d<br />
/EVAL SET proxy_string CONNECT %s:%d HTTP/1.0\n\n<br />
<br />
''irssi'' should then alter its config file correspondingly; if the proxy is not required, just set use_proxy to OFF.<br />
<br />
Should the proxy require a password, try:<br />
<br />
/SET proxy_password your_pass<br />
<br />
Otherwise:<br />
<br />
/SET -clear proxy_password<br />
<br />
{{Note|SSL behind a proxy will fail with these settings.}}<br />
<br />
== Additional Information ==<br />
<br />
* [http://linuxtidbits.wordpress.com/2008/01/09/setting-up-irssi/ Setting up Irssi]<br />
* [http://quadpoint.org/articles/irssi Guide to Efficiently Using Irssi & Screen]<br />
* [http://scripts.irssi.org/ Irssi Scripts]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Fluxbox&diff=160587Fluxbox2011-09-18T17:02:41Z<p>Lagagnon: /* Additional Resources */</p>
<hr />
<div>[[Category:Stacking WMs (English)]]<br />
{{i18n|Fluxbox}}<br />
[[fr:Fluxbox]]<br />
Fluxbox is yet another window manager for X. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit and there are hundreds of fluxbox "styles" to make your desktop look great. ArchLinux with FluxBox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.<br />
<br />
==Installation==<br />
<br />
Install Fluxbox using<br />
<br />
# pacman -S fluxbox<br />
<br />
== Starting Fluxbox ==<br />
=== Method 1: KDM/GDM Login/Session Managers ===<br />
Users of [[KDM]] or [[GDM]] will find a new fluxbox entry added to their session menu automatically. Simply choose the fluxbox option from the session menu when logging in.<br />
<br />
=== Method 2: ~/.xinitrc ===<br />
Edit {{Filename|~/.xinitrc}} and add the following code:<br />
<br />
exec startfluxbox <br />
<br />
If you like to have devices automounted (e.g. in Thunar and other file managers), use this code instead:<br />
<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
See [[Xinitrc]] for more details. You then use the "startx" command from a terminal to launch X and your window manager.<br />
<br />
=== Method 3: SLiM Login Manager ===<br />
<br />
SLiM, the Simple Login Manager, is a favourite of many Archlinux users due to its efficiency. SLiM reads ~/.xinitrc, so if you have your .xninitrc correct as above then it should just work. However, if you want to use SLiM to be able to choose between a number of different window managers/desktop environments then edit the sessions variable in {{Filename|/etc/slim.conf}} to match the names that trigger the case statement in {{Filename|~/.xinitrc}}. See [[Slim]] and [[Xinitrc]].<br />
<br />
== Configuration ==<br />
<br />
System-wide fluxbox configuration files are in {{Filename|/usr/share/fluxbox}} while user configuration files are in {{Filename|~/.fluxbox}}. The user config files are:<br />
<ul><br />
<li>init: the main fluxbox resource configuration file. See [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file]<br />
<li>menu: the fluxbox menu config. See below and [http://fluxbox-wiki.org/index.php?title=Editing_the_menu Editing the menu file]<br />
<li>keys: the fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/index.php?title=Keyboard_shortcuts here]<br />
<li>startup: where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/index.php?title=Editing_the_startup_file here]<br />
<li>overlay: a config file to override elements of styles. See [http://fluxbox-wiki.org/index.php?title=Style_overlay here].<br />
<li>apps: a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/index.php?title=Editing_the_apps_file here]<br />
<li>windowmenu: a config file for altering the Window Menu itself: [http://fluxbox-wiki.org/index.php?title=Editing_the_windowmenu read this]<br />
</ul><br />
There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.<br />
<br />
=== Menu Management ===<br />
<br />
When you first install fluxbox a very basic applications menu will be created at ~/.fluxbox/menu. You access the menu via a right mouse button click on the desktop. To enhance the menu and add/edit items there are basically four ways to do it:<br />
<br />
==== fluxbox-generate_menu ====<br />
There is a built-in command provided with fluxbox:<br />
$ fluxbox-generate_menu<br />
This command will auto-generate a {{Filename|~/.fluxbox/menu/}} file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by "menumaker" (see immediately below).<br />
<br />
====MenuMaker====<br />
[http://menumaker.sourceforge.net MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Fluxbox. MenuMaker will search your computer for executable programs and create a menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if desired.<br />
<br />
To install MenuMaker:<br />
# pacman -S menumaker<br />
<br />
Once installed, you can generate a complete menu and overwrite the default one by running:<br />
$ mmaker -f FluxBox<br />
<br />
To see MenuMaker options:<br />
$ mmaker --help<br />
<br />
==== Arch Linux Xdg menu ====<br />
Requires [[XdgMenu]] which is available via pacman:<br />
# pacman -S archlinux-xdg-menu<br />
<br />
To then create a fluxbox menu:<br />
$ xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
<br />
More info:<br />
$ xdg_menu --help<br />
<br />
==== Manually create/edit the menu ====<br />
Use your favourite text editor and edit the file: "~/.fluxbox/menu" .<br />
The basic syntax for a menu item to appear is:<br />
[exec] (name) {command}<br />
<br />
...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:<br />
[exec] (Firefox Browser) {/usr/bin/firefox}<br />
<br />
If you want to make submenu write:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
When done editing save the file and exit. There is no need to restart fluxbox. For more info read [http://fluxbox-wiki.org/index.php?title=Editing_the_menu editing the fluxbox menu].<br />
<br />
===Init===<br />
The ~/.fluxbox/init file is FluxBox's primary configuration resource file. You can change the basic functionality of fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file].<br />
<br />
===Hotkeys===<br />
Fluxbox offers basic hotkeys functionality. The fluxbox hotkey file is located at {{Filename|~/.fluxbox/keys}}.<br />
The Control key is represented by "Control". Mod1 corresponds to the Alt key and Mod4 corresponds to Meta (not a standard key but most users map Meta to the "Win" key). When installed and first run Fluxbox will provide you with a very usable, almost complete set of hotkeys. You should peruse and learn the ~/.fluxbox/keys file to enhance your FluxBox experience.<br />
<br />
Example: here is a quick way to control the Master volume:<br />
Control Mod1 Up :Exec amixer set Master,0 5%+ <br />
Control Mod1 Down :Exec amixer set Master,0 5%-<br />
<br />
===Workspaces===<br />
Fluxbox defaults to having four workspaces. These are accessible using Ctrl+F1-F4 shortcuts, or by using the left mouse button to click the arrows on the toolbar. You can also access workspaces via a middle mouse button click on desktop which pops up the Workspaces Menu.<br />
<br />
===Tabbing and Grouping===<br />
With at least two windows visible on your desktop middle click on the upper window tab of one window and drag it into the other open window. The two windows will now be grouped together with window tabs in the upper window tab bar. You may now perform a window operation that will affect the entire window "group".<br />
<br />
===Background (Wallpaper)===<br />
Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The fluxbox-wiki now has an entry for [http://fluxbox-wiki.org/index.php?title=Howto_set_the_background background setting], so please refer to that. <br />
<br />
The easiest way to do it with ArchLinux is to first of all check that you have a background setting application available:<br />
$ fbsetbg -i<br />
<br />
If not, install either feh, esetroot or wmsetbg using pacman. Then add this line to your ~/.xinitrc file, e.g.:<br />
fbsetbg /path/to/my/image.image<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
====Swapping Multiple Backgrounds Easily====<br />
<br />
Place the following submenu in your fluxbox menu:<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
Then put your background images into {{Filename|~/.fluxbox/backgrounds}} or any other folder you specify, they will then appear in the same fashion as your styles.\<br />
<br />
====Using Feh with FluxBox====<br />
Install feh with:<br />
# pacman -S feh<br />
You may add a quick submenu to your {{Filename|~/.fluxbox/menu}} file which will allow you to change backgrounds on-the-fly:<br />
[submenu] (Backgrounds)<br />
[backgrounds] (/path/to/your/backgrounds) {feh --bg-scale}<br />
[end]<br />
<br />
To make sure fluxbox will load feh background next time start:<br />
<br />
'''1.''' Make {{Filename|.fehbg}} executable:<br />
$ chmod 770 ~/.fehbg<br />
<br />
'''2.''' Then add (or modify) the following line to the file {{Filename|~/.fluxbox/init}}:<br />
session.screen0.rootCommand: ~/.fehbg<br />
<br />
'''3.''' or add (or modify) the following line to the file {{Filename|~/.fluxbox/startup}}:<br />
~/.fehbg<br />
<br />
===Theming===<br />
To install a fluxbox theme extract the theme archive file to a styles directory. The default directories are:<br />
*global - {{Filename|/usr/share/fluxbox/styles}}<br />
*user only - {{Filename|~/.fluxbox/styles}}<br />
<br />
The ArchLinux [[AUR]] currently contains a compilation of good looking fluxbox themes called "fluxbox-styles". Get it [http://aur.archlinux.org/packages.php?ID=28743 here] and install this package for more themes than you could possibly use. When installed correctly they will appear in the Fluxbox, Styles section of your Fluxbox menu.<br />
<br />
To create your own Fluxbox styles read [[Fluxbox_Style_Guide]] and this [http://tenr.de/howto/style_fluxbox/style_fluxbox.html style guide].<br />
<br />
===The Slit===<br />
Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit [http://dockapps.org Dockapps.org] <br />
<br />
===Autostarting Applications===<br />
The ArchLinux way to autostart apps is to put all code into {{Filename|~/.xinitrc}}. Please read [[Xinitrc]]. However, fluxbox provides functionality to autostart applications on its own. The {{Filename|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting fluxbox itself. The # symbol denotes a comment.<br />
<br />
A sample file:<br />
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.<br />
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. <br />
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.<br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> exec is for starting fluxbox itself, don't put an ampersand (&) after this or fluxbox will exit immediately<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:<br />
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Other Menus===<br />
<br />
In the "Menu Management" section (above) we were discussing the main "Applications" Menu, called the "Root" menu in fluxbox lingo. FluxBox also has other menus available to the user:<br />
<ul><br />
<li>Workspaces Menu: middle click on desktop.<br />
<li>Configuration Menu: located within the "Fluxbox" section of the "Root" menu.<br />
<li>Window menu: right click on the titlebar of any window, or its bar if minimized. Can be edited. See fluxbox-menu man page.<br />
<li>Toolbar menu: right click on empty part of toolbar. Also found as a sub-menu within the Configuration Menu.<br />
<li>Slit Menu: found as a sub-menu within the configuration menu.<br />
</ul><br />
<br />
===Transparent rxvt-unicode terminals===<br />
Install urxvt:<br />
# pacman -S rxvt-unicode<br />
<br />
Launch urxvt with these options:<br />
$ urxvt -depth 32 -bg rgba:0000/0000/0000/bbbb -tint grey<br />
<br />
Or you can edit your ~/.Xdefaults file and place the equivalent urxvt commands in that file. See [[Xdefaults]] for more info.<br />
<br />
===A life after xorg.conf===<br />
Xorg no longer requires an xorg.conf file. Traditionally this is where you would change your keyboard settings and powersave settings. Luckily there are elegant solutions not using xorg.conf. <br />
<br />
====Setting your keyboard right====<br />
Just add the following line to {{Filename|~/.fluxbox/startup}}:<br />
setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)<br />
<br />
Instead of 'us' you can also pass your language code and remove the variant option (ex.: 'us_intl', which works like the command above in some setups). See man setxkbmap for more options.<br />
<br />
To make a help function in your menu, just add in {{Filename|~/.fluxbox/menu}}:<br />
[submenu] (Keyboard)<br />
[exec] (normal) {setxkbmap us}<br />
[exec] (international) {setxkbmap us -variant intl}<br />
[end]<br />
<br />
====Disable Powersave====<br />
Do you recognize the problem while watching a movie that the screen goes blank? Congratulations, Xorg just detected that you were doing nothing :). If you don't need these movement exercises, you can disable this feature altogether. You'll just have to remember to manually turn off your monitor if you're not using it.<br />
<br />
Just add the following line at the start of {{Filename|~/.fluxbox/startup}}:<br />
xset s off -dpms &<br />
<br />
==Additional Resources==<br />
<br />
* [http://fluxbox.org/ Fluxbox Homepage]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://en.gentoo-wiki.com/wiki/Fluxbox Gentoo Wiki about Fluxbox]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml Gentoo Fluxbox Documentation]<br />
* [http://box-look.org/ Themes for Fluxbox]<br />
* [http://wiki.archlinux.org/index.php/Fluxbox_Style_Guide Fluxbox Style Guide]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox Guide]<br />
* The fluxbox man pages: fluxbox, fluxbox-menu, fluxbox-style, fluxbox-keys, fluxbox-apps, fluxbox-remote, fbsetroot, fbsetbg, fbrun, startfluxbox.<br />
* [https://bbs.archlinux.org/viewtopic.php?id=90260 Archlinux-FluxBox screenshots]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=List_of_applications/Science&diff=160500List of applications/Science2011-09-17T17:54:12Z<p>Lagagnon: /* Electronics */</p>
<hr />
<div>=Mathematics=<br />
==Calculator==<br />
* [http://speedcrunch.org Speedcrunch] - A feature-rich scientific calculator.<br />
* [http://extcalc-linux.sourceforge.net/ ExtCalc] - A feature-rich scientific calculator.<br />
* [http://kalgebra.berlios.de/ KAlgebra] - calculator and 3D plot.<br />
* [http://qalculate.sourceforge.net/ Qalculate] - calculator and equation solver with fault-tolerant parsing. Recognises constants and units.<br />
<br />
==Computer Algebra System==<br />
*[http://maxima.sourceforge.net/ Maxima] - "Maple/Mathematica"-like program or its frontend [http://wxmaxima.sourceforge.net/wiki/index.php/Main_Page wXMaxima].<br />
*[http://www.sagemath.org/ Sage] - "Maple/Mathematica-like"-like program in python.<br />
<br />
==Scientific or Technical Computing==<br />
*[[Matlab]] - Widely used for scientific computing and data processing (proprietary!).<br />
*[http://www.gnu.org/software/octave/ Octave] - "Matlab"-like program or its frontend {{Package Official|QtOctave}}.<br />
*[http://freemat.sourceforge.net/ Freemat] - "Matlab"-like program.<br />
*[http://www.scilab.org/ Scilab] - "Matlab"-like program.<br />
*[http://aur.archlinux.org/packages.php?ID=694 Euler] - Mathematical programming environment like MatLab or Octave<br />
*[http://aur.archlinux.org/packages.php?ID=19160 Englab] - Cross-compile mathematical platform with a C like syntax.<br />
<br />
==Statistics==<br />
* [http://www.gnu.org/software/pspp/ PSPP] - Free SPSS implementation (Graphical:PSPPire).<br />
* [[R]] - Software environment for statistical computing and graphics (note package name is {{Codeline|r}}, in {{Codeline|extras}})<br />
* [http://rkward.sourceforge.net/ RKWard] - Frontend for the statistical language R.<br />
<br />
==Data Evaluation==<br />
* [http://www.unipress.waw.pl/fityk/ Fityk] - Non-linear fitting of curves.<br />
* [http://soft.proindependent.com/qtiplot.html QtiPlot] - Similar & semi-compatible with "OriginLab".<br />
* [http://scidavis.sourceforge.net/ SciDavis] - Similar to QtiPlot.<br />
* [http://labplot.sourceforge.net/ LabPlot] - Comparable to "OriginLab".<br />
* [http://root.cern.ch/drupal/ ROOT] - Data analysis program and library (originally for particle physics).<br />
* [http://www.gnuplot.info/ GnuPlot] - Command-line based plotting program.<br />
* [http://plasma-gate.weizmann.ac.il/Grace/ XmGrace] - Plotting program with GUI.<br />
* [http://aur.archlinux.org/packages.php?ID=9583 Extrema] - Visualization and data analysis tool.<br />
* [[Common Applications#Spreadsheets]]<br />
<br />
=Natural Science=<br />
<br />
==Chemistry and Biology==<br />
<br />
===Molecule Viewer===<br />
*[http://avogadro.openmolecules.net/wiki/Main_Page Avogadro] - Edit and view 3D molecule structures (also .pdb) and simulate.<br />
*[http://www.ballview.org/ Ballview] - Standalone molecular modeling and visualization application.<br />
*[http://www.uku.fi/~thassine/projects/ghemical/ Ghemical] - Edit and view 3D molecule structures (also .pdb) and simulate.<br />
*[http://www.rasmol.org/ Rasmol] - View 3D molecule structures.<br />
*[http://pymol.sourceforge.net/ Pymol] - View 3D molecule structures.<br />
<br />
===Molecule Drawing===<br />
*[http://bkchem.zirael.org/ BkChem] - Practical and goodlooking skeletal formula molecule drawing program.<br />
*[http://xdrawchem.sourceforge.net/ XDrawChem] - Extensive skeletal formula molecule drawing program (incl. spectroscopy prediction).<br />
*[http://easychem.sourceforge.net/ EasyChem] - Simple skeletal formula molecule drawing program.<br />
*[http://ruby.chemie.uni-freiburg.de/~martin/chemtool/ Chemtool] - Skeletal formula molecule drawing program.<br />
*[http://gabedit.sourceforge.net/ Gabedit] - Gabedit is a graphical user interface to computational chemistry packages like Gamess-US, Gaussian, Molcas, Molpro, MPQC, OpenMopac, Orca, PCGamess and Q-Chem <br />
<br />
===Periodic Table===<br />
* [http://edu.kde.org/kalzium/ Kalzium] - Periodic table of the elements with molecule editor and equation solver (from KDE project).<br />
* [http://www.kdau.com/projects/gelemental/ GElemental]{{Linkrot|2011|09|05}} - Periodic table of the elements and additional information. <br />
<br />
===Biochemistry===<br />
* [http://www.bioclipse.net/ Bioclipse] - Aims to be a complete biochemistry office suite.<br />
<br />
===Molecular Modeling===<br />
* [http://www.gromacs.org GROMACS] - GROMACS is a versatile package to perform molecular dynamics, i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles.<br />
* [http://www.quantum-espresso.org/ Quantum-Espresso] - Quantum ESPRESSO is an integrated suite of computer codes for electronic-structure calculations and materials modeling at the nanoscale. It is based on density-functional theory, plane waves, and pseudopotentials (both norm-conserving and ultrasoft).<br />
<br />
==Astronomy==<br />
*[http://www.stellarium.org/ Stellarium] - Beautiful 3D planetarium.<br />
*[http://edu.kde.org/kstars/ KStars] - KDE desktop planetarium.<br />
*[http://starplot.org/ StarPlot] - 3D starchart viewer.<br />
*[http://www.shatters.net/celestia/ Celestia] - Space simulation software.<br />
<br />
==Physics==<br />
<br />
===Electronics===<br />
*[http://www.gpleda.org/ gEDA] - Electronic design automation tools.<br />
*[http://qucs.sourceforge.net/ Qucs] - Electronic circuit simulation.<br />
*[http://oregano.gforge.lug.fi.uba.ar/ Oregano]{{Linkrot|2011|09|05}} - Electronic circuit simulation.<br />
*[http://qelectrotech.org/ QElectroTech] - Draw advanced electrical circuits.<br />
*[http://kicad.sourceforge.net/wiki/index.php/Main_Page KiCad] - Design schematics for printed circuit boards.<br />
*[http://ksimus.berlios.de/ KSimus] - Logical circuits simulation.<br />
*[http://www.a-rostin.de/ KLogic] - Logical circuits simulation.<br />
<br />
===Physics Simulation===<br />
*[http://www.code-aster.org Code Aster] - Simulation for civil and structural engineering.<br />
*[http://edu.kde.org/step/ Step] - Physics Simulation Educative physics simulation (KDE).<br />
<br />
===Unit Conversion===<br />
*[http://convertall.bellz.org/ Convertall] - Convert between different physical units.<br />
*[http://www.unihedron.com/projects/gonvert/ Gonvert] - Convert between different physical units.<br />
<br />
[[Category:Mathematics and science (English)]]</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Fluxbox&diff=160499Fluxbox2011-09-17T17:39:34Z<p>Lagagnon: /* Method 2: ~/.xinitrc */</p>
<hr />
<div>[[Category:Stacking WMs (English)]]<br />
{{i18n|Fluxbox}}<br />
[[fr:Fluxbox]]<br />
Fluxbox is yet another window manager for X. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit and there are hundreds of fluxbox "styles" to make your desktop look great. ArchLinux with FluxBox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.<br />
<br />
==Installation==<br />
<br />
Install Fluxbox using<br />
<br />
# pacman -S fluxbox<br />
<br />
== Starting Fluxbox ==<br />
=== Method 1: KDM/GDM Login/Session Managers ===<br />
Users of [[KDM]] or [[GDM]] will find a new fluxbox entry added to their session menu automatically. Simply choose the fluxbox option from the session menu when logging in.<br />
<br />
=== Method 2: ~/.xinitrc ===<br />
Edit {{Filename|~/.xinitrc}} and add the following code:<br />
<br />
exec startfluxbox <br />
<br />
If you like to have devices automounted (e.g. in Thunar and other file managers), use this code instead:<br />
<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
See [[Xinitrc]] for more details. You then use the "startx" command from a terminal to launch X and your window manager.<br />
<br />
=== Method 3: SLiM Login Manager ===<br />
<br />
SLiM, the Simple Login Manager, is a favourite of many Archlinux users due to its efficiency. SLiM reads ~/.xinitrc, so if you have your .xninitrc correct as above then it should just work. However, if you want to use SLiM to be able to choose between a number of different window managers/desktop environments then edit the sessions variable in {{Filename|/etc/slim.conf}} to match the names that trigger the case statement in {{Filename|~/.xinitrc}}. See [[Slim]] and [[Xinitrc]].<br />
<br />
== Configuration ==<br />
<br />
System-wide fluxbox configuration files are in {{Filename|/usr/share/fluxbox}} while user configuration files are in {{Filename|~/.fluxbox}}. The user config files are:<br />
<ul><br />
<li>init: the main fluxbox resource configuration file. See [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file]<br />
<li>menu: the fluxbox menu config. See below and [http://fluxbox-wiki.org/index.php?title=Editing_the_menu Editing the menu file]<br />
<li>keys: the fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/index.php?title=Keyboard_shortcuts here]<br />
<li>startup: where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/index.php?title=Editing_the_startup_file here]<br />
<li>overlay: a config file to override elements of styles. See [http://fluxbox-wiki.org/index.php?title=Style_overlay here].<br />
<li>apps: a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/index.php?title=Editing_the_apps_file here]<br />
<li>windowmenu: a config file for altering the Window Menu itself: [http://fluxbox-wiki.org/index.php?title=Editing_the_windowmenu read this]<br />
</ul><br />
There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.<br />
<br />
=== Menu Management ===<br />
<br />
When you first install fluxbox a very basic applications menu will be created at ~/.fluxbox/menu. You access the menu via a right mouse button click on the desktop. To enhance the menu and add/edit items there are basically four ways to do it:<br />
<br />
==== fluxbox-generate_menu ====<br />
There is a built-in command provided with fluxbox:<br />
$ fluxbox-generate_menu<br />
This command will auto-generate a {{Filename|~/.fluxbox/menu/}} file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by "menumaker" (see immediately below).<br />
<br />
====MenuMaker====<br />
[http://menumaker.sourceforge.net MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Fluxbox. MenuMaker will search your computer for executable programs and create a menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if desired.<br />
<br />
To install MenuMaker:<br />
# pacman -S menumaker<br />
<br />
Once installed, you can generate a complete menu and overwrite the default one by running:<br />
$ mmaker -f FluxBox<br />
<br />
To see MenuMaker options:<br />
$ mmaker --help<br />
<br />
==== Arch Linux Xdg menu ====<br />
Requires [[XdgMenu]] which is available via pacman:<br />
# pacman -S archlinux-xdg-menu<br />
<br />
To then create a fluxbox menu:<br />
$ xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
<br />
More info:<br />
$ xdg_menu --help<br />
<br />
==== Manually create/edit the menu ====<br />
Use your favourite text editor and edit the file: "~/.fluxbox/menu" .<br />
The basic syntax for a menu item to appear is:<br />
[exec] (name) {command}<br />
<br />
...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:<br />
[exec] (Firefox Browser) {/usr/bin/firefox}<br />
<br />
If you want to make submenu write:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
When done editing save the file and exit. There is no need to restart fluxbox. For more info read [http://fluxbox-wiki.org/index.php?title=Editing_the_menu editing the fluxbox menu].<br />
<br />
===Init===<br />
The ~/.fluxbox/init file is FluxBox's primary configuration resource file. You can change the basic functionality of fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file].<br />
<br />
===Hotkeys===<br />
Fluxbox offers basic hotkeys functionality. The fluxbox hotkey file is located at {{Filename|~/.fluxbox/keys}}.<br />
The Control key is represented by "Control". Mod1 corresponds to the Alt key and Mod4 corresponds to Meta (not a standard key but most users map Meta to the "Win" key). When installed and first run Fluxbox will provide you with a very usable, almost complete set of hotkeys. You should peruse and learn the ~/.fluxbox/keys file to enhance your FluxBox experience.<br />
<br />
Example: here is a quick way to control the Master volume:<br />
Control Mod1 Up :Exec amixer set Master,0 5%+ <br />
Control Mod1 Down :Exec amixer set Master,0 5%-<br />
<br />
===Workspaces===<br />
Fluxbox defaults to having four workspaces. These are accessible using Ctrl+F1-F4 shortcuts, or by using the left mouse button to click the arrows on the toolbar. You can also access workspaces via a middle mouse button click on desktop which pops up the Workspaces Menu.<br />
<br />
===Tabbing and Grouping===<br />
With at least two windows visible on your desktop middle click on the upper window tab of one window and drag it into the other open window. The two windows will now be grouped together with window tabs in the upper window tab bar. You may now perform a window operation that will affect the entire window "group".<br />
<br />
===Background (Wallpaper)===<br />
Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The fluxbox-wiki now has an entry for [http://fluxbox-wiki.org/index.php?title=Howto_set_the_background background setting], so please refer to that. <br />
<br />
The easiest way to do it with ArchLinux is to first of all check that you have a background setting application available:<br />
$ fbsetbg -i<br />
<br />
If not, install either feh, esetroot or wmsetbg using pacman. Then add this line to your ~/.xinitrc file, e.g.:<br />
fbsetbg /path/to/my/image.image<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
====Swapping Multiple Backgrounds Easily====<br />
<br />
Place the following submenu in your fluxbox menu:<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
Then put your background images into {{Filename|~/.fluxbox/backgrounds}} or any other folder you specify, they will then appear in the same fashion as your styles.\<br />
<br />
====Using Feh with FluxBox====<br />
Install feh with:<br />
# pacman -S feh<br />
You may add a quick submenu to your {{Filename|~/.fluxbox/menu}} file which will allow you to change backgrounds on-the-fly:<br />
[submenu] (Backgrounds)<br />
[backgrounds] (/path/to/your/backgrounds) {feh --bg-scale}<br />
[end]<br />
<br />
To make sure fluxbox will load feh background next time start:<br />
<br />
'''1.''' Make {{Filename|.fehbg}} executable:<br />
$ chmod 770 ~/.fehbg<br />
<br />
'''2.''' Then add (or modify) the following line to the file {{Filename|~/.fluxbox/init}}:<br />
session.screen0.rootCommand: ~/.fehbg<br />
<br />
'''3.''' or add (or modify) the following line to the file {{Filename|~/.fluxbox/startup}}:<br />
~/.fehbg<br />
<br />
===Theming===<br />
To install a fluxbox theme extract the theme archive file to a styles directory. The default directories are:<br />
*global - {{Filename|/usr/share/fluxbox/styles}}<br />
*user only - {{Filename|~/.fluxbox/styles}}<br />
<br />
The ArchLinux [[AUR]] currently contains a compilation of good looking fluxbox themes called "fluxbox-styles". Get it [http://aur.archlinux.org/packages.php?ID=28743 here] and install this package for more themes than you could possibly use. When installed correctly they will appear in the Fluxbox, Styles section of your Fluxbox menu.<br />
<br />
To create your own Fluxbox styles read [[Fluxbox_Style_Guide]] and this [http://tenr.de/howto/style_fluxbox/style_fluxbox.html style guide].<br />
<br />
===The Slit===<br />
Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit [http://dockapps.org Dockapps.org] <br />
<br />
===Autostarting Applications===<br />
The ArchLinux way to autostart apps is to put all code into {{Filename|~/.xinitrc}}. Please read [[Xinitrc]]. However, fluxbox provides functionality to autostart applications on its own. The {{Filename|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting fluxbox itself. The # symbol denotes a comment.<br />
<br />
A sample file:<br />
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.<br />
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. <br />
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.<br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> exec is for starting fluxbox itself, don't put an ampersand (&) after this or fluxbox will exit immediately<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:<br />
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Other Menus===<br />
<br />
In the "Menu Management" section (above) we were discussing the main "Applications" Menu, called the "Root" menu in fluxbox lingo. FluxBox also has other menus available to the user:<br />
<ul><br />
<li>Workspaces Menu: middle click on desktop.<br />
<li>Configuration Menu: located within the "Fluxbox" section of the "Root" menu.<br />
<li>Window menu: right click on the titlebar of any window, or its bar if minimized. Can be edited. See fluxbox-menu man page.<br />
<li>Toolbar menu: right click on empty part of toolbar. Also found as a sub-menu within the Configuration Menu.<br />
<li>Slit Menu: found as a sub-menu within the configuration menu.<br />
</ul><br />
<br />
===Transparent rxvt-unicode terminals===<br />
Install urxvt:<br />
# pacman -S rxvt-unicode<br />
<br />
Launch urxvt with these options:<br />
$ urxvt -depth 32 -bg rgba:0000/0000/0000/bbbb -tint grey<br />
<br />
Or you can edit your ~/.Xdefaults file and place the equivalent urxvt commands in that file. See [[Xdefaults]] for more info.<br />
<br />
===A life after xorg.conf===<br />
Xorg no longer requires an xorg.conf file. Traditionally this is where you would change your keyboard settings and powersave settings. Luckily there are elegant solutions not using xorg.conf. <br />
<br />
====Setting your keyboard right====<br />
Just add the following line to {{Filename|~/.fluxbox/startup}}:<br />
setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)<br />
<br />
Instead of 'us' you can also pass your language code and remove the variant option (ex.: 'us_intl', which works like the command above in some setups). See man setxkbmap for more options.<br />
<br />
To make a help function in your menu, just add in {{Filename|~/.fluxbox/menu}}:<br />
[submenu] (Keyboard)<br />
[exec] (normal) {setxkbmap us}<br />
[exec] (international) {setxkbmap us -variant intl}<br />
[end]<br />
<br />
====Disable Powersave====<br />
Do you recognize the problem while watching a movie that the screen goes blank? Congratulations, Xorg just detected that you were doing nothing :). If you don't need these movement exercises, you can disable this feature altogether. You'll just have to remember to manually turn off your monitor if you're not using it.<br />
<br />
Just add the following line at the start of {{Filename|~/.fluxbox/startup}}:<br />
xset s off -dpms &<br />
<br />
==Additional Resources==<br />
<br />
* [http://fluxbox.org/ Fluxbox Homepage]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://en.gentoo-wiki.com/wiki/Fluxbox Gentoo Wiki about Fluxbox]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml Gentoo Fluxbox Documentation]<br />
* [http://box-look.org/ Themes for Fluxbox]<br />
* [http://wiki.archlinux.org/index.php/Fluxbox_Style_Guide Fluxbox Style Guide]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox Guide]<br />
* The fluxbox man pages: fluxbox, fluxbox-menu, fluxbox-style, fluxbox-keys, fluxbox-apps, fluxbox-remote, fbsetroot, fbsetbg, fbrun, startfluxbox.</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Fluxbox&diff=160498Fluxbox2011-09-17T17:36:11Z<p>Lagagnon: /* Method 2: ~/.xinitrc */</p>
<hr />
<div>[[Category:Stacking WMs (English)]]<br />
{{i18n|Fluxbox}}<br />
[[fr:Fluxbox]]<br />
Fluxbox is yet another window manager for X. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit and there are hundreds of fluxbox "styles" to make your desktop look great. ArchLinux with FluxBox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.<br />
<br />
==Installation==<br />
<br />
Install Fluxbox using<br />
<br />
# pacman -S fluxbox<br />
<br />
== Starting Fluxbox ==<br />
=== Method 1: KDM/GDM Login/Session Managers ===<br />
Users of [[KDM]] or [[GDM]] will find a new fluxbox entry added to their session menu automatically. Simply choose the fluxbox option from the session menu when logging in.<br />
<br />
=== Method 2: ~/.xinitrc ===<br />
Edit {{Filename|~/.xinitrc}} and add the following code:<br />
<br />
exec startfluxbox <br />
<br />
If you like to have devices automounted (e.g. in Thunar and other file managers), use this code instead:<br />
<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
See [[Xinitrc]] for more details.<br />
<br />
=== Method 3: SLiM Login Manager ===<br />
<br />
SLiM, the Simple Login Manager, is a favourite of many Archlinux users due to its efficiency. SLiM reads ~/.xinitrc, so if you have your .xninitrc correct as above then it should just work. However, if you want to use SLiM to be able to choose between a number of different window managers/desktop environments then edit the sessions variable in {{Filename|/etc/slim.conf}} to match the names that trigger the case statement in {{Filename|~/.xinitrc}}. See [[Slim]] and [[Xinitrc]].<br />
<br />
== Configuration ==<br />
<br />
System-wide fluxbox configuration files are in {{Filename|/usr/share/fluxbox}} while user configuration files are in {{Filename|~/.fluxbox}}. The user config files are:<br />
<ul><br />
<li>init: the main fluxbox resource configuration file. See [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file]<br />
<li>menu: the fluxbox menu config. See below and [http://fluxbox-wiki.org/index.php?title=Editing_the_menu Editing the menu file]<br />
<li>keys: the fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/index.php?title=Keyboard_shortcuts here]<br />
<li>startup: where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/index.php?title=Editing_the_startup_file here]<br />
<li>overlay: a config file to override elements of styles. See [http://fluxbox-wiki.org/index.php?title=Style_overlay here].<br />
<li>apps: a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/index.php?title=Editing_the_apps_file here]<br />
<li>windowmenu: a config file for altering the Window Menu itself: [http://fluxbox-wiki.org/index.php?title=Editing_the_windowmenu read this]<br />
</ul><br />
There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.<br />
<br />
=== Menu Management ===<br />
<br />
When you first install fluxbox a very basic applications menu will be created at ~/.fluxbox/menu. You access the menu via a right mouse button click on the desktop. To enhance the menu and add/edit items there are basically four ways to do it:<br />
<br />
==== fluxbox-generate_menu ====<br />
There is a built-in command provided with fluxbox:<br />
$ fluxbox-generate_menu<br />
This command will auto-generate a {{Filename|~/.fluxbox/menu/}} file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by "menumaker" (see immediately below).<br />
<br />
====MenuMaker====<br />
[http://menumaker.sourceforge.net MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Fluxbox. MenuMaker will search your computer for executable programs and create a menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if desired.<br />
<br />
To install MenuMaker:<br />
# pacman -S menumaker<br />
<br />
Once installed, you can generate a complete menu and overwrite the default one by running:<br />
$ mmaker -f FluxBox<br />
<br />
To see MenuMaker options:<br />
$ mmaker --help<br />
<br />
==== Arch Linux Xdg menu ====<br />
Requires [[XdgMenu]] which is available via pacman:<br />
# pacman -S archlinux-xdg-menu<br />
<br />
To then create a fluxbox menu:<br />
$ xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
<br />
More info:<br />
$ xdg_menu --help<br />
<br />
==== Manually create/edit the menu ====<br />
Use your favourite text editor and edit the file: "~/.fluxbox/menu" .<br />
The basic syntax for a menu item to appear is:<br />
[exec] (name) {command}<br />
<br />
...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:<br />
[exec] (Firefox Browser) {/usr/bin/firefox}<br />
<br />
If you want to make submenu write:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
When done editing save the file and exit. There is no need to restart fluxbox. For more info read [http://fluxbox-wiki.org/index.php?title=Editing_the_menu editing the fluxbox menu].<br />
<br />
===Init===<br />
The ~/.fluxbox/init file is FluxBox's primary configuration resource file. You can change the basic functionality of fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file].<br />
<br />
===Hotkeys===<br />
Fluxbox offers basic hotkeys functionality. The fluxbox hotkey file is located at {{Filename|~/.fluxbox/keys}}.<br />
The Control key is represented by "Control". Mod1 corresponds to the Alt key and Mod4 corresponds to Meta (not a standard key but most users map Meta to the "Win" key). When installed and first run Fluxbox will provide you with a very usable, almost complete set of hotkeys. You should peruse and learn the ~/.fluxbox/keys file to enhance your FluxBox experience.<br />
<br />
Example: here is a quick way to control the Master volume:<br />
Control Mod1 Up :Exec amixer set Master,0 5%+ <br />
Control Mod1 Down :Exec amixer set Master,0 5%-<br />
<br />
===Workspaces===<br />
Fluxbox defaults to having four workspaces. These are accessible using Ctrl+F1-F4 shortcuts, or by using the left mouse button to click the arrows on the toolbar. You can also access workspaces via a middle mouse button click on desktop which pops up the Workspaces Menu.<br />
<br />
===Tabbing and Grouping===<br />
With at least two windows visible on your desktop middle click on the upper window tab of one window and drag it into the other open window. The two windows will now be grouped together with window tabs in the upper window tab bar. You may now perform a window operation that will affect the entire window "group".<br />
<br />
===Background (Wallpaper)===<br />
Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The fluxbox-wiki now has an entry for [http://fluxbox-wiki.org/index.php?title=Howto_set_the_background background setting], so please refer to that. <br />
<br />
The easiest way to do it with ArchLinux is to first of all check that you have a background setting application available:<br />
$ fbsetbg -i<br />
<br />
If not, install either feh, esetroot or wmsetbg using pacman. Then add this line to your ~/.xinitrc file, e.g.:<br />
fbsetbg /path/to/my/image.image<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
====Swapping Multiple Backgrounds Easily====<br />
<br />
Place the following submenu in your fluxbox menu:<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
Then put your background images into {{Filename|~/.fluxbox/backgrounds}} or any other folder you specify, they will then appear in the same fashion as your styles.\<br />
<br />
====Using Feh with FluxBox====<br />
Install feh with:<br />
# pacman -S feh<br />
You may add a quick submenu to your {{Filename|~/.fluxbox/menu}} file which will allow you to change backgrounds on-the-fly:<br />
[submenu] (Backgrounds)<br />
[backgrounds] (/path/to/your/backgrounds) {feh --bg-scale}<br />
[end]<br />
<br />
To make sure fluxbox will load feh background next time start:<br />
<br />
'''1.''' Make {{Filename|.fehbg}} executable:<br />
$ chmod 770 ~/.fehbg<br />
<br />
'''2.''' Then add (or modify) the following line to the file {{Filename|~/.fluxbox/init}}:<br />
session.screen0.rootCommand: ~/.fehbg<br />
<br />
'''3.''' or add (or modify) the following line to the file {{Filename|~/.fluxbox/startup}}:<br />
~/.fehbg<br />
<br />
===Theming===<br />
To install a fluxbox theme extract the theme archive file to a styles directory. The default directories are:<br />
*global - {{Filename|/usr/share/fluxbox/styles}}<br />
*user only - {{Filename|~/.fluxbox/styles}}<br />
<br />
The ArchLinux [[AUR]] currently contains a compilation of good looking fluxbox themes called "fluxbox-styles". Get it [http://aur.archlinux.org/packages.php?ID=28743 here] and install this package for more themes than you could possibly use. When installed correctly they will appear in the Fluxbox, Styles section of your Fluxbox menu.<br />
<br />
To create your own Fluxbox styles read [[Fluxbox_Style_Guide]] and this [http://tenr.de/howto/style_fluxbox/style_fluxbox.html style guide].<br />
<br />
===The Slit===<br />
Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit [http://dockapps.org Dockapps.org] <br />
<br />
===Autostarting Applications===<br />
The ArchLinux way to autostart apps is to put all code into {{Filename|~/.xinitrc}}. Please read [[Xinitrc]]. However, fluxbox provides functionality to autostart applications on its own. The {{Filename|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting fluxbox itself. The # symbol denotes a comment.<br />
<br />
A sample file:<br />
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.<br />
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. <br />
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.<br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> exec is for starting fluxbox itself, don't put an ampersand (&) after this or fluxbox will exit immediately<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:<br />
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Other Menus===<br />
<br />
In the "Menu Management" section (above) we were discussing the main "Applications" Menu, called the "Root" menu in fluxbox lingo. FluxBox also has other menus available to the user:<br />
<ul><br />
<li>Workspaces Menu: middle click on desktop.<br />
<li>Configuration Menu: located within the "Fluxbox" section of the "Root" menu.<br />
<li>Window menu: right click on the titlebar of any window, or its bar if minimized. Can be edited. See fluxbox-menu man page.<br />
<li>Toolbar menu: right click on empty part of toolbar. Also found as a sub-menu within the Configuration Menu.<br />
<li>Slit Menu: found as a sub-menu within the configuration menu.<br />
</ul><br />
<br />
===Transparent rxvt-unicode terminals===<br />
Install urxvt:<br />
# pacman -S rxvt-unicode<br />
<br />
Launch urxvt with these options:<br />
$ urxvt -depth 32 -bg rgba:0000/0000/0000/bbbb -tint grey<br />
<br />
Or you can edit your ~/.Xdefaults file and place the equivalent urxvt commands in that file. See [[Xdefaults]] for more info.<br />
<br />
===A life after xorg.conf===<br />
Xorg no longer requires an xorg.conf file. Traditionally this is where you would change your keyboard settings and powersave settings. Luckily there are elegant solutions not using xorg.conf. <br />
<br />
====Setting your keyboard right====<br />
Just add the following line to {{Filename|~/.fluxbox/startup}}:<br />
setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)<br />
<br />
Instead of 'us' you can also pass your language code and remove the variant option (ex.: 'us_intl', which works like the command above in some setups). See man setxkbmap for more options.<br />
<br />
To make a help function in your menu, just add in {{Filename|~/.fluxbox/menu}}:<br />
[submenu] (Keyboard)<br />
[exec] (normal) {setxkbmap us}<br />
[exec] (international) {setxkbmap us -variant intl}<br />
[end]<br />
<br />
====Disable Powersave====<br />
Do you recognize the problem while watching a movie that the screen goes blank? Congratulations, Xorg just detected that you were doing nothing :). If you don't need these movement exercises, you can disable this feature altogether. You'll just have to remember to manually turn off your monitor if you're not using it.<br />
<br />
Just add the following line at the start of {{Filename|~/.fluxbox/startup}}:<br />
xset s off -dpms &<br />
<br />
==Additional Resources==<br />
<br />
* [http://fluxbox.org/ Fluxbox Homepage]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://en.gentoo-wiki.com/wiki/Fluxbox Gentoo Wiki about Fluxbox]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml Gentoo Fluxbox Documentation]<br />
* [http://box-look.org/ Themes for Fluxbox]<br />
* [http://wiki.archlinux.org/index.php/Fluxbox_Style_Guide Fluxbox Style Guide]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox Guide]<br />
* The fluxbox man pages: fluxbox, fluxbox-menu, fluxbox-style, fluxbox-keys, fluxbox-apps, fluxbox-remote, fbsetroot, fbsetbg, fbrun, startfluxbox.</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Fluxbox&diff=160483Fluxbox2011-09-17T15:31:03Z<p>Lagagnon: /* Other Menus */</p>
<hr />
<div>[[Category:Stacking WMs (English)]]<br />
{{i18n|Fluxbox}}<br />
[[fr:Fluxbox]]<br />
Fluxbox is yet another window manager for X. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit and there are hundreds of fluxbox "styles" to make your desktop look great. ArchLinux with FluxBox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.<br />
<br />
==Installation==<br />
<br />
Install Fluxbox using<br />
<br />
# pacman -S fluxbox<br />
<br />
== Starting Fluxbox ==<br />
=== Method 1: KDM/GDM Login/Session Managers ===<br />
Users of [[KDM]] or [[GDM]] will find a new fluxbox entry added to their session menu automatically. Simply choose the fluxbox option from the session menu when logging in.<br />
<br />
=== Method 2: ~/.xinitrc ===<br />
Edit {{Filename|~/.xinitrc}} and add the following code:<br />
<br />
exec startfluxbox <br />
<br />
If you like to have devices automounted (e.g. in Thunar and other file managers), use this code instead:<br />
<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
See [[Xinitrc]] for more details.<br />
<br />
== Configuration ==<br />
<br />
System-wide fluxbox configuration files are in {{Filename|/usr/share/fluxbox}} while user configuration files are in {{Filename|~/.fluxbox}}. The user config files are:<br />
<ul><br />
<li>init: the main fluxbox resource configuration file. See [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file]<br />
<li>menu: the fluxbox menu config. See below and [http://fluxbox-wiki.org/index.php?title=Editing_the_menu Editing the menu file]<br />
<li>keys: the fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/index.php?title=Keyboard_shortcuts here]<br />
<li>startup: where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/index.php?title=Editing_the_startup_file here]<br />
<li>overlay: a config file to override elements of styles. See [http://fluxbox-wiki.org/index.php?title=Style_overlay here].<br />
<li>apps: a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/index.php?title=Editing_the_apps_file here]<br />
<li>windowmenu: a config file for altering the Window Menu itself: [http://fluxbox-wiki.org/index.php?title=Editing_the_windowmenu read this]<br />
</ul><br />
There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.<br />
<br />
=== Menu Management ===<br />
<br />
When you first install fluxbox a very basic applications menu will be created at ~/.fluxbox/menu. You access the menu via a right mouse button click on the desktop. To enhance the menu and add/edit items there are basically four ways to do it:<br />
<br />
==== fluxbox-generate_menu ====<br />
There is a built-in command provided with fluxbox:<br />
$ fluxbox-generate_menu<br />
This command will auto-generate a {{Filename|~/.fluxbox/menu/}} file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by "menumaker" (see immediately below).<br />
<br />
====MenuMaker====<br />
[http://menumaker.sourceforge.net MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Fluxbox. MenuMaker will search your computer for executable programs and create a menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if desired.<br />
<br />
To install MenuMaker:<br />
# pacman -S menumaker<br />
<br />
Once installed, you can generate a complete menu and overwrite the default one by running:<br />
$ mmaker -f FluxBox<br />
<br />
To see MenuMaker options:<br />
$ mmaker --help<br />
<br />
==== Arch Linux Xdg menu ====<br />
Requires [[XdgMenu]] which is available via pacman:<br />
# pacman -S archlinux-xdg-menu<br />
<br />
To then create a fluxbox menu:<br />
$ xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
<br />
More info:<br />
$ xdg_menu --help<br />
<br />
==== Manually create/edit the menu ====<br />
Use your favourite text editor and edit the file: "~/.fluxbox/menu" .<br />
The basic syntax for a menu item to appear is:<br />
[exec] (name) {command}<br />
<br />
...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:<br />
[exec] (Firefox Browser) {/usr/bin/firefox}<br />
<br />
If you want to make submenu write:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
When done editing save the file and exit. There is no need to restart fluxbox. For more info read [http://fluxbox-wiki.org/index.php?title=Editing_the_menu editing the fluxbox menu].<br />
<br />
===Init===<br />
The ~/.fluxbox/init file is FluxBox's primary configuration resource file. You can change the basic functionality of fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file].<br />
<br />
===Hotkeys===<br />
Fluxbox offers basic hotkeys functionality. The fluxbox hotkey file is located at {{Filename|~/.fluxbox/keys}}.<br />
The Control key is represented by "Control". Mod1 corresponds to the Alt key and Mod4 corresponds to Meta (not a standard key but most users map Meta to the "Win" key). When installed and first run Fluxbox will provide you with a very usable, almost complete set of hotkeys. You should peruse and learn the ~/.fluxbox/keys file to enhance your FluxBox experience.<br />
<br />
Example: here is a quick way to control the Master volume:<br />
Control Mod1 Up :Exec amixer set Master,0 5%+ <br />
Control Mod1 Down :Exec amixer set Master,0 5%-<br />
<br />
===Workspaces===<br />
Fluxbox defaults to having four workspaces. These are accessible using Ctrl+F1-F4 shortcuts, or by using the left mouse button to click the arrows on the toolbar. You can also access workspaces via a middle mouse button click on desktop which pops up the Workspaces Menu.<br />
<br />
===Tabbing and Grouping===<br />
With at least two windows visible on your desktop middle click on the upper window tab of one window and drag it into the other open window. The two windows will now be grouped together with window tabs in the upper window tab bar. You may now perform a window operation that will affect the entire window "group".<br />
<br />
===Background (Wallpaper)===<br />
Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The fluxbox-wiki now has an entry for [http://fluxbox-wiki.org/index.php?title=Howto_set_the_background background setting], so please refer to that. <br />
<br />
The easiest way to do it with ArchLinux is to first of all check that you have a background setting application available:<br />
$ fbsetbg -i<br />
<br />
If not, install either feh, esetroot or wmsetbg using pacman. Then add this line to your ~/.xinitrc file, e.g.:<br />
fbsetbg /path/to/my/image.image<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
====Swapping Multiple Backgrounds Easily====<br />
<br />
Place the following submenu in your fluxbox menu:<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
Then put your background images into {{Filename|~/.fluxbox/backgrounds}} or any other folder you specify, they will then appear in the same fashion as your styles.\<br />
<br />
====Using Feh with FluxBox====<br />
Install feh with:<br />
# pacman -S feh<br />
You may add a quick submenu to your {{Filename|~/.fluxbox/menu}} file which will allow you to change backgrounds on-the-fly:<br />
[submenu] (Backgrounds)<br />
[backgrounds] (/path/to/your/backgrounds) {feh --bg-scale}<br />
[end]<br />
<br />
To make sure fluxbox will load feh background next time start:<br />
<br />
'''1.''' Make {{Filename|.fehbg}} executable:<br />
$ chmod 770 ~/.fehbg<br />
<br />
'''2.''' Then add (or modify) the following line to the file {{Filename|~/.fluxbox/init}}:<br />
session.screen0.rootCommand: ~/.fehbg<br />
<br />
'''3.''' or add (or modify) the following line to the file {{Filename|~/.fluxbox/startup}}:<br />
~/.fehbg<br />
<br />
===Theming===<br />
To install a fluxbox theme extract the theme archive file to a styles directory. The default directories are:<br />
*global - {{Filename|/usr/share/fluxbox/styles}}<br />
*user only - {{Filename|~/.fluxbox/styles}}<br />
<br />
The ArchLinux [[AUR]] currently contains a compilation of good looking fluxbox themes called "fluxbox-styles". Get it [http://aur.archlinux.org/packages.php?ID=28743 here] and install this package for more themes than you could possibly use. When installed correctly they will appear in the Fluxbox, Styles section of your Fluxbox menu.<br />
<br />
To create your own Fluxbox styles read [[Fluxbox_Style_Guide]] and this [http://tenr.de/howto/style_fluxbox/style_fluxbox.html style guide].<br />
<br />
===The Slit===<br />
Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit [http://dockapps.org Dockapps.org] <br />
<br />
===Autostarting Applications===<br />
The ArchLinux way to autostart apps is to put all code into {{Filename|~/.xinitrc}}. Please read [[Xinitrc]]. However, fluxbox provides functionality to autostart applications on its own. The {{Filename|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting fluxbox itself. The # symbol denotes a comment.<br />
<br />
A sample file:<br />
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.<br />
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. <br />
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.<br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> exec is for starting fluxbox itself, don't put an ampersand (&) after this or fluxbox will exit immediately<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:<br />
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Other Menus===<br />
<br />
In the "Menu Management" section (above) we were discussing the main "Applications" Menu, called the "Root" menu in fluxbox lingo. FluxBox also has other menus available to the user:<br />
<ul><br />
<li>Workspaces Menu: middle click on desktop.<br />
<li>Configuration Menu: located within the "Fluxbox" section of the "Root" menu.<br />
<li>Window menu: right click on the titlebar of any window, or its bar if minimized. Can be edited. See fluxbox-menu man page.<br />
<li>Toolbar menu: right click on empty part of toolbar. Also found as a sub-menu within the Configuration Menu.<br />
<li>Slit Menu: found as a sub-menu within the configuration menu.<br />
</ul><br />
<br />
===Transparent rxvt-unicode terminals===<br />
Install urxvt:<br />
# pacman -S rxvt-unicode<br />
<br />
Launch urxvt with these options:<br />
$ urxvt -depth 32 -bg rgba:0000/0000/0000/bbbb -tint grey<br />
<br />
Or you can edit your ~/.Xdefaults file and place the equivalent urxvt commands in that file. See [[Xdefaults]] for more info.<br />
<br />
===A life after xorg.conf===<br />
Xorg no longer requires an xorg.conf file. Traditionally this is where you would change your keyboard settings and powersave settings. Luckily there are elegant solutions not using xorg.conf. <br />
<br />
====Setting your keyboard right====<br />
Just add the following line to {{Filename|~/.fluxbox/startup}}:<br />
setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)<br />
<br />
Instead of 'us' you can also pass your language code and remove the variant option (ex.: 'us_intl', which works like the command above in some setups). See man setxkbmap for more options.<br />
<br />
To make a help function in your menu, just add in {{Filename|~/.fluxbox/menu}}:<br />
[submenu] (Keyboard)<br />
[exec] (normal) {setxkbmap us}<br />
[exec] (international) {setxkbmap us -variant intl}<br />
[end]<br />
<br />
====Disable Powersave====<br />
Do you recognize the problem while watching a movie that the screen goes blank? Congratulations, Xorg just detected that you were doing nothing :). If you don't need these movement exercises, you can disable this feature altogether. You'll just have to remember to manually turn off your monitor if you're not using it.<br />
<br />
Just add the following line at the start of {{Filename|~/.fluxbox/startup}}:<br />
xset s off -dpms &<br />
<br />
==Additional Resources==<br />
<br />
* [http://fluxbox.org/ Fluxbox Homepage]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://en.gentoo-wiki.com/wiki/Fluxbox Gentoo Wiki about Fluxbox]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml Gentoo Fluxbox Documentation]<br />
* [http://box-look.org/ Themes for Fluxbox]<br />
* [http://wiki.archlinux.org/index.php/Fluxbox_Style_Guide Fluxbox Style Guide]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox Guide]<br />
* The fluxbox man pages: fluxbox, fluxbox-menu, fluxbox-style, fluxbox-keys, fluxbox-apps, fluxbox-remote, fbsetroot, fbsetbg, fbrun, startfluxbox.</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Fluxbox&diff=160482Fluxbox2011-09-17T15:30:23Z<p>Lagagnon: /* Autostarting Applications */</p>
<hr />
<div>[[Category:Stacking WMs (English)]]<br />
{{i18n|Fluxbox}}<br />
[[fr:Fluxbox]]<br />
Fluxbox is yet another window manager for X. It is based on the (now abandoned) Blackbox 0.61.1 code, but with significant enhancements and continued development. Fluxbox is very light on resources and fast, yet provides interesting window management tools such as tabbing and grouping. Its configuration files are easy to understand and edit and there are hundreds of fluxbox "styles" to make your desktop look great. ArchLinux with FluxBox can turn an old Pentium 800 box with just 256MB of RAM into a very usable computer.<br />
<br />
==Installation==<br />
<br />
Install Fluxbox using<br />
<br />
# pacman -S fluxbox<br />
<br />
== Starting Fluxbox ==<br />
=== Method 1: KDM/GDM Login/Session Managers ===<br />
Users of [[KDM]] or [[GDM]] will find a new fluxbox entry added to their session menu automatically. Simply choose the fluxbox option from the session menu when logging in.<br />
<br />
=== Method 2: ~/.xinitrc ===<br />
Edit {{Filename|~/.xinitrc}} and add the following code:<br />
<br />
exec startfluxbox <br />
<br />
If you like to have devices automounted (e.g. in Thunar and other file managers), use this code instead:<br />
<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
See [[Xinitrc]] for more details.<br />
<br />
== Configuration ==<br />
<br />
System-wide fluxbox configuration files are in {{Filename|/usr/share/fluxbox}} while user configuration files are in {{Filename|~/.fluxbox}}. The user config files are:<br />
<ul><br />
<li>init: the main fluxbox resource configuration file. See [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file]<br />
<li>menu: the fluxbox menu config. See below and [http://fluxbox-wiki.org/index.php?title=Editing_the_menu Editing the menu file]<br />
<li>keys: the fluxbox keyboard shortcuts (hotkeys) file. See below and [http://fluxbox-wiki.org/index.php?title=Keyboard_shortcuts here]<br />
<li>startup: where to launch startup apps but see below for .xinitrc and also [http://fluxbox-wiki.org/index.php?title=Editing_the_startup_file here]<br />
<li>overlay: a config file to override elements of styles. See [http://fluxbox-wiki.org/index.php?title=Style_overlay here].<br />
<li>apps: a config file for remembering the window configuration of specific apps. See [http://fluxbox-wiki.org/index.php?title=Editing_the_apps_file here]<br />
<li>windowmenu: a config file for altering the Window Menu itself: [http://fluxbox-wiki.org/index.php?title=Editing_the_windowmenu read this]<br />
</ul><br />
There are a couple of other less important config files in the directory. But the main ones to be concerned with are init, menu, keys and perhaps startup.<br />
<br />
=== Menu Management ===<br />
<br />
When you first install fluxbox a very basic applications menu will be created at ~/.fluxbox/menu. You access the menu via a right mouse button click on the desktop. To enhance the menu and add/edit items there are basically four ways to do it:<br />
<br />
==== fluxbox-generate_menu ====<br />
There is a built-in command provided with fluxbox:<br />
$ fluxbox-generate_menu<br />
This command will auto-generate a {{Filename|~/.fluxbox/menu/}} file based on your installed programs. However, the menu it generates will not be as comprehensive as that generated by "menumaker" (see immediately below).<br />
<br />
====MenuMaker====<br />
[http://menumaker.sourceforge.net MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Fluxbox. MenuMaker will search your computer for executable programs and create a menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if desired.<br />
<br />
To install MenuMaker:<br />
# pacman -S menumaker<br />
<br />
Once installed, you can generate a complete menu and overwrite the default one by running:<br />
$ mmaker -f FluxBox<br />
<br />
To see MenuMaker options:<br />
$ mmaker --help<br />
<br />
==== Arch Linux Xdg menu ====<br />
Requires [[XdgMenu]] which is available via pacman:<br />
# pacman -S archlinux-xdg-menu<br />
<br />
To then create a fluxbox menu:<br />
$ xdg_menu --fullmenu --format fluxbox --root-menu /etc/xdg/menus/arch-applications.menu >~/.fluxbox/menu<br />
<br />
More info:<br />
$ xdg_menu --help<br />
<br />
==== Manually create/edit the menu ====<br />
Use your favourite text editor and edit the file: "~/.fluxbox/menu" .<br />
The basic syntax for a menu item to appear is:<br />
[exec] (name) {command}<br />
<br />
...where "name" is the text you wish to appear for that menu item and "command" is the location of the binary, e.g.:<br />
[exec] (Firefox Browser) {/usr/bin/firefox}<br />
<br />
If you want to make submenu write:<br />
[submenu] (Name)<br />
...<br />
...<br />
[end]<br />
When done editing save the file and exit. There is no need to restart fluxbox. For more info read [http://fluxbox-wiki.org/index.php?title=Editing_the_menu editing the fluxbox menu].<br />
<br />
===Init===<br />
The ~/.fluxbox/init file is FluxBox's primary configuration resource file. You can change the basic functionality of fluxbox, windows, toolbar, focus, etc. Some of these options are also available from the Fluxbox, Configuration Menu. For more detail read [http://fluxbox-wiki.org/index.php?title=Editing_the_init_file Editing the init file].<br />
<br />
===Hotkeys===<br />
Fluxbox offers basic hotkeys functionality. The fluxbox hotkey file is located at {{Filename|~/.fluxbox/keys}}.<br />
The Control key is represented by "Control". Mod1 corresponds to the Alt key and Mod4 corresponds to Meta (not a standard key but most users map Meta to the "Win" key). When installed and first run Fluxbox will provide you with a very usable, almost complete set of hotkeys. You should peruse and learn the ~/.fluxbox/keys file to enhance your FluxBox experience.<br />
<br />
Example: here is a quick way to control the Master volume:<br />
Control Mod1 Up :Exec amixer set Master,0 5%+ <br />
Control Mod1 Down :Exec amixer set Master,0 5%-<br />
<br />
===Workspaces===<br />
Fluxbox defaults to having four workspaces. These are accessible using Ctrl+F1-F4 shortcuts, or by using the left mouse button to click the arrows on the toolbar. You can also access workspaces via a middle mouse button click on desktop which pops up the Workspaces Menu.<br />
<br />
===Tabbing and Grouping===<br />
With at least two windows visible on your desktop middle click on the upper window tab of one window and drag it into the other open window. The two windows will now be grouped together with window tabs in the upper window tab bar. You may now perform a window operation that will affect the entire window "group".<br />
<br />
===Background (Wallpaper)===<br />
Setting the background in Fluxbox has historically been convoluted, especially where transparency was required. The fluxbox-wiki now has an entry for [http://fluxbox-wiki.org/index.php?title=Howto_set_the_background background setting], so please refer to that. <br />
<br />
The easiest way to do it with ArchLinux is to first of all check that you have a background setting application available:<br />
$ fbsetbg -i<br />
<br />
If not, install either feh, esetroot or wmsetbg using pacman. Then add this line to your ~/.xinitrc file, e.g.:<br />
fbsetbg /path/to/my/image.image<br />
exec ck-launch-session dbus-launch startfluxbox<br />
<br />
====Swapping Multiple Backgrounds Easily====<br />
<br />
Place the following submenu in your fluxbox menu:<br />
[submenu] (Backgrounds)<br />
[wallpapers] (~/.fluxbox/backgrounds)<br />
[wallpapers] (/usr/share/fluxbox/backgrounds)<br />
[end]<br />
Then put your background images into {{Filename|~/.fluxbox/backgrounds}} or any other folder you specify, they will then appear in the same fashion as your styles.\<br />
<br />
====Using Feh with FluxBox====<br />
Install feh with:<br />
# pacman -S feh<br />
You may add a quick submenu to your {{Filename|~/.fluxbox/menu}} file which will allow you to change backgrounds on-the-fly:<br />
[submenu] (Backgrounds)<br />
[backgrounds] (/path/to/your/backgrounds) {feh --bg-scale}<br />
[end]<br />
<br />
To make sure fluxbox will load feh background next time start:<br />
<br />
'''1.''' Make {{Filename|.fehbg}} executable:<br />
$ chmod 770 ~/.fehbg<br />
<br />
'''2.''' Then add (or modify) the following line to the file {{Filename|~/.fluxbox/init}}:<br />
session.screen0.rootCommand: ~/.fehbg<br />
<br />
'''3.''' or add (or modify) the following line to the file {{Filename|~/.fluxbox/startup}}:<br />
~/.fehbg<br />
<br />
===Theming===<br />
To install a fluxbox theme extract the theme archive file to a styles directory. The default directories are:<br />
*global - {{Filename|/usr/share/fluxbox/styles}}<br />
*user only - {{Filename|~/.fluxbox/styles}}<br />
<br />
The ArchLinux [[AUR]] currently contains a compilation of good looking fluxbox themes called "fluxbox-styles". Get it [http://aur.archlinux.org/packages.php?ID=28743 here] and install this package for more themes than you could possibly use. When installed correctly they will appear in the Fluxbox, Styles section of your Fluxbox menu.<br />
<br />
To create your own Fluxbox styles read [[Fluxbox_Style_Guide]] and this [http://tenr.de/howto/style_fluxbox/style_fluxbox.html style guide].<br />
<br />
===The Slit===<br />
Fluxbox, WindowMaker and a couple of other lightweight window managers have a "Slit". This is a dock for any application that can be 'dockable'. A docked application is anchored and appears on every workspace. It cannot be moved freely and is not influenced by any manipulation to windows. It is basically a small widget. Dock apps that are useful in such a situation tend to be clocks, system monitors, weather, etc. Visit [http://dockapps.org Dockapps.org] <br />
<br />
===Autostarting Applications===<br />
The ArchLinux way to autostart apps is to put all code into {{Filename|~/.xinitrc}}. Please read [[Xinitrc]]. However, fluxbox provides functionality to autostart applications on its own. The {{Filename|~/.fluxbox/startup}} file is a script for autostarting applications as well as starting fluxbox itself. The # symbol denotes a comment.<br />
<br />
A sample file:<br />
fbsetbg -l <nowiki>#</nowiki> sets the last background set, very useful and recommended.<br />
<nowiki>#</nowiki> In the below commands the ampersand symbol (&) is required on all applications that do not terminate immediately. <br />
<nowiki>#</nowiki> failure to provide them will cause fluxbox not to start.<br />
idesk & <br />
xterm &<br />
<nowiki>#</nowiki> exec is for starting fluxbox itself, don't put an ampersand (&) after this or fluxbox will exit immediately<br />
exec /usr/bin/fluxbox<br />
<nowiki>#</nowiki> or if you want to keep a log, uncomment the below command and comment out the above command:<br />
<nowiki>#</nowiki> exec /usr/bin/fluxbox -log ~/.fluxbox/log<br />
<br />
===Other Menus===<br />
<br />
In the "Menu Management" section (above) we were discussing the main "Applications" Menu, called the "Root" menu in fluxbox lingo. FluxBox also has other menus available to the user:<br />
<ul><br />
<li>Workspaces Menu: middle click on desktop.<br />
<li>Configuration Menu: located within the "Fluxbox" section of the "Root" menu.<br />
<li>Window menu: right click on the titlebar of any window, or its bar if minimized. Can be edited. See fluxbox-menu man page.<br />
<li>Toolbar menu: right click on empty part of toolbar. Also found as a sub-menu within the Configuration Menu.<br />
<li>Slit Menu: found as a sub-menu within the configuration menu.<br />
<br />
===Transparent rxvt-unicode terminals===<br />
Install urxvt:<br />
# pacman -S rxvt-unicode<br />
<br />
Launch urxvt with these options:<br />
$ urxvt -depth 32 -bg rgba:0000/0000/0000/bbbb -tint grey<br />
<br />
Or you can edit your ~/.Xdefaults file and place the equivalent urxvt commands in that file. See [[Xdefaults]] for more info.<br />
<br />
===A life after xorg.conf===<br />
Xorg no longer requires an xorg.conf file. Traditionally this is where you would change your keyboard settings and powersave settings. Luckily there are elegant solutions not using xorg.conf. <br />
<br />
====Setting your keyboard right====<br />
Just add the following line to {{Filename|~/.fluxbox/startup}}:<br />
setxkbmap us -variant intl & # to have a us keyboard with special characters enabled (like éóíáú)<br />
<br />
Instead of 'us' you can also pass your language code and remove the variant option (ex.: 'us_intl', which works like the command above in some setups). See man setxkbmap for more options.<br />
<br />
To make a help function in your menu, just add in {{Filename|~/.fluxbox/menu}}:<br />
[submenu] (Keyboard)<br />
[exec] (normal) {setxkbmap us}<br />
[exec] (international) {setxkbmap us -variant intl}<br />
[end]<br />
<br />
====Disable Powersave====<br />
Do you recognize the problem while watching a movie that the screen goes blank? Congratulations, Xorg just detected that you were doing nothing :). If you don't need these movement exercises, you can disable this feature altogether. You'll just have to remember to manually turn off your monitor if you're not using it.<br />
<br />
Just add the following line at the start of {{Filename|~/.fluxbox/startup}}:<br />
xset s off -dpms &<br />
<br />
==Additional Resources==<br />
<br />
* [http://fluxbox.org/ Fluxbox Homepage]<br />
* [http://fluxbox-wiki.org/ Fluxbox Wiki]<br />
* [http://en.gentoo-wiki.com/wiki/Fluxbox Gentoo Wiki about Fluxbox]<br />
* [http://www.gentoo.org/doc/en/fluxbox-config.xml Gentoo Fluxbox Documentation]<br />
* [http://box-look.org/ Themes for Fluxbox]<br />
* [http://wiki.archlinux.org/index.php/Fluxbox_Style_Guide Fluxbox Style Guide]<br />
* [http://bbs.archlinux.org/viewtopic.php?id=77729 Narada's Fluxbox Guide]<br />
* The fluxbox man pages: fluxbox, fluxbox-menu, fluxbox-style, fluxbox-keys, fluxbox-apps, fluxbox-remote, fbsetroot, fbsetbg, fbrun, startfluxbox.</div>Lagagnonhttps://wiki.archlinux.org/index.php?title=Daemons&diff=160340Daemons2011-09-16T21:54:36Z<p>Lagagnon: /* List of Daemons */</p>
<hr />
<div>[[Category:Boot process (English)]]<br />
[[Category:Daemons and system services (English)]]<br />
{{i18n|Daemon}}<br />
<br />
A [[Wikipedia:Daemon (computing)|daemon]] is a program that runs in the background, waiting for events to occur and offering services. A good example is a webserver that waits for a request to deliver a page or a ssh server waiting for someone trying to log in. While these are full featured applications, there are daemons whose work is not that visible. Daemons are for tasks like writing messages into a log file (e.g. syslog, metalog) or keeping your system time accurate (e.g. ntpd).<br />
<br />
{{note|The word daemon is sometimes used for a class of programs that are started at boot but have no process which remains in memory. They are called daemons simply because they utilize the same startup/shutdown framework (e.g. {{filename|/etc/rc.d/}} scripts) used to start traditional daemons. For example, the {{filename|/etc/rc.d}} scripts for ''alsa'' and ''cpufreq'' provide persistent configuration support for their perspective kernel modules but do not start additional background processes to service requests or respond to events.<br />
<br />
From the user's perspective the distinction is typically not significant unless the user tries to look for the "daemon" in a process list.<br />
}}<br />
<br />
==Starting on Boot==<br />
A default install of Arch Linux will leave you with very few services (or daemons) enabled during boot. You can add or remove services by editing the {{Codeline|DAEMONS}} array in your [[rc.conf]] file. It will initially look something like this:<br />
DAEMONS=(syslog-ng network netfs crond)<br />
<br />
They will start in the order you have them listed. You can disable one and keep it in the array by prefixing it with an exclamation mark (!). You can also have them start in the background by adding an at (@) symbol in front of it.<br />
<br />
Daemon scripts are stored in {{Filename|/etc/rc.d/}}. You can print the list of all the available daemons on your system, along with their current status, with:<br />
$ rc.d list<br />
<br />
==Performing daemon actions manually==<br />
Every daemon has a series of actions that can be called with specific commands: usually there are at least ''start'', ''stop'', and ''restart''. You can issue each with:<br />
# /etc/rc.d/''daemon-name'' {start|stop|restart|...}<br />
For example:<br />
# /etc/rc.d/vboxdrv setup<br />
A completely equivalent way is:<br />
# rc.d {start|stop|restart|...} ''daemon-name-1'' ''daemon-name-2'' ''daemon-name-3'' ...<br />
which, as it is clear from the example, works also with a list of daemons, calling for each the given action. For example:<br />
# rc.d setup vboxdrv<br />
<br />
For a list of all the available commands for a specific daemon, check its documentation, or just open the script in a text viewer.<br />
<br />
==Essentials==<br />
You do not have to add any more services, if you do not feel the need. However, a typical desktop user will add at least [[CUPS]] and [[dbus]]. As you install new services, you will have to manually add them to the {{Codeline|DAEMONS}} array in {{filename|/etc/rc.conf}}. (The {{Codeline|DAEMONS}} array is at the end of the default {{filename|rc.conf}} file.)<br />
<br />
==Starting Daemons in Background==<br />
This is helpful for starting a service and letting the next service start before the previous one has finished. Which services to start background depends on your needs. Do not background anything you need immediately. Here is an example:<br />
DAEMONS=(syslog-ng gensplash dbus network netfs @avahi-daemon @samba @crond @openntpd @cupsd @mpd)<br />
<br />
Starting ''openntpd'' in the background could lead to synchronization errors between the actual time and the time stored on your computer. If you recognize an increasing time difference between your desktop clock and the actual time, try to start the ''openntpd'' daemon normally and not in the background.<br />
<br />
==Rc.conf GUI Frontends==<br />
[[Rc.conf GUI Frontends]] allow you to easily change settings in {{filename|/etc/rc.conf}} using graphical application.<br />
<br />
==List of Daemons==<br />
Here is a list of daemons. Note that any package can provide a daemon, so this list will never be complete. Please feel free to add any missing daemons here, in alphabetical order.<br />
{| border="1"<br />
!Daemon!!Description<br />
|-<br />
|[[Acpid|acpid]]||Delivers ACPI events.<br />
|-<br />
|[[Alsa|alsa]]||Advanced Linux Sound Architecture; provides device drivers for sound cards.<br />
|-<br />
|atd||run jobs queued for later execution.<br />
|-<br />
|[[Avahi|avahi-daemon]]||Allows programs to automatically find local network services.<br />
|-<br />
|[[Avahi|avahi-dnsconfd]]||<br />
|-<br />
|crond||Daemon to schedule and time events. The daemon name ''crond'' is used by at least two packages, cronie and dcron. See [[cron]] for more information.<br />
|-<br />
|[[CUPS|cupsd]]||Common UNIX Printing System daemon.<br />
|-<br />
|[[D-Bus|dbus]]||Message bus system for software communication.<br />
|-<br />
|[[FAM|fam]]||File Alteration Monitor.<br />
|-<br />
|[[Fbsplash|fbsplash]]||Graphical boot splash screen for the user.<br />
|-<br />
|[[GDM|gdm]]||Gnome Display Manager (Login Screen)<br />
|-<br />
|[[Gensplash|gensplash]]||(see fbsplash)<br />
|-<br />
|[[HAL|hal]]||Hardware Abstraction Layer. (Deprecated)<br />
|-<br />
|[[LAMP|httpd]]||Apache HTTP Server (Web Server)<br />
|-<br />
|[[MDADM|mdadm]]||MD Administration (Linux Software RAID).<br />
|-<br />
|[[MPD|mpd]]||Music Player Daemon.<br />
|-<br />
|[[MySQL|mysqld]]||MySQL database server.<br />
|-<br />
|netfs||Mounts network file systems.<br />
|-<br />
|[[Configuring_Network|network]]||To bring up the network connections.<br />
|-<br />
|[[NetworkManager|networkmanager]]|| Replace network, and provide configuration and detection for automatic network connections.<br />
|-<br />
|nsyslogd||<br />
|-<br />
|[[NTPD|ntpd]]||Network Time Protocol daemon (client and server).<br />
|-<br />
|[[OpenNTP|openntpd]]||alternate Network Time Protocol daemon (client and server).<br />
|-<br />
|[[Pure-FTPD|pure-ftpd]]||FTP server.<br />
|-<br />
|[[Powernowd|powernowd]]||To adjust speed of CPU depending on system load. See also [[CPU_Frequency_Scaling]]<br />
|-<br />
|[[Rsyslog|rsyslogd]]||The latest version of a system logger.<br />
|-<br />
|[[SLiM|slim]]||Simple Login Manager<br />
|-<br />
|[[Samba|samba]]||File and print services for Microsoft Windows clients.<br />
|-<br />
|[[USB_Scanner_Support|saned]]||To share the scanner system over network.<br />
|-<br />
|[[Lm_Sensors|sensors]]||Hardware (temperature, fans etc) monitoring.<br />
|-<br />
|[[SMART|smartd]]||Self-Monitoring, Analysis, and Reporting Technology (S.M.A.R.T) Hard Disk Monitoring<br />
|-<br />
|[[OpenSSH|sshd]]||OpenSSH (secure shell) daemon.<br />
|-<br />
|stbd ||This daemon was previously necessary for gnome-system-tools. However, as of gnome-tools 2.28, it is no longer needed.<br />
|-<br />
|syslogd||This was the older and basic system logger.<br />
|-<br />
|[[Syslog-ng|syslog-ng]]||System logger next generation.<br />
|-<br />
|[[Timidity|timidity++]]||Software synthesizer for MIDI.<br />
|-<br />
|[[Vsftpd|vsftpd]]||FTP server.<br />
|-<br />
|[[Wicd|wicd]]||Combine with dbus to replace network, a lightweight alternative to networkmanager.<br />
|-<br />
|}<br />
<br />
==See also==<br />
Examples for [[writing rc.d scripts]]</div>Lagagnon