https://wiki.archlinux.org/api.php?action=feedcontributions&user=Vas&feedformat=atom
ArchWiki - User contributions [en]
2024-03-29T15:06:51Z
User contributions
MediaWiki 1.41.0
https://wiki.archlinux.org/index.php?title=Openbox&diff=390426
Openbox
2015-08-08T08:23:01Z
<p>Vas: /* Launch a complex command with hotkey */ Added example with redirections</p>
<hr />
<div>[[Category:Stacking WMs]]<br />
[[cs:Openbox]]<br />
[[de:Openbox]]<br />
[[el:Openbox]]<br />
[[es:Openbox]]<br />
[[fr:Openbox]]<br />
[[it:Openbox]]<br />
[[ja:Openbox]]<br />
[[ko:Openbox]]<br />
[[lt:Openbox]]<br />
[[nl:Openbox]]<br />
[[pl:Openbox]]<br />
[[ru:Openbox]]<br />
[[sk:Openbox]]<br />
[[sr:Openbox]]<br />
[[tr:Openbox]]<br />
[[zh-CN:Openbox]]<br />
[[zh-TW:Openbox]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|File manager functionality}}<br />
{{Related|Window manager}}<br />
{{Related|Oblogout}}<br />
{{Related articles end}}<br />
<br />
Openbox is a lightweight, powerful, and highly configurable ''stacking'' [[window manager]] with extensive standards support. It may be built upon and run independently as the basis of a unique [[desktop environment]], or within other integrated desktop environments such as [[KDE]] and [[Xfce]], as an alternative to the window managers they provide. The [[LXDE]] desktop environment is itself built around Openbox.<br />
<br />
A comprehensive list of features are documented at the [http://openbox.org/ official Openbox website]. This article pertains to specifically installing Openbox under Arch Linux.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|openbox}} package.<br />
<br />
=== Standalone ===<br />
<br />
[[Display manager|display managers]] will automatically detect Openbox, allowing for it to be run as a standalone session.<br />
<br />
When using [[Xinitrc]] or [[SLiM]], add the following line:<br />
<br />
exec openbox-session<br />
<br />
{{Note|Specifying {{ic|openbox}} instead of {{ic|openbox-session}} will prevent [[#autostart|autostart]] in {{ic|/etc/xdg/autostart}}.}}<br />
<br />
=== Other desktop environments ===<br />
<br />
When replacing the native window manager of a [[desktop environment]] with Openbox, keep in mind that Openbox does not provide any compositing effects (such as transparency). See [[#Compositing effects]].<br />
<br />
==== GNOME ====<br />
<br />
GNOME Shell is a plugin for the {{Pkg|mutter}} window manager, so can not be used with Openbox. Openbox does work with GNOME applications (but see [[GTK+#Client-side decorations]]). [http://comments.gmane.org/gmane.comp.window-managers.openbox/6595]<br />
<br />
==== KDE ====<br />
<br />
See [[KDE#KDE/Openbox Session]].<br />
<br />
==== Xfce ====<br />
<br />
See [[Xfce#Default window manager]].<br />
<br />
==== MATE ====<br />
<br />
See [[MATE#Use a different window manager with MATE]]<br />
<br />
== Configuration==<br />
<br />
{{Note|Local configuration files will always override global equivalents.}}<br />
<br />
Four key files form the basis of the openbox configuration, each serving a unique role. They are: {{ic|rc.xml}}, {{ic|menu.xml}}, {{ic|autostart}}, and {{ic|environment}}. Although these files are discussed in more detail below, to start configuring Openbox, it will first be necessary to create a '''local''' Openbox profile (i.e for your specific user account) based on them. This can be done by copying them from the '''global''' {{ic|/etc/xdg/openbox}} profile (applicable to any and all users) as a template:<br />
<br />
$ cp -R /etc/xdg/openbox ~/.config/openbox<br />
<br />
=== rc.xml ===<br />
<br />
{{Tip|Custom keyboard shortcuts (keybindings) must be added to the {{ic|<keyboard>}} section of this file, and underneath the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading.}}<br />
<br />
{{ic|~/.config/openbox/rc.xml}} is the main configuration file, responsible for determining the behaviour and settings of the overall session, including:<br />
<br />
* Keyboard shortcuts (e.g. starting applications; controlling the volume)<br />
* Theming<br />
* Desktop and Virtual desktop settings, and<br />
* Application Window settings<br />
<br />
This file is also pre-configured, meaning that it will only be necessary to amend existing content in order to customise behaviour to suit personal preference.<br />
<br />
=== menu.xml ===<br />
<br />
{{ic|~/.config/openbox/menu.xml}} defines the type and behaviour of the desktop menu, accessable by right-clicking the background. Although the default provided is a '''static menu''' (meaning that it will not automatically update when new applications are installed), it is possible to employ the use of '''dynamic menus''' that will automatically update as well. <br />
<br />
The available options are discussed extensively below in the [[#Menus|Menus]] section.<br />
<br />
=== autostart ===<br />
<br />
The file {{ic|~/.config/openbox/autostart}}, if present, is executed by Openbox at startup. A basic example of this file consists of one command per line, like so:<br />
<br />
xset -b<br />
nm-applet &<br />
conky &<br />
<br />
Note that a single ampersand ({{ic|&}}) causes the process in question to be run in the background, allowing the script to continue on to the next command. An ampersand is therefore needed after each command that launches a process of indefinite duration. Commands that are completed essentially instantly (e.g. {{ic|xset -b}}) may be left alone.<br />
<br />
Issues regarding commands in {{ic|~/.config/openbox/autostart}} being executed out of order (or skipped altogether) are often resolved by the addition of small delays. For instance:<br />
<br />
xset -b<br />
(sleep 3s && nm-applet) &<br />
(sleep 3s && conky) &<br />
<br />
{{Note|In addition to running {{ic|~/.config/openbox/autostart}}, Openbox will also launch programs with {{ic|.desktop}} files present in {{ic|/etc/xdg/autostart}}. This is the global [[autostart]] directory, which is automatically sourced by XDG-compliant desktop environments (e.g. GNOME, KDE). Openbox will source this directory as well, provided that the package {{Pkg|python2-xdg}} is installed, and Openbox is launched as {{ic|openbox-session}} (rather than simply {{ic|openbox}}, as [[#Standalone|noted earlier]]). Duplication between {{ic|~/.config/openbox/autostart}} and {{ic|/etc/xdg/autostart}} is a common cause of programs launching twice at startup (e.g. two network manager tray icons).}}<br />
=== environment ===<br />
<br />
{{ic|~/.config/openbox/environment}} can be used to export and set relevant environmental variables such as to:<br />
<br />
* Define new pathways (e.g. execute commands that would otherwise require the entire pathway to be listed with them)<br />
* Change language settings, and<br />
* Define other variables to be used (e.g. the fix for GTK theming could be listed here)<br />
<br />
=== GUI configuration ===<br />
<br />
Several GUI applications are available to quickly and easily configure your Openbox desktop. From the [[official repositories]]:<br />
<br />
* {{App|ObConf|A GTK2 based configuration tool for the Openbox window manager.|http://openbox.org/wiki/ObConf:About|{{Pkg|obconf}}}}<br />
* {{App|LXAppearance ObConf|Plugin for LXAppearance to configure Openbox.|http://lxde.org|{{Pkg|lxappearance-obconf}}}}<br />
* {{App|LXInput|LXDE keyboard and mouse configuration|http://lxde.org|{{Pkg|lxinput}}}}<br />
* {{App|LXRandR|LXDE monitor configuration.|http://wiki.lxde.org/en/LXRandR|{{Pkg|lxrandr}}}}<br />
<br />
From the [[AUR]]:<br />
* {{App|obkey|Configure Openbox keyboard shortcuts|https://code.google.com/p/obkey/|{{AUR|obkey}}}} <br />
* {{App|ob-autostart|A simple autostart application for Openbox.|http://pastebin.com/012YgXTk|{{AUR|ob-autostart}}}} <br />
<br />
Programs and applications relating to the configuration of Openbox's desktop menu are discussed in the [[#Menus|Menus]] section.<br />
<br />
== Openbox reconfiguration ==<br />
<br />
{{Tip|where not already present, it would be worthwhile adding this command to a menu and/or as a keybind for convenience.}}<br />
<br />
Openbox will not always automatically reflect any changes made to its configuration files within a session. As a consequence, it will be necessary to manually reload those files after they have been edited. To do so, enter the following command:<br />
<br />
$ openbox --reconfigure<br />
<br />
Where intending to add this command as a keybind to {{ic|~/.config/openbox/rc.xml}}, it will only be necessary to list the command as {{ic|reconfigure}}. An example has been provided below, using the {{ic|Super}}+{{ic|F11}} keybind:<br />
<br />
<keybind key="W-F11"><br />
<action name="Reconfigure"/><br />
</keybind><br />
<br />
== Keybinds ==<br />
<br />
All keybinds must be added to the {{ic|~/.config/openbox/rc.xml}} file, and below the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading. Although a brief overview has been provided here, a more in-depth explanation of keybindings can be found at [http://openbox.org/wiki/Help:Bindings openbox.org]. There is a utility 'obkey' in AUR for adjust key-binding. Before use obkey, you should use obconf to create {{ic|~/.config/openbox/rc.xml}}.<br />
<br />
=== Special keys ===<br />
<br />
While the use of standard alpha-numeric keys for keybindings is self-explanatory, special names are assigned to other types of keys, such as {{ic|modifers}}, {{ic|multimedia}} keys and {{ic|navigation}} keys.<br />
<br />
==== Modifiers ====<br />
<br />
{{ic|Modifer}} keys play an important role in keybindings (e.g. holding down the {{ic|shift}} or {{ic|CTRL / control}} key in combination with another key to undertake an action). Using modifers helps to prevent conflicting keybinds, whereby two or more actions are linked to the same key or combination of keys. The syntax to use a modifer with another key is:<br />
<br />
"<modifier>-<key>"<br />
<br />
The modifer codes are as follows:<br />
<br />
* {{ic|S}}: Shift<br />
* {{ic|C}}: Control / CTRL<br />
* {{ic|A}}: Alt<br />
* {{ic|W}}: Super / Windows<br />
* {{ic|M}}: Meta<br />
* {{ic|H}}: Hyper (If it is bound to something) <br />
<br />
For example, the code below would use {{ic|super}} and {{ic|t}} to launch {{Pkg|lxterminal}}<br />
<br />
<keybind key="W-t"><br />
<action name="Execute"><br />
<command>lxterminal</command><br />
</action><br />
</keybind><br />
<br />
==== Multimedia keys ====<br />
<br />
{{Merge|Extra keyboard keys in Xorg}}<br />
<br />
Where available, it is possible to set the appropriate {{ic|multimedia}} keys to perform their intended functions, such as to control the volume and/or the screen brightness. These will usually be integrated into the {{ic|function}} keys, and are identified by their appropriate symbols. See [[Extra keyboard keys]] for details.<br />
<br />
The volume and brightness multimedia codes are as follows (note that commands will still have to be assigned to them to actually function):<br />
<br />
* {{ic|XF86AudioRaiseVolume}}: Increase volume<br />
* {{ic|XF86AudioLowerVolume}}: Decrease volume<br />
* {{ic|XF86AudioMute}}: Mute / unmute volume<br />
* {{ic|XF86MonBrightnessUp}}: Increase screen brightess<br />
* {{ic|XF86MonBrightnessDown}}: Decrease screen brightness<br />
<br />
Examples of how these may be used in {{ic|~/.config/openbox/rc.xml}} have been provided below.<br />
<br />
==== Navigation keys ====<br />
<br />
These are the directional / arrow keys, usually used to move the cursor up, down, left, or right. The (self-explanatory) navigation codes are as follows:<br />
<br />
* {{ic|Up}}: Up<br />
* {{ic|Down}}: Down<br />
* {{ic|Left}}: Left<br />
* {{ic|Right}}: Right<br />
<br />
=== Volume Control ===<br />
<br />
What commands should be used for controlling the volume will depend on whether [[ALSA]], [[PulseAudio]], or [[OSS]] is used for sound.<br />
<br />
==== ALSA ====<br />
<br />
If [[ALSA]] is used for sound, the {{ic|amixer}} program can be used to adjust the volume, which is part of the {{Pkg|alsa-utils}} package. The following example - using the {{ic|multimedia}} keys intended to control the volume - will adjust the volume by +/- 5% (which may be changed, as desired):<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== Pulseaudio ====<br />
<br />
Where using [[PulseAudio]] with [[ALSA]] as a backend, the {{ic|amixer}} program commands will have to be modifed, as illustrated below in comparison to the ALSA example:<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== OSS ====<br />
<br />
{{Note|This option may be suitable for more experienced users.}}<br />
<br />
Where using [[OSS]], it is possible to create keybindings to raise or lower specific mixers. This allows, for example, the volume of a specific application (such as an audio player) to be changed without changing the overall system volume settings in turn. In this instance, the application must first have been [[OSS#Configuring_Applications_for_OSS|configured]] to use its own mixer. <br />
<br />
In the following example, [[MPD]] has been configured to use its own mixer - also named {{ic|mpd}} - to increase and decrease the volume by a single decibel at a time. The {{ic|--}} that appears after the {{ic|ossmix}} command has been added to prevent a negative value from being treated as an argument: <br />
<br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd +1</command><br />
</action><br />
</keybind><br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd -1</command><br />
</action><br />
</keybind><br />
<br />
=== Media player control ===<br />
<br />
The {{AUR|playerctl}} command-line utility can be used to bind multimedia keys to player actions. It should work with most media players.<br />
<br />
<keybind key="XF86AudioPlay"><br />
<action name="Execute"><br />
<command>playerctl play</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPause"><br />
<action name="Execute"><br />
<command>playerctl pause</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioNext"><br />
<action name="Execute"><br />
<command>playerctl next</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPrev"><br />
<action name="Execute"><br />
<command>playerctl previous</command><br />
</action><br />
</keybind><br />
<br />
=== Brightness control ===<br />
<br />
The {{ic|xbacklight}} program is used to control screen brightness, which is part of the [[Xorg]] X-Window system. In the example below, the {{ic|multimedia}} keys intended to control the screen brightness will adjust the settings by +/- 10%:<br />
<br />
<keybind key="XF86MonBrightnessUp"><br />
<action name="Execute"><br />
<command>xbacklight +10</command><br />
</action><br />
</keybind><br />
<keybind key="XF86MonBrightnessDown"><br />
<action name="Execute"><br />
<command>xbacklight -10</command><br />
</action><br />
</keybind><br />
<br />
=== Window snapping ===<br />
<br />
Many desktop environments and window managers support ''window snapping'' (e.g. Windows 7 Aero snap), whereby they will automatically snap into place when moved to the edge of the screen. This effect can also be simulated in Openbox through the use of keybinds on focused windows. <br />
<br />
As illustrated in the example below, percentages must be used to determine window sizes (see [http://openbox.org/wiki/Help:Actions openbox.org] for further information). In this instance, The {{ic|super}} key is used in conjunction with the {{ic|navigation}} keys:<br />
<br />
<keybind key="W-Left"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>west</direction></action><br />
</keybind><br />
<keybind key="W-Right"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>east</direction></action><br />
</keybind><br />
<br />
However, it should be noted that once a window has been 'snapped' to an edge, it will remain vertically maximised unless subsequently maximised and then restored. The solution is to implement additional keybinds - in this instance using the {{ic|down}} and {{ic|up}} keys - to do so. This will also make pulling 'snapped' windows from screen edges faster as well:<br />
<br />
<keybind key="W-Down"><br />
<action name="Unmaximize"/><br />
</keybind><br />
<keybind key="W-Up"><br />
<action name="Maximize"/><br />
</keybind><br />
<br />
This [http://ubuntuforums.org/showthread.php?t=1796793 Ubuntu forum thread] provides more information. Applications such as {{AUR|opensnap-git}} are also available from the AUR to automatically simulate window snapping behaviour without the use of keybinds.<br />
<br />
=== Desktop menu ===<br />
<br />
It is also possible to create a keybind to access the desktop menu. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
== Menus ==<br />
<br />
It is possible to employ three types of menu in Openbox: {{ic|static}}, {{ic|pipes}} (dynamic), and {{ic|generators}} (static or dynamic). They may also be used alone or in any combination.<br />
<br />
=== Static ===<br />
<br />
As the name would suggest, this default type of menu does not change in any way, and may be manually edited and/or (re)generated automatically through the use on an appropriate software package.<br />
<br />
Fast and efficient, while this type of menu can be used to select applications, it can also be useful to access specific functions and/or perform specific tasks (e.g. desktop configuration), leaving the access of applications to another process (e.g. the {{Pkg|synapse}} or {{Pkg|xfce4-appfinder}} applications).<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file will be the sole source of static desktop menu content.<br />
<br />
==== menumaker ====<br />
<br />
{{Warning|A root terminal '''must''' be installed in order to use MenuMaker, even though a standard user terminal may be used to run it. {{Pkg|xterm}} is a good choice.}}<br />
<br />
{{Pkg|menumaker}} automatically generates {{ic|xml}} menus for several window managers, including Openbox, [[Fluxbox]], [[IceWM]] and [[Xfce]]. It will search for all installed executable programs and consequently create a menu file for them. It is also possible to configure MenuMaker to exclude certain application types (e.g. relating to [[GNOME]] or [[KDE]]), if desired.<br />
<br />
Once installed and executed, it will automatically generate a new {{ic|~/.config/openbox/menu.xml}} file. To avoid overwriting an existing file, enter:<br />
<br />
$ mmaker -v OpenBox3<br />
<br />
Otherwise, to overwrite an existing file, add the {{ic|force}} argument ({{ic|f}}):<br />
<br />
$ mmaker -vf OpenBox3<br />
<br />
Once a new {{ic|~/.config/openbox/menu.xml}} file has been generated it may then be manually edited, or configured using a GUI menu editor, such as {{Pkg|obmenu}}.<br />
<br />
==== obmenu ====<br />
<br />
{{Warning|{{ic|obm-xdg}} - a pipe menu to generate a list of [[GTK+]] and [[GNOME]] applications - is also provided with obmenu. However, it has long-running bugs whereby it may produce an invalid output, or even not function at all. Consequently it has been omitted from discussion.}}<br />
<br />
{{Pkg|obmenu}} is a "user-friendly" GUI application to edit {{ic|~/.config/openbox/menu.xml}}, without the need to code in {{ic|xml}}.<br />
<br />
==== xdg-menu ====<br />
<br />
{{Pkg|archlinux-xdg-menu}} will automatically generate a menu based on {{ic|xdg}} files contained within the {{ic|/etc/xdg/}} directory for numerous Window Managers, including Openbox. Review the [[Xdg-menu#OpenBox]] article for further information.<br />
<br />
==== logout menu options ====<br />
<br />
{{Tip|The commands provided can also be attached to [[#Keybinds|keybinds]].}}<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file can be edited in order to provide a sub-menu with the same options as provided by [[#oblogout|oblogout]]. The sample script below will provide all of these options, with the exception of the ability to lock the screen:<br />
<br />
<menu id="exit-menu" label="Exit"><br />
<item label="Log Out"><br />
<action name="Execute"><br />
<command>openbox --exit</command><br />
</action><br />
</item><br />
<item label="Shutdown"><br />
<action name="Execute"><br />
<command>systemctl poweroff</command><br />
</action><br />
</item><br />
<item label="Restart"><br />
<action name="Execute"><br />
<command>systemctl reboot</command><br />
</action><br />
</item><br />
<item label="Suspend"><br />
<action name="Execute"><br />
<command>systemctl suspend</command><br />
</action><br />
</item><br />
<item label="Hibernate"><br />
<action name="Execute"><br />
<command>systemctl hibernate</command><br />
</action><br />
</item><br />
</menu><br />
<br />
Once the entries have been composed, add the following line to present the sub-menu where desired within the main desktop menu (usually as the last entry):<br />
<br />
<menu id="exit-menu"/><br />
<br />
=== Pipes ===<br />
<br />
{{Tip|It is entirely feasible for a static menu to contain one or more pipe sub-menus. The functionality of some pipe menus may also rely on the installation of relevant software packages.}}<br />
<br />
This type of menu is in essence a script that provides dynamic, refreshed lists on-the-fly as and when run. These lists may be used for multiple purposes, including to list applications, to provide information, and to provide control functions. Pre-configured pipe menus can be installed, although not from the [[official repositories]]. More experienced users can also modify and/or create their own custom scripts. Again, {{ic|~/.config/openbox/menu.xml}} may and commonly will contain several pipe menus.<br />
<br />
==== Examples ====<br />
<br />
* {{AUR|openbox-xdgmenu}}: fast xdg-menu converter to xml-pipe-menu<br />
* {{AUR|obfilebrowser}}: Application and file browser<br />
* {{AUR|obdevicemenu}}: Management of removable media with [[Udisks]]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1345031 wifi pipe menu]: Wireless networking using [[Netctl]]<br />
<br />
[http://openbox.org/download-pipemenus.php Openbox.org] also provides a further list of pipe menus.<br />
<br />
=== Generators ===<br />
<br />
This type of menu is akin to those provided by the taskbars of desktop environments such as [[Xfce]] or [[LXDE]]. Automatically updating on-the-fly, this type of menu can be powerful and very convenient. It may also be possible to add custom categories and menu entries; read the documentation for your intended dynamic menu to determine if and how this can be done.<br />
<br />
A menu generator will have to be executed from the {{ic|~/.config/openbox/menu.xml}} file.<br />
<br />
==== obmenu-generator ====<br />
<br />
{{Tip|icons can still be disabled in {{AUR|obmenu-generator}}, even where enabled in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|obmenu-generator}} is currently only available from the [[AUR]], although it is still highly recommended. With the ability to be used as a static or dynamic menu, it is highly configurable, powerful, and versatile. Menu categories and individual entries may also be easily hidden, customised, and/or added with ease. The [http://trizenx.blogspot.co.uk/2012/02/obmenu-generator.html official homepage] provides further information and screenshots.<br />
<br />
Below is an example of how obmenu-generator would be dynamically executed without icons in {{ic|~/.config/openbox/menu.xml}}:<br />
<br />
<?xml version="1.0" encoding="utf-8"?><br />
<openbox_menu><br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator"><br />
</menu><br />
</openbox_menu><br />
<br />
To automatically iconify entries, the {{ic|-i}} option would be added:<br />
<br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator -i"><br />
<br />
==== openbox-menu ====<br />
<br />
{{Tip|If this menu produces an error, it may be solved by enabling icons in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|openbox-menu}} uses the [[LXDE]] [http://sourceforge.net/projects/lxde/files/menu-cache/ menu-cache] to create dynamic menus. The [http://mimasgpc.free.fr/openbox-menu_en.html official homepage] provides further information and screenshots.<br />
<br />
==== obmenugen ====<br />
<br />
{{AUR|Obmenugen}} is currently only available from the [[AUR]], and can be used to a generate static or dynamic application menu based on {{ic|.desktop}} files. The [http://obmenugen.sourceforge.net/ official homepage] provides further information.<br />
<br />
=== Menu icons ===<br />
<br />
To show icons next to menu entries, it will be necessary to ensure they are enabled in the {{ic|<menu>}} section of the {{ic|~/.config/openbox/rc.xml}} file:<br />
<br />
<applicationIcons>yes</applicationIcons><br />
<br />
Where using a static menu, it will then be necessary to edit the {{ic|~/.config/openbox/menu.xml}} file to provide both the {{ic|icon <nowiki>=</nowiki>}} command, along with the full path and icon name for each entry. An example of the syntax used to provide an icon for a category is:<br />
<br />
<menu id="apps-menu" label="[label name]" icon="[pathway to icon]/[icon name]"><br />
<br />
=== Desktop menu as a panel menu ===<br />
<br />
{{Tip|XDoTool can simulate any keybind for any action, and as such, it may therefore be used for many other purposes...}}<br />
<br />
{{Pkg|xdotool}} is a package that can issue commands to simulate key presses / keybinds, meaning that it is possible to use it to invoke keybind-related actions without having to actually press their assigned keys. As this includes the ability to invoke an assigned keybind for the Openbox desktop menu, it is therefore possible to use XDoTool to turn the Openbox desktop menu into a panel menu. Especially where the desktop menu is heavily customised and feature-rich, this may prove very useful to:<br />
<br />
* Replace an existing panel menu<br />
* Implement a panel menu where otherwise not provided or possible (e.g. for {{AUR|tint2-git}})<br />
* Compensate where losing access to the desktop menu due to the use of an application like [[#xfdesktop|xfdesktop]] to [[#Desktop icons and wallpapers|manage the desktop]].<br />
<br />
Once XDoTool has been installed - if not already present - it will be necessary to create a keybind to access the root menu in {{ic|~/.config/openbox/rc.xml}}, and again below the {{ic|<nowiki><</nowiki>!-- Keybindings for running aplications --<nowiki>></nowiki>}} heading. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
Openbox must then be [[#Openbox reconfiguration|re-configured]]. In this instance, XDoTool will be used to simulate the {{ic|CTRL}} + {{ic|m}} keypress to access the desktop menu with the following command (note the use of {{ic|+}} in place of {{ic|-}}):<br />
<br />
xdotool key control+m<br />
<br />
How this command may be used as a panel launcher / icon is largely dependent on the features of panel used. While some panels will allow the above command to be executed directly in the process of creating a new launcher, others may require the use of an executable script. As an example, a custom executable script called {{ic|obpanelmenu.sh}} will be created in the {{ic|~/.config}} folder:<br />
<br />
$ ''text editor'' ~/.config/obpanelmenu.sh<br />
<br />
Once the empty file has been opened, the appropriate XDoTool command must be added to the empty file (i.e. to simulate the {{ic|CTRL}} + {{ic|m}} keypress for this example):<br />
<br />
xdotool key control+m<br />
<br />
After the file has been saved and closed, it may then be made into an executable script with the following command:<br />
<br />
$ chmod +x ~/.config/obpanelmenu.sh<br />
<br />
Executing it will bring up the Openbox desktop menu. Consequently, where using a panel that supports drag-and-drop functionality to add new launchers, simply drag the executable script onto it before changing the icon to suit personal taste. For instructions on how to use this executable script with {{AUR|tint2-svn}} - a derivative of the popular {{Pkg|tint2}} panel that allows launchers to be added - see [[Tint2#Application_Launchers_in_tint2-svn_.28AUR.29|Tint2-Svn launchers]].<br />
<br />
== Desktop theming ==<br />
<br />
{{Tip|It is '''strongly advised''' to install the {{Pkg|obconf}} and {{Pkg|lxappearance-obconf}} GUI applications to configure visual settings and theming. The latter is particularly important as it is responsible for generating the {{ic|~/.gtkrc-2.0}} file (see [[GTK+#GTK+ 2.x]]).}}<br />
<br />
It is important to note that a substantial range of both '''Openbox-specific''' and generalised, '''Openbox-compatible''' [[GTK]] themes are available to change the look of window decorations and the desktop menu. ''Generalised'' themes are designed to be simultaneously compatible with a range of popular desktop environments and/or window managers, commonly including Openbox. See these [https://aur.archlinux.org/packages/?O=0&C=0&SeB=n&K=gtk-theme-&outdated=&SB=n&SO=a&PP=50&do_Search=Go package descriptions] for examples. <br />
<br />
=== Configuration ===<br />
<br />
{{Pkg|obconf}} and/or {{Pkg|lxappearance-obconf}} should be used to select and configure available GTK themes. See [[Uniform Look for Qt and GTK Applications]] for information about theming Qt based applications like [[VirtualBox]] or [[Skype]].<br />
<br />
=== Installation: official and AUR ===<br />
<br />
A good selection of {{Pkg|openbox-themes}} are available from the official repositories.<br />
<br />
Both Openbox-specific and Openbox-compatible themes installed from the [[Official_repositories|official repositories]] and/or the [[AUR]] will be automatically installed to the {{ic|/usr/share/themes}} directory. Both will also be immediately available for selection.<br />
<br />
=== Installation: other sources ===<br />
<br />
[http://www.box-look.org/index.php?xcontentmode=7402 box-look.org] is an excellent and well-established source of themes. [http://www.deviantart.com/ deviantART.com] is another excellent resource. Many more can be found through the utilisation of a search engine.<br />
<br />
=== Troubleshooting ===<br />
<br />
There are two particular problems that may be encountered on rare occasions, especially where downloading themes from unsupported websites. These have been addressed below.<br />
<br />
==== Theme cannot be used ====<br />
<br />
If for any reason the newly extracted theme cannot be selected, open the theme directory to first ensure that it is indeed compatible with Openbox by determining that an {{ic|openbox-3}} directory is present, and that within this directory a {{ic|themerc}} file is also present. An {{ic|.obt}} ('''O'''pen'''B'''ox '''T'''heme) file may also be present in some instances, which can then be manually loaded in {{Pkg|obconf}}.<br />
<br />
Where expected files and directories are present and correct, then on occasion it is possible that the theme author has not correctly set permission to access the file (e.g. permission may still be for the account of the author, rather than for '''root'''). To eliminate this possibility, ensure the folder and file permissions are for '''root''':<br />
<br />
# chown -R root /user/share/themes<br />
<br />
==== Theme looks broken ====<br />
<br />
Of course, the first line of enquiry would be to check that it is not just a badly made, broken theme! Otherwise, ensure that the [[Openbox#GTK+ 2|Openbox GTK fix]]{{Dead link|2014|11|28}} has been implemented, and then re-start the session. Unfortunately some older themes can simply break if not maintained sufficiently to keep pace with the changes incurred by [[GTK]] updates. To avoid such occurrences, it is best to check that desired themes have recently been created or at least updated / patched.<br />
<br />
=== Edit or create new themes ===<br />
<br />
{{Tip|Where deciding to modify an existing theme (e.g. the colour scheme), it would be best to work on a copy of it, rather than the original. This will retain the original should anything go wrong, and ensure that your changes are not over-written through an update.}}<br />
<br />
The process of creating new or modifying existing themes is covered extensively at the official [http://openbox.org/wiki/Help:Themes openbox.org] website. A user-friendly GUI to do so - {{AUR|obtheme}} - is also available from the [[AUR]].<br />
<br />
== Compositing effects ==<br />
<br />
Openbox does not provide native support for [[Wikipedia:Compositing window manager|compositing]], and thus requires an external compositor for this purpose.<br />
<br />
Although compositing is not a necessary component, it may specifically avoid issues such as screen distortion with [[#oblogout|oblogout]], and visual glitches with terminal window transparency. See [[Xorg#Composite]] for common choices.<br />
<br />
== Mouse cursor and application icon themes ==<br />
<br />
See [[Cursor themes]] and [[Icons]] for details.<br />
<br />
== Desktop icons and wallpapers ==<br />
<br />
{{Merge||This section is applicable to most [[window manager]]s when used without [[Desktop environment]]}}<br />
<br />
Openbox does not natively support the use of desktop icons or wallpapers. As a consequence, it will be necessary to install additional applications for this purpose, where desired.<br />
<br />
=== Desktop management using file managers ===<br />
<br />
Some file managers have the capacity to fully '''manage the desktop''', meaning that they may be used to provide wallpapers and enable the use of icons on the desktop. The [[LXDE]] desktop environment itself uses PCManFM for this purpose.<br />
<br />
See [[PCManFM#Desktop_management]] and [[SpaceFM#Desktop_management]].<br />
<br />
=== Wallpaper ===<br />
<br />
See [[List_of_applications#Wallpaper_setters]]<br />
<br />
=== Icon programs ===<br />
<br />
While there are programs dedicated to enabling desktop icons alone, it would seem that they have greater drawbacks than the utilisation of file managers for the task. These programs are discussed briefly, below.<br />
<br />
==== idesk ====<br />
<br />
[[idesk]] is a simple program that can enable icons in addition to managing wallpaper. It will be necessary to create an {{ic|~/.idesktop}} directory, and desktop icons must also be manually created. To use idesk to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
idesk &<br />
<br />
==== xfdesktop ====<br />
<br />
{{Pkg|xfdesktop}} is the desktop manager for [[Xfce]]. The [[Thunar]] file manager will also be downloaded as a dependency. Where this is used, the Openbox desktop menu will no longer be accessible by right-clicking the background. <br />
<br />
As such, it will consequently be necessary to access it by other means, such as by [[#Desktop menu|creating a keybind]], and/or by - where permitted - re-configuring an installed panel to use the [[#Desktop menu as a panel menu|desktop menu as a panel menu]]. To use xfdesktop to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
xfdesktop &<br />
<br />
=== conky reconfiguration ===<br />
<br />
Particularly where using a file manager to manage the desktop, it will be necessary to edit {{ic|~/.conkyrc}} to change the {{ic|own_window_type}} command in order for [[conky]] to continue to be displayed (where used). The revised command that should be used is:<br />
<br />
own_window_type normal<br />
<br />
== oblogout ==<br />
<br />
See the [[Oblogout]] article for an overview on how to use this useful, graphical logout script.<br />
<br />
== Openbox for multihead users ==<br />
<br />
While Openbox provides better than average multihead support on its own, the {{AUR|openbox-multihead-git}} package from the [[AUR]] provides a development branch called '''Openbox Multihead''' that gives multihead users per-monitor desktops. This model is not commonly found in floating window managers, but exists mainly in tiling window managers. It is explained well on the [http://xmonad.org/tour.html#workspace Xmonad web site]. Also, please see [https://github.com/BurntSushi/openbox-multihead/blob/multihead/README.MULTIHEAD README.MULTIHEAD] for a more comprehensive description of the new features and configuration options found in Openbox Multihead.<br />
<br />
Openbox Multihead will function like normal Openbox when only a single head is available.<br />
<br />
A downside to using Openbox Multihead is that it breaks the EWMH assumption that one and only one desktop is visible at any time. Thus, existing pagers will not work well with it. To remedy this, {{AUR|pager-multihead-git}} can be found in the [[AUR]] and is compatible with Openbox Multihead. [http://imgur.com/a/cnZeq#y04nk Screenshots].<br />
<br />
Finally, a new version of [[PyTyle]] that will work with Openbox Multihead can also be found in the [[AUR]]: {{AUR|pytyle3-git}}.<br />
<br />
Both ''pytyle3'' and ''pager-multihead-git'' will work without Openbox Multihead if only one monitor is active.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Launch a complex command with hotkey ===<br />
<br />
If you need to execute a complex command, use shell functionality.<br />
<br />
Special character replacement are as follows:<br />
<br />
* {{ic|&}}: &amp;amp;<br />
* {{ic|<}}: &amp;lt;<br />
* {{ic|>}}: &amp;gt;<br />
<br />
This example will turn off display immediately and lock screen with {{Pkg|slock}}. It was taken from [https://bbs.archlinux.org/viewtopic.php?pid=903057 this thread].<br />
<keybind key="W-l"><br />
<action name="Execute"><br />
<command>sh -c 'slock &amp;amp; (sleep .5 &amp;amp;&amp;amp; xset dpms force off)'</command><br />
</action><br />
</keybind><br />
<br />
Sometimes one need to specify environment variable for application:<br />
<keybind key="A-F7"><br />
<action name="Execute"><br />
<command>sh -c "LC_ALL=C obconf"</command><br />
</action><br />
</keybind><br />
<br />
Another example will launch application preserving all stdout and stderr output to file:<br />
<keybind key="A-f"><br />
<action name="Execute"><br />
<command>sh -c sh -c "exec gimp &amp;gt;/tmp/gimp.out 2&amp;gt;&amp;amp;1"</command><br />
</action><br />
</keybind><br />
<br />
=== Switch desktops using the mouse ===<br />
<br />
It is possible to switch desktop by moving the mouse cursor to the edges of the screen. First install {{Pkg|xdotool}} and add the following two lines to your {{ic|~/.xinitrc}}:<br />
<br />
xdotool behave_screen_edge --delay 500 left set_desktop --relative -- -1 &<br />
xdotool behave_screen_edge --delay 500 right set_desktop --relative -- +1 &<br />
<br />
=== Set default applications / file associations ===<br />
<br />
See the [[Default applications]] article.<br />
<br />
=== Stop continous mouse wheel desktop switching ===<br />
<br />
By default Openbox switches from the last desktop back to the first desktop on mouse wheel scroll. Use {{ic|<wrap>no</wrap>}} in the {{ic|mousebind}} section to disable this behaviour.<br />
<br />
<context name="Desktop"><br />
<mousebind button="Up" action="Click"><br />
<action name="GoToDesktop"><br />
<to>previous</to><br />
<wrap>no</wrap><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name="GoToDesktop"><br />
<to>next</to><br />
<wrap>no</wrap><br />
</action><br />
</mousebind><br />
</context><br />
<br />
=== Ad-hoc window transparency ===<br />
<br />
{{Warning|This may not work where other actions are defined within the action group.}}<br />
The program {{Pkg|transset-df}} is available in the official repositories, and can enable window transparency on-the-fly.<br />
<br />
For example, using the following code in the {{ic|<mouse>}} section of the {{ic|~/.config/openbox/rc.xml}} file will enable control of application window transparency by hovering the mouse-pointer over the title bar and scrolling with the middle button:<br />
<br />
<context name="Titlebar"><br />
...<br />
<mousebind button="Up" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --inc </execute><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --dec </execute><br />
</action><br />
</mousebind><br />
...<br />
</context><br />
<br />
=== Using obxprop for faster configuration ===<br />
<br />
The {{Pkg|openbox}} package provides a {{ic|obxprop}} binary that can parse relevant values for applications settings in {{ic|rc.xml}}. Officially {{ic|<nowiki>obxprop | grep "^_OB_APP"</nowiki>}} is recommended for this task. Start the process by running the command shown, then click a window to see its properties in the terminal.<br />
<br />
Doing so for multiple applications and its windows can be very inefficient however. The following script {{ic|obxprop2obrc}} makes it much easier to configure even a large number of applications.<br />
<br />
{{Accuracy|Full of [http://shellcheck.net quoting errors], do '''not''' follow any of the instructions bellow!}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
##Script: obxprop-to-openbox-rc.sh<br />
##Recommended executable name: obxprop2obrc<br />
<br />
while [ $# -ne 0 ]; do<br />
case $1 in<br />
-f*)<br />
shift;<br />
FILE="$1";<br />
shift;<br />
;;<br />
-t*)<br />
shift;<br />
TIME="$1";<br />
shift;<br />
;;<br />
*)<br />
echo Usage: $0 [-f FILE_TEMPLATE] [-t WAIT_TO_KILL_TIME] <br />
exit 1;<br />
;;<br />
esac<br />
done<br />
<br />
if [ $TIME ]; then<br />
OBXPROPS=( $(obxprop | cat & (sleep $TIME && pkill -13 cat) | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
else<br />
OBXPROPS=( $(obxprop | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
fi<br />
OBPROPS=(TYPE TITLE GROUP_CLASS GROUP_NAME CLASS NAME ROLE);<br />
j=0;<br />
for i in $( seq 2 2 14 ); do<br />
OBPROP="$( echo ${OBXPROPS[@]} | awk -F \" '{ print $'$i'}' )";<br />
if [[ -z $OBPROP ]]; then <br />
declare ${OBPROPS[$j]}='"*"';<br />
else <br />
declare ${OBPROPS[$j]}="\"$OBPROP\"";<br />
fi<br />
j=$(($j+1));<br />
done;<br />
<br />
echo " <application type="$TYPE" title="$TITLE" class="$CLASS" name="$NAME" role="$ROLE">"<br />
if [ -f "$FILE" ]; then cat "$FILE" && exit; fi<br />
cat << EOF<br />
<desktop>1</desktop><br />
<desktop>all</desktop><br />
<decor>yes</decor><br />
<decor>no</decor><br />
<focus>yes</focus><br />
<focus>no</focus><br />
<fullscreen>yes</fullscreen><br />
<fullscreen>no</fullscreen><br />
<iconic>yes</iconic><br />
<iconic>no</iconic><br />
<maximized>yes</maximized><br />
<maximized>no</maximized><br />
<maximized>both</maximized><br />
<maximized>horizontal</maximized><br />
<maximized>vertical</maximized><br />
<monitor>0</monitor><br />
<monitor>1</monitor><br />
<position force="no"><br />
<position force="yes"><br />
<width>40%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
<x>center</x><br />
<y>center</y><br />
</position><br />
<layer>above</layer><br />
<layer>normal</layer><br />
<layer>below</layer><br />
<shade>yes</shade><br />
<shade>no</shade><br />
<skip_pager>yes</skip_pager><br />
<skip_pager>no</skip_pager><br />
<skip_taskbar>yes</skip_taskbar><br />
<skip_taskbar>no</skip_taskbar><br />
</application><br />
EOF<br />
</nowiki>}}<br />
<br />
If no further options are used default configuration, that can be edited by deleting unnecessary lines, is printed out. This script can use templates with default values when using {{ic|-f}} switch:<br />
{{hc|<br />
$ obxprop2obrc -f templates-rc-inkscape-dialogs.sc > part-rc-applications-inkscape.xml<br />
$ cat part-rc-applications-inkscape.xml|<nowiki><br />
<application type="normal" title="Align and Distribute (Shift+Ctrl+A)" class="Inkscape" name="inkscape" role="*"><br />
<desktop>3</desktop><br />
<decor>yes</decor><br />
<maximized>no</maximized><br />
<position force="yes"><br />
<width>20%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
</position><br />
<layer>normal</layer><br />
<shade>yes</shade><br />
</application><br />
</nowiki>}}<br />
<br />
It also has a time switch {{ic|-t}} which kills obxprop and thus can reduce time significantly in certain situations, although it may not work perfectly.<br />
<br />
=== Xprop values for applications ===<br />
<br />
{{Pkg|xorg-xprop}} is available in the official repositories, and can be used to relay property values for selected applications. Where frequently using per-application settings, the following [[Bash#Aliases|Bash Alias]] may be useful:<br />
dy:<br />
<br />
alias xp='xprop | grep "WM_WINDOW_ROLE\|WM_CLASS" && echo "WM_CLASS(STRING) = \"NAME\", \"CLASS\""'<br />
<br />
To use Xorg-XProp, run using the alias given {{ic|xp}}, and click on the active program desired to define with per-application settins. The results displayed will only be the information that Openbox itself requires, namely the {{ic|WM_WINDOW_ROLE}} and {{ic|WM_CLASS}} (name and class) values:<br />
<br />
WM_WINDOW_ROLE(STRING) = "roster"<br />
WM_CLASS(STRING) = "gajim.py", "Gajim.py"<br />
WM_CLASS(STRING) = "NAME", "CLASS"<br />
<br />
==== Firefox ====<br />
<br />
For whatever reason, Firefox and like-minded equivalents ignore application rules (e.g. ''<desktop>'') unless {{ic|class&#61;"Firefox*"}} is used. This applies irrespective of whatever values '''xprop''' may report for the program's {{ic|WM_CLASS}}.<br />
<br />
=== Switching between keyboard layouts ===<br />
<br />
See the article section [[Keyboard configuration in Xorg#Switching between keyboard layouts|switching between keyboard layouts]] for instructions.<br />
<br />
=== Set grid layout for virtual desktops ===<br />
<br />
Install {{AUR|obsetlayout}}. To set a 2x2 grid for example:<br />
<br />
obsetlayout 0 2 2 0<br />
<br />
Run it without arguments to know what the arguments mean.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Windows load behind the active window ===<br />
<br />
Some application windows (such as Firefox windows) may load behind the currently active window, causing you to need to switch to the window you just created to focus it. To fix this behavior add this to your {{ic|~/.config/openbox/rc.xml}} file, inbetween the {{ic|1=<openbox_config>}} and {{ic|1=</openbox_config>}} tags:<br />
<br />
{{bc|1=<br />
<applications><br />
<application class="*"><br />
<focus>yes</focus><br />
</application><br />
</applications><br />
}}<br />
<br />
== See also ==<br />
<br />
* [http://openbox.org/ Openbox Website] - Official website<br />
* [http://planetob.openmonkey.com/ Planet Openbox] - Openbox news portal<br />
* [http://www.box-look.org/ Box-Look.org] - A good resource for themes and related artwork<br />
* [https://bbs.archlinux.org/viewtopic.php?id=93126 Openbox Hacks and Configs Thread] @ Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=45692 Openbox Screenshots Thread] @ Arch Linux Forums<br />
* [http://urukrama.wordpress.com/openbox-guide/ An Openbox guide]</div>
Vas
https://wiki.archlinux.org/index.php?title=Openbox&diff=390424
Openbox
2015-08-08T07:59:23Z
<p>Vas: /* Launch a complex command with hotkey */ Added character replacement map, simplified example, added URL</p>
<hr />
<div>[[Category:Stacking WMs]]<br />
[[cs:Openbox]]<br />
[[de:Openbox]]<br />
[[el:Openbox]]<br />
[[es:Openbox]]<br />
[[fr:Openbox]]<br />
[[it:Openbox]]<br />
[[ja:Openbox]]<br />
[[ko:Openbox]]<br />
[[lt:Openbox]]<br />
[[nl:Openbox]]<br />
[[pl:Openbox]]<br />
[[ru:Openbox]]<br />
[[sk:Openbox]]<br />
[[sr:Openbox]]<br />
[[tr:Openbox]]<br />
[[zh-CN:Openbox]]<br />
[[zh-TW:Openbox]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|File manager functionality}}<br />
{{Related|Window manager}}<br />
{{Related|Oblogout}}<br />
{{Related articles end}}<br />
<br />
Openbox is a lightweight, powerful, and highly configurable ''stacking'' [[window manager]] with extensive standards support. It may be built upon and run independently as the basis of a unique [[desktop environment]], or within other integrated desktop environments such as [[KDE]] and [[Xfce]], as an alternative to the window managers they provide. The [[LXDE]] desktop environment is itself built around Openbox.<br />
<br />
A comprehensive list of features are documented at the [http://openbox.org/ official Openbox website]. This article pertains to specifically installing Openbox under Arch Linux.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|openbox}} package.<br />
<br />
=== Standalone ===<br />
<br />
[[Display manager|display managers]] will automatically detect Openbox, allowing for it to be run as a standalone session.<br />
<br />
When using [[Xinitrc]] or [[SLiM]], add the following line:<br />
<br />
exec openbox-session<br />
<br />
{{Note|Specifying {{ic|openbox}} instead of {{ic|openbox-session}} will prevent [[#autostart|autostart]] in {{ic|/etc/xdg/autostart}}.}}<br />
<br />
=== Other desktop environments ===<br />
<br />
When replacing the native window manager of a [[desktop environment]] with Openbox, keep in mind that Openbox does not provide any compositing effects (such as transparency). See [[#Compositing effects]].<br />
<br />
==== GNOME ====<br />
<br />
GNOME Shell is a plugin for the {{Pkg|mutter}} window manager, so can not be used with Openbox. Openbox does work with GNOME applications (but see [[GTK+#Client-side decorations]]). [http://comments.gmane.org/gmane.comp.window-managers.openbox/6595]<br />
<br />
==== KDE ====<br />
<br />
See [[KDE#KDE/Openbox Session]].<br />
<br />
==== Xfce ====<br />
<br />
See [[Xfce#Default window manager]].<br />
<br />
==== MATE ====<br />
<br />
See [[MATE#Use a different window manager with MATE]]<br />
<br />
== Configuration==<br />
<br />
{{Note|Local configuration files will always override global equivalents.}}<br />
<br />
Four key files form the basis of the openbox configuration, each serving a unique role. They are: {{ic|rc.xml}}, {{ic|menu.xml}}, {{ic|autostart}}, and {{ic|environment}}. Although these files are discussed in more detail below, to start configuring Openbox, it will first be necessary to create a '''local''' Openbox profile (i.e for your specific user account) based on them. This can be done by copying them from the '''global''' {{ic|/etc/xdg/openbox}} profile (applicable to any and all users) as a template:<br />
<br />
$ cp -R /etc/xdg/openbox ~/.config/openbox<br />
<br />
=== rc.xml ===<br />
<br />
{{Tip|Custom keyboard shortcuts (keybindings) must be added to the {{ic|<keyboard>}} section of this file, and underneath the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading.}}<br />
<br />
{{ic|~/.config/openbox/rc.xml}} is the main configuration file, responsible for determining the behaviour and settings of the overall session, including:<br />
<br />
* Keyboard shortcuts (e.g. starting applications; controlling the volume)<br />
* Theming<br />
* Desktop and Virtual desktop settings, and<br />
* Application Window settings<br />
<br />
This file is also pre-configured, meaning that it will only be necessary to amend existing content in order to customise behaviour to suit personal preference.<br />
<br />
=== menu.xml ===<br />
<br />
{{ic|~/.config/openbox/menu.xml}} defines the type and behaviour of the desktop menu, accessable by right-clicking the background. Although the default provided is a '''static menu''' (meaning that it will not automatically update when new applications are installed), it is possible to employ the use of '''dynamic menus''' that will automatically update as well. <br />
<br />
The available options are discussed extensively below in the [[#Menus|Menus]] section.<br />
<br />
=== autostart ===<br />
<br />
The file {{ic|~/.config/openbox/autostart}}, if present, is executed by Openbox at startup. A basic example of this file consists of one command per line, like so:<br />
<br />
xset -b<br />
nm-applet &<br />
conky &<br />
<br />
Note that a single ampersand ({{ic|&}}) causes the process in question to be run in the background, allowing the script to continue on to the next command. An ampersand is therefore needed after each command that launches a process of indefinite duration. Commands that are completed essentially instantly (e.g. {{ic|xset -b}}) may be left alone.<br />
<br />
Issues regarding commands in {{ic|~/.config/openbox/autostart}} being executed out of order (or skipped altogether) are often resolved by the addition of small delays. For instance:<br />
<br />
xset -b<br />
(sleep 3s && nm-applet) &<br />
(sleep 3s && conky) &<br />
<br />
{{Note|In addition to running {{ic|~/.config/openbox/autostart}}, Openbox will also launch programs with {{ic|.desktop}} files present in {{ic|/etc/xdg/autostart}}. This is the global [[autostart]] directory, which is automatically sourced by XDG-compliant desktop environments (e.g. GNOME, KDE). Openbox will source this directory as well, provided that the package {{Pkg|python2-xdg}} is installed, and Openbox is launched as {{ic|openbox-session}} (rather than simply {{ic|openbox}}, as [[#Standalone|noted earlier]]). Duplication between {{ic|~/.config/openbox/autostart}} and {{ic|/etc/xdg/autostart}} is a common cause of programs launching twice at startup (e.g. two network manager tray icons).}}<br />
=== environment ===<br />
<br />
{{ic|~/.config/openbox/environment}} can be used to export and set relevant environmental variables such as to:<br />
<br />
* Define new pathways (e.g. execute commands that would otherwise require the entire pathway to be listed with them)<br />
* Change language settings, and<br />
* Define other variables to be used (e.g. the fix for GTK theming could be listed here)<br />
<br />
=== GUI configuration ===<br />
<br />
Several GUI applications are available to quickly and easily configure your Openbox desktop. From the [[official repositories]]:<br />
<br />
* {{App|ObConf|A GTK2 based configuration tool for the Openbox window manager.|http://openbox.org/wiki/ObConf:About|{{Pkg|obconf}}}}<br />
* {{App|LXAppearance ObConf|Plugin for LXAppearance to configure Openbox.|http://lxde.org|{{Pkg|lxappearance-obconf}}}}<br />
* {{App|LXInput|LXDE keyboard and mouse configuration|http://lxde.org|{{Pkg|lxinput}}}}<br />
* {{App|LXRandR|LXDE monitor configuration.|http://wiki.lxde.org/en/LXRandR|{{Pkg|lxrandr}}}}<br />
<br />
From the [[AUR]]:<br />
* {{App|obkey|Configure Openbox keyboard shortcuts|https://code.google.com/p/obkey/|{{AUR|obkey}}}} <br />
* {{App|ob-autostart|A simple autostart application for Openbox.|http://pastebin.com/012YgXTk|{{AUR|ob-autostart}}}} <br />
<br />
Programs and applications relating to the configuration of Openbox's desktop menu are discussed in the [[#Menus|Menus]] section.<br />
<br />
== Openbox reconfiguration ==<br />
<br />
{{Tip|where not already present, it would be worthwhile adding this command to a menu and/or as a keybind for convenience.}}<br />
<br />
Openbox will not always automatically reflect any changes made to its configuration files within a session. As a consequence, it will be necessary to manually reload those files after they have been edited. To do so, enter the following command:<br />
<br />
$ openbox --reconfigure<br />
<br />
Where intending to add this command as a keybind to {{ic|~/.config/openbox/rc.xml}}, it will only be necessary to list the command as {{ic|reconfigure}}. An example has been provided below, using the {{ic|Super}}+{{ic|F11}} keybind:<br />
<br />
<keybind key="W-F11"><br />
<action name="Reconfigure"/><br />
</keybind><br />
<br />
== Keybinds ==<br />
<br />
All keybinds must be added to the {{ic|~/.config/openbox/rc.xml}} file, and below the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading. Although a brief overview has been provided here, a more in-depth explanation of keybindings can be found at [http://openbox.org/wiki/Help:Bindings openbox.org]. There is a utility 'obkey' in AUR for adjust key-binding. Before use obkey, you should use obconf to create {{ic|~/.config/openbox/rc.xml}}.<br />
<br />
=== Special keys ===<br />
<br />
While the use of standard alpha-numeric keys for keybindings is self-explanatory, special names are assigned to other types of keys, such as {{ic|modifers}}, {{ic|multimedia}} keys and {{ic|navigation}} keys.<br />
<br />
==== Modifiers ====<br />
<br />
{{ic|Modifer}} keys play an important role in keybindings (e.g. holding down the {{ic|shift}} or {{ic|CTRL / control}} key in combination with another key to undertake an action). Using modifers helps to prevent conflicting keybinds, whereby two or more actions are linked to the same key or combination of keys. The syntax to use a modifer with another key is:<br />
<br />
"<modifier>-<key>"<br />
<br />
The modifer codes are as follows:<br />
<br />
* {{ic|S}}: Shift<br />
* {{ic|C}}: Control / CTRL<br />
* {{ic|A}}: Alt<br />
* {{ic|W}}: Super / Windows<br />
* {{ic|M}}: Meta<br />
* {{ic|H}}: Hyper (If it is bound to something) <br />
<br />
For example, the code below would use {{ic|super}} and {{ic|t}} to launch {{Pkg|lxterminal}}<br />
<br />
<keybind key="W-t"><br />
<action name="Execute"><br />
<command>lxterminal</command><br />
</action><br />
</keybind><br />
<br />
==== Multimedia keys ====<br />
<br />
{{Merge|Extra keyboard keys in Xorg}}<br />
<br />
Where available, it is possible to set the appropriate {{ic|multimedia}} keys to perform their intended functions, such as to control the volume and/or the screen brightness. These will usually be integrated into the {{ic|function}} keys, and are identified by their appropriate symbols. See [[Extra keyboard keys]] for details.<br />
<br />
The volume and brightness multimedia codes are as follows (note that commands will still have to be assigned to them to actually function):<br />
<br />
* {{ic|XF86AudioRaiseVolume}}: Increase volume<br />
* {{ic|XF86AudioLowerVolume}}: Decrease volume<br />
* {{ic|XF86AudioMute}}: Mute / unmute volume<br />
* {{ic|XF86MonBrightnessUp}}: Increase screen brightess<br />
* {{ic|XF86MonBrightnessDown}}: Decrease screen brightness<br />
<br />
Examples of how these may be used in {{ic|~/.config/openbox/rc.xml}} have been provided below.<br />
<br />
==== Navigation keys ====<br />
<br />
These are the directional / arrow keys, usually used to move the cursor up, down, left, or right. The (self-explanatory) navigation codes are as follows:<br />
<br />
* {{ic|Up}}: Up<br />
* {{ic|Down}}: Down<br />
* {{ic|Left}}: Left<br />
* {{ic|Right}}: Right<br />
<br />
=== Volume Control ===<br />
<br />
What commands should be used for controlling the volume will depend on whether [[ALSA]], [[PulseAudio]], or [[OSS]] is used for sound.<br />
<br />
==== ALSA ====<br />
<br />
If [[ALSA]] is used for sound, the {{ic|amixer}} program can be used to adjust the volume, which is part of the {{Pkg|alsa-utils}} package. The following example - using the {{ic|multimedia}} keys intended to control the volume - will adjust the volume by +/- 5% (which may be changed, as desired):<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== Pulseaudio ====<br />
<br />
Where using [[PulseAudio]] with [[ALSA]] as a backend, the {{ic|amixer}} program commands will have to be modifed, as illustrated below in comparison to the ALSA example:<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== OSS ====<br />
<br />
{{Note|This option may be suitable for more experienced users.}}<br />
<br />
Where using [[OSS]], it is possible to create keybindings to raise or lower specific mixers. This allows, for example, the volume of a specific application (such as an audio player) to be changed without changing the overall system volume settings in turn. In this instance, the application must first have been [[OSS#Configuring_Applications_for_OSS|configured]] to use its own mixer. <br />
<br />
In the following example, [[MPD]] has been configured to use its own mixer - also named {{ic|mpd}} - to increase and decrease the volume by a single decibel at a time. The {{ic|--}} that appears after the {{ic|ossmix}} command has been added to prevent a negative value from being treated as an argument: <br />
<br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd +1</command><br />
</action><br />
</keybind><br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd -1</command><br />
</action><br />
</keybind><br />
<br />
=== Media player control ===<br />
<br />
The {{AUR|playerctl}} command-line utility can be used to bind multimedia keys to player actions. It should work with most media players.<br />
<br />
<keybind key="XF86AudioPlay"><br />
<action name="Execute"><br />
<command>playerctl play</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPause"><br />
<action name="Execute"><br />
<command>playerctl pause</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioNext"><br />
<action name="Execute"><br />
<command>playerctl next</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPrev"><br />
<action name="Execute"><br />
<command>playerctl previous</command><br />
</action><br />
</keybind><br />
<br />
=== Brightness control ===<br />
<br />
The {{ic|xbacklight}} program is used to control screen brightness, which is part of the [[Xorg]] X-Window system. In the example below, the {{ic|multimedia}} keys intended to control the screen brightness will adjust the settings by +/- 10%:<br />
<br />
<keybind key="XF86MonBrightnessUp"><br />
<action name="Execute"><br />
<command>xbacklight +10</command><br />
</action><br />
</keybind><br />
<keybind key="XF86MonBrightnessDown"><br />
<action name="Execute"><br />
<command>xbacklight -10</command><br />
</action><br />
</keybind><br />
<br />
=== Window snapping ===<br />
<br />
Many desktop environments and window managers support ''window snapping'' (e.g. Windows 7 Aero snap), whereby they will automatically snap into place when moved to the edge of the screen. This effect can also be simulated in Openbox through the use of keybinds on focused windows. <br />
<br />
As illustrated in the example below, percentages must be used to determine window sizes (see [http://openbox.org/wiki/Help:Actions openbox.org] for further information). In this instance, The {{ic|super}} key is used in conjunction with the {{ic|navigation}} keys:<br />
<br />
<keybind key="W-Left"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>west</direction></action><br />
</keybind><br />
<keybind key="W-Right"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>east</direction></action><br />
</keybind><br />
<br />
However, it should be noted that once a window has been 'snapped' to an edge, it will remain vertically maximised unless subsequently maximised and then restored. The solution is to implement additional keybinds - in this instance using the {{ic|down}} and {{ic|up}} keys - to do so. This will also make pulling 'snapped' windows from screen edges faster as well:<br />
<br />
<keybind key="W-Down"><br />
<action name="Unmaximize"/><br />
</keybind><br />
<keybind key="W-Up"><br />
<action name="Maximize"/><br />
</keybind><br />
<br />
This [http://ubuntuforums.org/showthread.php?t=1796793 Ubuntu forum thread] provides more information. Applications such as {{AUR|opensnap-git}} are also available from the AUR to automatically simulate window snapping behaviour without the use of keybinds.<br />
<br />
=== Desktop menu ===<br />
<br />
It is also possible to create a keybind to access the desktop menu. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
== Menus ==<br />
<br />
It is possible to employ three types of menu in Openbox: {{ic|static}}, {{ic|pipes}} (dynamic), and {{ic|generators}} (static or dynamic). They may also be used alone or in any combination.<br />
<br />
=== Static ===<br />
<br />
As the name would suggest, this default type of menu does not change in any way, and may be manually edited and/or (re)generated automatically through the use on an appropriate software package.<br />
<br />
Fast and efficient, while this type of menu can be used to select applications, it can also be useful to access specific functions and/or perform specific tasks (e.g. desktop configuration), leaving the access of applications to another process (e.g. the {{Pkg|synapse}} or {{Pkg|xfce4-appfinder}} applications).<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file will be the sole source of static desktop menu content.<br />
<br />
==== menumaker ====<br />
<br />
{{Warning|A root terminal '''must''' be installed in order to use MenuMaker, even though a standard user terminal may be used to run it. {{Pkg|xterm}} is a good choice.}}<br />
<br />
{{Pkg|menumaker}} automatically generates {{ic|xml}} menus for several window managers, including Openbox, [[Fluxbox]], [[IceWM]] and [[Xfce]]. It will search for all installed executable programs and consequently create a menu file for them. It is also possible to configure MenuMaker to exclude certain application types (e.g. relating to [[GNOME]] or [[KDE]]), if desired.<br />
<br />
Once installed and executed, it will automatically generate a new {{ic|~/.config/openbox/menu.xml}} file. To avoid overwriting an existing file, enter:<br />
<br />
$ mmaker -v OpenBox3<br />
<br />
Otherwise, to overwrite an existing file, add the {{ic|force}} argument ({{ic|f}}):<br />
<br />
$ mmaker -vf OpenBox3<br />
<br />
Once a new {{ic|~/.config/openbox/menu.xml}} file has been generated it may then be manually edited, or configured using a GUI menu editor, such as {{Pkg|obmenu}}.<br />
<br />
==== obmenu ====<br />
<br />
{{Warning|{{ic|obm-xdg}} - a pipe menu to generate a list of [[GTK+]] and [[GNOME]] applications - is also provided with obmenu. However, it has long-running bugs whereby it may produce an invalid output, or even not function at all. Consequently it has been omitted from discussion.}}<br />
<br />
{{Pkg|obmenu}} is a "user-friendly" GUI application to edit {{ic|~/.config/openbox/menu.xml}}, without the need to code in {{ic|xml}}.<br />
<br />
==== xdg-menu ====<br />
<br />
{{Pkg|archlinux-xdg-menu}} will automatically generate a menu based on {{ic|xdg}} files contained within the {{ic|/etc/xdg/}} directory for numerous Window Managers, including Openbox. Review the [[Xdg-menu#OpenBox]] article for further information.<br />
<br />
==== logout menu options ====<br />
<br />
{{Tip|The commands provided can also be attached to [[#Keybinds|keybinds]].}}<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file can be edited in order to provide a sub-menu with the same options as provided by [[#oblogout|oblogout]]. The sample script below will provide all of these options, with the exception of the ability to lock the screen:<br />
<br />
<menu id="exit-menu" label="Exit"><br />
<item label="Log Out"><br />
<action name="Execute"><br />
<command>openbox --exit</command><br />
</action><br />
</item><br />
<item label="Shutdown"><br />
<action name="Execute"><br />
<command>systemctl poweroff</command><br />
</action><br />
</item><br />
<item label="Restart"><br />
<action name="Execute"><br />
<command>systemctl reboot</command><br />
</action><br />
</item><br />
<item label="Suspend"><br />
<action name="Execute"><br />
<command>systemctl suspend</command><br />
</action><br />
</item><br />
<item label="Hibernate"><br />
<action name="Execute"><br />
<command>systemctl hibernate</command><br />
</action><br />
</item><br />
</menu><br />
<br />
Once the entries have been composed, add the following line to present the sub-menu where desired within the main desktop menu (usually as the last entry):<br />
<br />
<menu id="exit-menu"/><br />
<br />
=== Pipes ===<br />
<br />
{{Tip|It is entirely feasible for a static menu to contain one or more pipe sub-menus. The functionality of some pipe menus may also rely on the installation of relevant software packages.}}<br />
<br />
This type of menu is in essence a script that provides dynamic, refreshed lists on-the-fly as and when run. These lists may be used for multiple purposes, including to list applications, to provide information, and to provide control functions. Pre-configured pipe menus can be installed, although not from the [[official repositories]]. More experienced users can also modify and/or create their own custom scripts. Again, {{ic|~/.config/openbox/menu.xml}} may and commonly will contain several pipe menus.<br />
<br />
==== Examples ====<br />
<br />
* {{AUR|openbox-xdgmenu}}: fast xdg-menu converter to xml-pipe-menu<br />
* {{AUR|obfilebrowser}}: Application and file browser<br />
* {{AUR|obdevicemenu}}: Management of removable media with [[Udisks]]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1345031 wifi pipe menu]: Wireless networking using [[Netctl]]<br />
<br />
[http://openbox.org/download-pipemenus.php Openbox.org] also provides a further list of pipe menus.<br />
<br />
=== Generators ===<br />
<br />
This type of menu is akin to those provided by the taskbars of desktop environments such as [[Xfce]] or [[LXDE]]. Automatically updating on-the-fly, this type of menu can be powerful and very convenient. It may also be possible to add custom categories and menu entries; read the documentation for your intended dynamic menu to determine if and how this can be done.<br />
<br />
A menu generator will have to be executed from the {{ic|~/.config/openbox/menu.xml}} file.<br />
<br />
==== obmenu-generator ====<br />
<br />
{{Tip|icons can still be disabled in {{AUR|obmenu-generator}}, even where enabled in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|obmenu-generator}} is currently only available from the [[AUR]], although it is still highly recommended. With the ability to be used as a static or dynamic menu, it is highly configurable, powerful, and versatile. Menu categories and individual entries may also be easily hidden, customised, and/or added with ease. The [http://trizenx.blogspot.co.uk/2012/02/obmenu-generator.html official homepage] provides further information and screenshots.<br />
<br />
Below is an example of how obmenu-generator would be dynamically executed without icons in {{ic|~/.config/openbox/menu.xml}}:<br />
<br />
<?xml version="1.0" encoding="utf-8"?><br />
<openbox_menu><br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator"><br />
</menu><br />
</openbox_menu><br />
<br />
To automatically iconify entries, the {{ic|-i}} option would be added:<br />
<br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator -i"><br />
<br />
==== openbox-menu ====<br />
<br />
{{Tip|If this menu produces an error, it may be solved by enabling icons in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|openbox-menu}} uses the [[LXDE]] [http://sourceforge.net/projects/lxde/files/menu-cache/ menu-cache] to create dynamic menus. The [http://mimasgpc.free.fr/openbox-menu_en.html official homepage] provides further information and screenshots.<br />
<br />
==== obmenugen ====<br />
<br />
{{AUR|Obmenugen}} is currently only available from the [[AUR]], and can be used to a generate static or dynamic application menu based on {{ic|.desktop}} files. The [http://obmenugen.sourceforge.net/ official homepage] provides further information.<br />
<br />
=== Menu icons ===<br />
<br />
To show icons next to menu entries, it will be necessary to ensure they are enabled in the {{ic|<menu>}} section of the {{ic|~/.config/openbox/rc.xml}} file:<br />
<br />
<applicationIcons>yes</applicationIcons><br />
<br />
Where using a static menu, it will then be necessary to edit the {{ic|~/.config/openbox/menu.xml}} file to provide both the {{ic|icon <nowiki>=</nowiki>}} command, along with the full path and icon name for each entry. An example of the syntax used to provide an icon for a category is:<br />
<br />
<menu id="apps-menu" label="[label name]" icon="[pathway to icon]/[icon name]"><br />
<br />
=== Desktop menu as a panel menu ===<br />
<br />
{{Tip|XDoTool can simulate any keybind for any action, and as such, it may therefore be used for many other purposes...}}<br />
<br />
{{Pkg|xdotool}} is a package that can issue commands to simulate key presses / keybinds, meaning that it is possible to use it to invoke keybind-related actions without having to actually press their assigned keys. As this includes the ability to invoke an assigned keybind for the Openbox desktop menu, it is therefore possible to use XDoTool to turn the Openbox desktop menu into a panel menu. Especially where the desktop menu is heavily customised and feature-rich, this may prove very useful to:<br />
<br />
* Replace an existing panel menu<br />
* Implement a panel menu where otherwise not provided or possible (e.g. for {{AUR|tint2-git}})<br />
* Compensate where losing access to the desktop menu due to the use of an application like [[#xfdesktop|xfdesktop]] to [[#Desktop icons and wallpapers|manage the desktop]].<br />
<br />
Once XDoTool has been installed - if not already present - it will be necessary to create a keybind to access the root menu in {{ic|~/.config/openbox/rc.xml}}, and again below the {{ic|<nowiki><</nowiki>!-- Keybindings for running aplications --<nowiki>></nowiki>}} heading. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
Openbox must then be [[#Openbox reconfiguration|re-configured]]. In this instance, XDoTool will be used to simulate the {{ic|CTRL}} + {{ic|m}} keypress to access the desktop menu with the following command (note the use of {{ic|+}} in place of {{ic|-}}):<br />
<br />
xdotool key control+m<br />
<br />
How this command may be used as a panel launcher / icon is largely dependent on the features of panel used. While some panels will allow the above command to be executed directly in the process of creating a new launcher, others may require the use of an executable script. As an example, a custom executable script called {{ic|obpanelmenu.sh}} will be created in the {{ic|~/.config}} folder:<br />
<br />
$ ''text editor'' ~/.config/obpanelmenu.sh<br />
<br />
Once the empty file has been opened, the appropriate XDoTool command must be added to the empty file (i.e. to simulate the {{ic|CTRL}} + {{ic|m}} keypress for this example):<br />
<br />
xdotool key control+m<br />
<br />
After the file has been saved and closed, it may then be made into an executable script with the following command:<br />
<br />
$ chmod +x ~/.config/obpanelmenu.sh<br />
<br />
Executing it will bring up the Openbox desktop menu. Consequently, where using a panel that supports drag-and-drop functionality to add new launchers, simply drag the executable script onto it before changing the icon to suit personal taste. For instructions on how to use this executable script with {{AUR|tint2-svn}} - a derivative of the popular {{Pkg|tint2}} panel that allows launchers to be added - see [[Tint2#Application_Launchers_in_tint2-svn_.28AUR.29|Tint2-Svn launchers]].<br />
<br />
== Desktop theming ==<br />
<br />
{{Tip|It is '''strongly advised''' to install the {{Pkg|obconf}} and {{Pkg|lxappearance-obconf}} GUI applications to configure visual settings and theming. The latter is particularly important as it is responsible for generating the {{ic|~/.gtkrc-2.0}} file (see [[GTK+#GTK+ 2.x]]).}}<br />
<br />
It is important to note that a substantial range of both '''Openbox-specific''' and generalised, '''Openbox-compatible''' [[GTK]] themes are available to change the look of window decorations and the desktop menu. ''Generalised'' themes are designed to be simultaneously compatible with a range of popular desktop environments and/or window managers, commonly including Openbox. See these [https://aur.archlinux.org/packages/?O=0&C=0&SeB=n&K=gtk-theme-&outdated=&SB=n&SO=a&PP=50&do_Search=Go package descriptions] for examples. <br />
<br />
=== Configuration ===<br />
<br />
{{Pkg|obconf}} and/or {{Pkg|lxappearance-obconf}} should be used to select and configure available GTK themes. See [[Uniform Look for Qt and GTK Applications]] for information about theming Qt based applications like [[VirtualBox]] or [[Skype]].<br />
<br />
=== Installation: official and AUR ===<br />
<br />
A good selection of {{Pkg|openbox-themes}} are available from the official repositories.<br />
<br />
Both Openbox-specific and Openbox-compatible themes installed from the [[Official_repositories|official repositories]] and/or the [[AUR]] will be automatically installed to the {{ic|/usr/share/themes}} directory. Both will also be immediately available for selection.<br />
<br />
=== Installation: other sources ===<br />
<br />
[http://www.box-look.org/index.php?xcontentmode=7402 box-look.org] is an excellent and well-established source of themes. [http://www.deviantart.com/ deviantART.com] is another excellent resource. Many more can be found through the utilisation of a search engine.<br />
<br />
=== Troubleshooting ===<br />
<br />
There are two particular problems that may be encountered on rare occasions, especially where downloading themes from unsupported websites. These have been addressed below.<br />
<br />
==== Theme cannot be used ====<br />
<br />
If for any reason the newly extracted theme cannot be selected, open the theme directory to first ensure that it is indeed compatible with Openbox by determining that an {{ic|openbox-3}} directory is present, and that within this directory a {{ic|themerc}} file is also present. An {{ic|.obt}} ('''O'''pen'''B'''ox '''T'''heme) file may also be present in some instances, which can then be manually loaded in {{Pkg|obconf}}.<br />
<br />
Where expected files and directories are present and correct, then on occasion it is possible that the theme author has not correctly set permission to access the file (e.g. permission may still be for the account of the author, rather than for '''root'''). To eliminate this possibility, ensure the folder and file permissions are for '''root''':<br />
<br />
# chown -R root /user/share/themes<br />
<br />
==== Theme looks broken ====<br />
<br />
Of course, the first line of enquiry would be to check that it is not just a badly made, broken theme! Otherwise, ensure that the [[Openbox#GTK+ 2|Openbox GTK fix]]{{Dead link|2014|11|28}} has been implemented, and then re-start the session. Unfortunately some older themes can simply break if not maintained sufficiently to keep pace with the changes incurred by [[GTK]] updates. To avoid such occurrences, it is best to check that desired themes have recently been created or at least updated / patched.<br />
<br />
=== Edit or create new themes ===<br />
<br />
{{Tip|Where deciding to modify an existing theme (e.g. the colour scheme), it would be best to work on a copy of it, rather than the original. This will retain the original should anything go wrong, and ensure that your changes are not over-written through an update.}}<br />
<br />
The process of creating new or modifying existing themes is covered extensively at the official [http://openbox.org/wiki/Help:Themes openbox.org] website. A user-friendly GUI to do so - {{AUR|obtheme}} - is also available from the [[AUR]].<br />
<br />
== Compositing effects ==<br />
<br />
Openbox does not provide native support for [[Wikipedia:Compositing window manager|compositing]], and thus requires an external compositor for this purpose.<br />
<br />
Although compositing is not a necessary component, it may specifically avoid issues such as screen distortion with [[#oblogout|oblogout]], and visual glitches with terminal window transparency. See [[Xorg#Composite]] for common choices.<br />
<br />
== Mouse cursor and application icon themes ==<br />
<br />
See [[Cursor themes]] and [[Icons]] for details.<br />
<br />
== Desktop icons and wallpapers ==<br />
<br />
{{Merge||This section is applicable to most [[window manager]]s when used without [[Desktop environment]]}}<br />
<br />
Openbox does not natively support the use of desktop icons or wallpapers. As a consequence, it will be necessary to install additional applications for this purpose, where desired.<br />
<br />
=== Desktop management using file managers ===<br />
<br />
Some file managers have the capacity to fully '''manage the desktop''', meaning that they may be used to provide wallpapers and enable the use of icons on the desktop. The [[LXDE]] desktop environment itself uses PCManFM for this purpose.<br />
<br />
See [[PCManFM#Desktop_management]] and [[SpaceFM#Desktop_management]].<br />
<br />
=== Wallpaper ===<br />
<br />
See [[List_of_applications#Wallpaper_setters]]<br />
<br />
=== Icon programs ===<br />
<br />
While there are programs dedicated to enabling desktop icons alone, it would seem that they have greater drawbacks than the utilisation of file managers for the task. These programs are discussed briefly, below.<br />
<br />
==== idesk ====<br />
<br />
[[idesk]] is a simple program that can enable icons in addition to managing wallpaper. It will be necessary to create an {{ic|~/.idesktop}} directory, and desktop icons must also be manually created. To use idesk to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
idesk &<br />
<br />
==== xfdesktop ====<br />
<br />
{{Pkg|xfdesktop}} is the desktop manager for [[Xfce]]. The [[Thunar]] file manager will also be downloaded as a dependency. Where this is used, the Openbox desktop menu will no longer be accessible by right-clicking the background. <br />
<br />
As such, it will consequently be necessary to access it by other means, such as by [[#Desktop menu|creating a keybind]], and/or by - where permitted - re-configuring an installed panel to use the [[#Desktop menu as a panel menu|desktop menu as a panel menu]]. To use xfdesktop to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
xfdesktop &<br />
<br />
=== conky reconfiguration ===<br />
<br />
Particularly where using a file manager to manage the desktop, it will be necessary to edit {{ic|~/.conkyrc}} to change the {{ic|own_window_type}} command in order for [[conky]] to continue to be displayed (where used). The revised command that should be used is:<br />
<br />
own_window_type normal<br />
<br />
== oblogout ==<br />
<br />
See the [[Oblogout]] article for an overview on how to use this useful, graphical logout script.<br />
<br />
== Openbox for multihead users ==<br />
<br />
While Openbox provides better than average multihead support on its own, the {{AUR|openbox-multihead-git}} package from the [[AUR]] provides a development branch called '''Openbox Multihead''' that gives multihead users per-monitor desktops. This model is not commonly found in floating window managers, but exists mainly in tiling window managers. It is explained well on the [http://xmonad.org/tour.html#workspace Xmonad web site]. Also, please see [https://github.com/BurntSushi/openbox-multihead/blob/multihead/README.MULTIHEAD README.MULTIHEAD] for a more comprehensive description of the new features and configuration options found in Openbox Multihead.<br />
<br />
Openbox Multihead will function like normal Openbox when only a single head is available.<br />
<br />
A downside to using Openbox Multihead is that it breaks the EWMH assumption that one and only one desktop is visible at any time. Thus, existing pagers will not work well with it. To remedy this, {{AUR|pager-multihead-git}} can be found in the [[AUR]] and is compatible with Openbox Multihead. [http://imgur.com/a/cnZeq#y04nk Screenshots].<br />
<br />
Finally, a new version of [[PyTyle]] that will work with Openbox Multihead can also be found in the [[AUR]]: {{AUR|pytyle3-git}}.<br />
<br />
Both ''pytyle3'' and ''pager-multihead-git'' will work without Openbox Multihead if only one monitor is active.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Launch a complex command with hotkey ===<br />
<br />
If you need to execute a complex command, use shell functionality.<br />
<br />
Special character replacement are as follows:<br />
<br />
* {{ic|&}}: &amp;amp;<br />
* {{ic|<}}: &amp;lt;<br />
* {{ic|>}}: &amp;gt;<br />
<br />
This example will turn off display immediately and lock screen with {{Pkg|slock}}. It was taken from [https://bbs.archlinux.org/viewtopic.php?pid=903057 this thread].<br />
<keybind key="W-l"><br />
<action name="Execute"><br />
<command>sh -c 'slock &amp;amp; (sleep .5 &amp;amp;&amp;amp; xset dpms force off)'</command><br />
</action><br />
</keybind><br />
<br />
Sometimes one need to specify environment variable for application<br />
<keybind key="A-F7"><br />
<action name="Execute"><br />
<command>sh -c "LC_ALL=C obconf"</command><br />
</action><br />
</keybind><br />
<br />
=== Switch desktops using the mouse ===<br />
<br />
It is possible to switch desktop by moving the mouse cursor to the edges of the screen. First install {{Pkg|xdotool}} and add the following two lines to your {{ic|~/.xinitrc}}:<br />
<br />
xdotool behave_screen_edge --delay 500 left set_desktop --relative -- -1 &<br />
xdotool behave_screen_edge --delay 500 right set_desktop --relative -- +1 &<br />
<br />
=== Set default applications / file associations ===<br />
<br />
See the [[Default applications]] article.<br />
<br />
=== Stop continous mouse wheel desktop switching ===<br />
<br />
By default Openbox switches from the last desktop back to the first desktop on mouse wheel scroll. Use {{ic|<wrap>no</wrap>}} in the {{ic|mousebind}} section to disable this behaviour.<br />
<br />
<context name="Desktop"><br />
<mousebind button="Up" action="Click"><br />
<action name="GoToDesktop"><br />
<to>previous</to><br />
<wrap>no</wrap><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name="GoToDesktop"><br />
<to>next</to><br />
<wrap>no</wrap><br />
</action><br />
</mousebind><br />
</context><br />
<br />
=== Ad-hoc window transparency ===<br />
<br />
{{Warning|This may not work where other actions are defined within the action group.}}<br />
The program {{Pkg|transset-df}} is available in the official repositories, and can enable window transparency on-the-fly.<br />
<br />
For example, using the following code in the {{ic|<mouse>}} section of the {{ic|~/.config/openbox/rc.xml}} file will enable control of application window transparency by hovering the mouse-pointer over the title bar and scrolling with the middle button:<br />
<br />
<context name="Titlebar"><br />
...<br />
<mousebind button="Up" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --inc </execute><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --dec </execute><br />
</action><br />
</mousebind><br />
...<br />
</context><br />
<br />
=== Using obxprop for faster configuration ===<br />
<br />
The {{Pkg|openbox}} package provides a {{ic|obxprop}} binary that can parse relevant values for applications settings in {{ic|rc.xml}}. Officially {{ic|<nowiki>obxprop | grep "^_OB_APP"</nowiki>}} is recommended for this task. Start the process by running the command shown, then click a window to see its properties in the terminal.<br />
<br />
Doing so for multiple applications and its windows can be very inefficient however. The following script {{ic|obxprop2obrc}} makes it much easier to configure even a large number of applications.<br />
<br />
{{Accuracy|Full of [http://shellcheck.net quoting errors], do '''not''' follow any of the instructions bellow!}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
##Script: obxprop-to-openbox-rc.sh<br />
##Recommended executable name: obxprop2obrc<br />
<br />
while [ $# -ne 0 ]; do<br />
case $1 in<br />
-f*)<br />
shift;<br />
FILE="$1";<br />
shift;<br />
;;<br />
-t*)<br />
shift;<br />
TIME="$1";<br />
shift;<br />
;;<br />
*)<br />
echo Usage: $0 [-f FILE_TEMPLATE] [-t WAIT_TO_KILL_TIME] <br />
exit 1;<br />
;;<br />
esac<br />
done<br />
<br />
if [ $TIME ]; then<br />
OBXPROPS=( $(obxprop | cat & (sleep $TIME && pkill -13 cat) | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
else<br />
OBXPROPS=( $(obxprop | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
fi<br />
OBPROPS=(TYPE TITLE GROUP_CLASS GROUP_NAME CLASS NAME ROLE);<br />
j=0;<br />
for i in $( seq 2 2 14 ); do<br />
OBPROP="$( echo ${OBXPROPS[@]} | awk -F \" '{ print $'$i'}' )";<br />
if [[ -z $OBPROP ]]; then <br />
declare ${OBPROPS[$j]}='"*"';<br />
else <br />
declare ${OBPROPS[$j]}="\"$OBPROP\"";<br />
fi<br />
j=$(($j+1));<br />
done;<br />
<br />
echo " <application type="$TYPE" title="$TITLE" class="$CLASS" name="$NAME" role="$ROLE">"<br />
if [ -f "$FILE" ]; then cat "$FILE" && exit; fi<br />
cat << EOF<br />
<desktop>1</desktop><br />
<desktop>all</desktop><br />
<decor>yes</decor><br />
<decor>no</decor><br />
<focus>yes</focus><br />
<focus>no</focus><br />
<fullscreen>yes</fullscreen><br />
<fullscreen>no</fullscreen><br />
<iconic>yes</iconic><br />
<iconic>no</iconic><br />
<maximized>yes</maximized><br />
<maximized>no</maximized><br />
<maximized>both</maximized><br />
<maximized>horizontal</maximized><br />
<maximized>vertical</maximized><br />
<monitor>0</monitor><br />
<monitor>1</monitor><br />
<position force="no"><br />
<position force="yes"><br />
<width>40%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
<x>center</x><br />
<y>center</y><br />
</position><br />
<layer>above</layer><br />
<layer>normal</layer><br />
<layer>below</layer><br />
<shade>yes</shade><br />
<shade>no</shade><br />
<skip_pager>yes</skip_pager><br />
<skip_pager>no</skip_pager><br />
<skip_taskbar>yes</skip_taskbar><br />
<skip_taskbar>no</skip_taskbar><br />
</application><br />
EOF<br />
</nowiki>}}<br />
<br />
If no further options are used default configuration, that can be edited by deleting unnecessary lines, is printed out. This script can use templates with default values when using {{ic|-f}} switch:<br />
{{hc|<br />
$ obxprop2obrc -f templates-rc-inkscape-dialogs.sc > part-rc-applications-inkscape.xml<br />
$ cat part-rc-applications-inkscape.xml|<nowiki><br />
<application type="normal" title="Align and Distribute (Shift+Ctrl+A)" class="Inkscape" name="inkscape" role="*"><br />
<desktop>3</desktop><br />
<decor>yes</decor><br />
<maximized>no</maximized><br />
<position force="yes"><br />
<width>20%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
</position><br />
<layer>normal</layer><br />
<shade>yes</shade><br />
</application><br />
</nowiki>}}<br />
<br />
It also has a time switch {{ic|-t}} which kills obxprop and thus can reduce time significantly in certain situations, although it may not work perfectly.<br />
<br />
=== Xprop values for applications ===<br />
<br />
{{Pkg|xorg-xprop}} is available in the official repositories, and can be used to relay property values for selected applications. Where frequently using per-application settings, the following [[Bash#Aliases|Bash Alias]] may be useful:<br />
dy:<br />
<br />
alias xp='xprop | grep "WM_WINDOW_ROLE\|WM_CLASS" && echo "WM_CLASS(STRING) = \"NAME\", \"CLASS\""'<br />
<br />
To use Xorg-XProp, run using the alias given {{ic|xp}}, and click on the active program desired to define with per-application settins. The results displayed will only be the information that Openbox itself requires, namely the {{ic|WM_WINDOW_ROLE}} and {{ic|WM_CLASS}} (name and class) values:<br />
<br />
WM_WINDOW_ROLE(STRING) = "roster"<br />
WM_CLASS(STRING) = "gajim.py", "Gajim.py"<br />
WM_CLASS(STRING) = "NAME", "CLASS"<br />
<br />
==== Firefox ====<br />
<br />
For whatever reason, Firefox and like-minded equivalents ignore application rules (e.g. ''<desktop>'') unless {{ic|class&#61;"Firefox*"}} is used. This applies irrespective of whatever values '''xprop''' may report for the program's {{ic|WM_CLASS}}.<br />
<br />
=== Switching between keyboard layouts ===<br />
<br />
See the article section [[Keyboard configuration in Xorg#Switching between keyboard layouts|switching between keyboard layouts]] for instructions.<br />
<br />
=== Set grid layout for virtual desktops ===<br />
<br />
Install {{AUR|obsetlayout}}. To set a 2x2 grid for example:<br />
<br />
obsetlayout 0 2 2 0<br />
<br />
Run it without arguments to know what the arguments mean.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Windows load behind the active window ===<br />
<br />
Some application windows (such as Firefox windows) may load behind the currently active window, causing you to need to switch to the window you just created to focus it. To fix this behavior add this to your {{ic|~/.config/openbox/rc.xml}} file, inbetween the {{ic|1=<openbox_config>}} and {{ic|1=</openbox_config>}} tags:<br />
<br />
{{bc|1=<br />
<applications><br />
<application class="*"><br />
<focus>yes</focus><br />
</application><br />
</applications><br />
}}<br />
<br />
== See also ==<br />
<br />
* [http://openbox.org/ Openbox Website] - Official website<br />
* [http://planetob.openmonkey.com/ Planet Openbox] - Openbox news portal<br />
* [http://www.box-look.org/ Box-Look.org] - A good resource for themes and related artwork<br />
* [https://bbs.archlinux.org/viewtopic.php?id=93126 Openbox Hacks and Configs Thread] @ Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=45692 Openbox Screenshots Thread] @ Arch Linux Forums<br />
* [http://urukrama.wordpress.com/openbox-guide/ An Openbox guide]</div>
Vas
https://wiki.archlinux.org/index.php?title=System_backup&diff=390419
System backup
2015-08-08T07:36:45Z
<p>Vas: /* With a single command */ Added tip about overal progress option</p>
<hr />
<div>[[Category:System recovery]]<br />
[[cs:Full System Backup with rsync]]<br />
[[es:Full system backup with rsync]]<br />
[[zh-TW:Full System Backup with rsync]]<br />
{{Related articles start}}<br />
{{Related|Backup programs}}<br />
{{Related|rsync}}<br />
{{Related articles end}}<br />
This article is about using [[rsync]] to transfer a copy of your "/" tree, excluding a few select folders. This approach is considered to be better than [[disk cloning]] with {{ic|dd}} since it allows for a different size, partition table and filesystem to be used, and better than copying with {{ic|cp -a}} as well, because it allows greater control over file permissions, attributes, Access Control Lists (ACLs) and extended attributes. [http://www.bestbits.at/acl/about.html]<br />
<br />
Either method will work even while the system is running. Since it's going to take a while, you may freely browse the web during this time. Worst case scenario you will not get the same opened tabs when you restore the backup (or boot from it) because they were not saved. Not a big deal.<br />
<br />
== With a single command ==<br />
<br />
This command depends on brace expansion available in both the [https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html bash] and [http://zsh.sourceforge.net/Doc/Release/Expansion.html#Brace-Expansion zsh] shells. When using a different [[shell]], {{ic|--exclude}} patterns should be repeated manually.<br />
<br />
# rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /* ''/path/to/backup/folder''<br />
<br />
Using the {{ic|-aAX}} set of options, the files are transferred in archive mode, ensuring that symbolic links, devices, permissions and ownerships, modification times, [[ACL]]s and extended attributes are preserved.<br />
<br />
The {{ic|--exclude}} option will cause files that match the given patterns to be excluded. The contents of {{ic|/dev}}, {{ic|/proc}}, {{ic|/sys}}, {{ic|/tmp}} and {{ic|/run}} were excluded because they are populated at boot (while the folders themselves are ''not'' created), {{ic|/lost+found}} is filesystem-specific. Quoting the exclude patterns will avoid expansion by [[shell]], which is necessary e.g. when backing up over [[SSH]].<br />
<br />
{{Note|<br />
* If you plan on backing up your system somewhere other than {{ic|/mnt}} or {{ic|/media}}, do not forget to add it to the list of exclude patterns to avoid an infinite loop.<br />
* If there are any bind mounts in the system, they should be excluded as well, so that the bind mounted contents is copied only once.<br />
* If you use a [[Swap#Swap_file|swap file]], make sure to exclude it as well.<br />
* Consider also if you want to backup the {{ic|/home/}} folder. If it contains your data, it might be considerably larger than the system. Otherwise consider excluding unimportant subdirectories such as {{ic|/home/*/.thumbnails/*}}, {{ic|/home/*/.cache/mozilla/*}}, {{ic|/home/*/.cache/chromium/*}}, {{ic|/home/*/.local/share/Trash/*}}, depending on software installed on the system. If [[GVFS]] is installed, {{ic|/home/*/.gvfs}} must be excluded to prevent rsync errors.<br />
}}<br />
<br />
You may want to include additional [[rsync]] options, such as the following (see {{ic|man rsync}} for the full list):<br />
<br />
* If you are a heavy user of hardlinks, you might consider adding the {{ic|-H}} option, which is turned off by default as memory expensive, but nowadays it should be no problem on most modern machines. There are a lot of hard links below the {{ic|/usr/}} folder, which save disk space.<br />
* You may want to add rsync's {{ic|--delete}} option if you are running this multiple times to the same backup folder.<br />
* If you use any sparse files, such as virtual disks, [[Docker]] images and similar, you should add the {{ic|-S}} option.<br />
* The {{ic|--numeric-ids}} option will disable mapping of user and group names, numeric group and user IDs will be transfered instead. This is useful when backing up over [[SSH]] or when using a live system to backup different system disk.<br />
* Choosing {{ic|1=--info=progress2}} option instead of {{ic|v}} will show overal progress info and transfer speed instead of huge list of files.<br />
<br />
== Automated ==<br />
<br />
See [[Backup programs#Rsync-type backups]].<br />
<br />
== Boot requirements ==<br />
<br />
Having a bootable backup can be useful in case the filesystem becomes corrupt or if an update breaks the system. The backup can also be used as a test bed for updates, with the [testing] repo enabled, etc. If you transferred the system to a different partition or drive and you want to boot it, the process is as simple as updating the backup's {{ic|/etc/fstab}} and your bootloader's configuration file.<br />
<br />
=== Update the fstab ===<br />
<br />
Without rebooting, edit the backup's [[fstab]] to reflect the changes:<br />
{{hc|/path/to/backup/etc/fstab|2=<br />
tmpfs /tmp tmpfs nodev,nosuid 0 0<br />
<br />
<font color=#888888><i>/dev/sda1 /boot ext2 defaults 0 2<br />
/dev/sda5 none swap defaults 0 0<br />
/dev/sda6 / ext4 defaults 0 1<br />
/dev/sda7 /home ext4 defaults 0 2</i></font>}}<br />
<br />
Because rsync has performed a recursive copy of the ''entire'' root filesystem, all of the {{ic|sda}} mountpoints are problematic and booting the backup will fail. In this example, all of the offending entries are replaced with a single one:<br />
<br />
{{hc|/path/to/backup/etc/fstab|<br />
tmpfs /tmp tmpfs nodev,nosuid 0 0<br />
<br />
/dev/'''sdb1''' / ext4 defaults 0 1}}<br />
<br />
Remember to use the proper device name and filesystem type.<br />
<br />
=== Update the bootloader's configuration file ===<br />
<br />
This section assumes that you backed up the system to another drive or partition, that your current bootloader is working fine, and that you want to boot from the backup as well.<br />
<br />
For [[Syslinux]], all you need to do is duplicate the current entry, except pointing to a different drive or partition.<br />
<br />
{{Tip|Instead of editing {{ic|syslinux.cfg}}, you can also temporarily edit the menu during boot. When the menu shows up, press the {{ic|Tab}} key and change the relevant entries. Partitions are counted from one, drives are counted from zero.}}<br />
<br />
For [[GRUB]], it is recommended that you automatically [[GRUB#Generate_the_main_configuration_file|re-generate the main configuration file]].<br />
<br />
Also verify the new menu entry in {{ic|/boot/grub/grub.cfg}}. Make sure the UUID is matching the new partition, otherwise it could still boot the old system. Find the UUID of a partition as follows:<br />
<br />
# lsblk -no NAME,UUID /dev/sdb3<br />
<br />
where you substitute the desired partition for /dev/sdb3. To list the UUIDs of partitions grub thinks it can boot, use grep:<br />
<br />
# grep UUID= /boot/grub/grub.cfg<br />
<br />
If the one you found from lsblk is not found by grep, then grub-mkconfig did not work. Most likely, you will have to [[Change root]] into the duplicate file system and then use [[mkinitcpio]]. For example, if you had used rsync to duplicate root on /dev/sdb3 then change root and use mkinitcpio as follows:<br />
<br />
# mkdir /mnt/arch<br />
# mount /dev/sdb3 /mnt/arch<br />
# cd /mnt/arch<br />
# mount -t proc proc proc/<br />
# mount --rbind /sys sys/<br />
# mount --rbind /dev dev/<br />
# chroot /mnt/arch /bin/bash<br />
# mkinitcpio -p linux<br />
<br />
After exiting, generate grub.cfg again and verify the new UUID is included.<br />
<br />
== First boot ==<br />
<br />
Reboot the computer and select the right entry in the bootloader. This will load the system for the first time. All peripherals should be detected and the empty folders in {{ic|/}} will be populated.<br />
<br />
Now you can re-edit {{ic|/etc/fstab}} to add the previously removed partitions and mount points.<br />
<br />
If you transferred the data from HDD to SSD (solid state drive), do not forget to activate TRIM. Also consider using HDD and tmpfs mount points to reduce SSD wearing - see [[Maximizing performance#Relocate_files_to_tmpfs|Relocate files to tmpfs]] and [[Solid_State_Drives#Tips_for_Minimizing_SSD_Read.2FWrites|Tips for Minimizing SSD Read & Writes]].<br />
<br />
{{Note|You may have to reboot again in order to get all services and daemons working correctly. Personally, pulseaudio would not initialise because of a module loading error. I restarted the dbus.service to make it work.}}<br />
<br />
== See also ==<br />
<br />
* [http://blog.pointsoftware.ch/index.php/howto-local-and-remote-snapshot-backup-using-rsync-with-hard-links/ Howto – local and remote snapshot backup using rsync with hard links] Includes file deduplication with hard-links, MD5 integrity signature, 'chattr' protection, filter rules, disk quota, retention policy with exponential distribution (backups rotation while saving more recent backups than older)</div>
Vas
https://wiki.archlinux.org/index.php?title=Talk:Openbox&diff=389564
Talk:Openbox
2015-08-01T12:35:46Z
<p>Vas: /* complex command */ description</p>
<hr />
<div>== complex command ==<br />
<br />
Re [https://wiki.archlinux.org/index.php?title=Openbox&diff=389266&oldid=389265], 1. why are two [[DPMS]] commands run in succession 2. "Special characters should be replaced", but I still hope the {{ic|&amp}} are formatting mistakes and not to be taken literally. Else these commands should be included in a script. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 15:42, 30 July 2015 (UTC)<br />
<br />
:Ok, 1. launches slock in a subshell, which is then backgrounded. After that, the dpms delay is set to two seconds. After slock exits, the dpms command in the subshell sets the delay back to a reasonable 60 seconds. Similar to the inactivity timeout of i3lock.<br />
:For 2., I've found [http://crunchbang.org/forums/viewtopic.php?pid=314943#p314943]. That's just horrible. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 19:17, 30 July 2015 (UTC)<br />
<br />
::1. Well, this is not a really good example. It was taken from [https://bbs.archlinux.org/viewtopic.php?pid=903057#p903057]. I think we should add the link to description. The idea is to lock the screen and switch off backlight. But with simple {{ic|slock &amp; xset dpms force off}} it is not enough delay for hotkey to be released and backlight comes back. The more simple is to create an atrificial delay {{ic|slock &amp; (sleep .5 && xset dpms force off)}}. [[User:Vas|Vas]] ([[User talk:Vas|talk]]) 11:10, 1 August 2015 (UTC)<br />
::2. Special character replacement works fine. I've found an example [http://thread.gmane.org/gmane.comp.window-managers.openbox/6806/focus=6814] in openbox mailing list. [[User:Vas|Vas]] ([[User talk:Vas|talk]]) 12:33, 1 August 2015 (UTC)</div>
Vas
https://wiki.archlinux.org/index.php?title=Talk:Openbox&diff=389543
Talk:Openbox
2015-08-01T11:11:39Z
<p>Vas: /* complex command */ description</p>
<hr />
<div>== complex command ==<br />
<br />
Re [https://wiki.archlinux.org/index.php?title=Openbox&diff=389266&oldid=389265], 1. why are two [[DPMS]] commands run in succession 2. "Special characters should be replaced", but I still hope the {{ic|&amp}} are formatting mistakes and not to be taken literally. Else these commands should be included in a script. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 15:42, 30 July 2015 (UTC)<br />
<br />
:Ok, 1. launches slock in a subshell, which is then backgrounded. After that, the dpms delay is set to two seconds. After slock exits, the dpms command in the subshell sets the delay back to a reasonable 60 seconds. Similar to the inactivity timeout of i3lock.<br />
:For 2., I've found [http://crunchbang.org/forums/viewtopic.php?pid=314943#p314943]. That's just horrible. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 19:17, 30 July 2015 (UTC)<br />
<br />
::1. Well, this is not a really good example. It was taken from [https://bbs.archlinux.org/viewtopic.php?pid=903057#p903057]. I think we should add the link to description. The idea is to lock the screen and switch off backlight. But with simple {{ic|slock &amp; xset dpms force off}} it is not enough delay for hotkey to be released and backlight comes back. The more simple is to create an atrificial delay {{ic|slock &amp; (sleep .5 && xset dpms force off)}}. [[User:Vas|Vas]] ([[User talk:Vas|talk]]) 11:10, 1 August 2015 (UTC)</div>
Vas
https://wiki.archlinux.org/index.php?title=Openbox&diff=389266
Openbox
2015-07-30T13:43:15Z
<p>Vas: /* Launch a complex command with hotkey */ fixed incorrect example</p>
<hr />
<div>[[Category:Stacking WMs]]<br />
[[cs:Openbox]]<br />
[[de:Openbox]]<br />
[[el:Openbox]]<br />
[[es:Openbox]]<br />
[[fr:Openbox]]<br />
[[it:Openbox]]<br />
[[ja:Openbox]]<br />
[[ko:Openbox]]<br />
[[lt:Openbox]]<br />
[[nl:Openbox]]<br />
[[pl:Openbox]]<br />
[[ru:Openbox]]<br />
[[sk:Openbox]]<br />
[[sr:Openbox]]<br />
[[tr:Openbox]]<br />
[[zh-CN:Openbox]]<br />
[[zh-TW:Openbox]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|File manager functionality}}<br />
{{Related|Window manager}}<br />
{{Related|Oblogout}}<br />
{{Related articles end}}<br />
<br />
Openbox is a lightweight, powerful, and highly configurable ''stacking'' [[window manager]] with extensive standards support. It may be built upon and run independently as the basis of a unique [[desktop environment]], or within other integrated desktop environments such as [[KDE]] and [[Xfce]], as an alternative to the window managers they provide. The [[LXDE]] desktop environment is itself built around Openbox.<br />
<br />
A comprehensive list of features are documented at the [http://openbox.org/ official Openbox website]. This article pertains to specifically installing Openbox under Arch Linux.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|openbox}} package.<br />
<br />
=== Standalone ===<br />
<br />
[[Display manager|display managers]] will automatically detect Openbox, allowing for it to be run as a standalone session.<br />
<br />
When using [[Xinitrc]] or [[SLiM]], add the following line:<br />
<br />
exec openbox-session<br />
<br />
{{Note|Specifying {{ic|openbox}} instead of {{ic|openbox-session}} will prevent [[#autostart|autostart]] in {{ic|/etc/xdg/autostart}}.}}<br />
<br />
=== Other desktop environments ===<br />
<br />
When replacing the native window manager of a [[desktop environment]] with Openbox, keep in mind that Openbox does not provide any compositing effects (such as transparency). See [[#Compositing effects]].<br />
<br />
==== GNOME ====<br />
<br />
GNOME Shell is a plugin for the {{Pkg|mutter}} window manager, so can not be used with Openbox. Openbox does work with GNOME applications (but see [[GTK+#Client-side decorations]]). [http://comments.gmane.org/gmane.comp.window-managers.openbox/6595]<br />
<br />
==== KDE ====<br />
<br />
See [[KDE#KDE/Openbox Session]].<br />
<br />
==== Xfce ====<br />
<br />
See [[Xfce#Default window manager]].<br />
<br />
==== MATE ====<br />
<br />
See [[MATE#Use a different window manager with MATE]]<br />
<br />
== Configuration==<br />
<br />
{{Note|Local configuration files will always override global equivalents.}}<br />
<br />
Four key files form the basis of the openbox configuration, each serving a unique role. They are: {{ic|rc.xml}}, {{ic|menu.xml}}, {{ic|autostart}}, and {{ic|environment}}. Although these files are discussed in more detail below, to start configuring Openbox, it will first be necessary to create a '''local''' Openbox profile (i.e for your specific user account) based on them. This can be done by copying them from the '''global''' {{ic|/etc/xdg/openbox}} profile (applicable to any and all users) as a template:<br />
<br />
$ cp -R /etc/xdg/openbox ~/.config/openbox<br />
<br />
=== rc.xml ===<br />
<br />
{{Tip|Custom keyboard shortcuts (keybindings) must be added to the {{ic|<keyboard>}} section of this file, and underneath the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading.}}<br />
<br />
{{ic|~/.config/openbox/rc.xml}} is the main configuration file, responsible for determining the behaviour and settings of the overall session, including:<br />
<br />
* Keyboard shortcuts (e.g. starting applications; controlling the volume)<br />
* Theming<br />
* Desktop and Virtual desktop settings, and<br />
* Application Window settings<br />
<br />
This file is also pre-configured, meaning that it will only be necessary to amend existing content in order to customise behaviour to suit personal preference.<br />
<br />
=== menu.xml ===<br />
<br />
{{ic|~/.config/openbox/menu.xml}} defines the type and behaviour of the desktop menu, accessable by right-clicking the background. Although the default provided is a '''static menu''' (meaning that it will not automatically update when new applications are installed), it is possible to employ the use of '''dynamic menus''' that will automatically update as well. <br />
<br />
The available options are discussed extensively below in the [[#Menus|Menus]] section.<br />
<br />
=== autostart ===<br />
<br />
The file {{ic|~/.config/openbox/autostart}}, if present, is executed by Openbox at startup. A basic example of this file consists of one command per line, like so:<br />
<br />
xset -b<br />
nm-applet &<br />
conky &<br />
<br />
Note that a single ampersand ({{ic|&}}) causes the process in question to be run in the background, allowing the script to continue on to the next command. An ampersand is therefore needed after each command that launches a process of indefinite duration. Commands that are completed essentially instantly (e.g. {{ic|xset -b}}) may be left alone.<br />
<br />
Issues regarding commands in {{ic|~/.config/openbox/autostart}} being executed out of order (or skipped altogether) are often resolved by the addition of small delays. For instance:<br />
<br />
xset -b<br />
(sleep 3s && nm-applet) &<br />
(sleep 3s && conky) &<br />
<br />
{{Note|In addition to running {{ic|~/.config/openbox/autostart}}, Openbox will also launch programs with {{ic|.desktop}} files present in {{ic|/etc/xdg/autostart}}. This is the global [[autostart]] directory, which is automatically sourced by XDG-compliant desktop environments (e.g. GNOME, KDE). Openbox will source this directory as well, provided that the package {{Pkg|python2-xdg}} is installed, and Openbox is launched as {{ic|openbox-session}} (rather than simply {{ic|openbox}}, as [[#Standalone|noted earlier]]). Duplication between {{ic|~/.config/openbox/autostart}} and {{ic|/etc/xdg/autostart}} is a common cause of programs launching twice at startup (e.g. two network manager tray icons).}}<br />
=== environment ===<br />
<br />
{{ic|~/.config/openbox/environment}} can be used to export and set relevant environmental variables such as to:<br />
<br />
* Define new pathways (e.g. execute commands that would otherwise require the entire pathway to be listed with them)<br />
* Change language settings, and<br />
* Define other variables to be used (e.g. the fix for GTK theming could be listed here)<br />
<br />
=== GUI configuration ===<br />
<br />
Several GUI applications are available to quickly and easily configure your Openbox desktop. From the [[official repositories]]:<br />
<br />
* {{App|ObConf|A GTK2 based configuration tool for the Openbox window manager.|http://openbox.org/wiki/ObConf:About|{{Pkg|obconf}}}}<br />
* {{App|LXAppearance ObConf|Plugin for LXAppearance to configure Openbox.|http://lxde.org|{{Pkg|lxappearance-obconf}}}}<br />
* {{App|LXInput|LXDE keyboard and mouse configuration|http://lxde.org|{{Pkg|lxinput}}}}<br />
* {{App|LXRandR|LXDE monitor configuration.|http://wiki.lxde.org/en/LXRandR|{{Pkg|lxrandr}}}}<br />
<br />
From the [[AUR]]:<br />
* {{App|obkey|Configure Openbox keyboard shortcuts|https://code.google.com/p/obkey/|{{AUR|obkey}}}} <br />
* {{App|ob-autostart|A simple autostart application for Openbox.|http://pastebin.com/012YgXTk|{{AUR|ob-autostart}}}} <br />
<br />
Programs and applications relating to the configuration of Openbox's desktop menu are discussed in the [[#Menus|Menus]] section.<br />
<br />
== Openbox reconfiguration ==<br />
<br />
{{Tip|where not already present, it would be worthwhile adding this command to a menu and/or as a keybind for convenience.}}<br />
<br />
Openbox will not always automatically reflect any changes made to its configuration files within a session. As a consequence, it will be necessary to manually reload those files after they have been edited. To do so, enter the following command:<br />
<br />
$ openbox --reconfigure<br />
<br />
Where intending to add this command as a keybind to {{ic|~/.config/openbox/rc.xml}}, it will only be necessary to list the command as {{ic|reconfigure}}. An example has been provided below, using the {{ic|Super}}+{{ic|F11}} keybind:<br />
<br />
<keybind key="W-F11"><br />
<action name="Reconfigure"/><br />
</keybind><br />
<br />
== Keybinds ==<br />
<br />
All keybinds must be added to the {{ic|~/.config/openbox/rc.xml}} file, and below the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading. Although a brief overview has been provided here, a more in-depth explanation of keybindings can be found at [http://openbox.org/wiki/Help:Bindings openbox.org]. There is a utility 'obkey' in AUR for adjust key-binding. Before use obkey, you should use obconf to create {{ic|~/.config/openbox/rc.xml}}.<br />
<br />
=== Special keys ===<br />
<br />
While the use of standard alpha-numeric keys for keybindings is self-explanatory, special names are assigned to other types of keys, such as {{ic|modifers}}, {{ic|multimedia}} keys and {{ic|navigation}} keys.<br />
<br />
==== Modifiers ====<br />
<br />
{{ic|Modifer}} keys play an important role in keybindings (e.g. holding down the {{ic|shift}} or {{ic|CTRL / control}} key in combination with another key to undertake an action). Using modifers helps to prevent conflicting keybinds, whereby two or more actions are linked to the same key or combination of keys. The syntax to use a modifer with another key is:<br />
<br />
"<modifier>-<key>"<br />
<br />
The modifer codes are as follows:<br />
<br />
* {{ic|S}}: Shift<br />
* {{ic|C}}: Control / CTRL<br />
* {{ic|A}}: Alt<br />
* {{ic|W}}: Super / Windows<br />
* {{ic|M}}: Meta<br />
* {{ic|H}}: Hyper (If it is bound to something) <br />
<br />
For example, the code below would use {{ic|super}} and {{ic|t}} to launch {{Pkg|lxterminal}}<br />
<br />
<keybind key="W-t"><br />
<action name="Execute"><br />
<command>lxterminal</command><br />
</action><br />
</keybind><br />
<br />
==== Multimedia keys ====<br />
<br />
{{Merge|Extra keyboard keys in Xorg}}<br />
<br />
Where available, it is possible to set the appropriate {{ic|multimedia}} keys to perform their intended functions, such as to control the volume and/or the screen brightness. These will usually be integrated into the {{ic|function}} keys, and are identified by their appropriate symbols. See [[Extra keyboard keys]] for details.<br />
<br />
The volume and brightness multimedia codes are as follows (note that commands will still have to be assigned to them to actually function):<br />
<br />
* {{ic|XF86AudioRaiseVolume}}: Increase volume<br />
* {{ic|XF86AudioLowerVolume}}: Decrease volume<br />
* {{ic|XF86AudioMute}}: Mute / unmute volume<br />
* {{ic|XF86MonBrightnessUp}}: Increase screen brightess<br />
* {{ic|XF86MonBrightnessDown}}: Decrease screen brightness<br />
<br />
Examples of how these may be used in {{ic|~/.config/openbox/rc.xml}} have been provided below.<br />
<br />
==== Navigation keys ====<br />
<br />
These are the directional / arrow keys, usually used to move the cursor up, down, left, or right. The (self-explanatory) navigation codes are as follows:<br />
<br />
* {{ic|Up}}: Up<br />
* {{ic|Down}}: Down<br />
* {{ic|Left}}: Left<br />
* {{ic|Right}}: Right<br />
<br />
=== Volume Control ===<br />
<br />
What commands should be used for controlling the volume will depend on whether [[ALSA]], [[PulseAudio]], or [[OSS]] is used for sound.<br />
<br />
==== ALSA ====<br />
<br />
If [[ALSA]] is used for sound, the {{ic|amixer}} program can be used to adjust the volume, which is part of the {{Pkg|alsa-utils}} package. The following example - using the {{ic|multimedia}} keys intended to control the volume - will adjust the volume by +/- 5% (which may be changed, as desired):<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== Pulseaudio ====<br />
<br />
Where using [[PulseAudio]] with [[ALSA]] as a backend, the {{ic|amixer}} program commands will have to be modifed, as illustrated below in comparison to the ALSA example:<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== OSS ====<br />
<br />
{{Note|This option may be suitable for more experienced users.}}<br />
<br />
Where using [[OSS]], it is possible to create keybindings to raise or lower specific mixers. This allows, for example, the volume of a specific application (such as an audio player) to be changed without changing the overall system volume settings in turn. In this instance, the application must first have been [[OSS#Configuring_Applications_for_OSS|configured]] to use its own mixer. <br />
<br />
In the following example, [[MPD]] has been configured to use its own mixer - also named {{ic|mpd}} - to increase and decrease the volume by a single decibel at a time. The {{ic|--}} that appears after the {{ic|ossmix}} command has been added to prevent a negative value from being treated as an argument: <br />
<br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd +1</command><br />
</action><br />
</keybind><br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd -1</command><br />
</action><br />
</keybind><br />
<br />
=== Media player control ===<br />
<br />
The {{AUR|playerctl}} command-line utility can be used to bind multimedia keys to player actions. It should work with most media players.<br />
<br />
<keybind key="XF86AudioPlay"><br />
<action name="Execute"><br />
<command>playerctl play</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPause"><br />
<action name="Execute"><br />
<command>playerctl pause</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioNext"><br />
<action name="Execute"><br />
<command>playerctl next</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPrev"><br />
<action name="Execute"><br />
<command>playerctl previous</command><br />
</action><br />
</keybind><br />
<br />
=== Brightness control ===<br />
<br />
The {{ic|xbacklight}} program is used to control screen brightness, which is part of the [[Xorg]] X-Window system. In the example below, the {{ic|multimedia}} keys intended to control the screen brightness will adjust the settings by +/- 10%:<br />
<br />
<keybind key="XF86MonBrightnessUp"><br />
<action name="Execute"><br />
<command>xbacklight +10</command><br />
</action><br />
</keybind><br />
<keybind key="XF86MonBrightnessDown"><br />
<action name="Execute"><br />
<command>xbacklight -10</command><br />
</action><br />
</keybind><br />
<br />
=== Window snapping ===<br />
<br />
Many desktop environments and window managers support ''window snapping'' (e.g. Windows 7 Aero snap), whereby they will automatically snap into place when moved to the edge of the screen. This effect can also be simulated in Openbox through the use of keybinds on focused windows. <br />
<br />
As illustrated in the example below, percentages must be used to determine window sizes (see [http://openbox.org/wiki/Help:Actions openbox.org] for further information). In this instance, The {{ic|super}} key is used in conjunction with the {{ic|navigation}} keys:<br />
<br />
<keybind key="W-Left"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>west</direction></action><br />
</keybind><br />
<keybind key="W-Right"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>east</direction></action><br />
</keybind><br />
<br />
However, it should be noted that once a window has been 'snapped' to an edge, it will remain vertically maximised unless subsequently maximised and then restored. The solution is to implement additional keybinds - in this instance using the {{ic|down}} and {{ic|up}} keys - to do so. This will also make pulling 'snapped' windows from screen edges faster as well:<br />
<br />
<keybind key="W-Down"><br />
<action name="Unmaximize"/><br />
</keybind><br />
<keybind key="W-Up"><br />
<action name="Maximize"/><br />
</keybind><br />
<br />
This [http://ubuntuforums.org/showthread.php?t=1796793 Ubuntu forum thread] provides more information. Applications such as {{AUR|opensnap-git}} are also available from the AUR to automatically simulate window snapping behaviour without the use of keybinds.<br />
<br />
=== Desktop menu ===<br />
<br />
It is also possible to create a keybind to access the desktop menu. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
== Menus ==<br />
<br />
It is possible to employ three types of menu in Openbox: {{ic|static}}, {{ic|pipes}} (dynamic), and {{ic|generators}} (static or dynamic). They may also be used alone or in any combination.<br />
<br />
=== Static ===<br />
<br />
As the name would suggest, this default type of menu does not change in any way, and may be manually edited and/or (re)generated automatically through the use on an appropriate software package.<br />
<br />
Fast and efficient, while this type of menu can be used to select applications, it can also be useful to access specific functions and/or perform specific tasks (e.g. desktop configuration), leaving the access of applications to another process (e.g. the {{Pkg|synapse}} or {{Pkg|xfce4-appfinder}} applications).<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file will be the sole source of static desktop menu content.<br />
<br />
==== menumaker ====<br />
<br />
{{Warning|A root terminal '''must''' be installed in order to use MenuMaker, even though a standard user terminal may be used to run it. {{Pkg|xterm}} is a good choice.}}<br />
<br />
{{Pkg|menumaker}} automatically generates {{ic|xml}} menus for several window managers, including Openbox, [[Fluxbox]], [[IceWM]] and [[Xfce]]. It will search for all installed executable programs and consequently create a menu file for them. It is also possible to configure MenuMaker to exclude certain application types (e.g. relating to [[GNOME]] or [[KDE]]), if desired.<br />
<br />
Once installed and executed, it will automatically generate a new {{ic|~/.config/openbox/menu.xml}} file. To avoid overwriting an existing file, enter:<br />
<br />
$ mmaker -v OpenBox3<br />
<br />
Otherwise, to overwrite an existing file, add the {{ic|force}} argument ({{ic|f}}):<br />
<br />
$ mmaker -vf OpenBox3<br />
<br />
Once a new {{ic|~/.config/openbox/menu.xml}} file has been generated it may then be manually edited, or configured using a GUI menu editor, such as {{Pkg|obmenu}}.<br />
<br />
==== obmenu ====<br />
<br />
{{Warning|{{ic|obm-xdg}} - a pipe menu to generate a list of [[GTK+]] and [[GNOME]] applications - is also provided with obmenu. However, it has long-running bugs whereby it may produce an invalid output, or even not function at all. Consequently it has been omitted from discussion.}}<br />
<br />
{{Pkg|obmenu}} is a "user-friendly" GUI application to edit {{ic|~/.config/openbox/menu.xml}}, without the need to code in {{ic|xml}}.<br />
<br />
==== xdg-menu ====<br />
<br />
{{Pkg|archlinux-xdg-menu}} will automatically generate a menu based on {{ic|xdg}} files contained within the {{ic|/etc/xdg/}} directory for numerous Window Managers, including Openbox. Review the [[Xdg-menu#OpenBox]] article for further information.<br />
<br />
==== logout menu options ====<br />
<br />
{{Tip|The commands provided can also be attached to [[#Keybinds|keybinds]].}}<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file can be edited in order to provide a sub-menu with the same options as provided by [[#oblogout|oblogout]]. The sample script below will provide all of these options, with the exception of the ability to lock the screen:<br />
<br />
<menu id="exit-menu" label="Exit"><br />
<item label="Log Out"><br />
<action name="Execute"><br />
<command>openbox --exit</command><br />
</action><br />
</item><br />
<item label="Shutdown"><br />
<action name="Execute"><br />
<command>systemctl poweroff</command><br />
</action><br />
</item><br />
<item label="Restart"><br />
<action name="Execute"><br />
<command>systemctl reboot</command><br />
</action><br />
</item><br />
<item label="Suspend"><br />
<action name="Execute"><br />
<command>systemctl suspend</command><br />
</action><br />
</item><br />
<item label="Hibernate"><br />
<action name="Execute"><br />
<command>systemctl hibernate</command><br />
</action><br />
</item><br />
</menu><br />
<br />
Once the entries have been composed, add the following line to present the sub-menu where desired within the main desktop menu (usually as the last entry):<br />
<br />
<menu id="exit-menu"/><br />
<br />
=== Pipes ===<br />
<br />
{{Tip|It is entirely feasible for a static menu to contain one or more pipe sub-menus. The functionality of some pipe menus may also rely on the installation of relevant software packages.}}<br />
<br />
This type of menu is in essence a script that provides dynamic, refreshed lists on-the-fly as and when run. These lists may be used for multiple purposes, including to list applications, to provide information, and to provide control functions. Pre-configured pipe menus can be installed, although not from the [[official repositories]]. More experienced users can also modify and/or create their own custom scripts. Again, {{ic|~/.config/openbox/menu.xml}} may and commonly will contain several pipe menus.<br />
<br />
==== Examples ====<br />
<br />
* {{AUR|openbox-xdgmenu}}: fast xdg-menu converter to xml-pipe-menu<br />
* {{AUR|obfilebrowser}}: Application and file browser<br />
* {{AUR|obdevicemenu}}: Management of removable media with [[Udisks]]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1345031 wifi pipe menu]: Wireless networking using [[Netctl]]<br />
<br />
[http://openbox.org/download-pipemenus.php Openbox.org] also provides a further list of pipe menus.<br />
<br />
=== Generators ===<br />
<br />
This type of menu is akin to those provided by the taskbars of desktop environments such as [[Xfce]] or [[LXDE]]. Automatically updating on-the-fly, this type of menu can be powerful and very convenient. It may also be possible to add custom categories and menu entries; read the documentation for your intended dynamic menu to determine if and how this can be done.<br />
<br />
A menu generator will have to be executed from the {{ic|~/.config/openbox/menu.xml}} file.<br />
<br />
==== obmenu-generator ====<br />
<br />
{{Tip|icons can still be disabled in {{AUR|obmenu-generator}}, even where enabled in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|obmenu-generator}} is currently only available from the [[AUR]], although it is still highly recommended. With the ability to be used as a static or dynamic menu, it is highly configurable, powerful, and versatile. Menu categories and individual entries may also be easily hidden, customised, and/or added with ease. The [http://trizenx.blogspot.co.uk/2012/02/obmenu-generator.html official homepage] provides further information and screenshots.<br />
<br />
Below is an example of how obmenu-generator would be dynamically executed without icons in {{ic|~/.config/openbox/menu.xml}}:<br />
<br />
<?xml version="1.0" encoding="utf-8"?><br />
<openbox_menu><br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator"><br />
</menu><br />
</openbox_menu><br />
<br />
To automatically iconify entries, the {{ic|-i}} option would be added:<br />
<br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator -i"><br />
<br />
==== openbox-menu ====<br />
<br />
{{Tip|If this menu produces an error, it may be solved by enabling icons in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|openbox-menu}} uses the [[LXDE]] [http://sourceforge.net/projects/lxde/files/menu-cache/ menu-cache] to create dynamic menus. The [http://mimasgpc.free.fr/openbox-menu_en.html official homepage] provides further information and screenshots.<br />
<br />
==== obmenugen ====<br />
<br />
{{AUR|Obmenugen}} is currently only available from the [[AUR]], and can be used to a generate static or dynamic application menu based on {{ic|.desktop}} files. The [http://obmenugen.sourceforge.net/ official homepage] provides further information.<br />
<br />
=== Menu icons ===<br />
<br />
To show icons next to menu entries, it will be necessary to ensure they are enabled in the {{ic|<menu>}} section of the {{ic|~/.config/openbox/rc.xml}} file:<br />
<br />
<applicationIcons>yes</applicationIcons><br />
<br />
Where using a static menu, it will then be necessary to edit the {{ic|~/.config/openbox/menu.xml}} file to provide both the {{ic|icon <nowiki>=</nowiki>}} command, along with the full path and icon name for each entry. An example of the syntax used to provide an icon for a category is:<br />
<br />
<menu id="apps-menu" label="[label name]" icon="[pathway to icon]/[icon name]"><br />
<br />
=== Desktop menu as a panel menu ===<br />
<br />
{{Tip|XDoTool can simulate any keybind for any action, and as such, it may therefore be used for many other purposes...}}<br />
<br />
{{Pkg|xdotool}} is a package that can issue commands to simulate key presses / keybinds, meaning that it is possible to use it to invoke keybind-related actions without having to actually press their assigned keys. As this includes the ability to invoke an assigned keybind for the Openbox desktop menu, it is therefore possible to use XDoTool to turn the Openbox desktop menu into a panel menu. Especially where the desktop menu is heavily customised and feature-rich, this may prove very useful to:<br />
<br />
* Replace an existing panel menu<br />
* Implement a panel menu where otherwise not provided or possible (e.g. for {{AUR|tint2-git}})<br />
* Compensate where losing access to the desktop menu due to the use of an application like [[#xfdesktop|xfdesktop]] to [[#Desktop icons and wallpapers|manage the desktop]].<br />
<br />
Once XDoTool has been installed - if not already present - it will be necessary to create a keybind to access the root menu in {{ic|~/.config/openbox/rc.xml}}, and again below the {{ic|<nowiki><</nowiki>!-- Keybindings for running aplications --<nowiki>></nowiki>}} heading. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
Openbox must then be [[#Openbox reconfiguration|re-configured]]. In this instance, XDoTool will be used to simulate the {{ic|CTRL}} + {{ic|m}} keypress to access the desktop menu with the following command (note the use of {{ic|+}} in place of {{ic|-}}):<br />
<br />
xdotool key control+m<br />
<br />
How this command may be used as a panel launcher / icon is largely dependent on the features of panel used. While some panels will allow the above command to be executed directly in the process of creating a new launcher, others may require the use of an executable script. As an example, a custom executable script called {{ic|obpanelmenu.sh}} will be created in the {{ic|~/.config}} folder:<br />
<br />
$ ''text editor'' ~/.config/obpanelmenu.sh<br />
<br />
Once the empty file has been opened, the appropriate XDoTool command must be added to the empty file (i.e. to simulate the {{ic|CTRL}} + {{ic|m}} keypress for this example):<br />
<br />
xdotool key control+m<br />
<br />
After the file has been saved and closed, it may then be made into an executable script with the following command:<br />
<br />
$ chmod +x ~/.config/obpanelmenu.sh<br />
<br />
Executing it will bring up the Openbox desktop menu. Consequently, where using a panel that supports drag-and-drop functionality to add new launchers, simply drag the executable script onto it before changing the icon to suit personal taste. For instructions on how to use this executable script with {{AUR|tint2-svn}} - a derivative of the popular {{Pkg|tint2}} panel that allows launchers to be added - see [[Tint2#Application_Launchers_in_tint2-svn_.28AUR.29|Tint2-Svn launchers]].<br />
<br />
== Desktop theming ==<br />
<br />
{{Tip|It is '''strongly advised''' to install the {{Pkg|obconf}} and {{Pkg|lxappearance-obconf}} GUI applications to configure visual settings and theming. The latter is particularly important as it is responsible for generating the {{ic|~/.gtkrc-2.0}} file (see [[GTK+#GTK+ 2.x]]).}}<br />
<br />
It is important to note that a substantial range of both '''Openbox-specific''' and generalised, '''Openbox-compatible''' [[GTK]] themes are available to change the look of window decorations and the desktop menu. ''Generalised'' themes are designed to be simultaneously compatible with a range of popular desktop environments and/or window managers, commonly including Openbox. See these [https://aur.archlinux.org/packages/?O=0&C=0&SeB=n&K=gtk-theme-&outdated=&SB=n&SO=a&PP=50&do_Search=Go package descriptions] for examples. <br />
<br />
=== Configuration ===<br />
<br />
{{Pkg|obconf}} and/or {{Pkg|lxappearance-obconf}} should be used to select and configure available GTK themes. See [[Uniform Look for Qt and GTK Applications]] for information about theming Qt based applications like [[VirtualBox]] or [[Skype]].<br />
<br />
=== Installation: official and AUR ===<br />
<br />
A good selection of {{Pkg|openbox-themes}} are available from the official repositories.<br />
<br />
Both Openbox-specific and Openbox-compatible themes installed from the [[Official_repositories|official repositories]] and/or the [[AUR]] will be automatically installed to the {{ic|/usr/share/themes}} directory. Both will also be immediately available for selection.<br />
<br />
=== Installation: other sources ===<br />
<br />
[http://www.box-look.org/index.php?xcontentmode=7402 box-look.org] is an excellent and well-established source of themes. [http://www.deviantart.com/ deviantART.com] is another excellent resource. Many more can be found through the utilisation of a search engine.<br />
<br />
=== Troubleshooting ===<br />
<br />
There are two particular problems that may be encountered on rare occasions, especially where downloading themes from unsupported websites. These have been addressed below.<br />
<br />
==== Theme cannot be used ====<br />
<br />
If for any reason the newly extracted theme cannot be selected, open the theme directory to first ensure that it is indeed compatible with Openbox by determining that an {{ic|openbox-3}} directory is present, and that within this directory a {{ic|themerc}} file is also present. An {{ic|.obt}} ('''O'''pen'''B'''ox '''T'''heme) file may also be present in some instances, which can then be manually loaded in {{Pkg|obconf}}.<br />
<br />
Where expected files and directories are present and correct, then on occasion it is possible that the theme author has not correctly set permission to access the file (e.g. permission may still be for the account of the author, rather than for '''root'''). To eliminate this possibility, ensure the folder and file permissions are for '''root''':<br />
<br />
# chown -R root /user/share/themes<br />
<br />
==== Theme looks broken ====<br />
<br />
Of course, the first line of enquiry would be to check that it is not just a badly made, broken theme! Otherwise, ensure that the [[Openbox#GTK+ 2|Openbox GTK fix]]{{Dead link|2014|11|28}} has been implemented, and then re-start the session. Unfortunately some older themes can simply break if not maintained sufficiently to keep pace with the changes incurred by [[GTK]] updates. To avoid such occurrences, it is best to check that desired themes have recently been created or at least updated / patched.<br />
<br />
=== Edit or create new themes ===<br />
<br />
{{Tip|Where deciding to modify an existing theme (e.g. the colour scheme), it would be best to work on a copy of it, rather than the original. This will retain the original should anything go wrong, and ensure that your changes are not over-written through an update.}}<br />
<br />
The process of creating new or modifying existing themes is covered extensively at the official [http://openbox.org/wiki/Help:Themes openbox.org] website. A user-friendly GUI to do so - {{AUR|obtheme}} - is also available from the [[AUR]].<br />
<br />
== Compositing effects ==<br />
<br />
Openbox does not provide native support for [[Wikipedia:Compositing window manager|compositing]], and thus requires an external compositor for this purpose.<br />
<br />
Although compositing is not a necessary component, it may specifically avoid issues such as screen distortion with [[#oblogout|oblogout]], and visual glitches with terminal window transparency. See [[Xorg#Composite]] for common choices.<br />
<br />
== Mouse cursor and application icon themes ==<br />
<br />
See [[Cursor themes]] and [[Icons]] for details.<br />
<br />
== Desktop icons and wallpapers ==<br />
<br />
{{Merge||This section is applicable to most [[window manager]]s when used without [[Desktop environment]]}}<br />
<br />
Openbox does not natively support the use of desktop icons or wallpapers. As a consequence, it will be necessary to install additional applications for this purpose, where desired.<br />
<br />
=== Desktop management using file managers ===<br />
<br />
Some file managers have the capacity to fully '''manage the desktop''', meaning that they may be used to provide wallpapers and enable the use of icons on the desktop. The [[LXDE]] desktop environment itself uses PCManFM for this purpose.<br />
<br />
See [[PCManFM#Desktop_management]] and [[SpaceFM#Desktop_management]].<br />
<br />
=== Wallpaper ===<br />
<br />
See [[List_of_applications#Wallpaper_setters]]<br />
<br />
=== Icon programs ===<br />
<br />
While there are programs dedicated to enabling desktop icons alone, it would seem that they have greater drawbacks than the utilisation of file managers for the task. These programs are discussed briefly, below.<br />
<br />
==== idesk ====<br />
<br />
[[idesk]] is a simple program that can enable icons in addition to managing wallpaper. It will be necessary to create an {{ic|~/.idesktop}} directory, and desktop icons must also be manually created. To use idesk to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
idesk &<br />
<br />
==== xfdesktop ====<br />
<br />
{{Pkg|xfdesktop}} is the desktop manager for [[Xfce]]. The [[Thunar]] file manager will also be downloaded as a dependency. Where this is used, the Openbox desktop menu will no longer be accessible by right-clicking the background. <br />
<br />
As such, it will consequently be necessary to access it by other means, such as by [[#Desktop menu|creating a keybind]], and/or by - where permitted - re-configuring an installed panel to use the [[#Desktop menu as a panel menu|desktop menu as a panel menu]]. To use xfdesktop to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
xfdesktop &<br />
<br />
=== conky reconfiguration ===<br />
<br />
Particularly where using a file manager to manage the desktop, it will be necessary to edit {{ic|~/.conkyrc}} to change the {{ic|own_window_type}} command in order for [[conky]] to continue to be displayed (where used). The revised command that should be used is:<br />
<br />
own_window_type normal<br />
<br />
== oblogout ==<br />
<br />
See the [[Oblogout]] article for an overview on how to use this useful, graphical logout script.<br />
<br />
== Openbox for multihead users ==<br />
<br />
While Openbox provides better than average multihead support on its own, the {{AUR|openbox-multihead-git}} package from the [[AUR]] provides a development branch called '''Openbox Multihead''' that gives multihead users per-monitor desktops. This model is not commonly found in floating window managers, but exists mainly in tiling window managers. It is explained well on the [http://xmonad.org/tour.html#workspace Xmonad web site]. Also, please see [https://github.com/BurntSushi/openbox-multihead/blob/multihead/README.MULTIHEAD README.MULTIHEAD] for a more comprehensive description of the new features and configuration options found in Openbox Multihead.<br />
<br />
Openbox Multihead will function like normal Openbox when only a single head is available.<br />
<br />
A downside to using Openbox Multihead is that it breaks the EWMH assumption that one and only one desktop is visible at any time. Thus, existing pagers will not work well with it. To remedy this, {{AUR|pager-multihead-git}} can be found in the [[AUR]] and is compatible with Openbox Multihead. [http://imgur.com/a/cnZeq#y04nk Screenshots].<br />
<br />
Finally, a new version of [[PyTyle]] that will work with Openbox Multihead can also be found in the [[AUR]]: {{AUR|pytyle3-git}}.<br />
<br />
Both ''pytyle3'' and ''pager-multihead-git'' will work without Openbox Multihead if only one monitor is active.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Launch a complex command with hotkey ===<br />
<br />
If you need to execute a complex command, use shell functionality. Some special characters shoul be replaced.<br />
This example will turn off display immediately and lock screen with {{Pkg|slock}}<br />
<keybind key="W-l"><br />
<action name="Execute"><br />
<command>sh -c '( slock &amp;amp;&amp;amp; xset dpms 0 0 60 ) &amp;amp; xset dpms 0 0 2; xset dpms force off'</command><br />
</action><br />
</keybind><br />
<br />
Sometimes one need to specify environment variable for application<br />
<keybind key="A-F7"><br />
<action name="Execute"><br />
<command>sh -c "LC_ALL=C obconf"</command><br />
</action><br />
</keybind><br />
<br />
=== Switch desktops using the mouse ===<br />
<br />
It is possible to switch desktop by moving the mouse cursor to the edges of the screen. First install {{Pkg|xdotool}} and add the following two lines to your {{ic|~/.xinitrc}}:<br />
<br />
xdotool behave_screen_edge --delay 500 left set_desktop --relative -- -1 &<br />
xdotool behave_screen_edge --delay 500 right set_desktop --relative -- +1 &<br />
<br />
=== Set default applications / file associations ===<br />
<br />
See the [[Default applications]] article.<br />
<br />
=== Stop continous mouse wheel desktop switching ===<br />
<br />
By default Openbox switches from the last desktop back to the first desktop on mouse wheel scroll. Use {{ic|<wrap>no</wrap>}} in the {{ic|mousebind}} section to disable this behaviour.<br />
<br />
<context name="Desktop"><br />
<mousebind button="Up" action="Click"><br />
<action name="GoToDesktop"><br />
<to>previous</to><br />
<wrap>no</wrap><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name="GoToDesktop"><br />
<to>next</to><br />
<wrap>no</wrap><br />
</action><br />
</mousebind><br />
</context><br />
<br />
=== Ad-hoc window transparency ===<br />
<br />
{{Warning|This may not work where other actions are defined within the action group.}}<br />
The program {{Pkg|transset-df}} is available in the official repositories, and can enable window transparency on-the-fly.<br />
<br />
For example, using the following code in the {{ic|<mouse>}} section of the {{ic|~/.config/openbox/rc.xml}} file will enable control of application window transparency by hovering the mouse-pointer over the title bar and scrolling with the middle button:<br />
<br />
<context name="Titlebar"><br />
...<br />
<mousebind button="Up" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --inc </execute><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --dec </execute><br />
</action><br />
</mousebind><br />
...<br />
</context><br />
<br />
=== Using obxprop for faster configuration ===<br />
<br />
The {{Pkg|openbox}} package provides a {{ic|obxprop}} binary that can parse relevant values for applications settings in {{ic|rc.xml}}. Officially {{ic|<nowiki>obxprop | grep "^_OB_APP"</nowiki>}} is recommended for this task. Start the process by running the command shown, then click a window to see its properties in the terminal.<br />
<br />
Doing so for multiple applications and its windows can be very inefficient however. The following script {{ic|obxprop2obrc}} makes it much easier to configure even a large number of applications.<br />
<br />
{{Accuracy|Full of [http://shellcheck.net quoting errors], do '''not''' follow any of the instructions bellow!}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
##Script: obxprop-to-openbox-rc.sh<br />
##Recommended executable name: obxprop2obrc<br />
<br />
while [ $# -ne 0 ]; do<br />
case $1 in<br />
-f*)<br />
shift;<br />
FILE="$1";<br />
shift;<br />
;;<br />
-t*)<br />
shift;<br />
TIME="$1";<br />
shift;<br />
;;<br />
*)<br />
echo Usage: $0 [-f FILE_TEMPLATE] [-t WAIT_TO_KILL_TIME] <br />
exit 1;<br />
;;<br />
esac<br />
done<br />
<br />
if [ $TIME ]; then<br />
OBXPROPS=( $(obxprop | cat & (sleep $TIME && pkill -13 cat) | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
else<br />
OBXPROPS=( $(obxprop | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
fi<br />
OBPROPS=(TYPE TITLE GROUP_CLASS GROUP_NAME CLASS NAME ROLE);<br />
j=0;<br />
for i in $( seq 2 2 14 ); do<br />
OBPROP="$( echo ${OBXPROPS[@]} | awk -F \" '{ print $'$i'}' )";<br />
if [[ -z $OBPROP ]]; then <br />
declare ${OBPROPS[$j]}='"*"';<br />
else <br />
declare ${OBPROPS[$j]}="\"$OBPROP\"";<br />
fi<br />
j=$(($j+1));<br />
done;<br />
<br />
echo " <application type="$TYPE" title="$TITLE" class="$CLASS" name="$NAME" role="$ROLE">"<br />
if [ -f "$FILE" ]; then cat "$FILE" && exit; fi<br />
cat << EOF<br />
<desktop>1</desktop><br />
<desktop>all</desktop><br />
<decor>yes</decor><br />
<decor>no</decor><br />
<focus>yes</focus><br />
<focus>no</focus><br />
<fullscreen>yes</fullscreen><br />
<fullscreen>no</fullscreen><br />
<iconic>yes</iconic><br />
<iconic>no</iconic><br />
<maximized>yes</maximized><br />
<maximized>no</maximized><br />
<maximized>both</maximized><br />
<maximized>horizontal</maximized><br />
<maximized>vertical</maximized><br />
<monitor>0</monitor><br />
<monitor>1</monitor><br />
<position force="no"><br />
<position force="yes"><br />
<width>40%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
<x>center</x><br />
<y>center</y><br />
</position><br />
<layer>above</layer><br />
<layer>normal</layer><br />
<layer>below</layer><br />
<shade>yes</shade><br />
<shade>no</shade><br />
<skip_pager>yes</skip_pager><br />
<skip_pager>no</skip_pager><br />
<skip_taskbar>yes</skip_taskbar><br />
<skip_taskbar>no</skip_taskbar><br />
</application><br />
EOF<br />
</nowiki>}}<br />
<br />
If no further options are used default configuration, that can be edited by deleting unnecessary lines, is printed out. This script can use templates with default values when using {{ic|-f}} switch:<br />
{{hc|<br />
$ obxprop2obrc -f templates-rc-inkscape-dialogs.sc > part-rc-applications-inkscape.xml<br />
$ cat part-rc-applications-inkscape.xml|<nowiki><br />
<application type="normal" title="Align and Distribute (Shift+Ctrl+A)" class="Inkscape" name="inkscape" role="*"><br />
<desktop>3</desktop><br />
<decor>yes</decor><br />
<maximized>no</maximized><br />
<position force="yes"><br />
<width>20%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
</position><br />
<layer>normal</layer><br />
<shade>yes</shade><br />
</application><br />
</nowiki>}}<br />
<br />
It also has a time switch {{ic|-t}} which kills obxprop and thus can reduce time significantly in certain situations, although it may not work perfectly.<br />
<br />
=== Xprop values for applications ===<br />
<br />
{{Pkg|xorg-xprop}} is available in the official repositories, and can be used to relay property values for selected applications. Where frequently using per-application settings, the following [[Bash#Aliases|Bash Alias]] may be useful:<br />
dy:<br />
<br />
alias xp='xprop | grep "WM_WINDOW_ROLE\|WM_CLASS" && echo "WM_CLASS(STRING) = \"NAME\", \"CLASS\""'<br />
<br />
To use Xorg-XProp, run using the alias given {{ic|xp}}, and click on the active program desired to define with per-application settins. The results displayed will only be the information that Openbox itself requires, namely the {{ic|WM_WINDOW_ROLE}} and {{ic|WM_CLASS}} (name and class) values:<br />
<br />
WM_WINDOW_ROLE(STRING) = "roster"<br />
WM_CLASS(STRING) = "gajim.py", "Gajim.py"<br />
WM_CLASS(STRING) = "NAME", "CLASS"<br />
<br />
==== Firefox ====<br />
<br />
For whatever reason, Firefox and like-minded equivalents ignore application rules (e.g. ''<desktop>'') unless {{ic|class&#61;"Firefox*"}} is used. This applies irrespective of whatever values '''xprop''' may report for the program's {{ic|WM_CLASS}}.<br />
<br />
=== Switching between keyboard layouts ===<br />
<br />
See the article section [[Keyboard configuration in Xorg#Switching between keyboard layouts|switching between keyboard layouts]] for instructions.<br />
<br />
=== Set grid layout for virtual desktops ===<br />
<br />
Install {{AUR|obsetlayout}}. To set a 2x2 grid for example:<br />
<br />
obsetlayout 0 2 2 0<br />
<br />
Run it without arguments to know what the arguments mean.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Windows load behind the active window ===<br />
<br />
Some application windows (such as Firefox windows) may load behind the currently active window, causing you to need to switch to the window you just created to focus it. To fix this behavior add this to your {{ic|~/.config/openbox/rc.xml}} file, inbetween the {{ic|1=<openbox_config>}} and {{ic|1=</openbox_config>}} tags:<br />
<br />
{{bc|1=<br />
<applications><br />
<application class="*"><br />
<focus>yes</focus><br />
</application><br />
</applications><br />
}}<br />
<br />
== See also ==<br />
<br />
* [http://openbox.org/ Openbox Website] - Official website<br />
* [http://planetob.openmonkey.com/ Planet Openbox] - Openbox news portal<br />
* [http://www.box-look.org/ Box-Look.org] - A good resource for themes and related artwork<br />
* [https://bbs.archlinux.org/viewtopic.php?id=93126 Openbox Hacks and Configs Thread] @ Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=45692 Openbox Screenshots Thread] @ Arch Linux Forums<br />
* [http://urukrama.wordpress.com/openbox-guide/ An Openbox guide]</div>
Vas
https://wiki.archlinux.org/index.php?title=Openbox&diff=389265
Openbox
2015-07-30T13:32:36Z
<p>Vas: /* Launch a shell command with hotkey */ added a better example</p>
<hr />
<div>[[Category:Stacking WMs]]<br />
[[cs:Openbox]]<br />
[[de:Openbox]]<br />
[[el:Openbox]]<br />
[[es:Openbox]]<br />
[[fr:Openbox]]<br />
[[it:Openbox]]<br />
[[ja:Openbox]]<br />
[[ko:Openbox]]<br />
[[lt:Openbox]]<br />
[[nl:Openbox]]<br />
[[pl:Openbox]]<br />
[[ru:Openbox]]<br />
[[sk:Openbox]]<br />
[[sr:Openbox]]<br />
[[tr:Openbox]]<br />
[[zh-CN:Openbox]]<br />
[[zh-TW:Openbox]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|File manager functionality}}<br />
{{Related|Window manager}}<br />
{{Related|Oblogout}}<br />
{{Related articles end}}<br />
<br />
Openbox is a lightweight, powerful, and highly configurable ''stacking'' [[window manager]] with extensive standards support. It may be built upon and run independently as the basis of a unique [[desktop environment]], or within other integrated desktop environments such as [[KDE]] and [[Xfce]], as an alternative to the window managers they provide. The [[LXDE]] desktop environment is itself built around Openbox.<br />
<br />
A comprehensive list of features are documented at the [http://openbox.org/ official Openbox website]. This article pertains to specifically installing Openbox under Arch Linux.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|openbox}} package.<br />
<br />
=== Standalone ===<br />
<br />
[[Display manager|display managers]] will automatically detect Openbox, allowing for it to be run as a standalone session.<br />
<br />
When using [[Xinitrc]] or [[SLiM]], add the following line:<br />
<br />
exec openbox-session<br />
<br />
{{Note|Specifying {{ic|openbox}} instead of {{ic|openbox-session}} will prevent [[#autostart|autostart]] in {{ic|/etc/xdg/autostart}}.}}<br />
<br />
=== Other desktop environments ===<br />
<br />
When replacing the native window manager of a [[desktop environment]] with Openbox, keep in mind that Openbox does not provide any compositing effects (such as transparency). See [[#Compositing effects]].<br />
<br />
==== GNOME ====<br />
<br />
GNOME Shell is a plugin for the {{Pkg|mutter}} window manager, so can not be used with Openbox. Openbox does work with GNOME applications (but see [[GTK+#Client-side decorations]]). [http://comments.gmane.org/gmane.comp.window-managers.openbox/6595]<br />
<br />
==== KDE ====<br />
<br />
See [[KDE#KDE/Openbox Session]].<br />
<br />
==== Xfce ====<br />
<br />
See [[Xfce#Default window manager]].<br />
<br />
==== MATE ====<br />
<br />
See [[MATE#Use a different window manager with MATE]]<br />
<br />
== Configuration==<br />
<br />
{{Note|Local configuration files will always override global equivalents.}}<br />
<br />
Four key files form the basis of the openbox configuration, each serving a unique role. They are: {{ic|rc.xml}}, {{ic|menu.xml}}, {{ic|autostart}}, and {{ic|environment}}. Although these files are discussed in more detail below, to start configuring Openbox, it will first be necessary to create a '''local''' Openbox profile (i.e for your specific user account) based on them. This can be done by copying them from the '''global''' {{ic|/etc/xdg/openbox}} profile (applicable to any and all users) as a template:<br />
<br />
$ cp -R /etc/xdg/openbox ~/.config/openbox<br />
<br />
=== rc.xml ===<br />
<br />
{{Tip|Custom keyboard shortcuts (keybindings) must be added to the {{ic|<keyboard>}} section of this file, and underneath the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading.}}<br />
<br />
{{ic|~/.config/openbox/rc.xml}} is the main configuration file, responsible for determining the behaviour and settings of the overall session, including:<br />
<br />
* Keyboard shortcuts (e.g. starting applications; controlling the volume)<br />
* Theming<br />
* Desktop and Virtual desktop settings, and<br />
* Application Window settings<br />
<br />
This file is also pre-configured, meaning that it will only be necessary to amend existing content in order to customise behaviour to suit personal preference.<br />
<br />
=== menu.xml ===<br />
<br />
{{ic|~/.config/openbox/menu.xml}} defines the type and behaviour of the desktop menu, accessable by right-clicking the background. Although the default provided is a '''static menu''' (meaning that it will not automatically update when new applications are installed), it is possible to employ the use of '''dynamic menus''' that will automatically update as well. <br />
<br />
The available options are discussed extensively below in the [[#Menus|Menus]] section.<br />
<br />
=== autostart ===<br />
<br />
The file {{ic|~/.config/openbox/autostart}}, if present, is executed by Openbox at startup. A basic example of this file consists of one command per line, like so:<br />
<br />
xset -b<br />
nm-applet &<br />
conky &<br />
<br />
Note that a single ampersand ({{ic|&}}) causes the process in question to be run in the background, allowing the script to continue on to the next command. An ampersand is therefore needed after each command that launches a process of indefinite duration. Commands that are completed essentially instantly (e.g. {{ic|xset -b}}) may be left alone.<br />
<br />
Issues regarding commands in {{ic|~/.config/openbox/autostart}} being executed out of order (or skipped altogether) are often resolved by the addition of small delays. For instance:<br />
<br />
xset -b<br />
(sleep 3s && nm-applet) &<br />
(sleep 3s && conky) &<br />
<br />
{{Note|In addition to running {{ic|~/.config/openbox/autostart}}, Openbox will also launch programs with {{ic|.desktop}} files present in {{ic|/etc/xdg/autostart}}. This is the global [[autostart]] directory, which is automatically sourced by XDG-compliant desktop environments (e.g. GNOME, KDE). Openbox will source this directory as well, provided that the package {{Pkg|python2-xdg}} is installed, and Openbox is launched as {{ic|openbox-session}} (rather than simply {{ic|openbox}}, as [[#Standalone|noted earlier]]). Duplication between {{ic|~/.config/openbox/autostart}} and {{ic|/etc/xdg/autostart}} is a common cause of programs launching twice at startup (e.g. two network manager tray icons).}}<br />
=== environment ===<br />
<br />
{{ic|~/.config/openbox/environment}} can be used to export and set relevant environmental variables such as to:<br />
<br />
* Define new pathways (e.g. execute commands that would otherwise require the entire pathway to be listed with them)<br />
* Change language settings, and<br />
* Define other variables to be used (e.g. the fix for GTK theming could be listed here)<br />
<br />
=== GUI configuration ===<br />
<br />
Several GUI applications are available to quickly and easily configure your Openbox desktop. From the [[official repositories]]:<br />
<br />
* {{App|ObConf|A GTK2 based configuration tool for the Openbox window manager.|http://openbox.org/wiki/ObConf:About|{{Pkg|obconf}}}}<br />
* {{App|LXAppearance ObConf|Plugin for LXAppearance to configure Openbox.|http://lxde.org|{{Pkg|lxappearance-obconf}}}}<br />
* {{App|LXInput|LXDE keyboard and mouse configuration|http://lxde.org|{{Pkg|lxinput}}}}<br />
* {{App|LXRandR|LXDE monitor configuration.|http://wiki.lxde.org/en/LXRandR|{{Pkg|lxrandr}}}}<br />
<br />
From the [[AUR]]:<br />
* {{App|obkey|Configure Openbox keyboard shortcuts|https://code.google.com/p/obkey/|{{AUR|obkey}}}} <br />
* {{App|ob-autostart|A simple autostart application for Openbox.|http://pastebin.com/012YgXTk|{{AUR|ob-autostart}}}} <br />
<br />
Programs and applications relating to the configuration of Openbox's desktop menu are discussed in the [[#Menus|Menus]] section.<br />
<br />
== Openbox reconfiguration ==<br />
<br />
{{Tip|where not already present, it would be worthwhile adding this command to a menu and/or as a keybind for convenience.}}<br />
<br />
Openbox will not always automatically reflect any changes made to its configuration files within a session. As a consequence, it will be necessary to manually reload those files after they have been edited. To do so, enter the following command:<br />
<br />
$ openbox --reconfigure<br />
<br />
Where intending to add this command as a keybind to {{ic|~/.config/openbox/rc.xml}}, it will only be necessary to list the command as {{ic|reconfigure}}. An example has been provided below, using the {{ic|Super}}+{{ic|F11}} keybind:<br />
<br />
<keybind key="W-F11"><br />
<action name="Reconfigure"/><br />
</keybind><br />
<br />
== Keybinds ==<br />
<br />
All keybinds must be added to the {{ic|~/.config/openbox/rc.xml}} file, and below the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading. Although a brief overview has been provided here, a more in-depth explanation of keybindings can be found at [http://openbox.org/wiki/Help:Bindings openbox.org]. There is a utility 'obkey' in AUR for adjust key-binding. Before use obkey, you should use obconf to create {{ic|~/.config/openbox/rc.xml}}.<br />
<br />
=== Special keys ===<br />
<br />
While the use of standard alpha-numeric keys for keybindings is self-explanatory, special names are assigned to other types of keys, such as {{ic|modifers}}, {{ic|multimedia}} keys and {{ic|navigation}} keys.<br />
<br />
==== Modifiers ====<br />
<br />
{{ic|Modifer}} keys play an important role in keybindings (e.g. holding down the {{ic|shift}} or {{ic|CTRL / control}} key in combination with another key to undertake an action). Using modifers helps to prevent conflicting keybinds, whereby two or more actions are linked to the same key or combination of keys. The syntax to use a modifer with another key is:<br />
<br />
"<modifier>-<key>"<br />
<br />
The modifer codes are as follows:<br />
<br />
* {{ic|S}}: Shift<br />
* {{ic|C}}: Control / CTRL<br />
* {{ic|A}}: Alt<br />
* {{ic|W}}: Super / Windows<br />
* {{ic|M}}: Meta<br />
* {{ic|H}}: Hyper (If it is bound to something) <br />
<br />
For example, the code below would use {{ic|super}} and {{ic|t}} to launch {{Pkg|lxterminal}}<br />
<br />
<keybind key="W-t"><br />
<action name="Execute"><br />
<command>lxterminal</command><br />
</action><br />
</keybind><br />
<br />
==== Multimedia keys ====<br />
<br />
{{Merge|Extra keyboard keys in Xorg}}<br />
<br />
Where available, it is possible to set the appropriate {{ic|multimedia}} keys to perform their intended functions, such as to control the volume and/or the screen brightness. These will usually be integrated into the {{ic|function}} keys, and are identified by their appropriate symbols. See [[Extra keyboard keys]] for details.<br />
<br />
The volume and brightness multimedia codes are as follows (note that commands will still have to be assigned to them to actually function):<br />
<br />
* {{ic|XF86AudioRaiseVolume}}: Increase volume<br />
* {{ic|XF86AudioLowerVolume}}: Decrease volume<br />
* {{ic|XF86AudioMute}}: Mute / unmute volume<br />
* {{ic|XF86MonBrightnessUp}}: Increase screen brightess<br />
* {{ic|XF86MonBrightnessDown}}: Decrease screen brightness<br />
<br />
Examples of how these may be used in {{ic|~/.config/openbox/rc.xml}} have been provided below.<br />
<br />
==== Navigation keys ====<br />
<br />
These are the directional / arrow keys, usually used to move the cursor up, down, left, or right. The (self-explanatory) navigation codes are as follows:<br />
<br />
* {{ic|Up}}: Up<br />
* {{ic|Down}}: Down<br />
* {{ic|Left}}: Left<br />
* {{ic|Right}}: Right<br />
<br />
=== Volume Control ===<br />
<br />
What commands should be used for controlling the volume will depend on whether [[ALSA]], [[PulseAudio]], or [[OSS]] is used for sound.<br />
<br />
==== ALSA ====<br />
<br />
If [[ALSA]] is used for sound, the {{ic|amixer}} program can be used to adjust the volume, which is part of the {{Pkg|alsa-utils}} package. The following example - using the {{ic|multimedia}} keys intended to control the volume - will adjust the volume by +/- 5% (which may be changed, as desired):<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== Pulseaudio ====<br />
<br />
Where using [[PulseAudio]] with [[ALSA]] as a backend, the {{ic|amixer}} program commands will have to be modifed, as illustrated below in comparison to the ALSA example:<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== OSS ====<br />
<br />
{{Note|This option may be suitable for more experienced users.}}<br />
<br />
Where using [[OSS]], it is possible to create keybindings to raise or lower specific mixers. This allows, for example, the volume of a specific application (such as an audio player) to be changed without changing the overall system volume settings in turn. In this instance, the application must first have been [[OSS#Configuring_Applications_for_OSS|configured]] to use its own mixer. <br />
<br />
In the following example, [[MPD]] has been configured to use its own mixer - also named {{ic|mpd}} - to increase and decrease the volume by a single decibel at a time. The {{ic|--}} that appears after the {{ic|ossmix}} command has been added to prevent a negative value from being treated as an argument: <br />
<br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd +1</command><br />
</action><br />
</keybind><br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd -1</command><br />
</action><br />
</keybind><br />
<br />
=== Media player control ===<br />
<br />
The {{AUR|playerctl}} command-line utility can be used to bind multimedia keys to player actions. It should work with most media players.<br />
<br />
<keybind key="XF86AudioPlay"><br />
<action name="Execute"><br />
<command>playerctl play</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPause"><br />
<action name="Execute"><br />
<command>playerctl pause</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioNext"><br />
<action name="Execute"><br />
<command>playerctl next</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPrev"><br />
<action name="Execute"><br />
<command>playerctl previous</command><br />
</action><br />
</keybind><br />
<br />
=== Brightness control ===<br />
<br />
The {{ic|xbacklight}} program is used to control screen brightness, which is part of the [[Xorg]] X-Window system. In the example below, the {{ic|multimedia}} keys intended to control the screen brightness will adjust the settings by +/- 10%:<br />
<br />
<keybind key="XF86MonBrightnessUp"><br />
<action name="Execute"><br />
<command>xbacklight +10</command><br />
</action><br />
</keybind><br />
<keybind key="XF86MonBrightnessDown"><br />
<action name="Execute"><br />
<command>xbacklight -10</command><br />
</action><br />
</keybind><br />
<br />
=== Window snapping ===<br />
<br />
Many desktop environments and window managers support ''window snapping'' (e.g. Windows 7 Aero snap), whereby they will automatically snap into place when moved to the edge of the screen. This effect can also be simulated in Openbox through the use of keybinds on focused windows. <br />
<br />
As illustrated in the example below, percentages must be used to determine window sizes (see [http://openbox.org/wiki/Help:Actions openbox.org] for further information). In this instance, The {{ic|super}} key is used in conjunction with the {{ic|navigation}} keys:<br />
<br />
<keybind key="W-Left"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>west</direction></action><br />
</keybind><br />
<keybind key="W-Right"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>east</direction></action><br />
</keybind><br />
<br />
However, it should be noted that once a window has been 'snapped' to an edge, it will remain vertically maximised unless subsequently maximised and then restored. The solution is to implement additional keybinds - in this instance using the {{ic|down}} and {{ic|up}} keys - to do so. This will also make pulling 'snapped' windows from screen edges faster as well:<br />
<br />
<keybind key="W-Down"><br />
<action name="Unmaximize"/><br />
</keybind><br />
<keybind key="W-Up"><br />
<action name="Maximize"/><br />
</keybind><br />
<br />
This [http://ubuntuforums.org/showthread.php?t=1796793 Ubuntu forum thread] provides more information. Applications such as {{AUR|opensnap-git}} are also available from the AUR to automatically simulate window snapping behaviour without the use of keybinds.<br />
<br />
=== Desktop menu ===<br />
<br />
It is also possible to create a keybind to access the desktop menu. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
== Menus ==<br />
<br />
It is possible to employ three types of menu in Openbox: {{ic|static}}, {{ic|pipes}} (dynamic), and {{ic|generators}} (static or dynamic). They may also be used alone or in any combination.<br />
<br />
=== Static ===<br />
<br />
As the name would suggest, this default type of menu does not change in any way, and may be manually edited and/or (re)generated automatically through the use on an appropriate software package.<br />
<br />
Fast and efficient, while this type of menu can be used to select applications, it can also be useful to access specific functions and/or perform specific tasks (e.g. desktop configuration), leaving the access of applications to another process (e.g. the {{Pkg|synapse}} or {{Pkg|xfce4-appfinder}} applications).<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file will be the sole source of static desktop menu content.<br />
<br />
==== menumaker ====<br />
<br />
{{Warning|A root terminal '''must''' be installed in order to use MenuMaker, even though a standard user terminal may be used to run it. {{Pkg|xterm}} is a good choice.}}<br />
<br />
{{Pkg|menumaker}} automatically generates {{ic|xml}} menus for several window managers, including Openbox, [[Fluxbox]], [[IceWM]] and [[Xfce]]. It will search for all installed executable programs and consequently create a menu file for them. It is also possible to configure MenuMaker to exclude certain application types (e.g. relating to [[GNOME]] or [[KDE]]), if desired.<br />
<br />
Once installed and executed, it will automatically generate a new {{ic|~/.config/openbox/menu.xml}} file. To avoid overwriting an existing file, enter:<br />
<br />
$ mmaker -v OpenBox3<br />
<br />
Otherwise, to overwrite an existing file, add the {{ic|force}} argument ({{ic|f}}):<br />
<br />
$ mmaker -vf OpenBox3<br />
<br />
Once a new {{ic|~/.config/openbox/menu.xml}} file has been generated it may then be manually edited, or configured using a GUI menu editor, such as {{Pkg|obmenu}}.<br />
<br />
==== obmenu ====<br />
<br />
{{Warning|{{ic|obm-xdg}} - a pipe menu to generate a list of [[GTK+]] and [[GNOME]] applications - is also provided with obmenu. However, it has long-running bugs whereby it may produce an invalid output, or even not function at all. Consequently it has been omitted from discussion.}}<br />
<br />
{{Pkg|obmenu}} is a "user-friendly" GUI application to edit {{ic|~/.config/openbox/menu.xml}}, without the need to code in {{ic|xml}}.<br />
<br />
==== xdg-menu ====<br />
<br />
{{Pkg|archlinux-xdg-menu}} will automatically generate a menu based on {{ic|xdg}} files contained within the {{ic|/etc/xdg/}} directory for numerous Window Managers, including Openbox. Review the [[Xdg-menu#OpenBox]] article for further information.<br />
<br />
==== logout menu options ====<br />
<br />
{{Tip|The commands provided can also be attached to [[#Keybinds|keybinds]].}}<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file can be edited in order to provide a sub-menu with the same options as provided by [[#oblogout|oblogout]]. The sample script below will provide all of these options, with the exception of the ability to lock the screen:<br />
<br />
<menu id="exit-menu" label="Exit"><br />
<item label="Log Out"><br />
<action name="Execute"><br />
<command>openbox --exit</command><br />
</action><br />
</item><br />
<item label="Shutdown"><br />
<action name="Execute"><br />
<command>systemctl poweroff</command><br />
</action><br />
</item><br />
<item label="Restart"><br />
<action name="Execute"><br />
<command>systemctl reboot</command><br />
</action><br />
</item><br />
<item label="Suspend"><br />
<action name="Execute"><br />
<command>systemctl suspend</command><br />
</action><br />
</item><br />
<item label="Hibernate"><br />
<action name="Execute"><br />
<command>systemctl hibernate</command><br />
</action><br />
</item><br />
</menu><br />
<br />
Once the entries have been composed, add the following line to present the sub-menu where desired within the main desktop menu (usually as the last entry):<br />
<br />
<menu id="exit-menu"/><br />
<br />
=== Pipes ===<br />
<br />
{{Tip|It is entirely feasible for a static menu to contain one or more pipe sub-menus. The functionality of some pipe menus may also rely on the installation of relevant software packages.}}<br />
<br />
This type of menu is in essence a script that provides dynamic, refreshed lists on-the-fly as and when run. These lists may be used for multiple purposes, including to list applications, to provide information, and to provide control functions. Pre-configured pipe menus can be installed, although not from the [[official repositories]]. More experienced users can also modify and/or create their own custom scripts. Again, {{ic|~/.config/openbox/menu.xml}} may and commonly will contain several pipe menus.<br />
<br />
==== Examples ====<br />
<br />
* {{AUR|openbox-xdgmenu}}: fast xdg-menu converter to xml-pipe-menu<br />
* {{AUR|obfilebrowser}}: Application and file browser<br />
* {{AUR|obdevicemenu}}: Management of removable media with [[Udisks]]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1345031 wifi pipe menu]: Wireless networking using [[Netctl]]<br />
<br />
[http://openbox.org/download-pipemenus.php Openbox.org] also provides a further list of pipe menus.<br />
<br />
=== Generators ===<br />
<br />
This type of menu is akin to those provided by the taskbars of desktop environments such as [[Xfce]] or [[LXDE]]. Automatically updating on-the-fly, this type of menu can be powerful and very convenient. It may also be possible to add custom categories and menu entries; read the documentation for your intended dynamic menu to determine if and how this can be done.<br />
<br />
A menu generator will have to be executed from the {{ic|~/.config/openbox/menu.xml}} file.<br />
<br />
==== obmenu-generator ====<br />
<br />
{{Tip|icons can still be disabled in {{AUR|obmenu-generator}}, even where enabled in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|obmenu-generator}} is currently only available from the [[AUR]], although it is still highly recommended. With the ability to be used as a static or dynamic menu, it is highly configurable, powerful, and versatile. Menu categories and individual entries may also be easily hidden, customised, and/or added with ease. The [http://trizenx.blogspot.co.uk/2012/02/obmenu-generator.html official homepage] provides further information and screenshots.<br />
<br />
Below is an example of how obmenu-generator would be dynamically executed without icons in {{ic|~/.config/openbox/menu.xml}}:<br />
<br />
<?xml version="1.0" encoding="utf-8"?><br />
<openbox_menu><br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator"><br />
</menu><br />
</openbox_menu><br />
<br />
To automatically iconify entries, the {{ic|-i}} option would be added:<br />
<br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator -i"><br />
<br />
==== openbox-menu ====<br />
<br />
{{Tip|If this menu produces an error, it may be solved by enabling icons in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|openbox-menu}} uses the [[LXDE]] [http://sourceforge.net/projects/lxde/files/menu-cache/ menu-cache] to create dynamic menus. The [http://mimasgpc.free.fr/openbox-menu_en.html official homepage] provides further information and screenshots.<br />
<br />
==== obmenugen ====<br />
<br />
{{AUR|Obmenugen}} is currently only available from the [[AUR]], and can be used to a generate static or dynamic application menu based on {{ic|.desktop}} files. The [http://obmenugen.sourceforge.net/ official homepage] provides further information.<br />
<br />
=== Menu icons ===<br />
<br />
To show icons next to menu entries, it will be necessary to ensure they are enabled in the {{ic|<menu>}} section of the {{ic|~/.config/openbox/rc.xml}} file:<br />
<br />
<applicationIcons>yes</applicationIcons><br />
<br />
Where using a static menu, it will then be necessary to edit the {{ic|~/.config/openbox/menu.xml}} file to provide both the {{ic|icon <nowiki>=</nowiki>}} command, along with the full path and icon name for each entry. An example of the syntax used to provide an icon for a category is:<br />
<br />
<menu id="apps-menu" label="[label name]" icon="[pathway to icon]/[icon name]"><br />
<br />
=== Desktop menu as a panel menu ===<br />
<br />
{{Tip|XDoTool can simulate any keybind for any action, and as such, it may therefore be used for many other purposes...}}<br />
<br />
{{Pkg|xdotool}} is a package that can issue commands to simulate key presses / keybinds, meaning that it is possible to use it to invoke keybind-related actions without having to actually press their assigned keys. As this includes the ability to invoke an assigned keybind for the Openbox desktop menu, it is therefore possible to use XDoTool to turn the Openbox desktop menu into a panel menu. Especially where the desktop menu is heavily customised and feature-rich, this may prove very useful to:<br />
<br />
* Replace an existing panel menu<br />
* Implement a panel menu where otherwise not provided or possible (e.g. for {{AUR|tint2-git}})<br />
* Compensate where losing access to the desktop menu due to the use of an application like [[#xfdesktop|xfdesktop]] to [[#Desktop icons and wallpapers|manage the desktop]].<br />
<br />
Once XDoTool has been installed - if not already present - it will be necessary to create a keybind to access the root menu in {{ic|~/.config/openbox/rc.xml}}, and again below the {{ic|<nowiki><</nowiki>!-- Keybindings for running aplications --<nowiki>></nowiki>}} heading. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
Openbox must then be [[#Openbox reconfiguration|re-configured]]. In this instance, XDoTool will be used to simulate the {{ic|CTRL}} + {{ic|m}} keypress to access the desktop menu with the following command (note the use of {{ic|+}} in place of {{ic|-}}):<br />
<br />
xdotool key control+m<br />
<br />
How this command may be used as a panel launcher / icon is largely dependent on the features of panel used. While some panels will allow the above command to be executed directly in the process of creating a new launcher, others may require the use of an executable script. As an example, a custom executable script called {{ic|obpanelmenu.sh}} will be created in the {{ic|~/.config}} folder:<br />
<br />
$ ''text editor'' ~/.config/obpanelmenu.sh<br />
<br />
Once the empty file has been opened, the appropriate XDoTool command must be added to the empty file (i.e. to simulate the {{ic|CTRL}} + {{ic|m}} keypress for this example):<br />
<br />
xdotool key control+m<br />
<br />
After the file has been saved and closed, it may then be made into an executable script with the following command:<br />
<br />
$ chmod +x ~/.config/obpanelmenu.sh<br />
<br />
Executing it will bring up the Openbox desktop menu. Consequently, where using a panel that supports drag-and-drop functionality to add new launchers, simply drag the executable script onto it before changing the icon to suit personal taste. For instructions on how to use this executable script with {{AUR|tint2-svn}} - a derivative of the popular {{Pkg|tint2}} panel that allows launchers to be added - see [[Tint2#Application_Launchers_in_tint2-svn_.28AUR.29|Tint2-Svn launchers]].<br />
<br />
== Desktop theming ==<br />
<br />
{{Tip|It is '''strongly advised''' to install the {{Pkg|obconf}} and {{Pkg|lxappearance-obconf}} GUI applications to configure visual settings and theming. The latter is particularly important as it is responsible for generating the {{ic|~/.gtkrc-2.0}} file (see [[GTK+#GTK+ 2.x]]).}}<br />
<br />
It is important to note that a substantial range of both '''Openbox-specific''' and generalised, '''Openbox-compatible''' [[GTK]] themes are available to change the look of window decorations and the desktop menu. ''Generalised'' themes are designed to be simultaneously compatible with a range of popular desktop environments and/or window managers, commonly including Openbox. See these [https://aur.archlinux.org/packages/?O=0&C=0&SeB=n&K=gtk-theme-&outdated=&SB=n&SO=a&PP=50&do_Search=Go package descriptions] for examples. <br />
<br />
=== Configuration ===<br />
<br />
{{Pkg|obconf}} and/or {{Pkg|lxappearance-obconf}} should be used to select and configure available GTK themes. See [[Uniform Look for Qt and GTK Applications]] for information about theming Qt based applications like [[VirtualBox]] or [[Skype]].<br />
<br />
=== Installation: official and AUR ===<br />
<br />
A good selection of {{Pkg|openbox-themes}} are available from the official repositories.<br />
<br />
Both Openbox-specific and Openbox-compatible themes installed from the [[Official_repositories|official repositories]] and/or the [[AUR]] will be automatically installed to the {{ic|/usr/share/themes}} directory. Both will also be immediately available for selection.<br />
<br />
=== Installation: other sources ===<br />
<br />
[http://www.box-look.org/index.php?xcontentmode=7402 box-look.org] is an excellent and well-established source of themes. [http://www.deviantart.com/ deviantART.com] is another excellent resource. Many more can be found through the utilisation of a search engine.<br />
<br />
=== Troubleshooting ===<br />
<br />
There are two particular problems that may be encountered on rare occasions, especially where downloading themes from unsupported websites. These have been addressed below.<br />
<br />
==== Theme cannot be used ====<br />
<br />
If for any reason the newly extracted theme cannot be selected, open the theme directory to first ensure that it is indeed compatible with Openbox by determining that an {{ic|openbox-3}} directory is present, and that within this directory a {{ic|themerc}} file is also present. An {{ic|.obt}} ('''O'''pen'''B'''ox '''T'''heme) file may also be present in some instances, which can then be manually loaded in {{Pkg|obconf}}.<br />
<br />
Where expected files and directories are present and correct, then on occasion it is possible that the theme author has not correctly set permission to access the file (e.g. permission may still be for the account of the author, rather than for '''root'''). To eliminate this possibility, ensure the folder and file permissions are for '''root''':<br />
<br />
# chown -R root /user/share/themes<br />
<br />
==== Theme looks broken ====<br />
<br />
Of course, the first line of enquiry would be to check that it is not just a badly made, broken theme! Otherwise, ensure that the [[Openbox#GTK+ 2|Openbox GTK fix]]{{Dead link|2014|11|28}} has been implemented, and then re-start the session. Unfortunately some older themes can simply break if not maintained sufficiently to keep pace with the changes incurred by [[GTK]] updates. To avoid such occurrences, it is best to check that desired themes have recently been created or at least updated / patched.<br />
<br />
=== Edit or create new themes ===<br />
<br />
{{Tip|Where deciding to modify an existing theme (e.g. the colour scheme), it would be best to work on a copy of it, rather than the original. This will retain the original should anything go wrong, and ensure that your changes are not over-written through an update.}}<br />
<br />
The process of creating new or modifying existing themes is covered extensively at the official [http://openbox.org/wiki/Help:Themes openbox.org] website. A user-friendly GUI to do so - {{AUR|obtheme}} - is also available from the [[AUR]].<br />
<br />
== Compositing effects ==<br />
<br />
Openbox does not provide native support for [[Wikipedia:Compositing window manager|compositing]], and thus requires an external compositor for this purpose.<br />
<br />
Although compositing is not a necessary component, it may specifically avoid issues such as screen distortion with [[#oblogout|oblogout]], and visual glitches with terminal window transparency. See [[Xorg#Composite]] for common choices.<br />
<br />
== Mouse cursor and application icon themes ==<br />
<br />
See [[Cursor themes]] and [[Icons]] for details.<br />
<br />
== Desktop icons and wallpapers ==<br />
<br />
{{Merge||This section is applicable to most [[window manager]]s when used without [[Desktop environment]]}}<br />
<br />
Openbox does not natively support the use of desktop icons or wallpapers. As a consequence, it will be necessary to install additional applications for this purpose, where desired.<br />
<br />
=== Desktop management using file managers ===<br />
<br />
Some file managers have the capacity to fully '''manage the desktop''', meaning that they may be used to provide wallpapers and enable the use of icons on the desktop. The [[LXDE]] desktop environment itself uses PCManFM for this purpose.<br />
<br />
See [[PCManFM#Desktop_management]] and [[SpaceFM#Desktop_management]].<br />
<br />
=== Wallpaper ===<br />
<br />
See [[List_of_applications#Wallpaper_setters]]<br />
<br />
=== Icon programs ===<br />
<br />
While there are programs dedicated to enabling desktop icons alone, it would seem that they have greater drawbacks than the utilisation of file managers for the task. These programs are discussed briefly, below.<br />
<br />
==== idesk ====<br />
<br />
[[idesk]] is a simple program that can enable icons in addition to managing wallpaper. It will be necessary to create an {{ic|~/.idesktop}} directory, and desktop icons must also be manually created. To use idesk to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
idesk &<br />
<br />
==== xfdesktop ====<br />
<br />
{{Pkg|xfdesktop}} is the desktop manager for [[Xfce]]. The [[Thunar]] file manager will also be downloaded as a dependency. Where this is used, the Openbox desktop menu will no longer be accessible by right-clicking the background. <br />
<br />
As such, it will consequently be necessary to access it by other means, such as by [[#Desktop menu|creating a keybind]], and/or by - where permitted - re-configuring an installed panel to use the [[#Desktop menu as a panel menu|desktop menu as a panel menu]]. To use xfdesktop to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
xfdesktop &<br />
<br />
=== conky reconfiguration ===<br />
<br />
Particularly where using a file manager to manage the desktop, it will be necessary to edit {{ic|~/.conkyrc}} to change the {{ic|own_window_type}} command in order for [[conky]] to continue to be displayed (where used). The revised command that should be used is:<br />
<br />
own_window_type normal<br />
<br />
== oblogout ==<br />
<br />
See the [[Oblogout]] article for an overview on how to use this useful, graphical logout script.<br />
<br />
== Openbox for multihead users ==<br />
<br />
While Openbox provides better than average multihead support on its own, the {{AUR|openbox-multihead-git}} package from the [[AUR]] provides a development branch called '''Openbox Multihead''' that gives multihead users per-monitor desktops. This model is not commonly found in floating window managers, but exists mainly in tiling window managers. It is explained well on the [http://xmonad.org/tour.html#workspace Xmonad web site]. Also, please see [https://github.com/BurntSushi/openbox-multihead/blob/multihead/README.MULTIHEAD README.MULTIHEAD] for a more comprehensive description of the new features and configuration options found in Openbox Multihead.<br />
<br />
Openbox Multihead will function like normal Openbox when only a single head is available.<br />
<br />
A downside to using Openbox Multihead is that it breaks the EWMH assumption that one and only one desktop is visible at any time. Thus, existing pagers will not work well with it. To remedy this, {{AUR|pager-multihead-git}} can be found in the [[AUR]] and is compatible with Openbox Multihead. [http://imgur.com/a/cnZeq#y04nk Screenshots].<br />
<br />
Finally, a new version of [[PyTyle]] that will work with Openbox Multihead can also be found in the [[AUR]]: {{AUR|pytyle3-git}}.<br />
<br />
Both ''pytyle3'' and ''pager-multihead-git'' will work without Openbox Multihead if only one monitor is active.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Launch a complex command with hotkey ===<br />
<br />
If you need to execute a complex command, use shell functionality.<br />
This example will turn off display immediately and lock screen with {{Pkg|slock}}<br />
<keybind key="W-l"><br />
<action name="Execute"><br />
<command>sh -c '( slock && xset dpms 0 0 60 ) & xset dpms 0 0 2; xset dpms force off'</command><br />
</action><br />
</keybind><br />
<br />
Sometimes one need to specify environment variable for application<br />
<keybind key="A-F7"><br />
<action name="Execute"><br />
<command>sh -c "LC_ALL=C obconf"</command><br />
</action><br />
</keybind><br />
<br />
=== Switch desktops using the mouse ===<br />
<br />
It is possible to switch desktop by moving the mouse cursor to the edges of the screen. First install {{Pkg|xdotool}} and add the following two lines to your {{ic|~/.xinitrc}}:<br />
<br />
xdotool behave_screen_edge --delay 500 left set_desktop --relative -- -1 &<br />
xdotool behave_screen_edge --delay 500 right set_desktop --relative -- +1 &<br />
<br />
=== Set default applications / file associations ===<br />
<br />
See the [[Default applications]] article.<br />
<br />
=== Stop continous mouse wheel desktop switching ===<br />
<br />
By default Openbox switches from the last desktop back to the first desktop on mouse wheel scroll. Use {{ic|<wrap>no</wrap>}} in the {{ic|mousebind}} section to disable this behaviour.<br />
<br />
<context name="Desktop"><br />
<mousebind button="Up" action="Click"><br />
<action name="GoToDesktop"><br />
<to>previous</to><br />
<wrap>no</wrap><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name="GoToDesktop"><br />
<to>next</to><br />
<wrap>no</wrap><br />
</action><br />
</mousebind><br />
</context><br />
<br />
=== Ad-hoc window transparency ===<br />
<br />
{{Warning|This may not work where other actions are defined within the action group.}}<br />
The program {{Pkg|transset-df}} is available in the official repositories, and can enable window transparency on-the-fly.<br />
<br />
For example, using the following code in the {{ic|<mouse>}} section of the {{ic|~/.config/openbox/rc.xml}} file will enable control of application window transparency by hovering the mouse-pointer over the title bar and scrolling with the middle button:<br />
<br />
<context name="Titlebar"><br />
...<br />
<mousebind button="Up" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --inc </execute><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --dec </execute><br />
</action><br />
</mousebind><br />
...<br />
</context><br />
<br />
=== Using obxprop for faster configuration ===<br />
<br />
The {{Pkg|openbox}} package provides a {{ic|obxprop}} binary that can parse relevant values for applications settings in {{ic|rc.xml}}. Officially {{ic|<nowiki>obxprop | grep "^_OB_APP"</nowiki>}} is recommended for this task. Start the process by running the command shown, then click a window to see its properties in the terminal.<br />
<br />
Doing so for multiple applications and its windows can be very inefficient however. The following script {{ic|obxprop2obrc}} makes it much easier to configure even a large number of applications.<br />
<br />
{{Accuracy|Full of [http://shellcheck.net quoting errors], do '''not''' follow any of the instructions bellow!}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
##Script: obxprop-to-openbox-rc.sh<br />
##Recommended executable name: obxprop2obrc<br />
<br />
while [ $# -ne 0 ]; do<br />
case $1 in<br />
-f*)<br />
shift;<br />
FILE="$1";<br />
shift;<br />
;;<br />
-t*)<br />
shift;<br />
TIME="$1";<br />
shift;<br />
;;<br />
*)<br />
echo Usage: $0 [-f FILE_TEMPLATE] [-t WAIT_TO_KILL_TIME] <br />
exit 1;<br />
;;<br />
esac<br />
done<br />
<br />
if [ $TIME ]; then<br />
OBXPROPS=( $(obxprop | cat & (sleep $TIME && pkill -13 cat) | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
else<br />
OBXPROPS=( $(obxprop | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
fi<br />
OBPROPS=(TYPE TITLE GROUP_CLASS GROUP_NAME CLASS NAME ROLE);<br />
j=0;<br />
for i in $( seq 2 2 14 ); do<br />
OBPROP="$( echo ${OBXPROPS[@]} | awk -F \" '{ print $'$i'}' )";<br />
if [[ -z $OBPROP ]]; then <br />
declare ${OBPROPS[$j]}='"*"';<br />
else <br />
declare ${OBPROPS[$j]}="\"$OBPROP\"";<br />
fi<br />
j=$(($j+1));<br />
done;<br />
<br />
echo " <application type="$TYPE" title="$TITLE" class="$CLASS" name="$NAME" role="$ROLE">"<br />
if [ -f "$FILE" ]; then cat "$FILE" && exit; fi<br />
cat << EOF<br />
<desktop>1</desktop><br />
<desktop>all</desktop><br />
<decor>yes</decor><br />
<decor>no</decor><br />
<focus>yes</focus><br />
<focus>no</focus><br />
<fullscreen>yes</fullscreen><br />
<fullscreen>no</fullscreen><br />
<iconic>yes</iconic><br />
<iconic>no</iconic><br />
<maximized>yes</maximized><br />
<maximized>no</maximized><br />
<maximized>both</maximized><br />
<maximized>horizontal</maximized><br />
<maximized>vertical</maximized><br />
<monitor>0</monitor><br />
<monitor>1</monitor><br />
<position force="no"><br />
<position force="yes"><br />
<width>40%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
<x>center</x><br />
<y>center</y><br />
</position><br />
<layer>above</layer><br />
<layer>normal</layer><br />
<layer>below</layer><br />
<shade>yes</shade><br />
<shade>no</shade><br />
<skip_pager>yes</skip_pager><br />
<skip_pager>no</skip_pager><br />
<skip_taskbar>yes</skip_taskbar><br />
<skip_taskbar>no</skip_taskbar><br />
</application><br />
EOF<br />
</nowiki>}}<br />
<br />
If no further options are used default configuration, that can be edited by deleting unnecessary lines, is printed out. This script can use templates with default values when using {{ic|-f}} switch:<br />
{{hc|<br />
$ obxprop2obrc -f templates-rc-inkscape-dialogs.sc > part-rc-applications-inkscape.xml<br />
$ cat part-rc-applications-inkscape.xml|<nowiki><br />
<application type="normal" title="Align and Distribute (Shift+Ctrl+A)" class="Inkscape" name="inkscape" role="*"><br />
<desktop>3</desktop><br />
<decor>yes</decor><br />
<maximized>no</maximized><br />
<position force="yes"><br />
<width>20%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
</position><br />
<layer>normal</layer><br />
<shade>yes</shade><br />
</application><br />
</nowiki>}}<br />
<br />
It also has a time switch {{ic|-t}} which kills obxprop and thus can reduce time significantly in certain situations, although it may not work perfectly.<br />
<br />
=== Xprop values for applications ===<br />
<br />
{{Pkg|xorg-xprop}} is available in the official repositories, and can be used to relay property values for selected applications. Where frequently using per-application settings, the following [[Bash#Aliases|Bash Alias]] may be useful:<br />
dy:<br />
<br />
alias xp='xprop | grep "WM_WINDOW_ROLE\|WM_CLASS" && echo "WM_CLASS(STRING) = \"NAME\", \"CLASS\""'<br />
<br />
To use Xorg-XProp, run using the alias given {{ic|xp}}, and click on the active program desired to define with per-application settins. The results displayed will only be the information that Openbox itself requires, namely the {{ic|WM_WINDOW_ROLE}} and {{ic|WM_CLASS}} (name and class) values:<br />
<br />
WM_WINDOW_ROLE(STRING) = "roster"<br />
WM_CLASS(STRING) = "gajim.py", "Gajim.py"<br />
WM_CLASS(STRING) = "NAME", "CLASS"<br />
<br />
==== Firefox ====<br />
<br />
For whatever reason, Firefox and like-minded equivalents ignore application rules (e.g. ''<desktop>'') unless {{ic|class&#61;"Firefox*"}} is used. This applies irrespective of whatever values '''xprop''' may report for the program's {{ic|WM_CLASS}}.<br />
<br />
=== Switching between keyboard layouts ===<br />
<br />
See the article section [[Keyboard configuration in Xorg#Switching between keyboard layouts|switching between keyboard layouts]] for instructions.<br />
<br />
=== Set grid layout for virtual desktops ===<br />
<br />
Install {{AUR|obsetlayout}}. To set a 2x2 grid for example:<br />
<br />
obsetlayout 0 2 2 0<br />
<br />
Run it without arguments to know what the arguments mean.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Windows load behind the active window ===<br />
<br />
Some application windows (such as Firefox windows) may load behind the currently active window, causing you to need to switch to the window you just created to focus it. To fix this behavior add this to your {{ic|~/.config/openbox/rc.xml}} file, inbetween the {{ic|1=<openbox_config>}} and {{ic|1=</openbox_config>}} tags:<br />
<br />
{{bc|1=<br />
<applications><br />
<application class="*"><br />
<focus>yes</focus><br />
</application><br />
</applications><br />
}}<br />
<br />
== See also ==<br />
<br />
* [http://openbox.org/ Openbox Website] - Official website<br />
* [http://planetob.openmonkey.com/ Planet Openbox] - Openbox news portal<br />
* [http://www.box-look.org/ Box-Look.org] - A good resource for themes and related artwork<br />
* [https://bbs.archlinux.org/viewtopic.php?id=93126 Openbox Hacks and Configs Thread] @ Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=45692 Openbox Screenshots Thread] @ Arch Linux Forums<br />
* [http://urukrama.wordpress.com/openbox-guide/ An Openbox guide]</div>
Vas
https://wiki.archlinux.org/index.php?title=Openbox&diff=387244
Openbox
2015-07-23T20:18:05Z
<p>Vas: /* Launch a shell command with hotkey */ improved description</p>
<hr />
<div>[[Category:Stacking WMs]]<br />
[[cs:Openbox]]<br />
[[de:Openbox]]<br />
[[el:Openbox]]<br />
[[es:Openbox]]<br />
[[fr:Openbox]]<br />
[[it:Openbox]]<br />
[[ja:Openbox]]<br />
[[ko:Openbox]]<br />
[[lt:Openbox]]<br />
[[nl:Openbox]]<br />
[[pl:Openbox]]<br />
[[ru:Openbox]]<br />
[[sk:Openbox]]<br />
[[sr:Openbox]]<br />
[[tr:Openbox]]<br />
[[zh-CN:Openbox]]<br />
[[zh-TW:Openbox]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|File manager functionality}}<br />
{{Related|Window manager}}<br />
{{Related|Oblogout}}<br />
{{Related articles end}}<br />
<br />
Openbox is a lightweight, powerful, and highly configurable ''stacking'' [[window manager]] with extensive standards support. It may be built upon and run independently as the basis of a unique [[desktop environment]], or within other integrated desktop environments such as [[KDE]] and [[Xfce]], as an alternative to the window managers they provide. The [[LXDE]] desktop environment is itself built around Openbox.<br />
<br />
A comprehensive list of features are documented at the [http://openbox.org/ official Openbox website]. This article pertains to specifically installing Openbox under Arch Linux.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|openbox}} package.<br />
<br />
=== Standalone ===<br />
<br />
[[Display manager|display managers]] will automatically detect Openbox, allowing for it to be run as a standalone session.<br />
<br />
When using [[Xinitrc]] or [[SLiM]], add the following line:<br />
<br />
exec openbox-session<br />
<br />
{{Note|Specifying {{ic|openbox}} instead of {{ic|openbox-session}} will prevent [[#autostart|autostart]] in {{ic|/etc/xdg/autostart}}.}}<br />
<br />
=== Other desktop environments ===<br />
<br />
When replacing the native window manager of a [[desktop environment]] with Openbox, keep in mind that Openbox does not provide any compositing effects (such as transparency). See [[#Compositing effects]].<br />
<br />
==== GNOME ====<br />
<br />
GNOME Shell is a plugin for the {{Pkg|mutter}} window manager, so can not be used with Openbox. Openbox does work with GNOME applications (but see [[GTK+#Client-side decorations]]). [http://comments.gmane.org/gmane.comp.window-managers.openbox/6595]<br />
<br />
==== KDE ====<br />
<br />
See [[KDE#KDE/Openbox Session]].<br />
<br />
==== Xfce ====<br />
<br />
See [[Xfce#Default window manager]].<br />
<br />
==== MATE ====<br />
<br />
See [[MATE#Use a different window manager with MATE]]<br />
<br />
== Configuration==<br />
<br />
{{Note|Local configuration files will always override global equivalents.}}<br />
<br />
Four key files form the basis of the openbox configuration, each serving a unique role. They are: {{ic|rc.xml}}, {{ic|menu.xml}}, {{ic|autostart}}, and {{ic|environment}}. Although these files are discussed in more detail below, to start configuring Openbox, it will first be necessary to create a '''local''' Openbox profile (i.e for your specific user account) based on them. This can be done by copying them from the '''global''' {{ic|/etc/xdg/openbox}} profile (applicable to any and all users) as a template:<br />
<br />
$ cp -R /etc/xdg/openbox ~/.config/openbox<br />
<br />
=== rc.xml ===<br />
<br />
{{Tip|Custom keyboard shortcuts (keybindings) must be added to the {{ic|<keyboard>}} section of this file, and underneath the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading.}}<br />
<br />
{{ic|~/.config/openbox/rc.xml}} is the main configuration file, responsible for determining the behaviour and settings of the overall session, including:<br />
<br />
* Keyboard shortcuts (e.g. starting applications; controlling the volume)<br />
* Theming<br />
* Desktop and Virtual desktop settings, and<br />
* Application Window settings<br />
<br />
This file is also pre-configured, meaning that it will only be necessary to amend existing content in order to customise behaviour to suit personal preference.<br />
<br />
=== menu.xml ===<br />
<br />
{{ic|~/.config/openbox/menu.xml}} defines the type and behaviour of the desktop menu, accessable by right-clicking the background. Although the default provided is a '''static menu''' (meaning that it will not automatically update when new applications are installed), it is possible to employ the use of '''dynamic menus''' that will automatically update as well. <br />
<br />
The available options are discussed extensively below in the [[#Menus|Menus]] section.<br />
<br />
=== autostart ===<br />
<br />
The file {{ic|~/.config/openbox/autostart}}, if present, is executed by Openbox at startup. A basic example of this file consists of one command per line, like so:<br />
<br />
xset -b<br />
nm-applet &<br />
conky &<br />
<br />
Note that a single ampersand ({{ic|&}}) causes the process in question to be run in the background, allowing the script to continue on to the next command. An ampersand is therefore needed after each command that launches a process of indefinite duration. Commands that are completed essentially instantly (e.g. {{ic|xset -b}}) may be left alone.<br />
<br />
Issues regarding commands in {{ic|~/.config/openbox/autostart}} being executed out of order (or skipped altogether) are often resolved by the addition of small delays. For instance:<br />
<br />
xset -b<br />
(sleep 3s && nm-applet) &<br />
(sleep 3s && conky) &<br />
<br />
{{Note|In addition to running {{ic|~/.config/openbox/autostart}}, Openbox will also launch programs with {{ic|.desktop}} files present in {{ic|/etc/xdg/autostart}}. This is the global [[autostart]] directory, which is automatically sourced by XDG-compliant desktop environments (e.g. GNOME, KDE). Openbox will source this directory as well, provided that the package {{Pkg|python2-xdg}} is installed, and Openbox is launched as {{ic|openbox-session}} (rather than simply {{ic|openbox}}, as [[#Standalone|noted earlier]]). Duplication between {{ic|~/.config/openbox/autostart}} and {{ic|/etc/xdg/autostart}} is a common cause of programs launching twice at startup (e.g. two network manager tray icons).}}<br />
=== environment ===<br />
<br />
{{ic|~/.config/openbox/environment}} can be used to export and set relevant environmental variables such as to:<br />
<br />
* Define new pathways (e.g. execute commands that would otherwise require the entire pathway to be listed with them)<br />
* Change language settings, and<br />
* Define other variables to be used (e.g. the fix for GTK theming could be listed here)<br />
<br />
=== GUI configuration ===<br />
<br />
Several GUI applications are available to quickly and easily configure your Openbox desktop. From the [[official repositories]]:<br />
<br />
* {{App|ObConf|A GTK2 based configuration tool for the Openbox window manager.|http://openbox.org/wiki/ObConf:About|{{Pkg|obconf}}}}<br />
* {{App|LXAppearance ObConf|Plugin for LXAppearance to configure Openbox.|http://lxde.org|{{Pkg|lxappearance-obconf}}}}<br />
* {{App|LXInput|LXDE keyboard and mouse configuration|http://lxde.org|{{Pkg|lxinput}}}}<br />
* {{App|LXRandR|LXDE monitor configuration.|http://wiki.lxde.org/en/LXRandR|{{Pkg|lxrandr}}}}<br />
<br />
From the [[AUR]]:<br />
* {{App|obkey|Configure Openbox keyboard shortcuts|https://code.google.com/p/obkey/|{{AUR|obkey}}}} <br />
* {{App|ob-autostart|A simple autostart application for Openbox.|http://pastebin.com/012YgXTk|{{AUR|ob-autostart}}}} <br />
<br />
Programs and applications relating to the configuration of Openbox's desktop menu are discussed in the [[#Menus|Menus]] section.<br />
<br />
== Openbox reconfiguration ==<br />
<br />
{{Tip|where not already present, it would be worthwhile adding this command to a menu and/or as a keybind for convenience.}}<br />
<br />
Openbox will not always automatically reflect any changes made to its configuration files within a session. As a consequence, it will be necessary to manually reload those files after they have been edited. To do so, enter the following command:<br />
<br />
$ openbox --reconfigure<br />
<br />
Where intending to add this command as a keybind to {{ic|~/.config/openbox/rc.xml}}, it will only be necessary to list the command as {{ic|reconfigure}}. An example has been provided below, using the {{ic|Super}}+{{ic|F11}} keybind:<br />
<br />
<keybind key="W-F11"><br />
<action name="Reconfigure"/><br />
</keybind><br />
<br />
== Keybinds ==<br />
<br />
All keybinds must be added to the {{ic|~/.config/openbox/rc.xml}} file, and below the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading. Although a brief overview has been provided here, a more in-depth explanation of keybindings can be found at [http://openbox.org/wiki/Help:Bindings openbox.org]. There is a utility 'obkey' in AUR for adjust key-binding. Before use obkey, you should use obconf to create {{ic|~/.config/openbox/rc.xml}}.<br />
<br />
=== Special keys ===<br />
<br />
While the use of standard alpha-numeric keys for keybindings is self-explanatory, special names are assigned to other types of keys, such as {{ic|modifers}}, {{ic|multimedia}} keys and {{ic|navigation}} keys.<br />
<br />
==== Modifiers ====<br />
<br />
{{ic|Modifer}} keys play an important role in keybindings (e.g. holding down the {{ic|shift}} or {{ic|CTRL / control}} key in combination with another key to undertake an action). Using modifers helps to prevent conflicting keybinds, whereby two or more actions are linked to the same key or combination of keys. The syntax to use a modifer with another key is:<br />
<br />
"<modifier>-<key>"<br />
<br />
The modifer codes are as follows:<br />
<br />
* {{ic|S}}: Shift<br />
* {{ic|C}}: Control / CTRL<br />
* {{ic|A}}: Alt<br />
* {{ic|W}}: Super / Windows<br />
* {{ic|M}}: Meta<br />
* {{ic|H}}: Hyper (If it is bound to something) <br />
<br />
For example, the code below would use {{ic|super}} and {{ic|t}} to launch {{Pkg|lxterminal}}<br />
<br />
<keybind key="W-t"><br />
<action name="Execute"><br />
<command>lxterminal</command><br />
</action><br />
</keybind><br />
<br />
==== Multimedia keys ====<br />
<br />
{{Merge|Extra keyboard keys in Xorg}}<br />
<br />
Where available, it is possible to set the appropriate {{ic|multimedia}} keys to perform their intended functions, such as to control the volume and/or the screen brightness. These will usually be integrated into the {{ic|function}} keys, and are identified by their appropriate symbols. See [[Extra keyboard keys]] for details.<br />
<br />
The volume and brightness multimedia codes are as follows (note that commands will still have to be assigned to them to actually function):<br />
<br />
* {{ic|XF86AudioRaiseVolume}}: Increase volume<br />
* {{ic|XF86AudioLowerVolume}}: Decrease volume<br />
* {{ic|XF86AudioMute}}: Mute / unmute volume<br />
* {{ic|XF86MonBrightnessUp}}: Increase screen brightess<br />
* {{ic|XF86MonBrightnessDown}}: Decrease screen brightness<br />
<br />
Examples of how these may be used in {{ic|~/.config/openbox/rc.xml}} have been provided below.<br />
<br />
==== Navigation keys ====<br />
<br />
These are the directional / arrow keys, usually used to move the cursor up, down, left, or right. The (self-explanatory) navigation codes are as follows:<br />
<br />
* {{ic|Up}}: Up<br />
* {{ic|Down}}: Down<br />
* {{ic|Left}}: Left<br />
* {{ic|Right}}: Right<br />
<br />
=== Volume Control ===<br />
<br />
What commands should be used for controlling the volume will depend on whether [[ALSA]], [[PulseAudio]], or [[OSS]] is used for sound.<br />
<br />
==== ALSA ====<br />
<br />
If [[ALSA]] is used for sound, the {{ic|amixer}} program can be used to adjust the volume, which is part of the {{Pkg|alsa-utils}} package. The following example - using the {{ic|multimedia}} keys intended to control the volume - will adjust the volume by +/- 5% (which may be changed, as desired):<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== Pulseaudio ====<br />
<br />
Where using [[PulseAudio]] with [[ALSA]] as a backend, the {{ic|amixer}} program commands will have to be modifed, as illustrated below in comparison to the ALSA example:<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== OSS ====<br />
<br />
{{Note|This option may be suitable for more experienced users.}}<br />
<br />
Where using [[OSS]], it is possible to create keybindings to raise or lower specific mixers. This allows, for example, the volume of a specific application (such as an audio player) to be changed without changing the overall system volume settings in turn. In this instance, the application must first have been [[OSS#Configuring_Applications_for_OSS|configured]] to use its own mixer. <br />
<br />
In the following example, [[MPD]] has been configured to use its own mixer - also named {{ic|mpd}} - to increase and decrease the volume by a single decibel at a time. The {{ic|--}} that appears after the {{ic|ossmix}} command has been added to prevent a negative value from being treated as an argument: <br />
<br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd +1</command><br />
</action><br />
</keybind><br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd -1</command><br />
</action><br />
</keybind><br />
<br />
=== Media player control ===<br />
<br />
The {{AUR|playerctl}} command-line utility can be used to bind multimedia keys to player actions. It should work with most media players.<br />
<br />
<keybind key="XF86AudioPlay"><br />
<action name="Execute"><br />
<command>playerctl play</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPause"><br />
<action name="Execute"><br />
<command>playerctl pause</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioNext"><br />
<action name="Execute"><br />
<command>playerctl next</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPrev"><br />
<action name="Execute"><br />
<command>playerctl previous</command><br />
</action><br />
</keybind><br />
<br />
=== Brightness control ===<br />
<br />
The {{ic|xbacklight}} program is used to control screen brightness, which is part of the [[Xorg]] X-Window system. In the example below, the {{ic|multimedia}} keys intended to control the screen brightness will adjust the settings by +/- 10%:<br />
<br />
<keybind key="XF86MonBrightnessUp"><br />
<action name="Execute"><br />
<command>xbacklight +10</command><br />
</action><br />
</keybind><br />
<keybind key="XF86MonBrightnessDown"><br />
<action name="Execute"><br />
<command>xbacklight -10</command><br />
</action><br />
</keybind><br />
<br />
=== Window snapping ===<br />
<br />
Many desktop environments and window managers support ''window snapping'' (e.g. Windows 7 Aero snap), whereby they will automatically snap into place when moved to the edge of the screen. This effect can also be simulated in Openbox through the use of keybinds on focused windows. <br />
<br />
As illustrated in the example below, percentages must be used to determine window sizes (see [http://openbox.org/wiki/Help:Actions openbox.org] for further information). In this instance, The {{ic|super}} key is used in conjunction with the {{ic|navigation}} keys:<br />
<br />
<keybind key="W-Left"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>west</direction></action><br />
</keybind><br />
<keybind key="W-Right"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>east</direction></action><br />
</keybind><br />
<br />
However, it should be noted that once a window has been 'snapped' to an edge, it will remain vertically maximised unless subsequently maximised and then restored. The solution is to implement additional keybinds - in this instance using the {{ic|down}} and {{ic|up}} keys - to do so. This will also make pulling 'snapped' windows from screen edges faster as well:<br />
<br />
<keybind key="W-Down"><br />
<action name="Unmaximize"/><br />
</keybind><br />
<keybind key="W-Up"><br />
<action name="Maximize"/><br />
</keybind><br />
<br />
This [http://ubuntuforums.org/showthread.php?t=1796793 Ubuntu forum thread] provides more information. Applications such as {{AUR|opensnap-git}} are also available from the AUR to automatically simulate window snapping behaviour without the use of keybinds.<br />
<br />
=== Desktop menu ===<br />
<br />
It is also possible to create a keybind to access the desktop menu. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
== Menus ==<br />
<br />
It is possible to employ three types of menu in Openbox: {{ic|static}}, {{ic|pipes}} (dynamic), and {{ic|generators}} (static or dynamic). They may also be used alone or in any combination.<br />
<br />
=== Static ===<br />
<br />
As the name would suggest, this default type of menu does not change in any way, and may be manually edited and/or (re)generated automatically through the use on an appropriate software package.<br />
<br />
Fast and efficient, while this type of menu can be used to select applications, it can also be useful to access specific functions and/or perform specific tasks (e.g. desktop configuration), leaving the access of applications to another process (e.g. the {{Pkg|synapse}} or {{Pkg|xfce4-appfinder}} applications).<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file will be the sole source of static desktop menu content.<br />
<br />
==== menumaker ====<br />
<br />
{{Warning|A root terminal '''must''' be installed in order to use MenuMaker, even though a standard user terminal may be used to run it. {{Pkg|xterm}} is a good choice.}}<br />
<br />
{{Pkg|menumaker}} automatically generates {{ic|xml}} menus for several window managers, including Openbox, [[Fluxbox]], [[IceWM]] and [[Xfce]]. It will search for all installed executable programs and consequently create a menu file for them. It is also possible to configure MenuMaker to exclude certain application types (e.g. relating to [[GNOME]] or [[KDE]]), if desired.<br />
<br />
Once installed and executed, it will automatically generate a new {{ic|~/.config/openbox/menu.xml}} file. To avoid overwriting an existing file, enter:<br />
<br />
$ mmaker -v OpenBox3<br />
<br />
Otherwise, to overwrite an existing file, add the {{ic|force}} argument ({{ic|f}}):<br />
<br />
$ mmaker -vf OpenBox3<br />
<br />
Once a new {{ic|~/.config/openbox/menu.xml}} file has been generated it may then be manually edited, or configured using a GUI menu editor, such as {{Pkg|obmenu}}.<br />
<br />
==== obmenu ====<br />
<br />
{{Warning|{{ic|obm-xdg}} - a pipe menu to generate a list of [[GTK+]] and [[GNOME]] applications - is also provided with obmenu. However, it has long-running bugs whereby it may produce an invalid output, or even not function at all. Consequently it has been omitted from discussion.}}<br />
<br />
{{Pkg|obmenu}} is a "user-friendly" GUI application to edit {{ic|~/.config/openbox/menu.xml}}, without the need to code in {{ic|xml}}.<br />
<br />
==== xdg-menu ====<br />
<br />
{{Pkg|archlinux-xdg-menu}} will automatically generate a menu based on {{ic|xdg}} files contained within the {{ic|/etc/xdg/}} directory for numerous Window Managers, including Openbox. Review the [[Xdg-menu#OpenBox]] article for further information.<br />
<br />
==== logout menu options ====<br />
<br />
{{Tip|The commands provided can also be attached to [[#Keybinds|keybinds]].}}<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file can be edited in order to provide a sub-menu with the same options as provided by [[#oblogout|oblogout]]. The sample script below will provide all of these options, with the exception of the ability to lock the screen:<br />
<br />
<menu id="exit-menu" label="Exit"><br />
<item label="Log Out"><br />
<action name="Execute"><br />
<command>openbox --exit</command><br />
</action><br />
</item><br />
<item label="Shutdown"><br />
<action name="Execute"><br />
<command>systemctl poweroff</command><br />
</action><br />
</item><br />
<item label="Restart"><br />
<action name="Execute"><br />
<command>systemctl reboot</command><br />
</action><br />
</item><br />
<item label="Suspend"><br />
<action name="Execute"><br />
<command>systemctl suspend</command><br />
</action><br />
</item><br />
<item label="Hibernate"><br />
<action name="Execute"><br />
<command>systemctl hibernate</command><br />
</action><br />
</item><br />
</menu><br />
<br />
Once the entries have been composed, add the following line to present the sub-menu where desired within the main desktop menu (usually as the last entry):<br />
<br />
<menu id="exit-menu"/><br />
<br />
=== Pipes ===<br />
<br />
{{Tip|It is entirely feasible for a static menu to contain one or more pipe sub-menus. The functionality of some pipe menus may also rely on the installation of relevant software packages.}}<br />
<br />
This type of menu is in essence a script that provides dynamic, refreshed lists on-the-fly as and when run. These lists may be used for multiple purposes, including to list applications, to provide information, and to provide control functions. Pre-configured pipe menus can be installed, although not from the [[official repositories]]. More experienced users can also modify and/or create their own custom scripts. Again, {{ic|~/.config/openbox/menu.xml}} may and commonly will contain several pipe menus.<br />
<br />
==== Examples ====<br />
<br />
* {{AUR|openbox-xdgmenu}}: fast xdg-menu converter to xml-pipe-menu<br />
* {{AUR|obfilebrowser}}: Application and file browser<br />
* {{AUR|obdevicemenu}}: Management of removable media with [[Udisks]]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1345031 wifi pipe menu]: Wireless networking using [[Netctl]]<br />
<br />
[http://openbox.org/download-pipemenus.php Openbox.org] also provides a further list of pipe menus.<br />
<br />
=== Generators ===<br />
<br />
This type of menu is akin to those provided by the taskbars of desktop environments such as [[Xfce]] or [[LXDE]]. Automatically updating on-the-fly, this type of menu can be powerful and very convenient. It may also be possible to add custom categories and menu entries; read the documentation for your intended dynamic menu to determine if and how this can be done.<br />
<br />
A menu generator will have to be executed from the {{ic|~/.config/openbox/menu.xml}} file.<br />
<br />
==== obmenu-generator ====<br />
<br />
{{Tip|icons can still be disabled in {{AUR|obmenu-generator}}, even where enabled in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|obmenu-generator}} is currently only available from the [[AUR]], although it is still highly recommended. With the ability to be used as a static or dynamic menu, it is highly configurable, powerful, and versatile. Menu categories and individual entries may also be easily hidden, customised, and/or added with ease. The [http://trizenx.blogspot.co.uk/2012/02/obmenu-generator.html official homepage] provides further information and screenshots.<br />
<br />
Below is an example of how obmenu-generator would be dynamically executed without icons in {{ic|~/.config/openbox/menu.xml}}:<br />
<br />
<?xml version="1.0" encoding="utf-8"?><br />
<openbox_menu><br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator"><br />
</menu><br />
</openbox_menu><br />
<br />
To automatically iconify entries, the {{ic|-i}} option would be added:<br />
<br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator -i"><br />
<br />
==== openbox-menu ====<br />
<br />
{{Tip|If this menu produces an error, it may be solved by enabling icons in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|openbox-menu}} uses the [[LXDE]] [http://sourceforge.net/projects/lxde/files/menu-cache/ menu-cache] to create dynamic menus. The [http://mimasgpc.free.fr/openbox-menu_en.html official homepage] provides further information and screenshots.<br />
<br />
==== obmenugen ====<br />
<br />
{{AUR|Obmenugen}} is currently only available from the [[AUR]], and can be used to a generate static or dynamic application menu based on {{ic|.desktop}} files. The [http://obmenugen.sourceforge.net/ official homepage] provides further information.<br />
<br />
=== Menu icons ===<br />
<br />
To show icons next to menu entries, it will be necessary to ensure they are enabled in the {{ic|<menu>}} section of the {{ic|~/.config/openbox/rc.xml}} file:<br />
<br />
<applicationIcons>yes</applicationIcons><br />
<br />
Where using a static menu, it will then be necessary to edit the {{ic|~/.config/openbox/menu.xml}} file to provide both the {{ic|icon <nowiki>=</nowiki>}} command, along with the full path and icon name for each entry. An example of the syntax used to provide an icon for a category is:<br />
<br />
<menu id="apps-menu" label="[label name]" icon="[pathway to icon]/[icon name]"><br />
<br />
=== Desktop menu as a panel menu ===<br />
<br />
{{Tip|XDoTool can simulate any keybind for any action, and as such, it may therefore be used for many other purposes...}}<br />
<br />
{{Pkg|xdotool}} is a package that can issue commands to simulate key presses / keybinds, meaning that it is possible to use it to invoke keybind-related actions without having to actually press their assigned keys. As this includes the ability to invoke an assigned keybind for the Openbox desktop menu, it is therefore possible to use XDoTool to turn the Openbox desktop menu into a panel menu. Especially where the desktop menu is heavily customised and feature-rich, this may prove very useful to:<br />
<br />
* Replace an existing panel menu<br />
* Implement a panel menu where otherwise not provided or possible (e.g. for {{AUR|tint2-git}})<br />
* Compensate where losing access to the desktop menu due to the use of an application like [[#xfdesktop|xfdesktop]] to [[#Desktop icons and wallpapers|manage the desktop]].<br />
<br />
Once XDoTool has been installed - if not already present - it will be necessary to create a keybind to access the root menu in {{ic|~/.config/openbox/rc.xml}}, and again below the {{ic|<nowiki><</nowiki>!-- Keybindings for running aplications --<nowiki>></nowiki>}} heading. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
Openbox must then be [[#Openbox reconfiguration|re-configured]]. In this instance, XDoTool will be used to simulate the {{ic|CTRL}} + {{ic|m}} keypress to access the desktop menu with the following command (note the use of {{ic|+}} in place of {{ic|-}}):<br />
<br />
xdotool key control+m<br />
<br />
How this command may be used as a panel launcher / icon is largely dependent on the features of panel used. While some panels will allow the above command to be executed directly in the process of creating a new launcher, others may require the use of an executable script. As an example, a custom executable script called {{ic|obpanelmenu.sh}} will be created in the {{ic|~/.config}} folder:<br />
<br />
$ ''text editor'' ~/.config/obpanelmenu.sh<br />
<br />
Once the empty file has been opened, the appropriate XDoTool command must be added to the empty file (i.e. to simulate the {{ic|CTRL}} + {{ic|m}} keypress for this example):<br />
<br />
xdotool key control+m<br />
<br />
After the file has been saved and closed, it may then be made into an executable script with the following command:<br />
<br />
$ chmod +x ~/.config/obpanelmenu.sh<br />
<br />
Executing it will bring up the Openbox desktop menu. Consequently, where using a panel that supports drag-and-drop functionality to add new launchers, simply drag the executable script onto it before changing the icon to suit personal taste. For instructions on how to use this executable script with {{AUR|tint2-svn}} - a derivative of the popular {{Pkg|tint2}} panel that allows launchers to be added - see [[Tint2#Application_Launchers_in_tint2-svn_.28AUR.29|Tint2-Svn launchers]].<br />
<br />
== Desktop theming ==<br />
<br />
{{Tip|It is '''strongly advised''' to install the {{Pkg|obconf}} and {{Pkg|lxappearance-obconf}} GUI applications to configure visual settings and theming. The latter is particularly important as it is responsible for generating the {{ic|~/.gtkrc-2.0}} file (see [[GTK+#GTK+ 2.x]]).}}<br />
<br />
It is important to note that a substantial range of both '''Openbox-specific''' and generalised, '''Openbox-compatible''' [[GTK]] themes are available to change the look of window decorations and the desktop menu. ''Generalised'' themes are designed to be simultaneously compatible with a range of popular desktop environments and/or window managers, commonly including Openbox. See these [https://aur.archlinux.org/packages/?O=0&C=0&SeB=n&K=gtk-theme-&outdated=&SB=n&SO=a&PP=50&do_Search=Go package descriptions] for examples. <br />
<br />
=== Configuration ===<br />
<br />
{{Pkg|obconf}} and/or {{Pkg|lxappearance-obconf}} should be used to select and configure available GTK themes. See [[Uniform Look for Qt and GTK Applications]] for information about theming Qt based applications like [[VirtualBox]] or [[Skype]].<br />
<br />
=== Installation: official and AUR ===<br />
<br />
A good selection of {{Pkg|openbox-themes}} are available from the official repositories.<br />
<br />
Both Openbox-specific and Openbox-compatible themes installed from the [[Official_repositories|official repositories]] and/or the [[AUR]] will be automatically installed to the {{ic|/usr/share/themes}} directory. Both will also be immediately available for selection.<br />
<br />
=== Installation: other sources ===<br />
<br />
[http://www.box-look.org/index.php?xcontentmode=7402 box-look.org] is an excellent and well-established source of themes. [http://www.deviantart.com/ deviantART.com] is another excellent resource. Many more can be found through the utilisation of a search engine.<br />
<br />
=== Troubleshooting ===<br />
<br />
There are two particular problems that may be encountered on rare occasions, especially where downloading themes from unsupported websites. These have been addressed below.<br />
<br />
==== Theme cannot be used ====<br />
<br />
If for any reason the newly extracted theme cannot be selected, open the theme directory to first ensure that it is indeed compatible with Openbox by determining that an {{ic|openbox-3}} directory is present, and that within this directory a {{ic|themerc}} file is also present. An {{ic|.obt}} ('''O'''pen'''B'''ox '''T'''heme) file may also be present in some instances, which can then be manually loaded in {{Pkg|obconf}}.<br />
<br />
Where expected files and directories are present and correct, then on occasion it is possible that the theme author has not correctly set permission to access the file (e.g. permission may still be for the account of the author, rather than for '''root'''). To eliminate this possibility, ensure the folder and file permissions are for '''root''':<br />
<br />
# chown -R root /user/share/themes<br />
<br />
==== Theme looks broken ====<br />
<br />
Of course, the first line of enquiry would be to check that it is not just a badly made, broken theme! Otherwise, ensure that the [[Openbox#GTK+ 2|Openbox GTK fix]]{{Dead link|2014|11|28}} has been implemented, and then re-start the session. Unfortunately some older themes can simply break if not maintained sufficiently to keep pace with the changes incurred by [[GTK]] updates. To avoid such occurrences, it is best to check that desired themes have recently been created or at least updated / patched.<br />
<br />
=== Edit or create new themes ===<br />
<br />
{{Tip|Where deciding to modify an existing theme (e.g. the colour scheme), it would be best to work on a copy of it, rather than the original. This will retain the original should anything go wrong, and ensure that your changes are not over-written through an update.}}<br />
<br />
The process of creating new or modifying existing themes is covered extensively at the official [http://openbox.org/wiki/Help:Themes openbox.org] website. A user-friendly GUI to do so - {{AUR|obtheme}} - is also available from the [[AUR]].<br />
<br />
== Compositing effects ==<br />
<br />
Openbox does not provide native support for [[Wikipedia:Compositing window manager|compositing]], and thus requires an external compositor for this purpose.<br />
<br />
Although compositing is not a necessary component, it may specifically avoid issues such as screen distortion with [[#oblogout|oblogout]], and visual glitches with terminal window transparency. See [[Xorg#Composite]] for common choices.<br />
<br />
== Mouse cursor and application icon themes ==<br />
<br />
See [[Cursor themes]] and [[Icons]] for details.<br />
<br />
== Desktop icons and wallpapers ==<br />
<br />
{{Merge||This section is applicable to most [[window manager]]s when used without [[Desktop environment]]}}<br />
<br />
Openbox does not natively support the use of desktop icons or wallpapers. As a consequence, it will be necessary to install additional applications for this purpose, where desired.<br />
<br />
=== Desktop management using file managers ===<br />
<br />
Some file managers have the capacity to fully '''manage the desktop''', meaning that they may be used to provide wallpapers and enable the use of icons on the desktop. The [[LXDE]] desktop environment itself uses PCManFM for this purpose.<br />
<br />
See [[PCManFM#Desktop_management]] and [[SpaceFM#Desktop_management]].<br />
<br />
=== Wallpaper ===<br />
<br />
See [[List_of_applications#Wallpaper_setters]]<br />
<br />
=== Icon programs ===<br />
<br />
While there are programs dedicated to enabling desktop icons alone, it would seem that they have greater drawbacks than the utilisation of file managers for the task. These programs are discussed briefly, below.<br />
<br />
==== idesk ====<br />
<br />
[[idesk]] is a simple program that can enable icons in addition to managing wallpaper. It will be necessary to create an {{ic|~/.idesktop}} directory, and desktop icons must also be manually created. To use idesk to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
idesk &<br />
<br />
==== xfdesktop ====<br />
<br />
{{Pkg|xfdesktop}} is the desktop manager for [[Xfce]]. The [[Thunar]] file manager will also be downloaded as a dependency. Where this is used, the Openbox desktop menu will no longer be accessible by right-clicking the background. <br />
<br />
As such, it will consequently be necessary to access it by other means, such as by [[#Desktop menu|creating a keybind]], and/or by - where permitted - re-configuring an installed panel to use the [[#Desktop menu as a panel menu|desktop menu as a panel menu]]. To use xfdesktop to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
xfdesktop &<br />
<br />
=== conky reconfiguration ===<br />
<br />
Particularly where using a file manager to manage the desktop, it will be necessary to edit {{ic|~/.conkyrc}} to change the {{ic|own_window_type}} command in order for [[conky]] to continue to be displayed (where used). The revised command that should be used is:<br />
<br />
own_window_type normal<br />
<br />
== oblogout ==<br />
<br />
See the [[Oblogout]] article for an overview on how to use this useful, graphical logout script.<br />
<br />
== Openbox for multihead users ==<br />
<br />
While Openbox provides better than average multihead support on its own, the {{AUR|openbox-multihead-git}} package from the [[AUR]] provides a development branch called '''Openbox Multihead''' that gives multihead users per-monitor desktops. This model is not commonly found in floating window managers, but exists mainly in tiling window managers. It is explained well on the [http://xmonad.org/tour.html#workspace Xmonad web site]. Also, please see [https://github.com/BurntSushi/openbox-multihead/blob/multihead/README.MULTIHEAD README.MULTIHEAD] for a more comprehensive description of the new features and configuration options found in Openbox Multihead.<br />
<br />
Openbox Multihead will function like normal Openbox when only a single head is available.<br />
<br />
A downside to using Openbox Multihead is that it breaks the EWMH assumption that one and only one desktop is visible at any time. Thus, existing pagers will not work well with it. To remedy this, {{AUR|pager-multihead-git}} can be found in the [[AUR]] and is compatible with Openbox Multihead. [http://imgur.com/a/cnZeq#y04nk Screenshots].<br />
<br />
Finally, a new version of [[PyTyle]] that will work with Openbox Multihead can also be found in the [[AUR]]: {{AUR|pytyle3-git}}.<br />
<br />
Both ''pytyle3'' and ''pager-multihead-git'' will work without Openbox Multihead if only one monitor is active.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Launch a shell command with hotkey ===<br />
<br />
If you need to execute a complex command, or specify environment variable for application, use shell functionality. Here is just an example:<br />
<br />
<keybind key="A-F7"><br />
<action name="Execute"><br />
<command>sh -c "LC_ALL=C obconf"</command><br />
</action><br />
</keybind><br />
<br />
=== Switch desktops using the mouse ===<br />
<br />
It is possible to switch desktop by moving the mouse cursor to the edges of the screen. First install {{Pkg|xdotool}} and add the following two lines to your {{ic|~/.xinitrc}}:<br />
<br />
xdotool behave_screen_edge --delay 500 left set_desktop --relative -- -1 &<br />
xdotool behave_screen_edge --delay 500 right set_desktop --relative -- +1 &<br />
<br />
=== Set default applications / file associations ===<br />
<br />
See the [[Default applications]] article.<br />
<br />
=== Stop continous mouse wheel desktop switching ===<br />
<br />
By default Openbox switches from the last desktop back to the first desktop on mouse wheel scroll. Use {{ic|<wrap>no</wrap>}} in the {{ic|mousebind}} section to disable this behaviour.<br />
<br />
<context name="Desktop"><br />
<mousebind button="Up" action="Click"><br />
<action name="GoToDesktop"><br />
<to>previous</to><br />
<wrap>no</wrap><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name="GoToDesktop"><br />
<to>next</to><br />
<wrap>no</wrap><br />
</action><br />
</mousebind><br />
</context><br />
<br />
=== Ad-hoc window transparency ===<br />
<br />
{{Warning|This may not work where other actions are defined within the action group.}}<br />
The program {{Pkg|transset-df}} is available in the official repositories, and can enable window transparency on-the-fly.<br />
<br />
For example, using the following code in the {{ic|<mouse>}} section of the {{ic|~/.config/openbox/rc.xml}} file will enable control of application window transparency by hovering the mouse-pointer over the title bar and scrolling with the middle button:<br />
<br />
<context name="Titlebar"><br />
...<br />
<mousebind button="Up" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --inc </execute><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --dec </execute><br />
</action><br />
</mousebind><br />
...<br />
</context><br />
<br />
=== Using obxprop for faster configuration ===<br />
<br />
The {{Pkg|openbox}} package provides a {{ic|obxprop}} binary that can parse relevant values for applications settings in {{ic|rc.xml}}. Officially {{ic|<nowiki>obxprop | grep "^_OB_APP"</nowiki>}} is recommended for this task. Start the process by running the command shown, then click a window to see its properties in the terminal.<br />
<br />
Doing so for multiple applications and its windows can be very inefficient however. The following script {{ic|obxprop2obrc}} makes it much easier to configure even a large number of applications.<br />
<br />
{{Accuracy|Full of [http://shellcheck.net quoting errors], do '''not''' follow any of the instructions bellow!}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
##Script: obxprop-to-openbox-rc.sh<br />
##Recommended executable name: obxprop2obrc<br />
<br />
while [ $# -ne 0 ]; do<br />
case $1 in<br />
-f*)<br />
shift;<br />
FILE="$1";<br />
shift;<br />
;;<br />
-t*)<br />
shift;<br />
TIME="$1";<br />
shift;<br />
;;<br />
*)<br />
echo Usage: $0 [-f FILE_TEMPLATE] [-t WAIT_TO_KILL_TIME] <br />
exit 1;<br />
;;<br />
esac<br />
done<br />
<br />
if [ $TIME ]; then<br />
OBXPROPS=( $(obxprop | cat & (sleep $TIME && pkill -13 cat) | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
else<br />
OBXPROPS=( $(obxprop | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
fi<br />
OBPROPS=(TYPE TITLE GROUP_CLASS GROUP_NAME CLASS NAME ROLE);<br />
j=0;<br />
for i in $( seq 2 2 14 ); do<br />
OBPROP="$( echo ${OBXPROPS[@]} | awk -F \" '{ print $'$i'}' )";<br />
if [[ -z $OBPROP ]]; then <br />
declare ${OBPROPS[$j]}='"*"';<br />
else <br />
declare ${OBPROPS[$j]}="\"$OBPROP\"";<br />
fi<br />
j=$(($j+1));<br />
done;<br />
<br />
echo " <application type="$TYPE" title="$TITLE" class="$CLASS" name="$NAME" role="$ROLE">"<br />
if [ -f "$FILE" ]; then cat "$FILE" && exit; fi<br />
cat << EOF<br />
<desktop>1</desktop><br />
<desktop>all</desktop><br />
<decor>yes</decor><br />
<decor>no</decor><br />
<focus>yes</focus><br />
<focus>no</focus><br />
<fullscreen>yes</fullscreen><br />
<fullscreen>no</fullscreen><br />
<iconic>yes</iconic><br />
<iconic>no</iconic><br />
<maximized>yes</maximized><br />
<maximized>no</maximized><br />
<maximized>both</maximized><br />
<maximized>horizontal</maximized><br />
<maximized>vertical</maximized><br />
<monitor>0</monitor><br />
<monitor>1</monitor><br />
<position force="no"><br />
<position force="yes"><br />
<width>40%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
<x>center</x><br />
<y>center</y><br />
</position><br />
<layer>above</layer><br />
<layer>normal</layer><br />
<layer>below</layer><br />
<shade>yes</shade><br />
<shade>no</shade><br />
<skip_pager>yes</skip_pager><br />
<skip_pager>no</skip_pager><br />
<skip_taskbar>yes</skip_taskbar><br />
<skip_taskbar>no</skip_taskbar><br />
</application><br />
EOF<br />
</nowiki>}}<br />
<br />
If no further options are used default configuration, that can be edited by deleting unnecessary lines, is printed out. This script can use templates with default values when using {{ic|-f}} switch:<br />
{{hc|<br />
$ obxprop2obrc -f templates-rc-inkscape-dialogs.sc > part-rc-applications-inkscape.xml<br />
$ cat part-rc-applications-inkscape.xml|<nowiki><br />
<application type="normal" title="Align and Distribute (Shift+Ctrl+A)" class="Inkscape" name="inkscape" role="*"><br />
<desktop>3</desktop><br />
<decor>yes</decor><br />
<maximized>no</maximized><br />
<position force="yes"><br />
<width>20%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
</position><br />
<layer>normal</layer><br />
<shade>yes</shade><br />
</application><br />
</nowiki>}}<br />
<br />
It also has a time switch {{ic|-t}} which kills obxprop and thus can reduce time significantly in certain situations, although it may not work perfectly.<br />
<br />
=== Xprop values for applications ===<br />
<br />
{{Pkg|xorg-xprop}} is available in the official repositories, and can be used to relay property values for selected applications. Where frequently using per-application settings, the following [[Bash#Aliases|Bash Alias]] may be useful:<br />
dy:<br />
<br />
alias xp='xprop | grep "WM_WINDOW_ROLE\|WM_CLASS" && echo "WM_CLASS(STRING) = \"NAME\", \"CLASS\""'<br />
<br />
To use Xorg-XProp, run using the alias given {{ic|xp}}, and click on the active program desired to define with per-application settins. The results displayed will only be the information that Openbox itself requires, namely the {{ic|WM_WINDOW_ROLE}} and {{ic|WM_CLASS}} (name and class) values:<br />
<br />
WM_WINDOW_ROLE(STRING) = "roster"<br />
WM_CLASS(STRING) = "gajim.py", "Gajim.py"<br />
WM_CLASS(STRING) = "NAME", "CLASS"<br />
<br />
==== Firefox ====<br />
<br />
For whatever reason, Firefox and like-minded equivalents ignore application rules (e.g. ''<desktop>'') unless {{ic|class&#61;"Firefox*"}} is used. This applies irrespective of whatever values '''xprop''' may report for the program's {{ic|WM_CLASS}}.<br />
<br />
=== Switching between keyboard layouts ===<br />
<br />
See the article section [[Keyboard configuration in Xorg#Switching between keyboard layouts|switching between keyboard layouts]] for instructions.<br />
<br />
=== Set grid layout for virtual desktops ===<br />
<br />
Install {{AUR|obsetlayout}}. To set a 2x2 grid for example:<br />
<br />
obsetlayout 0 2 2 0<br />
<br />
Run it without arguments to know what the arguments mean.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Windows load behind the active window ===<br />
<br />
Some application windows (such as Firefox windows) may load behind the currently active window, causing you to need to switch to the window you just created to focus it. To fix this behavior add this to your {{ic|~/.config/openbox/rc.xml}} file, inbetween the {{ic|1=<openbox_config>}} and {{ic|1=</openbox_config>}} tags:<br />
<br />
{{bc|1=<br />
<applications><br />
<application class="*"><br />
<focus>yes</focus><br />
</application><br />
</applications><br />
}}<br />
<br />
== See also ==<br />
<br />
* [http://openbox.org/ Openbox Website] - Official website<br />
* [http://planetob.openmonkey.com/ Planet Openbox] - Openbox news portal<br />
* [http://www.box-look.org/ Box-Look.org] - A good resource for themes and related artwork<br />
* [https://bbs.archlinux.org/viewtopic.php?id=93126 Openbox Hacks and Configs Thread] @ Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=45692 Openbox Screenshots Thread] @ Arch Linux Forums<br />
* [http://urukrama.wordpress.com/openbox-guide/ An Openbox guide]</div>
Vas
https://wiki.archlinux.org/index.php?title=Openbox&diff=385386
Openbox
2015-07-19T19:09:42Z
<p>Vas: /* Tips and tricks */ Added tip to run complex command with hotkey</p>
<hr />
<div>[[Category:Stacking WMs]]<br />
[[cs:Openbox]]<br />
[[de:Openbox]]<br />
[[el:Openbox]]<br />
[[es:Openbox]]<br />
[[fr:Openbox]]<br />
[[it:Openbox]]<br />
[[ja:Openbox]]<br />
[[ko:Openbox]]<br />
[[lt:Openbox]]<br />
[[nl:Openbox]]<br />
[[pl:Openbox]]<br />
[[ru:Openbox]]<br />
[[sk:Openbox]]<br />
[[sr:Openbox]]<br />
[[tr:Openbox]]<br />
[[zh-CN:Openbox]]<br />
[[zh-TW:Openbox]]<br />
{{Related articles start}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related|File manager functionality}}<br />
{{Related|Window manager}}<br />
{{Related|Oblogout}}<br />
{{Related articles end}}<br />
<br />
Openbox is a lightweight, powerful, and highly configurable ''stacking'' [[window manager]] with extensive standards support. It may be built upon and run independently as the basis of a unique [[desktop environment]], or within other integrated desktop environments such as [[KDE]] and [[Xfce]], as an alternative to the window managers they provide. The [[LXDE]] desktop environment is itself built around Openbox.<br />
<br />
A comprehensive list of features are documented at the [http://openbox.org/ official Openbox website]. This article pertains to specifically installing Openbox under Arch Linux.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|openbox}} package.<br />
<br />
=== Standalone ===<br />
<br />
[[Display manager|display managers]] will automatically detect Openbox, allowing for it to be run as a standalone session.<br />
<br />
When using [[Xinitrc]] or [[SLiM]], add the following line:<br />
<br />
exec openbox-session<br />
<br />
{{Note|Specifying {{ic|openbox}} instead of {{ic|openbox-session}} will prevent [[#autostart|autostart]] in {{ic|/etc/xdg/autostart}}.}}<br />
<br />
=== Other desktop environments ===<br />
<br />
When replacing the native window manager of a [[desktop environment]] with Openbox, keep in mind that Openbox does not provide any compositing effects (such as transparency). See [[#Compositing effects]].<br />
<br />
==== GNOME ====<br />
<br />
GNOME Shell is a plugin for the {{Pkg|mutter}} window manager, so can not be used with Openbox. Openbox does work with GNOME applications (but see [[GTK+#Client-side decorations]]). [http://comments.gmane.org/gmane.comp.window-managers.openbox/6595]<br />
<br />
==== KDE ====<br />
<br />
See [[KDE#KDE/Openbox Session]].<br />
<br />
==== Xfce ====<br />
<br />
See [[Xfce#Default window manager]].<br />
<br />
==== MATE ====<br />
<br />
See [[MATE#Use a different window manager with MATE]]<br />
<br />
== Configuration==<br />
<br />
{{Note|Local configuration files will always override global equivalents.}}<br />
<br />
Four key files form the basis of the openbox configuration, each serving a unique role. They are: {{ic|rc.xml}}, {{ic|menu.xml}}, {{ic|autostart}}, and {{ic|environment}}. Although these files are discussed in more detail below, to start configuring Openbox, it will first be necessary to create a '''local''' Openbox profile (i.e for your specific user account) based on them. This can be done by copying them from the '''global''' {{ic|/etc/xdg/openbox}} profile (applicable to any and all users) as a template:<br />
<br />
$ cp -R /etc/xdg/openbox ~/.config/openbox<br />
<br />
=== rc.xml ===<br />
<br />
{{Tip|Custom keyboard shortcuts (keybindings) must be added to the {{ic|<keyboard>}} section of this file, and underneath the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading.}}<br />
<br />
{{ic|~/.config/openbox/rc.xml}} is the main configuration file, responsible for determining the behaviour and settings of the overall session, including:<br />
<br />
* Keyboard shortcuts (e.g. starting applications; controlling the volume)<br />
* Theming<br />
* Desktop and Virtual desktop settings, and<br />
* Application Window settings<br />
<br />
This file is also pre-configured, meaning that it will only be necessary to amend existing content in order to customise behaviour to suit personal preference.<br />
<br />
=== menu.xml ===<br />
<br />
{{ic|~/.config/openbox/menu.xml}} defines the type and behaviour of the desktop menu, accessable by right-clicking the background. Although the default provided is a '''static menu''' (meaning that it will not automatically update when new applications are installed), it is possible to employ the use of '''dynamic menus''' that will automatically update as well. <br />
<br />
The available options are discussed extensively below in the [[#Menus|Menus]] section.<br />
<br />
=== autostart ===<br />
<br />
The file {{ic|~/.config/openbox/autostart}}, if present, is executed by Openbox at startup. A basic example of this file consists of one command per line, like so:<br />
<br />
xset -b<br />
nm-applet &<br />
conky &<br />
<br />
Note that a single ampersand ({{ic|&}}) causes the process in question to be run in the background, allowing the script to continue on to the next command. An ampersand is therefore needed after each command that launches a process of indefinite duration. Commands that are completed essentially instantly (e.g. {{ic|xset -b}}) may be left alone.<br />
<br />
Issues regarding commands in {{ic|~/.config/openbox/autostart}} being executed out of order (or skipped altogether) are often resolved by the addition of small delays. For instance:<br />
<br />
xset -b<br />
(sleep 3s && nm-applet) &<br />
(sleep 3s && conky) &<br />
<br />
{{Note|In addition to running {{ic|~/.config/openbox/autostart}}, Openbox will also launch programs with {{ic|.desktop}} files present in {{ic|/etc/xdg/autostart}}. This is the global [[autostart]] directory, which is automatically sourced by XDG-compliant desktop environments (e.g. GNOME, KDE). Openbox will source this directory as well, provided that the package {{Pkg|python2-xdg}} is installed, and Openbox is launched as {{ic|openbox-session}} (rather than simply {{ic|openbox}}, as [[#Standalone|noted earlier]]). Duplication between {{ic|~/.config/openbox/autostart}} and {{ic|/etc/xdg/autostart}} is a common cause of programs launching twice at startup (e.g. two network manager tray icons).}}<br />
=== environment ===<br />
<br />
{{ic|~/.config/openbox/environment}} can be used to export and set relevant environmental variables such as to:<br />
<br />
* Define new pathways (e.g. execute commands that would otherwise require the entire pathway to be listed with them)<br />
* Change language settings, and<br />
* Define other variables to be used (e.g. the fix for GTK theming could be listed here)<br />
<br />
=== GUI configuration ===<br />
<br />
Several GUI applications are available to quickly and easily configure your Openbox desktop. From the [[official repositories]]:<br />
<br />
* {{App|ObConf|A GTK2 based configuration tool for the Openbox window manager.|http://openbox.org/wiki/ObConf:About|{{Pkg|obconf}}}}<br />
* {{App|LXAppearance ObConf|Plugin for LXAppearance to configure Openbox.|http://lxde.org|{{Pkg|lxappearance-obconf}}}}<br />
* {{App|LXInput|LXDE keyboard and mouse configuration|http://lxde.org|{{Pkg|lxinput}}}}<br />
* {{App|LXRandR|LXDE monitor configuration.|http://wiki.lxde.org/en/LXRandR|{{Pkg|lxrandr}}}}<br />
<br />
From the [[AUR]]:<br />
* {{App|obkey|Configure Openbox keyboard shortcuts|https://code.google.com/p/obkey/|{{AUR|obkey}}}} <br />
* {{App|ob-autostart|A simple autostart application for Openbox.|http://pastebin.com/012YgXTk|{{AUR|ob-autostart}}}} <br />
<br />
Programs and applications relating to the configuration of Openbox's desktop menu are discussed in the [[#Menus|Menus]] section.<br />
<br />
== Openbox reconfiguration ==<br />
<br />
{{Tip|where not already present, it would be worthwhile adding this command to a menu and/or as a keybind for convenience.}}<br />
<br />
Openbox will not always automatically reflect any changes made to its configuration files within a session. As a consequence, it will be necessary to manually reload those files after they have been edited. To do so, enter the following command:<br />
<br />
$ openbox --reconfigure<br />
<br />
Where intending to add this command as a keybind to {{ic|~/.config/openbox/rc.xml}}, it will only be necessary to list the command as {{ic|reconfigure}}. An example has been provided below, using the {{ic|Super}}+{{ic|F11}} keybind:<br />
<br />
<keybind key="W-F11"><br />
<action name="Reconfigure"/><br />
</keybind><br />
<br />
== Keybinds ==<br />
<br />
All keybinds must be added to the {{ic|~/.config/openbox/rc.xml}} file, and below the {{ic|<nowiki><!-- Keybindings for running aplications --></nowiki>}} heading. Although a brief overview has been provided here, a more in-depth explanation of keybindings can be found at [http://openbox.org/wiki/Help:Bindings openbox.org]. There is a utility 'obkey' in AUR for adjust key-binding. Before use obkey, you should use obconf to create {{ic|~/.config/openbox/rc.xml}}.<br />
<br />
=== Special keys ===<br />
<br />
While the use of standard alpha-numeric keys for keybindings is self-explanatory, special names are assigned to other types of keys, such as {{ic|modifers}}, {{ic|multimedia}} keys and {{ic|navigation}} keys.<br />
<br />
==== Modifiers ====<br />
<br />
{{ic|Modifer}} keys play an important role in keybindings (e.g. holding down the {{ic|shift}} or {{ic|CTRL / control}} key in combination with another key to undertake an action). Using modifers helps to prevent conflicting keybinds, whereby two or more actions are linked to the same key or combination of keys. The syntax to use a modifer with another key is:<br />
<br />
"<modifier>-<key>"<br />
<br />
The modifer codes are as follows:<br />
<br />
* {{ic|S}}: Shift<br />
* {{ic|C}}: Control / CTRL<br />
* {{ic|A}}: Alt<br />
* {{ic|W}}: Super / Windows<br />
* {{ic|M}}: Meta<br />
* {{ic|H}}: Hyper (If it is bound to something) <br />
<br />
For example, the code below would use {{ic|super}} and {{ic|t}} to launch {{Pkg|lxterminal}}<br />
<br />
<keybind key="W-t"><br />
<action name="Execute"><br />
<command>lxterminal</command><br />
</action><br />
</keybind><br />
<br />
==== Multimedia keys ====<br />
<br />
{{Merge|Extra keyboard keys in Xorg}}<br />
<br />
Where available, it is possible to set the appropriate {{ic|multimedia}} keys to perform their intended functions, such as to control the volume and/or the screen brightness. These will usually be integrated into the {{ic|function}} keys, and are identified by their appropriate symbols. See [[Extra keyboard keys]] for details.<br />
<br />
The volume and brightness multimedia codes are as follows (note that commands will still have to be assigned to them to actually function):<br />
<br />
* {{ic|XF86AudioRaiseVolume}}: Increase volume<br />
* {{ic|XF86AudioLowerVolume}}: Decrease volume<br />
* {{ic|XF86AudioMute}}: Mute / unmute volume<br />
* {{ic|XF86MonBrightnessUp}}: Increase screen brightess<br />
* {{ic|XF86MonBrightnessDown}}: Decrease screen brightness<br />
<br />
Examples of how these may be used in {{ic|~/.config/openbox/rc.xml}} have been provided below.<br />
<br />
==== Navigation keys ====<br />
<br />
These are the directional / arrow keys, usually used to move the cursor up, down, left, or right. The (self-explanatory) navigation codes are as follows:<br />
<br />
* {{ic|Up}}: Up<br />
* {{ic|Down}}: Down<br />
* {{ic|Left}}: Left<br />
* {{ic|Right}}: Right<br />
<br />
=== Volume Control ===<br />
<br />
What commands should be used for controlling the volume will depend on whether [[ALSA]], [[PulseAudio]], or [[OSS]] is used for sound.<br />
<br />
==== ALSA ====<br />
<br />
If [[ALSA]] is used for sound, the {{ic|amixer}} program can be used to adjust the volume, which is part of the {{Pkg|alsa-utils}} package. The following example - using the {{ic|multimedia}} keys intended to control the volume - will adjust the volume by +/- 5% (which may be changed, as desired):<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== Pulseaudio ====<br />
<br />
Where using [[PulseAudio]] with [[ALSA]] as a backend, the {{ic|amixer}} program commands will have to be modifed, as illustrated below in comparison to the ALSA example:<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
==== OSS ====<br />
<br />
{{Note|This option may be suitable for more experienced users.}}<br />
<br />
Where using [[OSS]], it is possible to create keybindings to raise or lower specific mixers. This allows, for example, the volume of a specific application (such as an audio player) to be changed without changing the overall system volume settings in turn. In this instance, the application must first have been [[OSS#Configuring_Applications_for_OSS|configured]] to use its own mixer. <br />
<br />
In the following example, [[MPD]] has been configured to use its own mixer - also named {{ic|mpd}} - to increase and decrease the volume by a single decibel at a time. The {{ic|--}} that appears after the {{ic|ossmix}} command has been added to prevent a negative value from being treated as an argument: <br />
<br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd +1</command><br />
</action><br />
</keybind><br />
<keybind key="[chosen keybind]"><br />
<action name="Execute"><br />
<command>ossmix -- mpd -1</command><br />
</action><br />
</keybind><br />
<br />
=== Media player control ===<br />
<br />
The {{AUR|playerctl}} command-line utility can be used to bind multimedia keys to player actions. It should work with most media players.<br />
<br />
<keybind key="XF86AudioPlay"><br />
<action name="Execute"><br />
<command>playerctl play</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPause"><br />
<action name="Execute"><br />
<command>playerctl pause</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioNext"><br />
<action name="Execute"><br />
<command>playerctl next</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioPrev"><br />
<action name="Execute"><br />
<command>playerctl previous</command><br />
</action><br />
</keybind><br />
<br />
=== Brightness control ===<br />
<br />
The {{ic|xbacklight}} program is used to control screen brightness, which is part of the [[Xorg]] X-Window system. In the example below, the {{ic|multimedia}} keys intended to control the screen brightness will adjust the settings by +/- 10%:<br />
<br />
<keybind key="XF86MonBrightnessUp"><br />
<action name="Execute"><br />
<command>xbacklight +10</command><br />
</action><br />
</keybind><br />
<keybind key="XF86MonBrightnessDown"><br />
<action name="Execute"><br />
<command>xbacklight -10</command><br />
</action><br />
</keybind><br />
<br />
=== Window snapping ===<br />
<br />
Many desktop environments and window managers support ''window snapping'' (e.g. Windows 7 Aero snap), whereby they will automatically snap into place when moved to the edge of the screen. This effect can also be simulated in Openbox through the use of keybinds on focused windows. <br />
<br />
As illustrated in the example below, percentages must be used to determine window sizes (see [http://openbox.org/wiki/Help:Actions openbox.org] for further information). In this instance, The {{ic|super}} key is used in conjunction with the {{ic|navigation}} keys:<br />
<br />
<keybind key="W-Left"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>west</direction></action><br />
</keybind><br />
<keybind key="W-Right"><br />
<action name="UnmaximizeFull"/><br />
<action name="MaximizeVert"/><br />
<action name="MoveResizeTo"><br />
<width>50%</width><br />
</action><br />
<action name="MoveToEdge"><direction>east</direction></action><br />
</keybind><br />
<br />
However, it should be noted that once a window has been 'snapped' to an edge, it will remain vertically maximised unless subsequently maximised and then restored. The solution is to implement additional keybinds - in this instance using the {{ic|down}} and {{ic|up}} keys - to do so. This will also make pulling 'snapped' windows from screen edges faster as well:<br />
<br />
<keybind key="W-Down"><br />
<action name="Unmaximize"/><br />
</keybind><br />
<keybind key="W-Up"><br />
<action name="Maximize"/><br />
</keybind><br />
<br />
This [http://ubuntuforums.org/showthread.php?t=1796793 Ubuntu forum thread] provides more information. Applications such as {{AUR|opensnap-git}} are also available from the AUR to automatically simulate window snapping behaviour without the use of keybinds.<br />
<br />
=== Desktop menu ===<br />
<br />
It is also possible to create a keybind to access the desktop menu. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
== Menus ==<br />
<br />
It is possible to employ three types of menu in Openbox: {{ic|static}}, {{ic|pipes}} (dynamic), and {{ic|generators}} (static or dynamic). They may also be used alone or in any combination.<br />
<br />
=== Static ===<br />
<br />
As the name would suggest, this default type of menu does not change in any way, and may be manually edited and/or (re)generated automatically through the use on an appropriate software package.<br />
<br />
Fast and efficient, while this type of menu can be used to select applications, it can also be useful to access specific functions and/or perform specific tasks (e.g. desktop configuration), leaving the access of applications to another process (e.g. the {{Pkg|synapse}} or {{Pkg|xfce4-appfinder}} applications).<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file will be the sole source of static desktop menu content.<br />
<br />
==== menumaker ====<br />
<br />
{{Warning|A root terminal '''must''' be installed in order to use MenuMaker, even though a standard user terminal may be used to run it. {{Pkg|xterm}} is a good choice.}}<br />
<br />
{{Pkg|menumaker}} automatically generates {{ic|xml}} menus for several window managers, including Openbox, [[Fluxbox]], [[IceWM]] and [[Xfce]]. It will search for all installed executable programs and consequently create a menu file for them. It is also possible to configure MenuMaker to exclude certain application types (e.g. relating to [[GNOME]] or [[KDE]]), if desired.<br />
<br />
Once installed and executed, it will automatically generate a new {{ic|~/.config/openbox/menu.xml}} file. To avoid overwriting an existing file, enter:<br />
<br />
$ mmaker -v OpenBox3<br />
<br />
Otherwise, to overwrite an existing file, add the {{ic|force}} argument ({{ic|f}}):<br />
<br />
$ mmaker -vf OpenBox3<br />
<br />
Once a new {{ic|~/.config/openbox/menu.xml}} file has been generated it may then be manually edited, or configured using a GUI menu editor, such as {{Pkg|obmenu}}.<br />
<br />
==== obmenu ====<br />
<br />
{{Warning|{{ic|obm-xdg}} - a pipe menu to generate a list of [[GTK+]] and [[GNOME]] applications - is also provided with obmenu. However, it has long-running bugs whereby it may produce an invalid output, or even not function at all. Consequently it has been omitted from discussion.}}<br />
<br />
{{Pkg|obmenu}} is a "user-friendly" GUI application to edit {{ic|~/.config/openbox/menu.xml}}, without the need to code in {{ic|xml}}.<br />
<br />
==== xdg-menu ====<br />
<br />
{{Pkg|archlinux-xdg-menu}} will automatically generate a menu based on {{ic|xdg}} files contained within the {{ic|/etc/xdg/}} directory for numerous Window Managers, including Openbox. Review the [[Xdg-menu#OpenBox]] article for further information.<br />
<br />
==== logout menu options ====<br />
<br />
{{Tip|The commands provided can also be attached to [[#Keybinds|keybinds]].}}<br />
<br />
The {{ic|~/.config/openbox/menu.xml}} file can be edited in order to provide a sub-menu with the same options as provided by [[#oblogout|oblogout]]. The sample script below will provide all of these options, with the exception of the ability to lock the screen:<br />
<br />
<menu id="exit-menu" label="Exit"><br />
<item label="Log Out"><br />
<action name="Execute"><br />
<command>openbox --exit</command><br />
</action><br />
</item><br />
<item label="Shutdown"><br />
<action name="Execute"><br />
<command>systemctl poweroff</command><br />
</action><br />
</item><br />
<item label="Restart"><br />
<action name="Execute"><br />
<command>systemctl reboot</command><br />
</action><br />
</item><br />
<item label="Suspend"><br />
<action name="Execute"><br />
<command>systemctl suspend</command><br />
</action><br />
</item><br />
<item label="Hibernate"><br />
<action name="Execute"><br />
<command>systemctl hibernate</command><br />
</action><br />
</item><br />
</menu><br />
<br />
Once the entries have been composed, add the following line to present the sub-menu where desired within the main desktop menu (usually as the last entry):<br />
<br />
<menu id="exit-menu"/><br />
<br />
=== Pipes ===<br />
<br />
{{Tip|It is entirely feasible for a static menu to contain one or more pipe sub-menus. The functionality of some pipe menus may also rely on the installation of relevant software packages.}}<br />
<br />
This type of menu is in essence a script that provides dynamic, refreshed lists on-the-fly as and when run. These lists may be used for multiple purposes, including to list applications, to provide information, and to provide control functions. Pre-configured pipe menus can be installed, although not from the [[official repositories]]. More experienced users can also modify and/or create their own custom scripts. Again, {{ic|~/.config/openbox/menu.xml}} may and commonly will contain several pipe menus.<br />
<br />
==== Examples ====<br />
<br />
* {{AUR|openbox-xdgmenu}}: fast xdg-menu converter to xml-pipe-menu<br />
* {{AUR|obfilebrowser}}: Application and file browser<br />
* {{AUR|obdevicemenu}}: Management of removable media with [[Udisks]]<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=1345031 wifi pipe menu]: Wireless networking using [[Netctl]]<br />
<br />
[http://openbox.org/download-pipemenus.php Openbox.org] also provides a further list of pipe menus.<br />
<br />
=== Generators ===<br />
<br />
This type of menu is akin to those provided by the taskbars of desktop environments such as [[Xfce]] or [[LXDE]]. Automatically updating on-the-fly, this type of menu can be powerful and very convenient. It may also be possible to add custom categories and menu entries; read the documentation for your intended dynamic menu to determine if and how this can be done.<br />
<br />
A menu generator will have to be executed from the {{ic|~/.config/openbox/menu.xml}} file.<br />
<br />
==== obmenu-generator ====<br />
<br />
{{Tip|icons can still be disabled in {{AUR|obmenu-generator}}, even where enabled in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|obmenu-generator}} is currently only available from the [[AUR]], although it is still highly recommended. With the ability to be used as a static or dynamic menu, it is highly configurable, powerful, and versatile. Menu categories and individual entries may also be easily hidden, customised, and/or added with ease. The [http://trizenx.blogspot.co.uk/2012/02/obmenu-generator.html official homepage] provides further information and screenshots.<br />
<br />
Below is an example of how obmenu-generator would be dynamically executed without icons in {{ic|~/.config/openbox/menu.xml}}:<br />
<br />
<?xml version="1.0" encoding="utf-8"?><br />
<openbox_menu><br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator"><br />
</menu><br />
</openbox_menu><br />
<br />
To automatically iconify entries, the {{ic|-i}} option would be added:<br />
<br />
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator -i"><br />
<br />
==== openbox-menu ====<br />
<br />
{{Tip|If this menu produces an error, it may be solved by enabling icons in {{ic|~/.config/openbox/rc.xml}}.}}<br />
<br />
{{AUR|openbox-menu}} uses the [[LXDE]] [http://sourceforge.net/projects/lxde/files/menu-cache/ menu-cache] to create dynamic menus. The [http://mimasgpc.free.fr/openbox-menu_en.html official homepage] provides further information and screenshots.<br />
<br />
==== obmenugen ====<br />
<br />
{{AUR|Obmenugen}} is currently only available from the [[AUR]], and can be used to a generate static or dynamic application menu based on {{ic|.desktop}} files. The [http://obmenugen.sourceforge.net/ official homepage] provides further information.<br />
<br />
=== Menu icons ===<br />
<br />
To show icons next to menu entries, it will be necessary to ensure they are enabled in the {{ic|<menu>}} section of the {{ic|~/.config/openbox/rc.xml}} file:<br />
<br />
<applicationIcons>yes</applicationIcons><br />
<br />
Where using a static menu, it will then be necessary to edit the {{ic|~/.config/openbox/menu.xml}} file to provide both the {{ic|icon <nowiki>=</nowiki>}} command, along with the full path and icon name for each entry. An example of the syntax used to provide an icon for a category is:<br />
<br />
<menu id="apps-menu" label="[label name]" icon="[pathway to icon]/[icon name]"><br />
<br />
=== Desktop menu as a panel menu ===<br />
<br />
{{Tip|XDoTool can simulate any keybind for any action, and as such, it may therefore be used for many other purposes...}}<br />
<br />
{{Pkg|xdotool}} is a package that can issue commands to simulate key presses / keybinds, meaning that it is possible to use it to invoke keybind-related actions without having to actually press their assigned keys. As this includes the ability to invoke an assigned keybind for the Openbox desktop menu, it is therefore possible to use XDoTool to turn the Openbox desktop menu into a panel menu. Especially where the desktop menu is heavily customised and feature-rich, this may prove very useful to:<br />
<br />
* Replace an existing panel menu<br />
* Implement a panel menu where otherwise not provided or possible (e.g. for {{AUR|tint2-git}})<br />
* Compensate where losing access to the desktop menu due to the use of an application like [[#xfdesktop|xfdesktop]] to [[#Desktop icons and wallpapers|manage the desktop]].<br />
<br />
Once XDoTool has been installed - if not already present - it will be necessary to create a keybind to access the root menu in {{ic|~/.config/openbox/rc.xml}}, and again below the {{ic|<nowiki><</nowiki>!-- Keybindings for running aplications --<nowiki>></nowiki>}} heading. For example, the following code will bring up the menu by pressing {{ic|CTRL}} + {{ic|m}}:<br />
<br />
<keybind key="C-m"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
<br />
Openbox must then be [[#Openbox reconfiguration|re-configured]]. In this instance, XDoTool will be used to simulate the {{ic|CTRL}} + {{ic|m}} keypress to access the desktop menu with the following command (note the use of {{ic|+}} in place of {{ic|-}}):<br />
<br />
xdotool key control+m<br />
<br />
How this command may be used as a panel launcher / icon is largely dependent on the features of panel used. While some panels will allow the above command to be executed directly in the process of creating a new launcher, others may require the use of an executable script. As an example, a custom executable script called {{ic|obpanelmenu.sh}} will be created in the {{ic|~/.config}} folder:<br />
<br />
$ ''text editor'' ~/.config/obpanelmenu.sh<br />
<br />
Once the empty file has been opened, the appropriate XDoTool command must be added to the empty file (i.e. to simulate the {{ic|CTRL}} + {{ic|m}} keypress for this example):<br />
<br />
xdotool key control+m<br />
<br />
After the file has been saved and closed, it may then be made into an executable script with the following command:<br />
<br />
$ chmod +x ~/.config/obpanelmenu.sh<br />
<br />
Executing it will bring up the Openbox desktop menu. Consequently, where using a panel that supports drag-and-drop functionality to add new launchers, simply drag the executable script onto it before changing the icon to suit personal taste. For instructions on how to use this executable script with {{AUR|tint2-svn}} - a derivative of the popular {{Pkg|tint2}} panel that allows launchers to be added - see [[Tint2#Application_Launchers_in_tint2-svn_.28AUR.29|Tint2-Svn launchers]].<br />
<br />
== Desktop theming ==<br />
<br />
{{Tip|It is '''strongly advised''' to install the {{Pkg|obconf}} and {{Pkg|lxappearance-obconf}} GUI applications to configure visual settings and theming. The latter is particularly important as it is responsible for generating the {{ic|~/.gtkrc-2.0}} file (see [[GTK+#GTK+ 2.x]]).}}<br />
<br />
It is important to note that a substantial range of both '''Openbox-specific''' and generalised, '''Openbox-compatible''' [[GTK]] themes are available to change the look of window decorations and the desktop menu. ''Generalised'' themes are designed to be simultaneously compatible with a range of popular desktop environments and/or window managers, commonly including Openbox. See these [https://aur.archlinux.org/packages/?O=0&C=0&SeB=n&K=gtk-theme-&outdated=&SB=n&SO=a&PP=50&do_Search=Go package descriptions] for examples. <br />
<br />
=== Configuration ===<br />
<br />
{{Pkg|obconf}} and/or {{Pkg|lxappearance-obconf}} should be used to select and configure available GTK themes. See [[Uniform Look for Qt and GTK Applications]] for information about theming Qt based applications like [[VirtualBox]] or [[Skype]].<br />
<br />
=== Installation: official and AUR ===<br />
<br />
A good selection of {{Pkg|openbox-themes}} are available from the official repositories.<br />
<br />
Both Openbox-specific and Openbox-compatible themes installed from the [[Official_repositories|official repositories]] and/or the [[AUR]] will be automatically installed to the {{ic|/usr/share/themes}} directory. Both will also be immediately available for selection.<br />
<br />
=== Installation: other sources ===<br />
<br />
[http://www.box-look.org/index.php?xcontentmode=7402 box-look.org] is an excellent and well-established source of themes. [http://www.deviantart.com/ deviantART.com] is another excellent resource. Many more can be found through the utilisation of a search engine.<br />
<br />
=== Troubleshooting ===<br />
<br />
There are two particular problems that may be encountered on rare occasions, especially where downloading themes from unsupported websites. These have been addressed below.<br />
<br />
==== Theme cannot be used ====<br />
<br />
If for any reason the newly extracted theme cannot be selected, open the theme directory to first ensure that it is indeed compatible with Openbox by determining that an {{ic|openbox-3}} directory is present, and that within this directory a {{ic|themerc}} file is also present. An {{ic|.obt}} ('''O'''pen'''B'''ox '''T'''heme) file may also be present in some instances, which can then be manually loaded in {{Pkg|obconf}}.<br />
<br />
Where expected files and directories are present and correct, then on occasion it is possible that the theme author has not correctly set permission to access the file (e.g. permission may still be for the account of the author, rather than for '''root'''). To eliminate this possibility, ensure the folder and file permissions are for '''root''':<br />
<br />
# chown -R root /user/share/themes<br />
<br />
==== Theme looks broken ====<br />
<br />
Of course, the first line of enquiry would be to check that it is not just a badly made, broken theme! Otherwise, ensure that the [[Openbox#GTK+ 2|Openbox GTK fix]]{{Dead link|2014|11|28}} has been implemented, and then re-start the session. Unfortunately some older themes can simply break if not maintained sufficiently to keep pace with the changes incurred by [[GTK]] updates. To avoid such occurrences, it is best to check that desired themes have recently been created or at least updated / patched.<br />
<br />
=== Edit or create new themes ===<br />
<br />
{{Tip|Where deciding to modify an existing theme (e.g. the colour scheme), it would be best to work on a copy of it, rather than the original. This will retain the original should anything go wrong, and ensure that your changes are not over-written through an update.}}<br />
<br />
The process of creating new or modifying existing themes is covered extensively at the official [http://openbox.org/wiki/Help:Themes openbox.org] website. A user-friendly GUI to do so - {{AUR|obtheme}} - is also available from the [[AUR]].<br />
<br />
== Compositing effects ==<br />
<br />
Openbox does not provide native support for [[Wikipedia:Compositing window manager|compositing]], and thus requires an external compositor for this purpose.<br />
<br />
Although compositing is not a necessary component, it may specifically avoid issues such as screen distortion with [[#oblogout|oblogout]], and visual glitches with terminal window transparency. See [[Xorg#Composite]] for common choices.<br />
<br />
== Mouse cursor and application icon themes ==<br />
<br />
See [[Cursor themes]] and [[Icons]] for details.<br />
<br />
== Desktop icons and wallpapers ==<br />
<br />
{{Merge||This section is applicable to most [[window manager]]s when used without [[Desktop environment]]}}<br />
<br />
Openbox does not natively support the use of desktop icons or wallpapers. As a consequence, it will be necessary to install additional applications for this purpose, where desired.<br />
<br />
=== Desktop management using file managers ===<br />
<br />
Some file managers have the capacity to fully '''manage the desktop''', meaning that they may be used to provide wallpapers and enable the use of icons on the desktop. The [[LXDE]] desktop environment itself uses PCManFM for this purpose.<br />
<br />
See [[PCManFM#Desktop_management]] and [[SpaceFM#Desktop_management]].<br />
<br />
=== Wallpaper ===<br />
<br />
See [[List_of_applications#Wallpaper_setters]]<br />
<br />
=== Icon programs ===<br />
<br />
While there are programs dedicated to enabling desktop icons alone, it would seem that they have greater drawbacks than the utilisation of file managers for the task. These programs are discussed briefly, below.<br />
<br />
==== idesk ====<br />
<br />
[[idesk]] is a simple program that can enable icons in addition to managing wallpaper. It will be necessary to create an {{ic|~/.idesktop}} directory, and desktop icons must also be manually created. To use idesk to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
idesk &<br />
<br />
==== xfdesktop ====<br />
<br />
{{Pkg|xfdesktop}} is the desktop manager for [[Xfce]]. The [[Thunar]] file manager will also be downloaded as a dependency. Where this is used, the Openbox desktop menu will no longer be accessible by right-clicking the background. <br />
<br />
As such, it will consequently be necessary to access it by other means, such as by [[#Desktop menu|creating a keybind]], and/or by - where permitted - re-configuring an installed panel to use the [[#Desktop menu as a panel menu|desktop menu as a panel menu]]. To use xfdesktop to provide icons, add the following command to the {{ic|~/.config/openbox/autostart}} file:<br />
<br />
xfdesktop &<br />
<br />
=== conky reconfiguration ===<br />
<br />
Particularly where using a file manager to manage the desktop, it will be necessary to edit {{ic|~/.conkyrc}} to change the {{ic|own_window_type}} command in order for [[conky]] to continue to be displayed (where used). The revised command that should be used is:<br />
<br />
own_window_type normal<br />
<br />
== oblogout ==<br />
<br />
See the [[Oblogout]] article for an overview on how to use this useful, graphical logout script.<br />
<br />
== Openbox for multihead users ==<br />
<br />
While Openbox provides better than average multihead support on its own, the {{AUR|openbox-multihead-git}} package from the [[AUR]] provides a development branch called '''Openbox Multihead''' that gives multihead users per-monitor desktops. This model is not commonly found in floating window managers, but exists mainly in tiling window managers. It is explained well on the [http://xmonad.org/tour.html#workspace Xmonad web site]. Also, please see [https://github.com/BurntSushi/openbox-multihead/blob/multihead/README.MULTIHEAD README.MULTIHEAD] for a more comprehensive description of the new features and configuration options found in Openbox Multihead.<br />
<br />
Openbox Multihead will function like normal Openbox when only a single head is available.<br />
<br />
A downside to using Openbox Multihead is that it breaks the EWMH assumption that one and only one desktop is visible at any time. Thus, existing pagers will not work well with it. To remedy this, {{AUR|pager-multihead-git}} can be found in the [[AUR]] and is compatible with Openbox Multihead. [http://imgur.com/a/cnZeq#y04nk Screenshots].<br />
<br />
Finally, a new version of [[PyTyle]] that will work with Openbox Multihead can also be found in the [[AUR]]: {{AUR|pytyle3-git}}.<br />
<br />
Both ''pytyle3'' and ''pager-multihead-git'' will work without Openbox Multihead if only one monitor is active.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Launch a shell command with hotkey ===<br />
<br />
If you need to execute a complex, but short command, use shell functionality. Here is just an example:<br />
<br />
<keybind key="A-F7"><br />
<action name="Execute"><br />
<command>sh -c "LC_ALL=C obconf"</command><br />
</action><br />
</keybind><br />
<br />
=== Switch desktops using the mouse ===<br />
<br />
It is possible to switch desktop by moving the mouse cursor to the edges of the screen. First install {{Pkg|xdotool}} and add the following two lines to your {{ic|~/.xinitrc}}:<br />
<br />
xdotool behave_screen_edge --delay 500 left set_desktop --relative -- -1 &<br />
xdotool behave_screen_edge --delay 500 right set_desktop --relative -- +1 &<br />
<br />
=== Set default applications / file associations ===<br />
<br />
See the [[Default applications]] article.<br />
<br />
=== Stop continous mouse wheel desktop switching ===<br />
<br />
By default Openbox switches from the last desktop back to the first desktop on mouse wheel scroll. Use {{ic|<wrap>no</wrap>}} in the {{ic|mousebind}} section to disable this behaviour.<br />
<br />
<context name="Desktop"><br />
<mousebind button="Up" action="Click"><br />
<action name="GoToDesktop"><br />
<to>previous</to><br />
<wrap>no</wrap><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name="GoToDesktop"><br />
<to>next</to><br />
<wrap>no</wrap><br />
</action><br />
</mousebind><br />
</context><br />
<br />
=== Ad-hoc window transparency ===<br />
<br />
{{Warning|This may not work where other actions are defined within the action group.}}<br />
The program {{Pkg|transset-df}} is available in the official repositories, and can enable window transparency on-the-fly.<br />
<br />
For example, using the following code in the {{ic|<mouse>}} section of the {{ic|~/.config/openbox/rc.xml}} file will enable control of application window transparency by hovering the mouse-pointer over the title bar and scrolling with the middle button:<br />
<br />
<context name="Titlebar"><br />
...<br />
<mousebind button="Up" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --inc </execute><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --dec </execute><br />
</action><br />
</mousebind><br />
...<br />
</context><br />
<br />
=== Using obxprop for faster configuration ===<br />
<br />
The {{Pkg|openbox}} package provides a {{ic|obxprop}} binary that can parse relevant values for applications settings in {{ic|rc.xml}}. Officially {{ic|<nowiki>obxprop | grep "^_OB_APP"</nowiki>}} is recommended for this task. Start the process by running the command shown, then click a window to see its properties in the terminal.<br />
<br />
Doing so for multiple applications and its windows can be very inefficient however. The following script {{ic|obxprop2obrc}} makes it much easier to configure even a large number of applications.<br />
<br />
{{Accuracy|Full of [http://shellcheck.net quoting errors], do '''not''' follow any of the instructions bellow!}}<br />
<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
##Script: obxprop-to-openbox-rc.sh<br />
##Recommended executable name: obxprop2obrc<br />
<br />
while [ $# -ne 0 ]; do<br />
case $1 in<br />
-f*)<br />
shift;<br />
FILE="$1";<br />
shift;<br />
;;<br />
-t*)<br />
shift;<br />
TIME="$1";<br />
shift;<br />
;;<br />
*)<br />
echo Usage: $0 [-f FILE_TEMPLATE] [-t WAIT_TO_KILL_TIME] <br />
exit 1;<br />
;;<br />
esac<br />
done<br />
<br />
if [ $TIME ]; then<br />
OBXPROPS=( $(obxprop | cat & (sleep $TIME && pkill -13 cat) | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
else<br />
OBXPROPS=( $(obxprop | awk -F \" '/_OB_APP/{ print "\x22"$2"\x22" }' ) );<br />
fi<br />
OBPROPS=(TYPE TITLE GROUP_CLASS GROUP_NAME CLASS NAME ROLE);<br />
j=0;<br />
for i in $( seq 2 2 14 ); do<br />
OBPROP="$( echo ${OBXPROPS[@]} | awk -F \" '{ print $'$i'}' )";<br />
if [[ -z $OBPROP ]]; then <br />
declare ${OBPROPS[$j]}='"*"';<br />
else <br />
declare ${OBPROPS[$j]}="\"$OBPROP\"";<br />
fi<br />
j=$(($j+1));<br />
done;<br />
<br />
echo " <application type="$TYPE" title="$TITLE" class="$CLASS" name="$NAME" role="$ROLE">"<br />
if [ -f "$FILE" ]; then cat "$FILE" && exit; fi<br />
cat << EOF<br />
<desktop>1</desktop><br />
<desktop>all</desktop><br />
<decor>yes</decor><br />
<decor>no</decor><br />
<focus>yes</focus><br />
<focus>no</focus><br />
<fullscreen>yes</fullscreen><br />
<fullscreen>no</fullscreen><br />
<iconic>yes</iconic><br />
<iconic>no</iconic><br />
<maximized>yes</maximized><br />
<maximized>no</maximized><br />
<maximized>both</maximized><br />
<maximized>horizontal</maximized><br />
<maximized>vertical</maximized><br />
<monitor>0</monitor><br />
<monitor>1</monitor><br />
<position force="no"><br />
<position force="yes"><br />
<width>40%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
<x>center</x><br />
<y>center</y><br />
</position><br />
<layer>above</layer><br />
<layer>normal</layer><br />
<layer>below</layer><br />
<shade>yes</shade><br />
<shade>no</shade><br />
<skip_pager>yes</skip_pager><br />
<skip_pager>no</skip_pager><br />
<skip_taskbar>yes</skip_taskbar><br />
<skip_taskbar>no</skip_taskbar><br />
</application><br />
EOF<br />
</nowiki>}}<br />
<br />
If no further options are used default configuration, that can be edited by deleting unnecessary lines, is printed out. This script can use templates with default values when using {{ic|-f}} switch:<br />
{{hc|<br />
$ obxprop2obrc -f templates-rc-inkscape-dialogs.sc > part-rc-applications-inkscape.xml<br />
$ cat part-rc-applications-inkscape.xml|<nowiki><br />
<application type="normal" title="Align and Distribute (Shift+Ctrl+A)" class="Inkscape" name="inkscape" role="*"><br />
<desktop>3</desktop><br />
<decor>yes</decor><br />
<maximized>no</maximized><br />
<position force="yes"><br />
<width>20%</width><br />
<height>30%</height><br />
<x>-1</x><br />
<y>-1</y><br />
</position><br />
<layer>normal</layer><br />
<shade>yes</shade><br />
</application><br />
</nowiki>}}<br />
<br />
It also has a time switch {{ic|-t}} which kills obxprop and thus can reduce time significantly in certain situations, although it may not work perfectly.<br />
<br />
=== Xprop values for applications ===<br />
<br />
{{Pkg|xorg-xprop}} is available in the official repositories, and can be used to relay property values for selected applications. Where frequently using per-application settings, the following [[Bash#Aliases|Bash Alias]] may be useful:<br />
dy:<br />
<br />
alias xp='xprop | grep "WM_WINDOW_ROLE\|WM_CLASS" && echo "WM_CLASS(STRING) = \"NAME\", \"CLASS\""'<br />
<br />
To use Xorg-XProp, run using the alias given {{ic|xp}}, and click on the active program desired to define with per-application settins. The results displayed will only be the information that Openbox itself requires, namely the {{ic|WM_WINDOW_ROLE}} and {{ic|WM_CLASS}} (name and class) values:<br />
<br />
WM_WINDOW_ROLE(STRING) = "roster"<br />
WM_CLASS(STRING) = "gajim.py", "Gajim.py"<br />
WM_CLASS(STRING) = "NAME", "CLASS"<br />
<br />
==== Firefox ====<br />
<br />
For whatever reason, Firefox and like-minded equivalents ignore application rules (e.g. ''<desktop>'') unless {{ic|class&#61;"Firefox*"}} is used. This applies irrespective of whatever values '''xprop''' may report for the program's {{ic|WM_CLASS}}.<br />
<br />
=== Switching between keyboard layouts ===<br />
<br />
See the article section [[Keyboard configuration in Xorg#Switching between keyboard layouts|switching between keyboard layouts]] for instructions.<br />
<br />
=== Set grid layout for virtual desktops ===<br />
<br />
Install {{AUR|obsetlayout}}. To set a 2x2 grid for example:<br />
<br />
obsetlayout 0 2 2 0<br />
<br />
Run it without arguments to know what the arguments mean.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Windows load behind the active window ===<br />
<br />
Some application windows (such as Firefox windows) may load behind the currently active window, causing you to need to switch to the window you just created to focus it. To fix this behavior add this to your {{ic|~/.config/openbox/rc.xml}} file, inbetween the {{ic|1=<openbox_config>}} and {{ic|1=</openbox_config>}} tags:<br />
<br />
{{bc|1=<br />
<applications><br />
<application class="*"><br />
<focus>yes</focus><br />
</application><br />
</applications><br />
}}<br />
<br />
== See also ==<br />
<br />
* [http://openbox.org/ Openbox Website] - Official website<br />
* [http://planetob.openmonkey.com/ Planet Openbox] - Openbox news portal<br />
* [http://www.box-look.org/ Box-Look.org] - A good resource for themes and related artwork<br />
* [https://bbs.archlinux.org/viewtopic.php?id=93126 Openbox Hacks and Configs Thread] @ Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=45692 Openbox Screenshots Thread] @ Arch Linux Forums<br />
* [http://urukrama.wordpress.com/openbox-guide/ An Openbox guide]</div>
Vas
https://wiki.archlinux.org/index.php?title=Skype&diff=285355
Skype
2013-11-30T08:03:33Z
<p>Vas: /* Use Skype with special user */ changed mandatory groups</p>
<hr />
<div>[[bg:Skype]]<br />
[[cs:Skype]]<br />
[[lt:Skype]]<br />
[[ru:Skype]]<br />
[[uk:Skype]]<br />
[[Category:Audio/Video]]<br />
[[Category:Telephony and Voice]]<br />
== Installation ==<br />
<br />
[[pacman|Install]] {{Pkg|skype}} from the [[official repositories]]. If you have a 64-bit system, enable the [[multilib]] repository first as Skype is 32-bit only.<br />
<br />
Running Skype is just as easy. Type {{Ic|skype}} into a terminal or double-click the Skype icon on your desktop or in your DE's application menu.<br />
<br />
== Skype sound ==<br />
<br />
Skype supports [[ALSA]] and [[PulseAudio]]. [[OSS]] is no longer supported.<br />
<br />
=== ALSA ===<br />
<br />
Sound should work out of the box, if not you can select a sound device to use in Skype options. If you have problems with Skype blocking your sound device, you only need to add the following to your {{ic|~/.asoundrc}}<br />
pcm.dmixout {<br />
# Just pass this on to the system dmix<br />
type plug<br />
slave {<br />
pcm "dmix"<br />
}<br />
}<br />
then you can start Skype as normal, go to the audio options and select dmixout as your speaker- and ringingdevice.<br />
<br />
=== PulseAudio ===<br />
<br />
Sound should work out of the box, if not you can select another input using pavucontrol (you may have to install it first).<br />
<br />
If you are on x86_64 and use the multilib {{Pkg|skype}} package, you also need {{Pkg|lib32-libpulse}}.<br />
<br />
=== OSS (Pre-2.0, no longer available) ===<br />
<br />
Option B is preferred over other options.<br />
With option B you can use Skype AND let other programs play sound too.<br />
With option C you can do that too, but option B is way easier to set up.<br />
<br />
You can install the legacy {{Pkg|skype-oss}} from Comunity repo.<br />
<br />
If you need 64x-86x support then download an OSS compatible version from [http://www.mediafire.com/?2ydhmj4yo3i here] and the PKGBUILD form [https://aur.archlinux.org/packages.php?ID=18312 here.] Also install {{Pkg|lib32-libxinerama}}. Finally, run<br />
$ makepkg -s<br />
to create the pacman installable package.<br />
<br />
==== A. With OSS or Kernel OSS emulation for ALSA ====<br />
<br />
Start Skype and make sure no other program is using your soundcard.<br />
If you want to use Skype AND let another program play sound too, look at option B instead.<br />
<br />
==== B. Making ALSA + dMix work for Skype ====<br />
<br />
First of all, we need to install the {{Pkg|alsa-oss}} package with [[pacman]].<br />
<br />
Add the following to {{ic|~/.asoundrc}}. If the file does not exist yet, just create it! (Many thanks to Lorenzo Colitti for figuring this out!)<br />
<br />
# .asoundrc to use skype at the same time as other audio apps like xmms<br />
#<br />
# Successfully tested on an IBM x40 with i810_audio using Linux 2.6.15 and<br />
# Debian unstable with skype 1.2.0.18-API. No sound daemons (asound, esd, etc.)<br />
# running. However, YMMV.<br />
#<br />
# For background, see:<br />
#<br />
# https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1228<br />
# https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1224<br />
#<br />
# (C) 2006-06-03 Lorenzo Colitti - http://www.colitti.com/lorenzo/<br />
# Licensed under the GPLv2 or later<br />
<br />
pcm.skype {<br />
type asym<br />
playback.pcm "skypeout"<br />
capture.pcm "skypein"<br />
}<br />
<br />
pcm.skypein {<br />
# Convert from 8-bit unsigned mono (default format set by aoss when<br />
# /dev/dsp is opened) to 16-bit signed stereo (expected by dsnoop)<br />
#<br />
# We cannot just use a "plug" plugin because although the open will<br />
# succeed, the buffer sizes will be wrong and we will hear no sound at<br />
# all.<br />
type route<br />
slave {<br />
pcm "skypedsnoop"<br />
format S16_LE<br />
}<br />
ttable {<br />
0 {0 0.5}<br />
1 {0 0.5}<br />
}<br />
}<br />
<br />
pcm.skypeout {<br />
# Just pass this on to the system dmix<br />
type plug<br />
slave {<br />
pcm "dmix"<br />
}<br />
}<br />
<br />
pcm.skypedsnoop {<br />
type dsnoop<br />
ipc_key 1133<br />
slave {<br />
# "Magic" buffer values to get skype audio to work<br />
# If these are not set, opening /dev/dsp succeeds but no sound<br />
# will be heard. According to the ALSA developers this is due<br />
# to skype abusing the OSS API.<br />
pcm "hw:0,0"<br />
period_size 256<br />
periods 16<br />
buffer_size 16384<br />
}<br />
bindings {<br />
0 0<br />
}<br />
}<br />
<br />
If you get the error message :<br />
<br />
The dmix plugin supports only playback stream<br />
<br />
then add the following to {{ic|.asoundrc}}:<br />
<br />
pcm.asymed {<br />
type asym<br />
playback.pcm "dmix"<br />
capture.pcm "dsnoop"<br />
}<br />
<br />
pcm.!default {<br />
type plug<br />
slave.pcm "asymed"<br />
}<br />
<br />
<br />
Now run Skype in this way each time you want to use it:<br />
ALSA_OSS_PCM_DEVICE="skype" aoss skype<br />
<br />
Optionally you can make a script to start Skype:<br />
<br />
As root, create the file: {{ic|/usr/bin/askype}}<br />
<br />
# Little script to run Skype correctly using the modified .asoundrc<br />
# See: https://wiki.archlinux.org/index.php/Skype for more information!<br />
#<br />
# Questions/Remarks: profox@debianbox.be<br />
<br />
ALSA_OSS_PCM_DEVICE="skype" aoss skype<br />
<br />
Now make sure every user is able to execute the file:<br />
# chmod a+x /usr/bin/askype<br />
<br />
You can also fix the menu entry so you can start Skype from the your window manager's menu:<br />
<br />
Edit the file: {{ic|/usr/share/applications/skype.desktop}}<br />
<br />
[Desktop Entry]<br />
Name=Skype<br />
Comment=P2P software for high-quality voice communication<br />
Exec=askype<br />
Icon=skype.png<br />
Terminal=0<br />
Type=Application<br />
Encoding=UTF-8<br />
Categories=Network;Application;<br />
<br />
Sometimes it takes a while for Skype to start up but once it is loaded it should work ok!<br />
<br />
==== C. Using OSS emulation with oss2jack ====<br />
<br />
{{AUR|oss2jack}} is another way to have OSS emulation without using ALSA directly. Instead, oss2jack creates a OSS device that forwards everything to JACK (JACK Audio Connection Kit), which in turn mixes, then outputs to the standard ALSA device.<br />
<br />
== Securing Skype ==<br />
<br />
There are a couple of reasons you might want to restrict Skype's access to your computer:<br />
* The skype binary is disguised against decompiling, so nobody is (still) able to reproduce what it really does.<br />
* It produces encrypted traffic even when you are not actively using Skype.<br />
* ...<br />
See [http://www1.cs.columbia.edu/~salman/skype/index.html] for more information.<br />
<br />
=== AppArmor ===<br />
<br />
Follow the instructions [[AppArmor|here]] to set up AppArmor.<br />
<br />
The userland tools for AppArmor come with a collection of example profiles. Skype is amongst them. Copy this to the directory where AppArmor profiles are stored.<br />
# cp -ip /etc/apparmor/profiles/extras/usr.bin.skype /etc/apparmor.d/<br />
<br />
For whatever reason, the profile is not complete. You may wish to modify it further. Here is an example for Skype 4:<br />
<br />
{{bc|#include <tunables/global><br />
/usr/bin/skype {<br />
#include <abstractions/audio><br />
#include <abstractions/consoles><br />
#include <abstractions/dbus-session><br />
#include <abstractions/gnome><br />
#include <abstractions/kde><br />
#include <abstractions/nameservice><br />
#include <abstractions/video><br />
<br />
# Executables<br />
/usr/bin/skype ixmr,<br />
/usr/lib{,32}/skype/skype ixmr,<br />
/usr/bin/xdg-open PUxmr,<br />
<br />
# Configuration files<br />
owner @{HOME}/.Skype/ rw,<br />
owner @{HOME}/.Skype/** krw,<br />
owner @{HOME}/.config/Skype/ rw,<br />
owner @{HOME}/.config/Skype/** krw,<br />
<br />
# Downloads/uploads directory<br />
owner @{HOME}/Public/ rw,<br />
owner @{HOME}/Public/** krw,<br />
<br />
# Libraries<br />
/usr/lib{,32}/libv4l/v4l2convert.so mr,<br />
/usr/share/skype/lib/libQtWebKit.so.4 mr,<br />
<br />
# Shared data<br />
/usr/share/skype/ r,<br />
/usr/share/skype/** r,<br />
<br />
# Devices<br />
/dev/ r,<br />
/dev/video[0-9]* mrw,<br />
<br />
# System information<br />
/etc/machine-id r,<br />
@{PROC}/sys/kernel/{ostype,osrelease} r,<br />
@{PROC}/sys/vm/overcommit_memory r,<br />
@{PROC}/[0-9]*/net/arp r,<br />
owner @{PROC}/[0-9]*/cmdline r,<br />
owner @{PROC}/[0-9]*/status r,<br />
owner @{PROC}/[0-9]*/task/ r,<br />
owner @{PROC}/[0-9]*/task/[0-9]*/stat r,<br />
/sys/devices/system/cpu/ r,<br />
/sys/devices/system/cpu/cpu[0-9]*/cpufreq/scaling_{cur_freq,max_freq} r,<br />
/sys/devices/pci*/*/usb[0-9]*/*/*/*/modalias r,<br />
/sys/devices/pci*/*/usb[0-9]*/*/*/*/video4linux/video[0-9]*/dev r,<br />
/sys/devices/pci*/*/usb[0-9]*/*/*/{idVendor,idProduct,speed} r,<br />
<br />
# This probably should go to appropriate abstractions<br />
owner @{HOME}/.config/fontconfig/fonts.conf r,<br />
owner @{HOME}/.config/gtk-3.0/bookmarks r,<br />
owner @{HOME}/.config/pulse/cookie krw,<br />
owner @{HOME}/.icons/** r,<br />
owner @{HOME}/.kde/share/config/kioslaverc r,<br />
<br />
# Denials<br />
deny owner @{HOME}/.mozilla/ r,<br />
deny owner @{HOME}/.mozilla/** r,<br />
deny /sys/devices/virtual/dmi/** r,<br />
&#125;}}<br />
<br />
{{Note|This example assumes that Skype is configured to save received files into {{ic|~/Public}}. Feel free to change it to any folder you like.}}<br />
<br />
To use the profile, first be sure {{ic|securityfs}} is mounted,<br />
# mount -t securityfs securityfs /sys/kernel/security<br />
<br />
Load the profile by the command,<br />
# apparmor_parser -r /etc/apparmor.d/usr.bin.skype<br />
<br />
Now you can run Skype restricted but as your own user. Denials are logged in {{ic|messages.log}}.<br />
<br />
=== TOMOYO ===<br />
<br />
Follow the instructions [[TOMOYO_Linux#TOMOYO_Linux_2.x|here]] to install TOMOYO. Please note that this section describes using TOMOYO 2.5.<br />
<br />
During Skype audit it was discovered that Skype reads DMI information and Mozilla profile. To give Skype minimal access to your system using TOMOYO, please follow these steps.<br />
<br />
* Open {{ic|/etc/tomoyo/exception_policy.conf}} file and add these lines:<br />
<br />
{{bc|path_group SKYPE_DIRS /home/\*/.Skype/<br />
path_group SKYPE_DIRS /home/\*/.Skype/\{\*\}/<br />
path_group SKYPE_DIRS /home/\*/.config/Skype/\{\*\}/<br />
path_group SKYPE_DIRS /usr/share/skype/\{\*\}/<br />
path_group SKYPE_DIRS /home/pf/work/tmp/\{\*\}/<br />
path_group SKYPE_FILES /home/\*/.Skype/\{\*\}/\*<br />
path_group SKYPE_FILES /home/\*/.config/Skype/\{\*\}/\*<br />
path_group SKYPE_FILES /usr/share/skype/\{\*\}/\*<br />
path_group SKYPE_FILES /home/pf/work/tmp/\{\*\}/\*<br />
path_group SKYPE_FILES /home/\*/.Skype/\*<br />
path_group SKYPE_FILES /home/\*/.config/Skype/\*<br />
path_group SKYPE_FILES /usr/share/skype/\*<br />
path_group SKYPE_FILES /home/pf/work/tmp/\*<br />
path_group ICONS_DIRS /usr/share/icons/\{\*\}/<br />
path_group ICONS_FILES /usr/share/icons/\{\*\}/\*<br />
path_group ICONS_FILES /usr/share/icons/\*<br />
initialize_domain /usr/bin/skype from any<br />
initialize_domain /usr/lib32/skype/skype from any}}<br />
<br />
Note that {{ic|/home/pf/work/tmp}} folder is only the folder to which Skype will be able to save received files and from which it will be able to send all files. You have to change this folder.<br />
<br />
* Then open {{ic|/etc/tomoyo/domain_policy.conf}} and add the following lines:<br />
<br />
{{bc|<kernel> /usr/bin/skype<br />
use_profile 3<br />
use_group 0<br />
<br />
misc env \*<br />
file read /bin/bash<br />
file read /usr/bin/bash<br />
file read/write /dev/tty<br />
file read /usr/lib/locale/locale-archive<br />
file read /usr/lib/gconv/gconv-modules<br />
file read /usr/bin/skype<br />
file read /usr/lib32/skype/skype<br />
file execute /usr/lib32/skype/skype exec.realpath&#61;"/usr/lib32/skype/skype" exec.argv[0]&#61;"/usr/lib32/skype/skype"<br />
<br />
<kernel> /usr/lib32/skype/skype<br />
use_profile 3<br />
use_group 0<br />
<br />
file append /dev/snd/pcm\*<br />
file chmod /home/\*/.Skype/ 0700<br />
file create /home/\*/.cache/fontconfig/\* 0600-0666<br />
file create /tmp/qtsingleapp-\*-lockfile 0600-0666<br />
file create @SKYPE_FILES 0600-0666<br />
file execute /usr/bin/firefox<br />
file execute /usr/bin/gnome-open<br />
file execute /usr/bin/notify-send<br />
file execute /usr/bin/opera<br />
file execute /usr/bin/xdg-open<br />
file ioctl /dev/snd/\* 0-0xFFFFFFFFFFFFFFFF<br />
file ioctl /dev/video0 0-0xFFFFFFFFFFFFFFFF<br />
file ioctl anon_inode:inotify 0x541B<br />
file ioctl socket:[family&#61;1:type&#61;2:protocol&#61;0] 0x8910<br />
file ioctl socket:[family&#61;1:type&#61;2:protocol&#61;0] 0x8933<br />
file ioctl socket:[family&#61;2:type&#61;1:protocol&#61;6] 0x541B<br />
file ioctl socket:[family&#61;2:type&#61;2:protocol&#61;17] 0x541B<br />
file ioctl socket:[family&#61;2:type&#61;2:protocol&#61;17] 0x8912<br />
file ioctl socket:[family&#61;2:type&#61;2:protocol&#61;17] 0x8927<br />
file ioctl socket:[family&#61;2:type&#61;2:protocol&#61;17] 0x8B01<br />
file link /home/\*/.cache/fontconfig/\* /home/\*/.cache/fontconfig/\*<br />
file mkdir /home/\*/.cache/fontconfig/\* 0600<br />
file mkdir @SKYPE_DIRS 0700-0777<br />
file mksock /tmp/qtsingleapp-\* 0755<br />
file read /dev/urandom<br />
file read /etc/fonts/conf.avail/\*.conf<br />
file read /etc/fonts/conf.d/\*.conf<br />
file read /etc/fonts/fonts.conf<br />
file read /etc/group<br />
file read /etc/host.conf<br />
file read /etc/hosts<br />
file read /etc/machine-id<br />
file read /etc/nsswitch.conf<br />
file read /etc/passwd<br />
file read /etc/resolv.conf<br />
file read /home/\*/.ICEauthority<br />
file read /home/\*/.XCompose<br />
file read /home/\*/.Xauthority<br />
file read /home/\*/.Xdefaults<br />
file read /home/\*/.fontconfig/\*<br />
file read /home/\*/.config/fontconfig/\*<br />
file read /usr/lib/locale/locale-archive<br />
file read /usr/lib32/gconv/UTF-16.so<br />
file read /usr/lib32/gconv/gconv-modules<br />
file read /usr/lib32/libv4l/v4l2convert.so<br />
file read /usr/lib32/qt/plugins/bearer/libq\*bearer.so<br />
file read /usr/lib32/qt/plugins/iconengines/libqsvgicon.so<br />
file read /usr/lib32/qt/plugins/imageformats/libq\*.so<br />
file read /usr/lib32/qt/plugins/inputmethods/libqimsw-multi.so<br />
file read /usr/lib32/skype/skype<br />
file read /usr/share/X11/locale/\*/Compose<br />
file read /usr/share/X11/locale/\*/XLC_LOCALE<br />
file read /usr/share/X11/locale/compose.dir<br />
file read /usr/share/X11/locale/locale.alias<br />
file read /usr/share/X11/locale/locale.dir<br />
file read /usr/share/alsa/alsa.conf<br />
file read /usr/share/alsa/cards/\*.conf<br />
file read /usr/share/alsa/pcm/\*.conf<br />
file read /usr/share/fonts/\*/\*/\*<br />
file read @ICONS_FILES<br />
file read proc:/cpuinfo<br />
file read proc:/stat<br />
file read proc:/sys/kernel/osrelease<br />
file read proc:/sys/kernel/ostype<br />
file read sysfs:/devices/\*/\*/\*/\*/\*/\*/modalias<br />
file read sysfs:/devices/\*/\*/\*/\*/\*/\*/video4linux/video0/dev<br />
file read sysfs:/devices/\*/\*/\*/\*/\*/idProduct<br />
file read sysfs:/devices/\*/\*/\*/\*/\*/idVendor<br />
file read sysfs:/devices/\*/\*/\*/\*/\*/speed<br />
file read sysfs:/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq<br />
file read sysfs:/devices/system/cpu/cpu0/cpufreq/scaling_max_freq<br />
file read sysfs:/devices/system/cpu/online<br />
file read/write /dev/snd/\*<br />
file read/write /dev/video0<br />
file read/write/truncate /home/\*/.config/Trolltech.conf<br />
file read/write/unlink /home/\*/.cache/fontconfig/\*<br />
file read/write/unlink /tmp/qtsingleapp-\*<br />
file read/write/unlink/truncate @SKYPE_FILES<br />
file rename /home/\*/.cache/fontconfig/\* /home/\*/.cache/fontconfig/\*<br />
file rename @SKYPE_DIRS @SKYPE_DIRS<br />
file rename @SKYPE_FILES @SKYPE_FILES<br />
file rmdir @SKYPE_DIRS<br />
misc env \*<br />
network inet dgram bind 0.0.0.0 0-65535<br />
network inet dgram bind 127.0.0.1 0<br />
network inet dgram bind/send 0.0.0.0-255.255.255.255 0-65535<br />
network inet stream bind/listen 0.0.0.0 0-65535<br />
network inet stream connect 0.0.0.0-255.255.255.255 0-65535<br />
network unix stream bind/listen /tmp/qtsingleapp-\*<br />
network unix stream connect /tmp/.ICE-unix/\*<br />
network unix stream connect /tmp/qtsingleapp-\*<br />
network unix stream connect /var/run/dbus/system_bus_socket<br />
network unix stream connect /var/run/nscd/socket<br />
network unix stream connect \000/tmp/.ICE-unix/\*<br />
network unix stream connect \000/tmp/.X11-unix/X0<br />
network unix stream connect \000/tmp/dbus-\*<br />
<br />
<kernel> /usr/lib32/skype/skype /usr/bin/xdg-open<br />
use_profile 0<br />
use_group 0<br />
<br />
<br />
<kernel> /usr/lib32/skype/skype /usr/bin/gnome-open<br />
use_profile 0<br />
use_group 0<br />
<br />
<kernel> /usr/lib32/skype/skype /usr/bin/notify-send<br />
use_profile 0<br />
use_group 0}}<br />
<br />
* After finishing editing reload TOMOYO config files by executing these commands:<br />
<br />
{{bc|# tomoyo-loadpolicy -df </etc/tomoyo/domain_policy.conf<br />
# tomoyo-loadpolicy -ef </etc/tomoyo/exception_policy.conf}}<br />
<br />
Voilà — your Skype is sandboxed now.<br />
<br />
Please note that this config is generated on 64-bit Arch system, and some of your ioctls and library paths may differ from mentioned above. So in order to fine-tune TOMOYO config for your Skype load {{ic|tomoyo-auditd}} daemon:<br />
<br />
# systemctl start tomoyo-auditd<br />
<br />
Then go to {{ic|/var/log/tomoyo}} folder and start watching {{ic|reject_003.log}}:<br />
<br />
tail -f reject_003.log<br />
<br />
The output of this command will show you rejected actions for Skype, so you'll be able to add them to {{ic|domain_policy.conf}} file if needed.<br />
<br />
Detailed guide about TOMOYO configuring can be found [http://tomoyo.sourceforge.jp/2.5/index.html.en here].<br />
<br />
=== Use Skype with special user ===<br />
<br />
Instead of using AppArmor or TOMOYO which require the installation of extra packages, one may prefer to add a special user. This user is only used for running Skype within one's normal environment. This approach restricts Skype to reading only the data of this particular user instead of one's main user. (The new user should not be used for any other thing. Skype only.)<br />
<br />
An AUR package, [https://aur.archlinux.org/packages/skype-restricted/ skype-restricted] exists that will run skype as a separate user ("_skype") cleanly. It's heavily based on the information in this section.<br />
<br />
Optionally, we first add a default group for the skype user. I will call the new user and its default group "skype". The security advantage in keeping the "skype" user in its separate group is that it can be restricted from accessing some places other users are allowed in.<br />
# groupadd skype<br />
Then we have to add the new user:<br />
# useradd -m -g skype -G audio,video -s /bin/bash skype<br />
<br />
{{Note|1=Maybe you need to add "skype" user to "pulse-access" and "pulse-rt" groups. But it works fine with "audio" and "skype" groups only.}}<br />
<br />
<br />
Now add the following line to {{ic|/home/skype/.bashrc}}:<br />
export DISPLAY=":0.0"<br />
<br />
At last we define the alias (e.g. in {{ic|~/.bashrc}}):<br />
alias skype='xhost +local: && su skype -c skype'<br />
Now we can start Skype as the newly created user simply by running {{Ic|skype}} from the command line and entering the password of the user skype.<br />
<br />
If you are tired of typing in the skype user's password every time, make sure you installed the [[sudo]] package, run {{Ic|visudo}} then add this line at the bottom:<br />
%wheel ALL=(skype) NOPASSWD: /usr/bin/skype<br />
<br />
And use this alias to launch skype:<br />
alias skype='xhost +local: && sudo -u skype /usr/bin/skype'<br />
<br />
{{Note|If you forget the {{ic|xhost}} command, Skype may fail with a "No protocol specified" error on stdout.}}<br />
<br />
I noticed that the newly created user is able to read some of the files in my home directory because the permissions were a+r, so I changed them manually to a-r u+r and changed umask from 022 to 066.<br />
<br />
In order to restrict user "skype" accessing your external drive mounted in {{ic|/media/data}} for instance, make sure first that "skype" does not belong to group "users" (if you used the default group "skype", everything should be fine), then change the accesses on the mount point:<br />
# chown :users /media/data<br />
# chmod o-rwx /media/data<br />
This way, it is ensured that only the owner (normally "root") and "users" can access the specified directory tree while the others, including "skype", will be forbidden.<br />
<br />
==== Open URLs in your user's browser ====<br />
<br />
When one clicks URL in chat window, skype execute [[xdg-open]] to handle it. By default {{ic|xdg-open}} uses default web browser for skype user environment. In order to open links in your user's browser perform next setup.<br />
<br />
{{Note|<br />
* [[Sudo]] should be installed and properly configured.<br />
* Current example uses [[firefox]] as preferred browser.<br />
* Do not forget to adjust ''your_user'' to proper value.<br />
}}<br />
<br />
Log in as skype user:<br />
$ sudo su - skype<br />
<br />
Create local preferences dir:<br />
$ mkdir -p ~/.local/share/applications<br />
<br />
Create {{ic|/home/skype/.local/share/applications/firefox-sudo.desktop}} file:<br />
[Desktop Entry]<br />
Name=Firefox<br />
Exec=/home/skype/firefox-wrapper %u<br />
Terminal=false<br />
Type=Application<br />
Categories=Network;WebBrowser;<br />
<br />
Set {{ic|firefox-sudo.desktop}} to manage HTTP and HTTPS URLs:<br />
$ xdg-mime default firefox-sudo.desktop x-scheme-handler/http<br />
$ xdg-mime default firefox-sudo.desktop x-scheme-handler/https<br />
<br />
(Optionally) add FTP handler:<br />
$ xdg-mime default firefox-sudo.desktop x-scheme-handler/ftp<br />
<br />
Create {{ic|/home/skype/firefox-wrapper}} script (adjust ''your_user''):<br />
#!/bin/bash<br />
DISPLAY=:0.0 HOME=/home/''your_user'' sudo -u ''your_user'' /usr/lib/firefox/firefox -new-tab $1<br />
<br />
Make it executable:<br />
$ chmod +x ~/firefox-wrapper<br />
<br />
Now as root user open {{ic|/etc/sudoers}}:<br />
# visudo<br />
<br />
And add permission for skype user to exec user's browser (adjust ''your_user''):<br />
skype ALL=(''your_user'') NOPASSWD: /usr/lib/firefox/firefox -new-tab http*, /usr/lib/firefox/firefox -new-tab ftp*<br />
<br />
==== Access received files ====<br />
<br />
By default {{ic|skype}} stores received files with 600 permissions (only owner can access them). One may use [https://www.archlinux.org/packages/?sort=&q=incron incron] to perform automatic permission fix upon downloading.<br />
<br />
{{Note|This example assumes that you configure skype to save received files into {{ic|/home/skype/downloads}}}}<br />
<br />
Make skype home dir and download dir accessible:<br />
# chmod 755 /home/skype /home/skype/downloads<br />
<br />
Install incron with the {{Pkg|incron}} package from the [[official repositories]], and enable and start {{ic|incrond}} [[systemd#Using units|using systemd]].<br />
Open incrontab for root user:<br />
# incrontab -e<br />
<br />
Add incron job:<br />
/home/skype/downloads IN_CREATE chmod 644 $@/$#<br />
<br />
Save changes and exit incrontab editor.<br />
<br />
To test incron in action just enter skype donwload dir and create test file:<br />
# cd /home/skype/downloads<br />
# install -m 600 /dev/null test.txt<br />
# ls -l test.txt<br />
<br />
File permissions should be 644 or -rw-r--r--<br />
<br />
(Optionally) link skype download dir into your home dir:<br />
$ ln -s /home/skype/downloads ~/skype_files<br />
<br />
== Skype plugin for Pidgin ==<br />
<br />
See [[Pidgin#Skype plugin]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Skype crashes immediately ===<br />
<br />
Try creating the directory {{ic|~/.Skype/Logs}}.<br />
<br />
=== Skype crashes shortly after login ===<br />
<br />
If Skype crashes shortly after logging in, changing the rights for {{ic|libpulse.so.0.12.4}} (minor version might differ) and {{ic|libpulse-simple.so.0.0.3}} might fix the issue.[https://bugs.launchpad.net/ubuntu/+source/ia32-libs/+bug/646862/comments/14]<br />
<br />
# cd /usr/lib<br />
# chmod ugo-r libpulse.so.0.12.*<br />
# chmod ugo-r libpulse-simple.so.0.0.3<br />
<br />
64bit users might have to cd to {{ic|/usr/lib32}} instead.<br />
<br />
=== I can receive multiple audio streams, but I can only send one ===<br />
<br />
Skype can send and receive audio and I still hear other sounds playing from other applications, but I cannot record my microphone with other applications. That is because Skype or aoss blocks the audio input for itself.<br />
<br />
=== No video with GSPCA webcams ===<br />
<br />
For i686, install {{Pkg|v4l-utils}}, userspace tools and conversion library for Video 4 Linux, and run Skype with<br />
<br />
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype<br />
<br />
to start Skype with v4l1 compatibility.<br />
<br />
For x86_64, install {{Pkg|lib32-v4l-utils}} from [multilib] repository and run Skype with<br />
<br />
LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype<br />
<br />
To make it running from DE menus and independent of Skype updates, you can add alias (e.g. in {{ic|~/.bashrc}}):<br />
<br />
alias skype='LD_PRELOAD=/usr/''libxx''/libv4l/v4l1compat.so skype'<br />
<br />
where ''libxx'' should be edited as appropriate.<br />
<br />
=== No video with Compiz ===<br />
<br />
Try launching Skype setting an environment variable like this:<br />
<br />
$ XLIB_SKIP_ARGB_VISUALS=1 skype<br />
<br />
=== Skype does not use my GTK+ theme, even though other Qt apps do ===<br />
<br />
Recent versions of Skype allow you to change the theme via the Options menu. However, selecting the GTK+ option may not work properly. This is probably because you do not have a 32-bit theme engine installed. Try to find the engine your theme uses in the multilib repository or the [[AUR]]. If you have no idea which engine your theme is using, the easiest fix is to install {{AUR|lib32-gtk-engines}}. This does however contain quite a lot of packages, so the best would be to find and install only the needed package.<br />
<br />
{{Note|You may not have to install ''lib32-gtk-engines''. First try if the following steps work for you if you only install ''lib32-gtk2'' and a GTK+2 theme respectively. See also the [https://bbs.archlinux.org/viewtopic.php?pid&#61;1200975#p1200975 forums].}}<br />
<br />
Once installed, it will still not work unless you have a 32-bit version of GConf installed. You could build and install {{AUR|lib32-gconf}} if desired, but there is an easier workaround. First, create or edit {{ic|~/.gtkrc-2.0}} so that it contains the following line:<br />
<br />
$ gtk-theme-name = "''My theme''"<br />
<br />
Replace ''My theme by'' the name of your theme, but leave the quotes. Second, run Skype like this:<br />
<br />
$ export GTK2_RC_FILES="/etc/gtk-2.0/gtkrc:$HOME/.gtkrc-2.0"<br />
$ skype<br />
<br />
The GTK+ theme should now appear correctly. You can make this permanent either by running Skype from a script containing the above 2 lines, or by exporting GTK2_RC_FILES in {{ic|~/.xprofile}} or {{ic|~/.xinitrc}}, depending on how you start X.<br />
<br />
If you cannot change the theme in the Options menu, run Skype using the following command:<br />
<br />
$ /usr/bin/skype --disable-cleanlooks -style GTK<br />
<br />
If you wish menus within desktop environments to load Skype with a GTK+ theme by default then modify the 'Exec' line of {{ic|/usr/share/applications/skype.desktop}} so that it reads:<br />
<br />
$ Exec=/usr/bin/skype --disable-cleanlooks -style GTK<br />
<br />
Similarly if you have set Skype to autostart then modify {{ic|~/.config/autostart/skype.desktop}} in the same way.<br />
<br />
=== The microphone does not work ===<br />
<br />
Run amixer:<br />
<br />
$ amixer<br />
<br />
and check if you have an output for '''Capture''' similar to the one below.<br />
<br />
Simple mixer control 'Capture',0<br />
Capabilities: cvolume cswitch penum<br />
Capture channels: Front Left - Front Right<br />
Limits: Capture 0 - 15<br />
Front Left: Capture 8 [53%] [12.00dB] [on]<br />
Front Right: Capture 8 [53%] [12.00dB] [on]<br />
<br />
If your output is similar, your microphone is working just fine, and the issue is either hardware related (broken microphone) or your volume needs to be checked. If you do not have an output similar to the one above or, more specifically, if both '''Front Left''' and '''Front Right''' are 0% or show an '''[off]''' tag at the end, then your microphone settings need to be rectified.<br />
<br />
In either case, try to run:<br />
<br />
$ alsamixer<br />
<br />
and press {{ic|F5}} to show all channels. Using the arrow keys navigate all the way to the end and increase '''Capture'''. If you do not see a left and right channel for '''Capture''', press the space bar. Doing this turns the left and right channels on. Check that '''Input Source''' is set to the correct value (e.g. ''[Front Mic]''): navigate through the values with up and down arrow keys. If your microphone is an array built into your monitor, or you have a similar setup, make sure to increase the volume for the '''Digital''' column too. If you have multiple microphones, you may have to play around with the '''Mic Jack''' channel to get your desired setting.<br />
<br />
You may want to save your mixer settings with:<br />
<br />
# alsactl -f /var/lib/alsa/asound.state store<br />
<br />
=== No incoming video stream ===<br />
<br />
If skype shows a black square for the video preview, but something else (like {{ic|xawtv -c /dev/video0}}) shows video correctly, you might need to start Skype with:<br />
<br />
export XLIB_SKIP_ARGB_VISUALS=1 && skype<br />
<br />
Another possible workaround is to preload ''v4l1compat.so'':<br />
<br />
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype<br />
<br />
For my machine this doesn't seem to work; instead I do<br />
{{bc|<nowiki><br />
cd /usr/lib/lib32/libv4l && LD_PRELOAD=v4l1compat.so skype;<br />
</nowiki>|bc}}<br />
<br />
=== Low sound in Skype, but works everywhere else ===<br />
<br />
If you are sure your microphone is configured correctly in ALSA (try recording with a 3rd-party-utility to determine whether it is an ALSA or Skype problem), it is most likely because Skype is controlling your volume levels. Simply disable this feature in the voice settings page in the Skype configuration window.<br />
<br />
This may also help if your microphone input is automatically lowered until 0.<br />
<br />
=== Monster/low-octave "growling" distortion over mic ===<br />
<br />
Some users with newer kernels are experiencing a monster-like growling distortion of their sound stream on the other end of Skype. This can be fixed by creating a dummy ALSA device or by removing {{ic|~/.Skype/shared.xml}}. See https://bbs.archlinux.org/viewtopic.php?pid=819500#p819500 for more information.<br />
<br />
=== Skype can only see PulseAudio, but not ALSA devices ===<br />
<br />
Turn PulseAudio autospawn off and kill PulseAudio:<br />
$ echo "autospawn = no" > ~/.pulse/client.conf<br />
$ killall pulseaudio<br />
And restart Skype.<br />
<br />
=== Crackling/noisy sound (mainly using 64-bit OS) ===<br />
<br />
Edit {{ic|/etc/pulse/default.pa}} and change the following line<br />
<br />
load-module module-udev-detect<br />
<br />
to<br />
<br />
load-module module-udev-detect tsched=0<br />
<br />
See also: [[PulseAudio#Glitches, skips or crackling]].<br />
<br />
=== Problem with Audio Playback on x86_64 ===<br />
<br />
See [[Pulseaudio#Skype (x86_64 only)]], even if you are not using PulseAudio.<br />
<br />
=== Skype sounds stops media player or other sound sources === <br />
<br />
You can try commenting out the following modules in {{ic|/etc/pulse/default.pa}}<br />
#module-cork-music-on-phone<br />
#module-role-cork<br />
<br />
If that does not help, you can try changing flat-volumes to no in {{ic|/etc/pulse/daemon.conf}}.<br />
flat-volumes = no</div>
Vas
https://wiki.archlinux.org/index.php?title=Skype&diff=285352
Skype
2013-11-30T07:50:54Z
<p>Vas: /* Use Skype with special user */ changed interactive useradd command to non-interactive</p>
<hr />
<div>[[bg:Skype]]<br />
[[cs:Skype]]<br />
[[lt:Skype]]<br />
[[ru:Skype]]<br />
[[uk:Skype]]<br />
[[Category:Audio/Video]]<br />
[[Category:Telephony and Voice]]<br />
== Installation ==<br />
<br />
[[pacman|Install]] {{Pkg|skype}} from the [[official repositories]]. If you have a 64-bit system, enable the [[multilib]] repository first as Skype is 32-bit only.<br />
<br />
Running Skype is just as easy. Type {{Ic|skype}} into a terminal or double-click the Skype icon on your desktop or in your DE's application menu.<br />
<br />
== Skype sound ==<br />
<br />
Skype supports [[ALSA]] and [[PulseAudio]]. [[OSS]] is no longer supported.<br />
<br />
=== ALSA ===<br />
<br />
Sound should work out of the box, if not you can select a sound device to use in Skype options. If you have problems with Skype blocking your sound device, you only need to add the following to your {{ic|~/.asoundrc}}<br />
pcm.dmixout {<br />
# Just pass this on to the system dmix<br />
type plug<br />
slave {<br />
pcm "dmix"<br />
}<br />
}<br />
then you can start Skype as normal, go to the audio options and select dmixout as your speaker- and ringingdevice.<br />
<br />
=== PulseAudio ===<br />
<br />
Sound should work out of the box, if not you can select another input using pavucontrol (you may have to install it first).<br />
<br />
If you are on x86_64 and use the multilib {{Pkg|skype}} package, you also need {{Pkg|lib32-libpulse}}.<br />
<br />
=== OSS (Pre-2.0, no longer available) ===<br />
<br />
Option B is preferred over other options.<br />
With option B you can use Skype AND let other programs play sound too.<br />
With option C you can do that too, but option B is way easier to set up.<br />
<br />
You can install the legacy {{Pkg|skype-oss}} from Comunity repo.<br />
<br />
If you need 64x-86x support then download an OSS compatible version from [http://www.mediafire.com/?2ydhmj4yo3i here] and the PKGBUILD form [https://aur.archlinux.org/packages.php?ID=18312 here.] Also install {{Pkg|lib32-libxinerama}}. Finally, run<br />
$ makepkg -s<br />
to create the pacman installable package.<br />
<br />
==== A. With OSS or Kernel OSS emulation for ALSA ====<br />
<br />
Start Skype and make sure no other program is using your soundcard.<br />
If you want to use Skype AND let another program play sound too, look at option B instead.<br />
<br />
==== B. Making ALSA + dMix work for Skype ====<br />
<br />
First of all, we need to install the {{Pkg|alsa-oss}} package with [[pacman]].<br />
<br />
Add the following to {{ic|~/.asoundrc}}. If the file does not exist yet, just create it! (Many thanks to Lorenzo Colitti for figuring this out!)<br />
<br />
# .asoundrc to use skype at the same time as other audio apps like xmms<br />
#<br />
# Successfully tested on an IBM x40 with i810_audio using Linux 2.6.15 and<br />
# Debian unstable with skype 1.2.0.18-API. No sound daemons (asound, esd, etc.)<br />
# running. However, YMMV.<br />
#<br />
# For background, see:<br />
#<br />
# https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1228<br />
# https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1224<br />
#<br />
# (C) 2006-06-03 Lorenzo Colitti - http://www.colitti.com/lorenzo/<br />
# Licensed under the GPLv2 or later<br />
<br />
pcm.skype {<br />
type asym<br />
playback.pcm "skypeout"<br />
capture.pcm "skypein"<br />
}<br />
<br />
pcm.skypein {<br />
# Convert from 8-bit unsigned mono (default format set by aoss when<br />
# /dev/dsp is opened) to 16-bit signed stereo (expected by dsnoop)<br />
#<br />
# We cannot just use a "plug" plugin because although the open will<br />
# succeed, the buffer sizes will be wrong and we will hear no sound at<br />
# all.<br />
type route<br />
slave {<br />
pcm "skypedsnoop"<br />
format S16_LE<br />
}<br />
ttable {<br />
0 {0 0.5}<br />
1 {0 0.5}<br />
}<br />
}<br />
<br />
pcm.skypeout {<br />
# Just pass this on to the system dmix<br />
type plug<br />
slave {<br />
pcm "dmix"<br />
}<br />
}<br />
<br />
pcm.skypedsnoop {<br />
type dsnoop<br />
ipc_key 1133<br />
slave {<br />
# "Magic" buffer values to get skype audio to work<br />
# If these are not set, opening /dev/dsp succeeds but no sound<br />
# will be heard. According to the ALSA developers this is due<br />
# to skype abusing the OSS API.<br />
pcm "hw:0,0"<br />
period_size 256<br />
periods 16<br />
buffer_size 16384<br />
}<br />
bindings {<br />
0 0<br />
}<br />
}<br />
<br />
If you get the error message :<br />
<br />
The dmix plugin supports only playback stream<br />
<br />
then add the following to {{ic|.asoundrc}}:<br />
<br />
pcm.asymed {<br />
type asym<br />
playback.pcm "dmix"<br />
capture.pcm "dsnoop"<br />
}<br />
<br />
pcm.!default {<br />
type plug<br />
slave.pcm "asymed"<br />
}<br />
<br />
<br />
Now run Skype in this way each time you want to use it:<br />
ALSA_OSS_PCM_DEVICE="skype" aoss skype<br />
<br />
Optionally you can make a script to start Skype:<br />
<br />
As root, create the file: {{ic|/usr/bin/askype}}<br />
<br />
# Little script to run Skype correctly using the modified .asoundrc<br />
# See: https://wiki.archlinux.org/index.php/Skype for more information!<br />
#<br />
# Questions/Remarks: profox@debianbox.be<br />
<br />
ALSA_OSS_PCM_DEVICE="skype" aoss skype<br />
<br />
Now make sure every user is able to execute the file:<br />
# chmod a+x /usr/bin/askype<br />
<br />
You can also fix the menu entry so you can start Skype from the your window manager's menu:<br />
<br />
Edit the file: {{ic|/usr/share/applications/skype.desktop}}<br />
<br />
[Desktop Entry]<br />
Name=Skype<br />
Comment=P2P software for high-quality voice communication<br />
Exec=askype<br />
Icon=skype.png<br />
Terminal=0<br />
Type=Application<br />
Encoding=UTF-8<br />
Categories=Network;Application;<br />
<br />
Sometimes it takes a while for Skype to start up but once it is loaded it should work ok!<br />
<br />
==== C. Using OSS emulation with oss2jack ====<br />
<br />
{{AUR|oss2jack}} is another way to have OSS emulation without using ALSA directly. Instead, oss2jack creates a OSS device that forwards everything to JACK (JACK Audio Connection Kit), which in turn mixes, then outputs to the standard ALSA device.<br />
<br />
== Securing Skype ==<br />
<br />
There are a couple of reasons you might want to restrict Skype's access to your computer:<br />
* The skype binary is disguised against decompiling, so nobody is (still) able to reproduce what it really does.<br />
* It produces encrypted traffic even when you are not actively using Skype.<br />
* ...<br />
See [http://www1.cs.columbia.edu/~salman/skype/index.html] for more information.<br />
<br />
=== AppArmor ===<br />
<br />
Follow the instructions [[AppArmor|here]] to set up AppArmor.<br />
<br />
The userland tools for AppArmor come with a collection of example profiles. Skype is amongst them. Copy this to the directory where AppArmor profiles are stored.<br />
# cp -ip /etc/apparmor/profiles/extras/usr.bin.skype /etc/apparmor.d/<br />
<br />
For whatever reason, the profile is not complete. You may wish to modify it further. Here is an example for Skype 4:<br />
<br />
{{bc|#include <tunables/global><br />
/usr/bin/skype {<br />
#include <abstractions/audio><br />
#include <abstractions/consoles><br />
#include <abstractions/dbus-session><br />
#include <abstractions/gnome><br />
#include <abstractions/kde><br />
#include <abstractions/nameservice><br />
#include <abstractions/video><br />
<br />
# Executables<br />
/usr/bin/skype ixmr,<br />
/usr/lib{,32}/skype/skype ixmr,<br />
/usr/bin/xdg-open PUxmr,<br />
<br />
# Configuration files<br />
owner @{HOME}/.Skype/ rw,<br />
owner @{HOME}/.Skype/** krw,<br />
owner @{HOME}/.config/Skype/ rw,<br />
owner @{HOME}/.config/Skype/** krw,<br />
<br />
# Downloads/uploads directory<br />
owner @{HOME}/Public/ rw,<br />
owner @{HOME}/Public/** krw,<br />
<br />
# Libraries<br />
/usr/lib{,32}/libv4l/v4l2convert.so mr,<br />
/usr/share/skype/lib/libQtWebKit.so.4 mr,<br />
<br />
# Shared data<br />
/usr/share/skype/ r,<br />
/usr/share/skype/** r,<br />
<br />
# Devices<br />
/dev/ r,<br />
/dev/video[0-9]* mrw,<br />
<br />
# System information<br />
/etc/machine-id r,<br />
@{PROC}/sys/kernel/{ostype,osrelease} r,<br />
@{PROC}/sys/vm/overcommit_memory r,<br />
@{PROC}/[0-9]*/net/arp r,<br />
owner @{PROC}/[0-9]*/cmdline r,<br />
owner @{PROC}/[0-9]*/status r,<br />
owner @{PROC}/[0-9]*/task/ r,<br />
owner @{PROC}/[0-9]*/task/[0-9]*/stat r,<br />
/sys/devices/system/cpu/ r,<br />
/sys/devices/system/cpu/cpu[0-9]*/cpufreq/scaling_{cur_freq,max_freq} r,<br />
/sys/devices/pci*/*/usb[0-9]*/*/*/*/modalias r,<br />
/sys/devices/pci*/*/usb[0-9]*/*/*/*/video4linux/video[0-9]*/dev r,<br />
/sys/devices/pci*/*/usb[0-9]*/*/*/{idVendor,idProduct,speed} r,<br />
<br />
# This probably should go to appropriate abstractions<br />
owner @{HOME}/.config/fontconfig/fonts.conf r,<br />
owner @{HOME}/.config/gtk-3.0/bookmarks r,<br />
owner @{HOME}/.config/pulse/cookie krw,<br />
owner @{HOME}/.icons/** r,<br />
owner @{HOME}/.kde/share/config/kioslaverc r,<br />
<br />
# Denials<br />
deny owner @{HOME}/.mozilla/ r,<br />
deny owner @{HOME}/.mozilla/** r,<br />
deny /sys/devices/virtual/dmi/** r,<br />
&#125;}}<br />
<br />
{{Note|This example assumes that Skype is configured to save received files into {{ic|~/Public}}. Feel free to change it to any folder you like.}}<br />
<br />
To use the profile, first be sure {{ic|securityfs}} is mounted,<br />
# mount -t securityfs securityfs /sys/kernel/security<br />
<br />
Load the profile by the command,<br />
# apparmor_parser -r /etc/apparmor.d/usr.bin.skype<br />
<br />
Now you can run Skype restricted but as your own user. Denials are logged in {{ic|messages.log}}.<br />
<br />
=== TOMOYO ===<br />
<br />
Follow the instructions [[TOMOYO_Linux#TOMOYO_Linux_2.x|here]] to install TOMOYO. Please note that this section describes using TOMOYO 2.5.<br />
<br />
During Skype audit it was discovered that Skype reads DMI information and Mozilla profile. To give Skype minimal access to your system using TOMOYO, please follow these steps.<br />
<br />
* Open {{ic|/etc/tomoyo/exception_policy.conf}} file and add these lines:<br />
<br />
{{bc|path_group SKYPE_DIRS /home/\*/.Skype/<br />
path_group SKYPE_DIRS /home/\*/.Skype/\{\*\}/<br />
path_group SKYPE_DIRS /home/\*/.config/Skype/\{\*\}/<br />
path_group SKYPE_DIRS /usr/share/skype/\{\*\}/<br />
path_group SKYPE_DIRS /home/pf/work/tmp/\{\*\}/<br />
path_group SKYPE_FILES /home/\*/.Skype/\{\*\}/\*<br />
path_group SKYPE_FILES /home/\*/.config/Skype/\{\*\}/\*<br />
path_group SKYPE_FILES /usr/share/skype/\{\*\}/\*<br />
path_group SKYPE_FILES /home/pf/work/tmp/\{\*\}/\*<br />
path_group SKYPE_FILES /home/\*/.Skype/\*<br />
path_group SKYPE_FILES /home/\*/.config/Skype/\*<br />
path_group SKYPE_FILES /usr/share/skype/\*<br />
path_group SKYPE_FILES /home/pf/work/tmp/\*<br />
path_group ICONS_DIRS /usr/share/icons/\{\*\}/<br />
path_group ICONS_FILES /usr/share/icons/\{\*\}/\*<br />
path_group ICONS_FILES /usr/share/icons/\*<br />
initialize_domain /usr/bin/skype from any<br />
initialize_domain /usr/lib32/skype/skype from any}}<br />
<br />
Note that {{ic|/home/pf/work/tmp}} folder is only the folder to which Skype will be able to save received files and from which it will be able to send all files. You have to change this folder.<br />
<br />
* Then open {{ic|/etc/tomoyo/domain_policy.conf}} and add the following lines:<br />
<br />
{{bc|<kernel> /usr/bin/skype<br />
use_profile 3<br />
use_group 0<br />
<br />
misc env \*<br />
file read /bin/bash<br />
file read /usr/bin/bash<br />
file read/write /dev/tty<br />
file read /usr/lib/locale/locale-archive<br />
file read /usr/lib/gconv/gconv-modules<br />
file read /usr/bin/skype<br />
file read /usr/lib32/skype/skype<br />
file execute /usr/lib32/skype/skype exec.realpath&#61;"/usr/lib32/skype/skype" exec.argv[0]&#61;"/usr/lib32/skype/skype"<br />
<br />
<kernel> /usr/lib32/skype/skype<br />
use_profile 3<br />
use_group 0<br />
<br />
file append /dev/snd/pcm\*<br />
file chmod /home/\*/.Skype/ 0700<br />
file create /home/\*/.cache/fontconfig/\* 0600-0666<br />
file create /tmp/qtsingleapp-\*-lockfile 0600-0666<br />
file create @SKYPE_FILES 0600-0666<br />
file execute /usr/bin/firefox<br />
file execute /usr/bin/gnome-open<br />
file execute /usr/bin/notify-send<br />
file execute /usr/bin/opera<br />
file execute /usr/bin/xdg-open<br />
file ioctl /dev/snd/\* 0-0xFFFFFFFFFFFFFFFF<br />
file ioctl /dev/video0 0-0xFFFFFFFFFFFFFFFF<br />
file ioctl anon_inode:inotify 0x541B<br />
file ioctl socket:[family&#61;1:type&#61;2:protocol&#61;0] 0x8910<br />
file ioctl socket:[family&#61;1:type&#61;2:protocol&#61;0] 0x8933<br />
file ioctl socket:[family&#61;2:type&#61;1:protocol&#61;6] 0x541B<br />
file ioctl socket:[family&#61;2:type&#61;2:protocol&#61;17] 0x541B<br />
file ioctl socket:[family&#61;2:type&#61;2:protocol&#61;17] 0x8912<br />
file ioctl socket:[family&#61;2:type&#61;2:protocol&#61;17] 0x8927<br />
file ioctl socket:[family&#61;2:type&#61;2:protocol&#61;17] 0x8B01<br />
file link /home/\*/.cache/fontconfig/\* /home/\*/.cache/fontconfig/\*<br />
file mkdir /home/\*/.cache/fontconfig/\* 0600<br />
file mkdir @SKYPE_DIRS 0700-0777<br />
file mksock /tmp/qtsingleapp-\* 0755<br />
file read /dev/urandom<br />
file read /etc/fonts/conf.avail/\*.conf<br />
file read /etc/fonts/conf.d/\*.conf<br />
file read /etc/fonts/fonts.conf<br />
file read /etc/group<br />
file read /etc/host.conf<br />
file read /etc/hosts<br />
file read /etc/machine-id<br />
file read /etc/nsswitch.conf<br />
file read /etc/passwd<br />
file read /etc/resolv.conf<br />
file read /home/\*/.ICEauthority<br />
file read /home/\*/.XCompose<br />
file read /home/\*/.Xauthority<br />
file read /home/\*/.Xdefaults<br />
file read /home/\*/.fontconfig/\*<br />
file read /home/\*/.config/fontconfig/\*<br />
file read /usr/lib/locale/locale-archive<br />
file read /usr/lib32/gconv/UTF-16.so<br />
file read /usr/lib32/gconv/gconv-modules<br />
file read /usr/lib32/libv4l/v4l2convert.so<br />
file read /usr/lib32/qt/plugins/bearer/libq\*bearer.so<br />
file read /usr/lib32/qt/plugins/iconengines/libqsvgicon.so<br />
file read /usr/lib32/qt/plugins/imageformats/libq\*.so<br />
file read /usr/lib32/qt/plugins/inputmethods/libqimsw-multi.so<br />
file read /usr/lib32/skype/skype<br />
file read /usr/share/X11/locale/\*/Compose<br />
file read /usr/share/X11/locale/\*/XLC_LOCALE<br />
file read /usr/share/X11/locale/compose.dir<br />
file read /usr/share/X11/locale/locale.alias<br />
file read /usr/share/X11/locale/locale.dir<br />
file read /usr/share/alsa/alsa.conf<br />
file read /usr/share/alsa/cards/\*.conf<br />
file read /usr/share/alsa/pcm/\*.conf<br />
file read /usr/share/fonts/\*/\*/\*<br />
file read @ICONS_FILES<br />
file read proc:/cpuinfo<br />
file read proc:/stat<br />
file read proc:/sys/kernel/osrelease<br />
file read proc:/sys/kernel/ostype<br />
file read sysfs:/devices/\*/\*/\*/\*/\*/\*/modalias<br />
file read sysfs:/devices/\*/\*/\*/\*/\*/\*/video4linux/video0/dev<br />
file read sysfs:/devices/\*/\*/\*/\*/\*/idProduct<br />
file read sysfs:/devices/\*/\*/\*/\*/\*/idVendor<br />
file read sysfs:/devices/\*/\*/\*/\*/\*/speed<br />
file read sysfs:/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq<br />
file read sysfs:/devices/system/cpu/cpu0/cpufreq/scaling_max_freq<br />
file read sysfs:/devices/system/cpu/online<br />
file read/write /dev/snd/\*<br />
file read/write /dev/video0<br />
file read/write/truncate /home/\*/.config/Trolltech.conf<br />
file read/write/unlink /home/\*/.cache/fontconfig/\*<br />
file read/write/unlink /tmp/qtsingleapp-\*<br />
file read/write/unlink/truncate @SKYPE_FILES<br />
file rename /home/\*/.cache/fontconfig/\* /home/\*/.cache/fontconfig/\*<br />
file rename @SKYPE_DIRS @SKYPE_DIRS<br />
file rename @SKYPE_FILES @SKYPE_FILES<br />
file rmdir @SKYPE_DIRS<br />
misc env \*<br />
network inet dgram bind 0.0.0.0 0-65535<br />
network inet dgram bind 127.0.0.1 0<br />
network inet dgram bind/send 0.0.0.0-255.255.255.255 0-65535<br />
network inet stream bind/listen 0.0.0.0 0-65535<br />
network inet stream connect 0.0.0.0-255.255.255.255 0-65535<br />
network unix stream bind/listen /tmp/qtsingleapp-\*<br />
network unix stream connect /tmp/.ICE-unix/\*<br />
network unix stream connect /tmp/qtsingleapp-\*<br />
network unix stream connect /var/run/dbus/system_bus_socket<br />
network unix stream connect /var/run/nscd/socket<br />
network unix stream connect \000/tmp/.ICE-unix/\*<br />
network unix stream connect \000/tmp/.X11-unix/X0<br />
network unix stream connect \000/tmp/dbus-\*<br />
<br />
<kernel> /usr/lib32/skype/skype /usr/bin/xdg-open<br />
use_profile 0<br />
use_group 0<br />
<br />
<br />
<kernel> /usr/lib32/skype/skype /usr/bin/gnome-open<br />
use_profile 0<br />
use_group 0<br />
<br />
<kernel> /usr/lib32/skype/skype /usr/bin/notify-send<br />
use_profile 0<br />
use_group 0}}<br />
<br />
* After finishing editing reload TOMOYO config files by executing these commands:<br />
<br />
{{bc|# tomoyo-loadpolicy -df </etc/tomoyo/domain_policy.conf<br />
# tomoyo-loadpolicy -ef </etc/tomoyo/exception_policy.conf}}<br />
<br />
Voilà — your Skype is sandboxed now.<br />
<br />
Please note that this config is generated on 64-bit Arch system, and some of your ioctls and library paths may differ from mentioned above. So in order to fine-tune TOMOYO config for your Skype load {{ic|tomoyo-auditd}} daemon:<br />
<br />
# systemctl start tomoyo-auditd<br />
<br />
Then go to {{ic|/var/log/tomoyo}} folder and start watching {{ic|reject_003.log}}:<br />
<br />
tail -f reject_003.log<br />
<br />
The output of this command will show you rejected actions for Skype, so you'll be able to add them to {{ic|domain_policy.conf}} file if needed.<br />
<br />
Detailed guide about TOMOYO configuring can be found [http://tomoyo.sourceforge.jp/2.5/index.html.en here].<br />
<br />
=== Use Skype with special user ===<br />
<br />
Instead of using AppArmor or TOMOYO which require the installation of extra packages, one may prefer to add a special user. This user is only used for running Skype within one's normal environment. This approach restricts Skype to reading only the data of this particular user instead of one's main user. (The new user should not be used for any other thing. Skype only.)<br />
<br />
An AUR package, [https://aur.archlinux.org/packages/skype-restricted/ skype-restricted] exists that will run skype as a separate user ("_skype") cleanly. It's heavily based on the information in this section.<br />
<br />
Optionally, we first add a default group for the skype user. I will call the new user and its default group "skype". The security advantage in keeping the "skype" user in its separate group is that it can be restricted from accessing some places other users are allowed in.<br />
# groupadd skype<br />
Then we have to add the new user:<br />
# useradd -m -g skype -G audio,video,pulse-access,pulse-rt -s /bin/bash skype<br />
<br />
Now add the following line to {{ic|/home/skype/.bashrc}}:<br />
export DISPLAY=":0.0"<br />
<br />
At last we define the alias (e.g. in {{ic|~/.bashrc}}):<br />
alias skype='xhost +local: && su skype -c skype'<br />
Now we can start Skype as the newly created user simply by running {{Ic|skype}} from the command line and entering the password of the user skype.<br />
<br />
If you are tired of typing in the skype user's password every time, make sure you installed the [[sudo]] package, run {{Ic|visudo}} then add this line at the bottom:<br />
%wheel ALL=(skype) NOPASSWD: /usr/bin/skype<br />
<br />
And use this alias to launch skype:<br />
alias skype='xhost +local: && sudo -u skype /usr/bin/skype'<br />
<br />
{{Note|If you forget the {{ic|xhost}} command, Skype may fail with a "No protocol specified" error on stdout.}}<br />
<br />
I noticed that the newly created user is able to read some of the files in my home directory because the permissions were a+r, so I changed them manually to a-r u+r and changed umask from 022 to 066.<br />
<br />
In order to restrict user "skype" accessing your external drive mounted in {{ic|/media/data}} for instance, make sure first that "skype" does not belong to group "users" (if you used the default group "skype", everything should be fine), then change the accesses on the mount point:<br />
# chown :users /media/data<br />
# chmod o-rwx /media/data<br />
This way, it is ensured that only the owner (normally "root") and "users" can access the specified directory tree while the others, including "skype", will be forbidden.<br />
<br />
==== Open URLs in your user's browser ====<br />
<br />
When one clicks URL in chat window, skype execute [[xdg-open]] to handle it. By default {{ic|xdg-open}} uses default web browser for skype user environment. In order to open links in your user's browser perform next setup.<br />
<br />
{{Note|<br />
* [[Sudo]] should be installed and properly configured.<br />
* Current example uses [[firefox]] as preferred browser.<br />
* Do not forget to adjust ''your_user'' to proper value.<br />
}}<br />
<br />
Log in as skype user:<br />
$ sudo su - skype<br />
<br />
Create local preferences dir:<br />
$ mkdir -p ~/.local/share/applications<br />
<br />
Create {{ic|/home/skype/.local/share/applications/firefox-sudo.desktop}} file:<br />
[Desktop Entry]<br />
Name=Firefox<br />
Exec=/home/skype/firefox-wrapper %u<br />
Terminal=false<br />
Type=Application<br />
Categories=Network;WebBrowser;<br />
<br />
Set {{ic|firefox-sudo.desktop}} to manage HTTP and HTTPS URLs:<br />
$ xdg-mime default firefox-sudo.desktop x-scheme-handler/http<br />
$ xdg-mime default firefox-sudo.desktop x-scheme-handler/https<br />
<br />
(Optionally) add FTP handler:<br />
$ xdg-mime default firefox-sudo.desktop x-scheme-handler/ftp<br />
<br />
Create {{ic|/home/skype/firefox-wrapper}} script (adjust ''your_user''):<br />
#!/bin/bash<br />
DISPLAY=:0.0 HOME=/home/''your_user'' sudo -u ''your_user'' /usr/lib/firefox/firefox -new-tab $1<br />
<br />
Make it executable:<br />
$ chmod +x ~/firefox-wrapper<br />
<br />
Now as root user open {{ic|/etc/sudoers}}:<br />
# visudo<br />
<br />
And add permission for skype user to exec user's browser (adjust ''your_user''):<br />
skype ALL=(''your_user'') NOPASSWD: /usr/lib/firefox/firefox -new-tab http*, /usr/lib/firefox/firefox -new-tab ftp*<br />
<br />
==== Access received files ====<br />
<br />
By default {{ic|skype}} stores received files with 600 permissions (only owner can access them). One may use [https://www.archlinux.org/packages/?sort=&q=incron incron] to perform automatic permission fix upon downloading.<br />
<br />
{{Note|This example assumes that you configure skype to save received files into {{ic|/home/skype/downloads}}}}<br />
<br />
Make skype home dir and download dir accessible:<br />
# chmod 755 /home/skype /home/skype/downloads<br />
<br />
Install incron with the {{Pkg|incron}} package from the [[official repositories]], and enable and start {{ic|incrond}} [[systemd#Using units|using systemd]].<br />
Open incrontab for root user:<br />
# incrontab -e<br />
<br />
Add incron job:<br />
/home/skype/downloads IN_CREATE chmod 644 $@/$#<br />
<br />
Save changes and exit incrontab editor.<br />
<br />
To test incron in action just enter skype donwload dir and create test file:<br />
# cd /home/skype/downloads<br />
# install -m 600 /dev/null test.txt<br />
# ls -l test.txt<br />
<br />
File permissions should be 644 or -rw-r--r--<br />
<br />
(Optionally) link skype download dir into your home dir:<br />
$ ln -s /home/skype/downloads ~/skype_files<br />
<br />
== Skype plugin for Pidgin ==<br />
<br />
See [[Pidgin#Skype plugin]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Skype crashes immediately ===<br />
<br />
Try creating the directory {{ic|~/.Skype/Logs}}.<br />
<br />
=== Skype crashes shortly after login ===<br />
<br />
If Skype crashes shortly after logging in, changing the rights for {{ic|libpulse.so.0.12.4}} (minor version might differ) and {{ic|libpulse-simple.so.0.0.3}} might fix the issue.[https://bugs.launchpad.net/ubuntu/+source/ia32-libs/+bug/646862/comments/14]<br />
<br />
# cd /usr/lib<br />
# chmod ugo-r libpulse.so.0.12.*<br />
# chmod ugo-r libpulse-simple.so.0.0.3<br />
<br />
64bit users might have to cd to {{ic|/usr/lib32}} instead.<br />
<br />
=== I can receive multiple audio streams, but I can only send one ===<br />
<br />
Skype can send and receive audio and I still hear other sounds playing from other applications, but I cannot record my microphone with other applications. That is because Skype or aoss blocks the audio input for itself.<br />
<br />
=== No video with GSPCA webcams ===<br />
<br />
For i686, install {{Pkg|v4l-utils}}, userspace tools and conversion library for Video 4 Linux, and run Skype with<br />
<br />
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype<br />
<br />
to start Skype with v4l1 compatibility.<br />
<br />
For x86_64, install {{Pkg|lib32-v4l-utils}} from [multilib] repository and run Skype with<br />
<br />
LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype<br />
<br />
To make it running from DE menus and independent of Skype updates, you can add alias (e.g. in {{ic|~/.bashrc}}):<br />
<br />
alias skype='LD_PRELOAD=/usr/''libxx''/libv4l/v4l1compat.so skype'<br />
<br />
where ''libxx'' should be edited as appropriate.<br />
<br />
=== No video with Compiz ===<br />
<br />
Try launching Skype setting an environment variable like this:<br />
<br />
$ XLIB_SKIP_ARGB_VISUALS=1 skype<br />
<br />
=== Skype does not use my GTK+ theme, even though other Qt apps do ===<br />
<br />
Recent versions of Skype allow you to change the theme via the Options menu. However, selecting the GTK+ option may not work properly. This is probably because you do not have a 32-bit theme engine installed. Try to find the engine your theme uses in the multilib repository or the [[AUR]]. If you have no idea which engine your theme is using, the easiest fix is to install {{AUR|lib32-gtk-engines}}. This does however contain quite a lot of packages, so the best would be to find and install only the needed package.<br />
<br />
{{Note|You may not have to install ''lib32-gtk-engines''. First try if the following steps work for you if you only install ''lib32-gtk2'' and a GTK+2 theme respectively. See also the [https://bbs.archlinux.org/viewtopic.php?pid&#61;1200975#p1200975 forums].}}<br />
<br />
Once installed, it will still not work unless you have a 32-bit version of GConf installed. You could build and install {{AUR|lib32-gconf}} if desired, but there is an easier workaround. First, create or edit {{ic|~/.gtkrc-2.0}} so that it contains the following line:<br />
<br />
$ gtk-theme-name = "''My theme''"<br />
<br />
Replace ''My theme by'' the name of your theme, but leave the quotes. Second, run Skype like this:<br />
<br />
$ export GTK2_RC_FILES="/etc/gtk-2.0/gtkrc:$HOME/.gtkrc-2.0"<br />
$ skype<br />
<br />
The GTK+ theme should now appear correctly. You can make this permanent either by running Skype from a script containing the above 2 lines, or by exporting GTK2_RC_FILES in {{ic|~/.xprofile}} or {{ic|~/.xinitrc}}, depending on how you start X.<br />
<br />
If you cannot change the theme in the Options menu, run Skype using the following command:<br />
<br />
$ /usr/bin/skype --disable-cleanlooks -style GTK<br />
<br />
If you wish menus within desktop environments to load Skype with a GTK+ theme by default then modify the 'Exec' line of {{ic|/usr/share/applications/skype.desktop}} so that it reads:<br />
<br />
$ Exec=/usr/bin/skype --disable-cleanlooks -style GTK<br />
<br />
Similarly if you have set Skype to autostart then modify {{ic|~/.config/autostart/skype.desktop}} in the same way.<br />
<br />
=== The microphone does not work ===<br />
<br />
Run amixer:<br />
<br />
$ amixer<br />
<br />
and check if you have an output for '''Capture''' similar to the one below.<br />
<br />
Simple mixer control 'Capture',0<br />
Capabilities: cvolume cswitch penum<br />
Capture channels: Front Left - Front Right<br />
Limits: Capture 0 - 15<br />
Front Left: Capture 8 [53%] [12.00dB] [on]<br />
Front Right: Capture 8 [53%] [12.00dB] [on]<br />
<br />
If your output is similar, your microphone is working just fine, and the issue is either hardware related (broken microphone) or your volume needs to be checked. If you do not have an output similar to the one above or, more specifically, if both '''Front Left''' and '''Front Right''' are 0% or show an '''[off]''' tag at the end, then your microphone settings need to be rectified.<br />
<br />
In either case, try to run:<br />
<br />
$ alsamixer<br />
<br />
and press {{ic|F5}} to show all channels. Using the arrow keys navigate all the way to the end and increase '''Capture'''. If you do not see a left and right channel for '''Capture''', press the space bar. Doing this turns the left and right channels on. Check that '''Input Source''' is set to the correct value (e.g. ''[Front Mic]''): navigate through the values with up and down arrow keys. If your microphone is an array built into your monitor, or you have a similar setup, make sure to increase the volume for the '''Digital''' column too. If you have multiple microphones, you may have to play around with the '''Mic Jack''' channel to get your desired setting.<br />
<br />
You may want to save your mixer settings with:<br />
<br />
# alsactl -f /var/lib/alsa/asound.state store<br />
<br />
=== No incoming video stream ===<br />
<br />
If skype shows a black square for the video preview, but something else (like {{ic|xawtv -c /dev/video0}}) shows video correctly, you might need to start Skype with:<br />
<br />
export XLIB_SKIP_ARGB_VISUALS=1 && skype<br />
<br />
Another possible workaround is to preload ''v4l1compat.so'':<br />
<br />
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype<br />
<br />
For my machine this doesn't seem to work; instead I do<br />
{{bc|<nowiki><br />
cd /usr/lib/lib32/libv4l && LD_PRELOAD=v4l1compat.so skype;<br />
</nowiki>|bc}}<br />
<br />
=== Low sound in Skype, but works everywhere else ===<br />
<br />
If you are sure your microphone is configured correctly in ALSA (try recording with a 3rd-party-utility to determine whether it is an ALSA or Skype problem), it is most likely because Skype is controlling your volume levels. Simply disable this feature in the voice settings page in the Skype configuration window.<br />
<br />
This may also help if your microphone input is automatically lowered until 0.<br />
<br />
=== Monster/low-octave "growling" distortion over mic ===<br />
<br />
Some users with newer kernels are experiencing a monster-like growling distortion of their sound stream on the other end of Skype. This can be fixed by creating a dummy ALSA device or by removing {{ic|~/.Skype/shared.xml}}. See https://bbs.archlinux.org/viewtopic.php?pid=819500#p819500 for more information.<br />
<br />
=== Skype can only see PulseAudio, but not ALSA devices ===<br />
<br />
Turn PulseAudio autospawn off and kill PulseAudio:<br />
$ echo "autospawn = no" > ~/.pulse/client.conf<br />
$ killall pulseaudio<br />
And restart Skype.<br />
<br />
=== Crackling/noisy sound (mainly using 64-bit OS) ===<br />
<br />
Edit {{ic|/etc/pulse/default.pa}} and change the following line<br />
<br />
load-module module-udev-detect<br />
<br />
to<br />
<br />
load-module module-udev-detect tsched=0<br />
<br />
See also: [[PulseAudio#Glitches, skips or crackling]].<br />
<br />
=== Problem with Audio Playback on x86_64 ===<br />
<br />
See [[Pulseaudio#Skype (x86_64 only)]], even if you are not using PulseAudio.<br />
<br />
=== Skype sounds stops media player or other sound sources === <br />
<br />
You can try commenting out the following modules in {{ic|/etc/pulse/default.pa}}<br />
#module-cork-music-on-phone<br />
#module-role-cork<br />
<br />
If that does not help, you can try changing flat-volumes to no in {{ic|/etc/pulse/daemon.conf}}.<br />
flat-volumes = no</div>
Vas
https://wiki.archlinux.org/index.php?title=Xorg&diff=248146
Xorg
2013-02-22T12:05:27Z
<p>Vas: /* Key repeat delay and rate */ Added default values</p>
<hr />
<div>[[Category:X Server]]<br />
[[cs:Xorg]]<br />
[[da:Xorg]]<br />
[[de:X]]<br />
[[el:Xorg]]<br />
[[es:Xorg]]<br />
[[fr:Xorg]]<br />
[[it:Xorg]]<br />
[[ja:Xorg]]<br />
[[nl:Xorg]]<br />
[[pl:Xorg]]<br />
[[pt:Xorg]]<br />
[[ro:Xorg]]<br />
[[ru:Xorg]]<br />
[[tr:X_Sunucusu]]<br />
[[zh-CN:Xorg]]<br />
[[zh-TW:Xorg]]<br />
{{Article summary start}}<br />
{{Article summary text|An all-inclusive overview about installing and managing Xorg}}<br />
{{Article summary heading|Overview}}<br />
{{Article summary text|{{Graphical user interface overview}}}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Start X at Login}}<br />
{{Article summary wiki|Execute commands after X start}}<br />
{{Article summary wiki|Login Manager}}<br />
{{Article summary wiki|Window Manager}}<br />
{{Article summary wiki|Font Configuration}}<br />
{{Article summary wiki|X11 Cursors}}<br />
{{Article summary wiki|Get All Mouse Buttons Working}}<br />
{{Article summary wiki|Desktop Environment}}<br />
{{Article summary wiki|Wayland}}<br />
{{Article summary heading|Free Video Drivers}}<br />
{{Article summary wiki|Intel Graphics}}<br />
{{Article summary wiki|ATI}}<br />
{{Article summary wiki|Nouveau}}<br />
{{Article summary heading|Proprietary Video Drivers}}<br />
{{Article summary wiki|AMD Catalyst}}<br />
{{Article summary wiki|NVIDIA}}<br />
{{Article summary end}}<br />
<br />
'''Xorg''' is the public, open-source implementation of the X window system version 11. Since Xorg is the most popular choice among Linux users, its ubiquity has led to making it an ever-present requisite for GUI applications, resulting in massive adoption from most distributions. See the [[Wikipedia:X.Org Server|Xorg]] Wikipedia article or visit the [http://www.x.org/wiki/ Xorg website] for more details.<br />
<br />
==Installation==<br />
First, you will need to [[pacman|install]] the X server with the package {{Pkg|xorg-server}}, available in the [[Official Repositories]]. You may also want the useful utilities contained in the {{Grp|xorg-apps}} group.<br />
<br />
[[Udev]] will detect your hardware and [[Wikipedia:evdev|evdev]] will act as the hotplugging input driver for almost all devices. [[Udev]] is provided by {{Pkg|systemd}} and {{Pkg| xf86-input-evdev}} is required by {{Pkg|xorg-server}}, so there is no need to explicitly install those packages.<br />
<br />
{{Tip|The default X environment is rather bare, and you will typically seek to install a [[Window Manager|window manager]] or a [[Desktop Environment|desktop environment]] to supplement X.}}<br />
<br />
==Running==<br />
''See also: [[Start X at Login]]''<br />
<br />
{{Tip|The easiest way to start X is by using a [[Display Manager|display manager]] such as [[GDM]], [[KDM]] or [[SLiM]].}}<br />
<br />
If you want to start X without a display manager, install the package {{Pkg|xorg-xinit}}. Optionally, the packages {{Pkg|xorg-twm}}, {{Pkg|xorg-xclock}} and {{Pkg|xterm}} allows for a default environment, as described below.<br />
<br />
The {{ic|startx}} and {{ic|xinit}} commands will start the X server and clients (the {{ic|startx}} script is merely a front end to the {{ic|xinit}} command). To determine the client to run, {{ic|startx}}/{{ic|xinit}} will first look to parse a {{ic|~/.xinitrc}} file in the user's home directory. In the absence of {{ic|~/.xinitrc}}, it defaults to the global file {{ic|/etc/X11/xinit/xinitrc}}, which defaults to starting a basic environment with the [[Twm]] window manager, [[Wikipedia:Xclock|Xclock]] and [[Xterm]].<br />
<br />
{{Note|X must always be run on the same tty where the login occurred, to preserve the logind session. This is handled by the default {{ic|/etc/X11/xinit/xserverrc}}.}}<br />
<br />
{{Warning|If you choose to use {{ic|xinit}} instead of {{ic|startx}}, you are responsible for passing {{ic|-nolisten tcp}} and ensuring the session does not break by starting X on a different tty.}}<br />
<br />
For more information, see [[xinitrc]].<br />
<br />
{{Note|<br />
* If a problem occurs, then view the log at {{ic|/var/log/Xorg.0.log}}. Be on the lookout for any lines beginning with {{ic|(EE)}}, which represent errors, and also {{ic|(WW)}}, which are warnings that could indicate other issues.<br />
* If there is an ''empty'' {{ic|.xinitrc}} file in your {{ic|$HOME}}, either delete or [[xinitrc|edit it]] in order for X to start properly. If you do not do this X will show a blank screen with what appears to be no errors in your {{ic|Xorg.0.log}}. Simply deleting it will get it running with a default X environment.}}<br />
<br />
== Configuration ==<br />
{{Note|Arch supplies default configuration files in {{ic|/etc/X11/xorg.conf.d}}, and no extra configuration is necessary for most setups.}}<br />
<br />
=== Using split files ===<br />
The {{ic|/etc/X11/xorg.conf.d/}} directory stores user-specific configuration. You are free to add configuration files to {{ic|/etc/X11/xorg.conf.d/}}, but they must start with {{ic|XX-}} (where XX is a number) and have a {{ic|.conf}} suffix (10 is read before 20, for example). These files are parsed by the X server upon startup and are treated like part of the traditional xorg.conf configuration file. The X server essentially treats the collection of configuration files as one big file with entries from xorg.conf at the end.<br />
<br />
=== Using single file ===<br />
Xorg can also be configured via {{ic|/etc/X11/xorg.conf}} or {{ic|/etc/xorg.conf}}. You can also generate skeleton for the xorg.conf by<br />
# Xorg :0 -configure<br />
<br />
That should create an {{ic|xorg.conf.new}} file in {{ic|/root/}} that you can copy over to {{ic|/etc/X11/xorg.conf}} for more information see {{ic|man xorg.conf}} <br />
<br />
Alternatively, your video card drivers may come with a tool to automatically configure Xorg. In the case of NVIDIA, try nvidia-xconfig. For ATI with the proprietary driver, try aticonfig.<br />
<br />
{{Note| Config file keywords are case-insensitive, and “_” characters are ignored. Most strings (including Option names) are also case-insensitive, and insensitive to white space and “_” characters.}}<br />
<br />
==Input devices==<br />
Installing input drivers is not needed for most hardware. Nevertheless, if evdev does not support your device, install the needed driver from the {{Grp|xorg-drivers}} group (try {{ic|pacman -Sg xorg-drivers}} for a listing).<br />
<br />
You should have {{ic|10-evdev.conf}} in the {{ic|/etc/X11/xorg.conf.d}} directory, which manages the keyboard, the mouse, the touchpad and the touchscreen.<br />
<br />
===Touchpad Synaptics===<br />
''Main page: [[Touchpad Synaptics]]''<br />
<br />
If you have a laptop, you need to [[pacman|install]] the touchpad driver provided by the {{Pkg|xf86-input-synaptics}} package in the [[Official Repositories]].<br />
<br />
After installation, you can find {{ic|10-synaptics.conf}} in the {{ic|/etc/X11/xorg.conf.d}} directory. It is safe to comment out/delete the {{ic|InputClass}} line regarding the touchpad in {{ic|10-evdev.conf}}.<br />
<br />
===Disabling input hot-plugging===<br />
Since version''' 1.8''' Xorg-server uses udev for device detection. The following will disable the use of udev.<br />
<br />
Section "ServerFlags"<br />
Option "AutoAddDevices" "False"<br />
EndSection<br />
{{Warning|This will disable Xorg hot-plugging for '''all''' input devices and revert to the same behavior as xorg-server 1.4. It is much more convenient to let udev configure your devices. '''Therefore, disabling hot-plugging is not recommended!'''}}<br />
<br />
===Keyboard settings===<br />
<br />
Xorg may fail to detect your keyboard correctly. This might give problems with your keyboard layout or keyboard model not being set correctly.<br />
<br />
To see a full list of keyboard models, layouts, variants and options, open {{ic|/usr/share/X11/xkb/rules/xorg.lst}}.<br />
<br />
To set the keymap for the current Xorg session:<br />
# setxkbmap dvorak<br />
<br />
====Key repeat delay and rate====<br />
<br />
Use {{ic|xset r rate DELAY RATE}} to change them, then use [[xinitrc]] to make it permanent. Values 170 and 30 are a good start point.<br />
<br />
====Viewing keyboard settings====<br />
{{hc|$ setxkbmap -print -verbose 10|<nowiki><br />
<br />
Setting verbose level to 10<br />
locale is C<br />
Applied rules from evdev:<br />
model: evdev<br />
layout: us<br />
options: terminate:ctrl_alt_bksp<br />
Trying to build keymap using the following components:<br />
keycodes: evdev+aliases(qwerty)<br />
types: complete<br />
compat: complete<br />
symbols: pc+us+inet(evdev)+terminate(ctrl_alt_bksp)<br />
geometry: pc(pc104)<br />
xkb_keymap {<br />
xkb_keycodes { include "evdev+aliases(qwerty)" };<br />
xkb_types { include "complete" };<br />
xkb_compat { include "complete" };<br />
xkb_symbols { include "pc+us+inet(evdev)+terminate(ctrl_alt_bksp)" };<br />
xkb_geometry { include "pc(pc104)" };<br />
};<br />
</nowiki>}}<br />
====Setting keyboard layout with hot-plugging====<br />
{{Note|If you use [[GNOME]], these settings will be ignored. You will have to set the keyboard layout from the GNOME Keyboard applet. Follow the Keyboard Layout link and add the layout you require and remove any you do not. For XkbOptions, see [[GNOME#Modify_Keyboard_with_XkbOptions]].}}<br />
<br />
To change your keyboard layout, create a {{ic|''number''-*.conf}} file (e.g. {{ic|10-keyboard.conf}}) with the following content:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-keyboard.conf|<br />
Section "InputClass"<br />
Identifier "Keyboard Defaults"<br />
MatchIsKeyboard "yes"<br />
Option "XkbLayout" "us"<br />
Option "XkbVariant" "colemak"<br />
EndSection}}<br />
<br />
Alternatively, you can also combine {{ic|XkbLayout}} and {{ic|XkbVariant}}:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-keyboard.conf|<br />
Section "InputClass"<br />
Identifier "Keyboard Defaults"<br />
MatchIsKeyboard "yes"<br />
Option "XkbLayout" "us(colemak)"<br />
EndSection}}<br />
<br />
====Setting keyboard layout without hot-plugging (deprecated)====<br />
{{Note|Changing the keyboard layout through this method requires disabling input hot-plugging.}}<br />
<br />
To change the keyboard layout, use the XkbLayout option in the keyboard InputDevice section. For example, if you have a keyboard with the English (Great Britain) layout, your keyboard InputDevice section might look similar to this:<br />
<br />
Section "InputDevice"<br />
Identifier "Keyboard0"<br />
Driver "kbd"<br />
Option "XkbLayout" "gb"<br />
EndSection<br />
<br />
To change the keyboard model, use the XkbModel option in the keyboard InputDevice section. For example, if you have a Microsoft Wireless Multimedia Keyboard:<br />
<br />
Option "XkbModel" "microsoftmult"<br />
<br />
====Switching between keyboard layouts====<br />
To be able to easily switch keyboard layouts, modify the Options used in either of the above two methods. For example, to switch between a US and a Swedish layout using the {{Keypress|Caps Lock}} key, create a file {{ic|/etc/X11/xorg.conf.d/01-keyboard-layout.conf}} with the following content:<br />
Section "InputClass"<br />
Identifier "keyboard-layout"<br />
MatchIsKeyboard "on"<br />
Option "XkbLayout" "us, se"<br />
Option "XkbOptions" "grp:caps_toggle"<br />
EndSection<br />
<br />
As an alternative, you can add the following to your {{ic|.xinitrc}}:<br />
<br />
setxkbmap -layout "us, se" -option "grp:caps_toggle"<br />
<br />
This is mainly useful if you run a Desktop Environment which does not take care of keyboard layouts for you.<br />
<br />
{{Tip|If you want to get a list of possible values for the layout and options, you can find them in {{ic|/usr/share/X11/xkb/rules/xorg.lst}}. They are under sections {{ic|! layout}} and {{ic|! option}} respectively. These values work for both the configuration file solution, and the command line alternative.}}<br />
<br />
====Enable pointerkeys====<br />
[[Wikipedia:Mouse keys|Mouse keys]] is now disabled by default and has to be manually enabled:<br />
{{hc|/etc/X11/xorg.conf.d/20-enable-pointerkeys.conf|<nowiki>Section "InputClass"<br />
Identifier "Keyboard Defaults"<br />
MatchIsKeyboard "yes"<br />
Option "XkbOptions" "keypad:pointerkeys"<br />
EndSection</nowiki>}}<br />
<br />
You can also run:<br />
$ setxkbmap -option keypad:pointerkeys<br />
<br />
Both will make the {{Keypress|Shift+Num Lock}} shortcut toggle mouse keys.<br />
<br />
===InputClasses ===<br />
'''Taken from: https://fedoraproject.org/wiki/Input_device_configuration'''<br />
<br />
InputClasses are a new type of configuration section that does not apply to a single device but rather to a class of devices, including hotplugged devices. An InputClass section's scope is limited by the ''matches'' specified &ndash; to apply to an input device, all matches must apply to a device. An example InputClass section is provided below:<br />
<br />
{{bc|<br />
Section "InputClass"<br />
Identifier "touchpad catchall"<br />
MatchIsTouchpad "on"<br />
Driver "synaptics"<br />
EndSection<br />
}}<br />
<br />
The next snippet might also be helpful:<br />
{{bc|<br />
Section "InputClass"<br />
Identifier "evdev touchpad catchall"<br />
MatchIsTouchpad "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Driver "evdev"<br />
EndSection<br />
}}<br />
<br />
If this snippet is present in the {{ic|xorg.conf}} or xorg.conf.d, any touchpad present in the system is assigned the synaptics driver. Note that due to precedence order (alphanumeric sorting of xorg.conf.d snippets) the Driver setting overwrites previously set driver options &ndash; the more generic the class, the earlier it should be listed. The default snippet shipped with the {{pkg|xorg-x11-drv-Xorg}} package is {{ic|00-evdev.conf}} and applies the evdev driver to all input devices.<br />
<br />
The match options specify which devices a section may apply to. To match a device, all match lines must apply. The following match lines are supported (with examples):<br />
* {{ic|MatchIsPointer}}, {{ic|MatchIsKeyboard}}, {{ic|MatchIsTouchpad}}, {{ic|MatchIsTouchscreen}}, {{ic|MatchIsJoystick}} &ndash; boolean options to apply to a group of devices.<br />
* {{ic|MatchProduct "foo&#124;bar"}}: match any device with a product name containing either "foo" or "bar"<br />
* {{ic|MatchVendor "foo&#124;bar&#124;baz"}}: match any device with a vendor string containing either "foo", "bar", or "baz"<br />
* {{ic|MatchDevicePath "/dev/input/event*"}}: match any device with a device path matching the given patch (see fnmatch(3) for the allowed pattern)<br />
* {{ic|MatchTag "foo&#124;bar"}}: match any device with a tag of either "foo" or "bar". Tags may be assigned by the config backend &ndash; udev in our case &ndash; to label devices that need quirks or special configuration.<br />
<br />
An example section for user-specific configuration is:<br />
<br />
{{bc|<br />
Section "InputClass"<br />
Identifier "lasermouse slowdown"<br />
MatchIsPointer "on"<br />
MatchProduct "Lasermouse"<br />
MatchVendor "LaserMouse Inc."<br />
Option "ConstantDeceleration" 20<br />
EndSection<br />
}}<br />
<br />
This section would match a pointer device containing "Lasermouse" from "Lasermouse Inc." and apply a constant deceleration of 20 on this device &ndash; slowing it down by factor 20.<br />
<br />
Some devices may get picked up by the X server when they really should not be. These devices can be configured to be ignored:<br />
<br />
{{bc|<br />
Section "InputClass"<br />
Identifier "no need for accelerometers in X"<br />
MatchProduct "accelerometer"<br />
Option "Ignore" "on"<br />
EndSection<br />
}}<br />
<br />
====Example configurations====<br />
<br />
The following subsections describe example configurations for commonly used configuration options. Note that if you use a desktop environment such as GNOME or KDE, options you set in the xorg.conf ''may'' get overwritten with user-specific options upon login.<br />
<br />
=====Example: Wheel emulation (for a Trackpoint)=====<br />
<br />
If you own a computer with a Trackpoint (a Thinkpad, for example) you can add the following to the {{ic|xorg.conf}} to use the middle button to emulate a mouse wheel:<br />
<br />
{{bc|<br />
Section "InputClass"<br />
Identifier "Wheel Emulation"<br />
MatchIsPointer "on"<br />
MatchProduct "TrackPoint"<br />
Option "EmulateWheelButton" "2"<br />
Option "EmulateWheel" "on"<br />
EndSection<br />
}}<br />
<br />
For full support of TrackPoints (including horizontal scrolling) you can use the following:<br />
{{bc|<nowiki><br />
Section "InputClass"<br />
Identifier "Trackpoint Wheel Emulation"<br />
MatchProduct "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device"<br />
MatchDevicePath "/dev/input/event*"<br />
Option "EmulateWheel" "true"<br />
Option "EmulateWheelButton" "2"<br />
Option "Emulate3Buttons" "false"<br />
Option "XAxisMapping" "6 7"<br />
Option "YAxisMapping" "4 5"<br />
EndSection<br />
</nowiki>}}<br />
<br />
=====Example: Tap-to-click=====<br />
Tap-to-click can be enabled in the mouse configuration dialog (in the touchpad tab) but if you need tapping enabled at gdm already, the following snippet does it for you:<br />
{{bc|<br />
Section "InputClass"<br />
Identifier "tap-by-default"<br />
MatchIsTouchpad "on"<br />
Option "TapButton1" "1"<br />
EndSection<br />
}}<br />
<br />
=====Example: Keyboard layout and model on Acer 5920G laptop=====<br />
<br />
Keyboard model and layout may be set in the file {{ic|/etc/X11/xorg.conf.d/keyboard.conf}} or any other .conf file in the same directory.<br />
* {{ic|MatchIsKeyboard "yes"}}: set the input device to a keyboard<br />
* {{ic|Option "XkbModel" "acer_laptop"}}: set the keyboard model to an Acer laptop keyboard. You may replace {{ic|acer_laptop}} with your actual keyboard layout.<br />
* {{ic|Option "XkbLayout" "be"}}: set the keyboard layout to belgian. You may replace {{ic|be}} with whatever layout you have.<br />
* {{ic|Option "XkbVariant" "sundeadkeys"}}: set the layout variant to Sun dead keys. You may omit the {{ic|XkbVariant}} option if you stick with the default variant.<br />
<br />
Note that a list of keyboard layouts and models can be found in {{ic|/usr/share/X11/xkb/rules/base.lst}}<br />
<br />
{{bc|<br />
Section "InputClass"<br />
Identifier "Keyboard Defaults"<br />
MatchIsKeyboard "yes"<br />
Option "XkbModel" "acer_laptop"<br />
Option "XkbLayout" "be"<br />
Option "XkbVariant" "sundeadkeys"<br />
EndSection<br />
}}<br />
<br />
=====Example: Third button emulation (for all attached mice)=====<br />
Third button emulation allows you to use the 1 and 2 buttons (left and right click) together to produce a button 3 event (middle-click), which is really useful for copy and paste in X.<br />
<br />
We will modify the mouse input catchall in {{ic|/etc/X11/xorg.conf.d/10-evdev.conf}}<br />
{{bc|<br />
Section "InputClass"<br />
Identifier "evdev pointer catchall"<br />
MatchIsPointer "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Driver "evdev"<br />
Option "Emulate3Buttons" "True"<br />
Option "Emulate3Timeout" "25"<br />
EndSection<br />
}}<br />
<br />
Here you see the {{ic|Option "Emulate3Buttons" "True"}} and {{ic|Option "Emulate3Timeout" "25"}} options that specify that 3 buttons should be emulated and the delay to recognize both buttons down as a middle click is 25ms.<br />
<br />
==Graphics==<br />
===Driver installation===<br />
The default graphics driver is vesa ({{Pkg|xf86-video-vesa}}), which handles a large number of chipsets but does not include any 2D or 3D acceleration. To enable graphics acceleration, you will need to install and use the driver specific to your graphics card.<br />
<br />
First, identify your card:<br />
$ lspci | grep VGA<br />
<br />
Then, install an appropriate driver. You can search for these packages with the following command:<br />
$ pacman -Ss xf86-video<br />
<br />
Common open source drivers:<br />
*NVIDIA: {{Pkg|xf86-video-nouveau}} (see [[Nouveau]])<br />
*Intel: {{Pkg|xf86-video-intel}} (see [[Intel]])<br />
*ATI: {{Pkg|xf86-video-ati}} (see [[ATI]])<br />
<br />
Common proprietary drivers:<br />
*NVIDIA: {{Pkg|nvidia}} (see [[NVIDIA]])<br />
*ATI: {{AUR|catalyst}} (see [[ATI Catalyst]])<br />
<br />
Xorg should run smoothly without closed source drivers, which are typically needed only for advanced features such as fast 3D-accelerated rendering for games, dual-screen setups, and TV-out.<br />
<br />
===Monitor settings===<br />
====Getting started====<br />
{{Note|This step is OPTIONAL and should not be done unless you know what you are doing.<br><br />
This step is '''NOT OPTIONAL''' if using dual monitors and the nouveau driver. See [[Nouveau#Configuration]].}}<br />
<br />
First, create a new config file, such as {{ic|/etc/X11/xorg.conf.d/10-monitor.conf}}.<br />
<br />
Insert the following code into the config file mentioned above:<br />
<br />
{{bc|<nowiki><br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "vesa" #Choose the driver used for this monitor<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Screen0" #Collapse Monitor and Device section to Screen section<br />
Device "Device0"<br />
Monitor "Monitor0"<br />
DefaultDepth 16 #Choose the depth (16||24)<br />
SubSection "Display"<br />
Depth 16<br />
Modes "1024x768_75.00" #Choose the resolution<br />
EndSubSection<br />
EndSection<br />
</nowiki>}}<br />
<br />
====Multiple monitors/Dual screen====<br />
=====NVIDIA=====<br />
Please see: [[NVIDIA#Multiple monitors]].<br />
<br />
=====More than one graphics card=====<br />
You must define the correct driver to use and put the bus ID of your graphic cards.<br />
{{bc|<br />
Section "Device"<br />
Identifier "Screen0"<br />
Driver "nouveau"<br />
BusID "PCI:0:12:0"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Screen1"<br />
Driver "radeon"<br />
BusID "PCI:1:0:0"<br />
EndSection<br />
}}<br />
<br />
To get your bus ID:<br />
$ lspci | grep VGA<br />
01:00.0 VGA compatible controller: nVidia Corporation G96 [GeForce 9600M GT] (rev a1)<br />
<br />
The bus ID here is 1:0:0.<br />
<br />
=====Script to toggle internal/external display for laptops=====<br />
Run the following script after connecting to external displays with your computer to change the display used by Xorg. It checks if a display is connected to the port specified in {{ic|EXT}} before changing displays.<br />
<br />
To find out the display names to be specified in {{ic|EXT}} run:<br />
# xrandr -q<br />
The internal display should be connected when running the script, which is always true for a laptop. To use this script the package {{Pkg|xorg-xrandr}} needs to be installed.<br />
{{bc|<nowiki><br />
#!/bin/bash<br />
<br />
IN="LVDS1"<br />
EXT="VGA1"<br />
<br />
if (xrandr | grep "$EXT" | grep "+")<br />
then<br />
xrandr --output $EXT --off --output $IN --auto<br />
else<br />
if (xrandr | grep "$EXT" | grep " connected")<br />
then<br />
xrandr --output $IN --off --output $EXT --auto<br />
fi<br />
fi<br />
</nowiki>}}<br />
<br />
==== Display Size and DPI ====<br />
The DPI of the X server is determined in the following manner:<br />
# The -dpi command line option has highest priority.<br />
# If this is not used, the DisplaySize setting in the X config file is used to derive the DPI, given the screen resolution.<br />
# If no DisplaySize is given, the monitor size values from DDC are used to derive the DPI, given the screen resolution.<br />
# If DDC does not specify a size, 75 DPI is used by default.<br />
<br />
In order to get correct dots per inch (DPI) set, the display size must be recognized or set. Having the correct DPI is especially necessary where fine detail is required (like font rendering). Previously, manufacturers tried to create a standard for 96 DPI (a 10.3" diagonal monitor would be 800x600, a 13.2" monitor 1024x768). These days, screen DPIs vary and may not be equal horizontally and vertically. For example, a 19" widescreen LCD at 1440x900 may have a DPI of 89x87. To be able to set the DPI, the Xorg server attempts to auto-detect your monitor's physical screen size through the graphic card with [http://en.wikipedia.org/wiki/Display_Data_Channel DDC]. When the Xorg server knows the physical screen size, it will be able to set the correct DPI depending on resolution size.<br />
<br />
To see if your display size and DPI are detected/calculated correctly:<br />
<br />
$ xdpyinfo | grep -B2 resolution<br />
<br />
Check that the dimensions match your display size. If the Xorg server is not able to correctly calculate the screen size, it will default to 75x75 DPI and you will have to calculate it yourself.<br />
<br />
If you have specifications on the physical size of the screen, they can be entered in the Xorg configuration file so that the proper DPI is calculated:<br />
<br />
{{bc|<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
DisplaySize 286 179 # In millimeters<br />
EndSection<br />
}}<br />
<br />
If you only want to enter the specification of your monitor '''without''' creating a full xorg.conf create a new config file. For example ({{ic|/etc/X11/xorg.conf.d/90-monitor.conf}}):<br />
<br />
{{bc|<br />
Section "Monitor"<br />
Identifier "<default monitor>"<br />
DisplaySize 286 179 # In millimeters<br />
EndSection<br />
}}<br />
<br />
If you do not have specifications for physical screen width and height (most specifications these days only list by diagonal size), you can use the monitor's native resolution (or aspect ratio) and diagonal length to calculate the horizontal and vertical physical dimensions. Using the Pythagorean theorem on a 13.3" diagonal length screen with a 1280x800 native resolution (or 16:10 aspect ratio):<br />
<br />
echo 'scale=5;sqrt(1280^2+800^2)' | bc # 1509.43698<br />
<br />
This will give the pixel diagonal length and with this value you can discover the physical horizontal and vertical lengths (and convert them to millimeters):<br />
<br />
{{bc|<nowiki><br />
echo 'scale=5;(13.3/1509)*1280*25.4' | bc # 286.43072<br />
echo 'scale=5;(13.3/1509)*800*25.4' | bc # 179.01920<br />
</nowiki>}}<br />
<br />
{{Note|This calculation works for monitors with square pixels; however, there is the seldom monitor that may compress aspect ratio (e.g 16:10 aspect resolution to a 16:9 monitor). If this is the case, you should measure your screen size manually.}}<br />
<br />
===== Setting DPI manually =====<br />
DPI can be set manually if you only plan to use one resolution ([http://pxcalc.com/ DPI calculator]):<br />
<br />
{{bc|<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
Option "DPI" "96 x 96"<br />
EndSection<br />
}}<br />
<br />
If you use an NVIDIA card, you can manually set the DPI adding the options bellow on {{ic|/etc/X11/xorg.conf.d/20-nvidia.conf}} (inside '''Device''' section):<br />
<br />
Option "UseEdidDpi" "False"<br />
Option "DPI" "96 x 96"<br />
<br />
For RandR compliant drivers, you can set it by:<br />
<br />
xrandr --dpi 96<br />
<br />
See [[Execute commands after X start]] to make it permanent.<br />
<br />
Note: while you can set any dpi you like and applications using Qt and GTK will scale accordingly, it's recommended to set it to 96, 120 (25% higher), 144 (50% higher), 168 (75% higher), 192 (100% higher) etc., to reduce scaling artifacts to GUI that use bitmaps. Reducing it below 96 dpi may not reduce size of graphical elements of GUI as typically the lowest dpi the icons are made for is 96.<br />
<br />
====DPMS====<br />
DPMS (Display Power Management Signaling) is a technology that allows power saving behaviour of monitors when the computer is not in use. This will allow you to have your monitors automatically go into standby after a predefined period of time. See: [[DPMS]]<br />
<br />
== Composite ==<br />
The Composite extension for X causes an entire sub-tree of the window hierarchy to be rendered to an off-screen buffer. Applications can then take the contents of that buffer and do whatever they like. The off-screen buffer can be automatically merged into the parent window or merged by external programs, called compositing managers.<br />
<br />
{{Accuracy|Is this actually still true in recent Xorg releases?}}<br />
The Composite extension can't be used simultaneously with Xinerama. However, it can be used simultaneously with Nvidia Twinview.<br />
<br />
=== Disabling the extension ===<br />
The composite extension is enabled by default. To disable it, add this to xorg.conf or a file in /etc/xorg.conf.d:<br />
<br />
Section "Extensions"<br />
Option "Composite" "Disable"<br />
EndSection<br />
<br />
This may slightly improve your performance with some drivers.<br />
<br />
=== See also ===<br />
*[[AIGLX]]<br />
*[[Compiz]] -- The original composite/window manager from Novell<br />
*[[Xcompmgr]] -- A simple composite manager capable of drop shadows and primitive transparency<br />
*[[Compton]] -- A fork of [[xcompmgr]] with feature improves and bug fix<br />
*[[Cairo Compmgr|Cairo Composite Manager]] -- A versatile and extensible composite manager which uses cairo for rendering.<br />
*[[Wikipedia:Compositing window manager]]<br />
<br />
==Sample configurations==<br />
Anyone who has an {{ic|xorg.conf}} file written up that works, go ahead and post a link to it here for others to look at. Please do not in-line the entire configuration file; upload it somewhere else and link to it.<br />
<br />
'''Please post input hotplugging configurations only, otherwise note that your config is not using input hotplugging.''' (Xorg 1.8 = udev)<br />
<br />
=== Sample 1: {{ic|xorg.conf}} & {{ic|/etc/X11/xorg.conf.d/10-evdev.conf}} ===<br />
This is a sample configuration file using {{ic|/etc/X11/xorg.conf.d/10-evdev.conf}} for the keyboard layouts:<br />
<br />
{{Note|The "InputDevice" sections are commented out, because {{ic|/etc/X11/xorg.conf.d/10-evdev.conf}} is taking care of them.}}<br />
{{ic|xorg.conf}}: http://pastebin.com/raw.php?i=EuSKahkn<br />
{{ic|/etc/X11/xorg.conf.d/10-evdev.conf}}: http://pastebin.com/raw.php?i=4mPY35Mw<br />
{{ic|/etc/X11/xorg.conf.d/10-monitor.conf}} (VMware): http://pastebin.com/raw.php?i=fJv8EXGb<br />
{{ic|/etc/X11/xorg.conf.d/10-monitor.conf}} (KVM): http://pastebin.com/raw.php?i=NRz7v0Kn<br />
<br />
==Tips and tricks==<br />
===X startup ({{ic|/usr/bin/startx}}) tweaking===<br />
For X's option reference see:<br />
$ man Xserver<br />
<br />
The following options have to be appended to the variable {{ic|"defaultserverargs"}} in the {{ic|/usr/bin/startx}} file:<br />
<br />
* Enable deferred glyph loading for 16 bit fonts:<br />
-deferglyphs 16<br />
<br />
{{Note|1=If you start X with kdm, the startx script does not seem to be executed. X options must be appended to the variable {{ic|"ServerArgsLocal"}} or {{ic|"ServerCmd"}} in the {{ic|/usr/share/config/kdm/kdmrc}} file. By default kdm options are:<br />
{{bc|1=ServerArgsLocal=-nolisten tcp<br />
ServerCmd=/usr/bin/X}}<br />
}}<br />
<br />
===Nested X session===<br />
To run a nested session of another desktop environment:<br />
$ /usr/bin/Xnest :1 -geometry 1024x768+0+0 -ac -name Windowmaker & wmaker -display :1<br />
<br />
This will launch a Window Maker session in a 1024 by 768 window within your current X session.<br />
<br />
This needs the package {{Pkg|xorg-server-xnest}} to be installed.<br />
<br />
===Starting GUI Programs Remotely===<br />
To start up a program that uses X when logged in remotely (such as through ssh), you need to type this in from the remote login Bash shell:<br />
<br />
export DISPLAY=:0<br />
<br />
Then invoke the program the way you would locally from the shell.<br />
<br />
Hint: Add that line to ~/.bashrc to have it happen automatically every time you log in.<br />
<br />
===On-Demand Disabling and Enabling of Input Sources===<br />
With the help of {{ic|xinput}} you can temporarily disable or enable input sources. This might be useful, for example, on systems that have more than one mouse, such as the ThinkPads and you would rather use just one to avoid unwanted mouse clicks. Let's see how to accomplish this.<br />
<br />
Install {{ic|xinput}} from the {{Pkg|xorg-xinput}} package: {{bc|# pacman -S xorg-xinput}}<br />
<br />
Find the ID of the device you want to disable: {{bc|xinput}}<br />
<br />
For example in a Lenovo ThinkPad T500, the output looks like this:<br />
{{hc|$ xinput|<nowiki>⎡ Virtual core pointer id=2 [master pointer (3)]<br />
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]<br />
⎜ ↳ TPPS/2 IBM TrackPoint id=11 [slave pointer (2)]<br />
⎜ ↳ SynPS/2 Synaptics TouchPad id=10 [slave pointer (2)]<br />
⎣ Virtual core keyboard id=3 [master keyboard (2)]<br />
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]<br />
↳ Power Button id=6 [slave keyboard (3)]<br />
↳ Video Bus id=7 [slave keyboard (3)]<br />
↳ Sleep Button id=8 [slave keyboard (3)]<br />
↳ AT Translated Set 2 keyboard id=9 [slave keyboard (3)]<br />
↳ ThinkPad Extra Buttons id=12 [slave keyboard (3)]</nowiki><br />
}}<br />
<br />
Disable the device with {{ic|xinput --disable DEVICE}}, where DEVICE is the device ID you want to disable. In this example we'll disable the Synaptics Touchpad, with the ID 10:<br />
{{bc|xinput --disable 10}}<br />
<br />
To re-enable the device, just issue the opposite command:<br />
{{bc|xinput --enable DEVICE}}<br />
<br />
==Troubleshooting==<br />
===Common problems===<br />
If Xorg will not start, the screen is completely black, the keyboard and mouse are not working, etc., first take these simple steps:<br />
*Check the log file: {{ic|cat /var/log/Xorg.0.log}}<br />
*Install input driver (keyboard, mouse, joystick, tablet, etc...):<br />
*Finally, search for common problems in [[ATI]], [[Intel]] and [[NVIDIA]] articles.<br />
<br />
===Ctrl+Alt+Backspace does not work===<br />
There are two ways of restoring {{Keypress|Ctrl+Alt+Backspace}}; with and without input-hotplugging. Using hot-plugging is recommended.<br />
<br />
====With input hot-plugging====<br />
=====System-wide=====<br />
Within {{ic|/etc/X11/xorg.conf.d/10-evdev.conf}}, simply add the following:<br />
{{bc|<br />
Section "InputClass" <br />
Identifier "Keyboard Defaults" <br />
MatchIsKeyboard "yes" <br />
Option "XkbOptions" "terminate:ctrl_alt_bksp" <br />
EndSection<br />
}}<br />
<br />
{{Note|On KDE, this system-wide setting has no effect. To restore, go to Kickoff > Computer > System Settings which will open up the System Settings window. Click on 'Input Devices'. In this new window click the Keyboard tab and then click on the advanced tab. In this new window, click the box for 'Configure keyboard options.' Expand the entry for 'Key sequence to kill the X server' and ensure {{keypress|Ctrl+Alt+Backspace}} is checked. Click Apply and close the System Settings window. You now have your {{keypress|Ctrl+Alt+Backspace}} back in KDE.}}<br />
<br />
=====User-specific=====<br />
Another way is to put this line in [[xinitrc]]:<br />
setxkbmap -option terminate:ctrl_alt_bksp<br />
<br />
{{Note|This setting has no effect on Gnome 3.}}<br />
<br />
====Without input hot-plugging====<br />
New Xorg disables zapping with {{keypress|Ctrl+Alt+Backspace}} by default. You can enable it by adding the following line to {{ic|/etc/X11/xorg.conf}},<br />
Option "XkbOptions" "terminate:ctrl_alt_bksp"<br />
to {{ic|InputDevice}} section for keyboard.<br />
<br />
===CTRL right key does not work with oss keymap===<br />
Edit as root {{ic|/usr/share/X11/xkb/symbols/fr}}, and change the line :<br />
{{bc|include "level5(rctrl_switch)"}}<br />
to<br />
{{bc|// include "level5(rctrl_switch)"}}<br />
Then restart X or reboot.<br />
<br />
===Apple keyboard issues===<br />
:''See: [[Apple Keyboard]]''<br />
<br />
===Touchpad tap-click issues===<br />
:''See: [[Synaptics]]''<br />
<br />
===Extra mouse buttons not recognized===<br />
:''See: [[Get All Mouse Buttons Working]]''<br />
<br />
===X clients started with "su" fail===<br />
If you are getting "Client is not authorized to connect to server", try adding the line:<br />
session optional pam_xauth.so<br />
to {{ic|/etc/pam.d/su}}. {{ic|pam_xauth}} will then properly set environment variables and handle {{ic|xauth}} keys.<br />
<br />
===Program requests "font '(null)'"===<br />
*Error message: "''unable to load font `(null)'.''"<br />
Some programs only work with bitmap fonts. Two major packages with bitmap fonts are available, {{Pkg|xorg-fonts-75dpi}} and {{Pkg|xorg-fonts-100dpi}}. You do not need both; one should be enough. To find out which one would be better in your case, try this:<br />
$ xdpyinfo | grep resolution<br />
and use what is closer to you (75 or 100 instead of XX)<br />
# pacman -S xorg-fonts-XXdpi<br />
<br />
===Frame-buffer mode problems===<br />
If X fails to start with the following log messages,<br />
{{bc|<nowiki><br />
(WW) Falling back to old probe method for fbdev<br />
(II) Loading sub module "fbdevhw"<br />
(II) LoadModule: "fbdevhw"<br />
(II) Loading /usr/lib/xorg/modules/linux//libfbdevhw.so<br />
(II) Module fbdevhw: vendor="X.Org Foundation"<br />
compiled for 1.6.1, module version=0.0.2<br />
ABI class: X.Org Video Driver, version 5.0<br />
(II) FBDEV(1): using default device<br />
<br />
Fatal server error:<br />
Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices<br />
</nowiki>}}<br />
uninstall fbdev:<br />
# pacman -R xf86-video-fbdev<br />
<br />
===DRI with Matrox cards stops working===<br />
If you use a Matrox card and DRI stops working after upgrading to Xorg, try adding the line:<br />
Option "OldDmaInit" "On"<br />
to the Device section that references the video card in {{ic|xorg.conf}}.<br />
<br />
===Recovery: disabling Xorg before GUI login===<br />
If Xorg is set to boot up automatically and for some reason you need to prevent it from starting up before the login/display manager appears (if {{ic|/etc/rc.conf}} is wrongly configured and Xorg does not recognize your mouse or keyboard input, for instance), you can accomplish this task with two methods.<br />
<br />
*From the GRUB menu, you can specify the runlevel in the kernel line by adding a number to the end of the kernel line specifying the run level you want. The following example sets the run level to 3:<br />
kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/..ro 3<br />
<br />
*If you have not only a faulty {{ic|/etc/rc.conf}} to make Xorg unusable, but you have also set the GRUB menu wait time to zero, or cannot otherwise use GRUB to prevent Xorg from booting, you can use the Arch Linux live CD. Boot up the live CD and login as root. You need a mount point, such as {{ic|/mnt}}, and you need to know the name of the partition you want to mount.<br />
<br />
:You can use the command,<br />
# fdisk -l<br />
:to see your partitions. Usually, the one you want will be resembling {{ic|/dev/sda1}}. Then, to mount this to {{ic|/mnt}}, use<br />
# mount /dev/sda1 /mnt<br />
<br />
:Then your filesystem will show up under {{ic|/mnt}}. So your {{ic|/etc/rc.conf}} file, for example, would be in {{ic|/mnt/etc/rc.conf}}. From here you can delete the {{ic|gdm}} daemon to prevent Xorg from booting up normally or make any other necessary changes to the configuration.<br />
<br />
===X failed to start : Keyboard initialization failed===<br />
If your hard disk is full, startx will fail. {{ic|/var/log/Xorg.0.log}} will end with:<br />
(EE) Error compiling keymap (server-0)<br />
(EE) XKB: Couldn't compile keymap<br />
(EE) XKB: Failed to load keymap. Loading default keymap instead.<br />
(EE) Error compiling keymap (server-0)<br />
(EE) XKB: Couldn't compile keymap<br />
XKB: Failed to compile keymap<br />
Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.<br />
Fatal server error:<br />
Failed to activate core devices.<br />
Please consult the The X.Org Foundation support at http://wiki.x.org<br />
for help.<br />
Please also check the log file at "/var/log/Xorg.0.log" for additional information.<br />
(II) AIGLX: Suspending AIGLX clients for VT switch<br />
<br />
Make some free space on your root partition and X will start.</div>
Vas
https://wiki.archlinux.org/index.php?title=Thunar_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=202794
Thunar (Русский)
2012-05-25T06:13:40Z
<p>Vas: /* Запуск Thunar как демона */ Openbox autostart script is named "autostart" now</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:Программное обеспечение (Русский)]]<br />
{{i18n|Thunar}}<br />
<br />
Thunar - это новый файловый менеджер, создаваемый как быстрый, легковесный и простой в использовании. Является частью окружения рабочего стола Xfce4, но может быть использован с другими оконными менеджерами. Это делает Thunar весьма привлекательным для пользователей [[Openbox (Русский)|Openbox]] и [[Awesome3 (Русский)|Awesome3]]<br />
<br />
==Установка==<br />
Чтобы установить Thunar, наберите команду:<br />
# pacman -S thunar<br />
<br />
Если вы используете Xfce4, то скорее всего Thunar у вас уже есть.<br />
<br />
==Подключаемые модули и дополнения==<br />
Большинство дополнений для Thunar входят в группу {{Ic|xfce4-goodies}}, и если вы её загружали, то считайте, что все дополнения уже установлены.<br />
<br />
===Менеджер томов Thunar===<br />
Thunar может автоматически монтировать и размонтировать съёмные устройства, а Менеджер томов Thunar обеспечивает дополнительные возможности, такие как автозапуск команд или открытие окна Thunar для подмонтированного устройства.<br />
<br />
====Системные требования====<br />
Учтите, что для правильной работы Менеджер томов Thunar требует запущенный Dbus.<br />
{{Note|В связи со заменой HAL на udev, автомонтирование не работает. Посмотрите раздел [[Thunar_%28%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9%29#.D0.90.D0.B2.D1.82.D0.BE.D0.BC.D0.B0.D1.82.D0.B8.D1.87.D0.B5.D1.81.D0.BA.D0.BE.D0.B5_.D0.BC.D0.BE.D0.BD.D1.82.D0.B8.D1.80.D0.BE.D0.B2.D0.B0.D0.BD.D0.B8.D0.B5_.D1.81_.D0.BF.D0.BE.D0.BC.D0.BE.D1.89.D1.8C.D1.8E_udev|автомонтирование с udev]]}}<br />
<br />
====Установка====<br />
Менеджер томов Thunar можно установить так:<br />
# pacman -S thunar-volman<br />
<br />
====Конфигурация====<br />
Менеджер томов можно настроить на выполнение определённых действий, например когда подключена фотокамера или аудиоплеер.<br />
Для этого нужно установить дополнения:<br />
# Запустите Thunar и откройте Настройки.<br />
# Во вкладке Дополнительно отметьте флажок 'Включить управление томами'.<br />
# Щёлкните 'Настроить' и внесите необходимые изменения (пример см. ниже).<br />
Например, вам нужно заставить Amarok проигрывать Audio CD:<br />
Multimedia - Audio CDs: {{ic|amarok --cdplay %d}}<br />
<br />
===Дополнение архиватора Thunar===<br />
Дополнение архиватора Thunar - это фронтэнд к вашей программе-архиватору, например File Roller, Ark или Xarchiver. Он нужен, чтобы предоставить простой интерфейс для открытия и распаковки архивов.<br />
<br />
Дополнение можно установить так:<br />
# pacman -S thunar-archive-plugin<br />
<br />
===Дополнения тегов мультимедиа===<br />
Если вы хотите, чтобы Thunar отображал подробную информацию о файлах мультимедиа, установите thunar-media-tags-plugin. Это дополнение поддерживает ID3 (формат MP3) и теги Ogg/Vorbis. Кроме того, в него включена функция массового переименования файлов и редактирования тегов мультимедиа.<br />
<br />
Дополнение можно установить так:<br />
# pacman -S thunar-media-tags-plugin<br />
<br />
===Эскизы Thunar===<br />
Цель проекта Эскизы Thunar - создать генерацию эскизов для мультимедиа форматов, неподдерживаемых другими генераторами эскизов. Если вы хотели бы видеть эскизы и поддержку форматов мультимедиа, с которыми не работают другие генераторы эскизов, используйте Эскизы Thunar. Чтобы узнать полный список поддерживаемых форматов, посмотрите [http://goodies.xfce.org/projects/thunar-plugins/thunar-thumbnailers/ страницу проекта].<br />
<br />
Для установки дополнения запустите:<br />
# pacman -S thunar-thumbnailers<br />
<br />
===Общий доступ Thunar===<br />
Дополнение Общего доступа Thunar позволит вам быстро открыть общий доступ к папке из Thunar, используя Samba. При этом вам не понадобится доступ root.<br />
<br />
====Установка дополнения====<br />
Установите пакет {{AUR|thunar-shares-plugin}}. Если у вас есть {{Ic|yaourt}}, наберите:<br />
yaourt -S thunar-shares-plugin<br />
<br />
====Настройка дополнения====<br />
Как пользователь root выполните следующие действия, описанные ниже.<br />
<br />
This marks the named objects for automatic export to the environment of subsequently executed commands:<br />
export USERSHARES_DIR="/var/lib/samba/''usershares''"<br />
export USERSHARES_GROUP="''sambashare''"<br />
<br />
Создайте папку общих файлов впользователя в {{ic|/var/lib/samba}}:<br />
mkdir -p ${USERSHARES_DIR}<br />
<br />
Создайте группу {{Ic|sambashare}}:<br />
groupadd ${USERSHARES_GROUP}<br />
<br />
Смените владельца папки и группы, которые вы только что создали:<br />
chown root:${USERSHARES_GROUP} ${USERSHARES_DIR}<br />
<br />
Измените разрешения папки с общими файлами так, чтобы пользователи в группе ''sambashare'' могли читать, писать и выполнять файлы:<br />
chmod 01770 ${USERSHARES_DIR}<br />
<br />
Откройте свой любимый текстовый редактор (например, [[Nano]]) и создайте файл {{ic|/etc/samba/smb.conf}}:<br />
<br />
##This is the main Samba configuration file. You should read the<br />
##smb.conf(5) manual page in order to understand the options listed<br />
##here. Samba has a huge number of configurable options (perhaps too<br />
##many!) most of which are not shown in this example<br />
##<br />
##For a step to step guide on installing, configuring and using samba, <br />
## read the Samba-HOWTO-Collection. This may be obtained from:<br />
## http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf<br />
##<br />
## Many working examples of smb.conf files can be found in the <br />
## Samba-Guide which is generated daily and can be downloaded from: <br />
## http://www.samba.org/samba/docs/Samba-Guide.pdf<br />
##<br />
## Any line which starts with a ; (semi-colon) or a # (hash) <br />
## is a comment and is ignored. In this example we will use a #<br />
## for commentry and a ; for parts of the config file that you<br />
## may wish to enable<br />
##<br />
## NOTE: Whenever you modify this file you should run the command "testparm"<br />
## to check that you have not made any basic syntactic errors. <br />
##<br />
#[global]<br />
# workgroup = WORKGROUP<br />
# security = share<br />
# server string = My Share<br />
# load printers = yes<br />
# log file = /var/log/samba/%m.log<br />
# max log size = 50<br />
# usershare path = /var/lib/samba/usershares<br />
# usershare max shares = 100<br />
# usershare allow guests = yes<br />
# usershare owner only = yes<br />
# <br />
#<br />
# #Windows Internet Name Serving Support Section:<br />
#<br />
# #WINS Support - Tells the NMBD component of Samba to enable it's WINS Server<br />
#; wins support = yes<br />
#<br />
## WINS Server - Tells the NMBD components of Samba to be a WINS Client<br />
## Note: Samba can be either a WINS Server, or a WINS Client, but NOT both<br />
#; wins server = w.x.y.z<br />
#<br />
##WINS Proxy - Tells Samba to answer name resolution queries on<br />
## behalf of a non WINS capable client, for this to work there must be<br />
## at least one WINS Server on the network. The default is NO.<br />
#; wins proxy = yes<br />
<br />
Сохраните файл. Затем добавьте вашего пользователя в группу ''sambashares'':<br />
gpasswd -a ''имя пользователя'' ${USERSHARES_GROUP}<br />
<br />
Перезапустите Samba:<br />
/etc/rc.d/samba restart<br />
<br />
Выйдите из системы и войдите снова. Теперь у вас есть возможность щёлкнуть правой кнопкой на любой папке и открыть к ней доступ из сети.<br />
<br />
Для того, чтобы samba запускалась во время загрузки компьютера, добавьте ''samba'' в список демонов в файл {{ic|/etc/rc.conf}}.<br />
<br />
Если вы хотите узнать больше, загляните на страницу [[Samba (Русский)|Samba]]<br />
<br />
==Советы и подсказки==<br />
===Запуск Thunar как демона===<br />
Thunar может запускаться как демон. Это даёт несколько преимуществ, включая более быстрый запуск Thunar и его выполнение в фоне.<br />
<br />
Одно из решений - запускать Thunar автоматически через файл {{ic|~/.xinirc}} или скрипт автозапуска (так, в [[Openbox (Русский)|Openbox]] это {{ic|autostart}}).<br />
<br />
Чтобы запустить Thunar как демона, просто добавьте в свой скрипт автозапуска или запустите из терминала:<br />
thunar --daemon &<br />
<br />
===Исправление отображения русских букв===<br />
В общесистемном {{ic|/etc/xdg/xfce4/mount.rc}} или в пользовательском файле {{ic|~/.config/xfce4/mount.rc}} добавьте ''utf8=true'' в секции файловых систем, с которыми имеет место проблема. Например:<br />
[vfat]<br />
uid=<auto><br />
shortname=winnt<br />
utf8=true<br />
# FreeBSD specific option<br />
longnames=true<br />
<br />
В этом файле определены правила для нескольких файловых систем:<br />
* '''vfat''' - FAT, флешки<br />
* '''iso9660''' - CDFS, компакт-диски CD<br />
* '''udf''' - UDF, обычно DVD<br />
* '''ntfs''' - собственно, NTFS<br />
* '''ntfs-3g''' - свободная реализация NTFS<br />
<br />
===Не работает автомонтирование,нет корзины===<br />
Посетите статью про PCManFM все относится и к Thunar [https://wiki.archlinux.org/index.php/PCManFM_%28%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9%29]<br />
<br />
==Устранение конфликтов==<br />
===Блокировка в hal-mtab===<br />
Если у вас одновременно работают hal и autofs, возможны блокировки в hal-mtab. Чтобы предотвратить это, используйте только один из них.<br />
<br />
Если у вас не работает автоматическое монтирование при запуске вашего оконного менеджера через {{ic|~/.xinitrc}}, вам, возможно, потребуется изменить строчку запуска для оконного менеджера с такой:<br />
exec /usr/bin/dwm<br />
<br />
на такую:<br />
exec ck-launch-session /usr/bin/dwm<br />
<br />
===Автоматическое монтирование с помощью udev===<br />
Thunar и XFCE4 переходят на [[udev]] для обнаружения и монтирования внешних мультимедиа устройств.<br />
<br />
Установливайте Thunar как обычно, однако не забудьте добавить пользователя в группу 'storage' ({{ic|/etc/group}}).<br />
<br />
# usermod -a -G storage <user><br />
<br />
Если Вы используете [[Display_Manager|менеджер входа в систему]] для запуска Вашего оконного менеджера, посмотрите документацию по настройке запуска с нужной [[PolicyKit|политикой доступа]]. Например, при использовании SLIM руководство [[Slim#PolicyKit|здесь]].<br />
<br />
Если Вы не используете менеджер входа в систему, включите dbus-launch и ck-launch-session перед командой для старта оконного менеджера или окружения рабочего стола в пользовательском файле {{ic|~/.xinitrc}}<br />
<br />
{{hc|~/.xinitrc|<nowiki>exec dbus-launch --exit-with-session ck-launch-session startxfce4 # здесь добавьте Ваш оконный менеджер</nowiki>}}<br />
<br />
==Ссылки и руководства==<br />
* Страница [http://thunar.xfce.org/index.html Thunar].<br />
* Страница [http://goodies.xfce.org/projects/thunar-plugins/thunar-volman Thunar Volume Manager].<br />
* Страница [http://goodies.xfce.org/projects/thunar-plugins/thunar-archive-plugin Thunar Archive Plugin].<br />
* Страница [http://goodies.xfce.org/projects/thunar-plugins/thunar-media-tags-plugin Thunar Media Tags Plugin].<br />
* Страница [http://goodies.xfce.org/projects/thunar-plugins/thunar-thumbnailers/ Thunar Thumbnailers].<br />
* Страница [http://goodies.xfce.org/projects/thunar-plugins/thunar-shares-plugin/ Thunar Shares Plugin].<br />
* Список [http://goodies.xfce.org/projects/thunar-plugins/start модулей].</div>
Vas
https://wiki.archlinux.org/index.php?title=Openbox_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=201138
Openbox (Русский)
2012-05-12T10:42:53Z
<p>Vas: /* Ресурсы */ added link to wikibook about configurating Openbox</p>
<hr />
<div>[[Category:Desktop environments (Русский)]]<br />
[[Category:Руководства (Русский)]]<br />
[[Category:Русский]]<br />
{{i18n|Openbox}}<br />
<br />
Openbox это легкий и гибкий в настройке [[Window Manager|оконный менеджер]], поддерживающий большинство стандартных функций. Все его особенности документированы на [http://openbox.org/ официальном веб-сайте]. Эта статья описывает процесс установки Openbox под Arch Linux.<br />
<br />
== Установка ==<br />
<br />
{{Pkg|Openbox}} доступен из репозитория сообщества:<br />
# pacman -S openbox<br />
<br />
После установки вы должны скопировать конфигурационные файлы по умолчанию {{ic|rc.xml}}, {{ic|menu.xml}}, {{ic|autostart}}, и {{ic|environment}} в {{ic|~/.config/openbox}}:<br />
<br />
{{Note|Делайте это с правами пользователя, а не с правами суперпользователя.}}<br />
<br />
$ mkdir -p ~/.config/openbox<br />
$ cp /etc/xdg/openbox/{rc.xml,menu.xml,autostart,environment} ~/.config/openbox<br />
<br />
{{ic|rc.xml}} основной конфигурационный файл. В нем описаны сочетания клавиш, темы, виртуальные столы, и т.д.<br />
<br />
{{ic|menu.xml}} описывает содержимое меню, выпадающего по правому клику мыши. В нем описаны ярлыки запуска приложений и другие ярлыки. Смотрите секцию [[#Меню]].<br />
<br />
{{ic|autostart}} файл, отвечающий за автозапуск приложений при загрузке сессии openbox-session. Содержит программы, которые должны запускаться при загрузке. Обычно используется для установки переменных окружения, запуска панелей и доков, установки обоев на рабочий стол или запуска иных скриптов. Смотри [http://openbox.org/wiki/Help:Autostart Openbox Wiki].<br />
<br />
{{ic|environment}} is sourced by openbox-session at startup. Содержит переменные окружения, которые будут добавлены в контекст Openbox. Любые переменные, которые вы устанавливаете здесь будут видны в Openbox всем приложениям, которые вы запускаете, включая приложения в меню.<br />
<br />
== Обновление до Openbox 3.5 ==<br />
<br />
Если вы обновляетесь до Openbox 3.5 или более поздней версии с ранних релизов, то вам следует знать следующее:<br />
* Новый конфигурационный файл {{ic|environment}} вы должны скопировать отсюда /etc/xdg/openbox в папку ~/.config/openbox .<br />
* Прошлый конфигурационный файл, именуемый {{ic|autostart.sh}} теперь носит имя {{ic|autostart}}. Вам следует его переименовать - убрать из имени .sh .<br />
* Несколько изменилась грамматика в файле {{ic|rc.xml}}. Но пока Openbox понимает старые опции, сравните свои файлы конфигурации с соответствующими файлами в /etc/xdg/openbox и посмотрите на изменения.<br />
<br />
=== Проблемы 3.5 ===<br />
Смотри секцию ниже [[#Устранение неисправностей Openbox 3.5|Устранение неисправностей Openbox 3.5]].<br />
<br />
== Openbox в качестве отдельного менеджера окон ==<br />
<br />
Openbox можно использовать в качестве отдельного менеджера окон. Так его обычно проще устанавливать и настраивать, чем использовать Openbox с другими рабочими средами. Запуск Openbox в качестве самостоятельного рабочего окружения может значительно снизить загруженность вашего процессора и уменьшить количество потребляемой памяти.<br />
<br />
Для запуска Openbox в качестве отдельного менеджера окон файл '''{{ic|~/.xinitrc}}''' должен выглядеть так:<br />
exec openbox-session<br />
<br />
Вы можете так же запустить Openbox из терминала, используя '''xinit''':<br />
$ xinit /usr/bin/openbox-session<br />
<br />
Если вы использовали другой менеджер окон (например, Xfwm) и теперь Openbox не запускается после выхода из X, попытайтесь проделать следующее:<br />
mv ~/.config/autostart ~/.config/autostart-bak<br />
<br />
Для запуска с Consolekit, используйте такую строку:<br />
exec ck-launch-session openbox-session<br />
<br />
Если вы используете '''polkit''' и '''D-Bus''' (требуется для автоматического монтирования носителей в Nautilus/Gnome) используйте:<br />
exec ck-launch-session dbus-launch openbox-session<br />
<br />
{{Note|[http://www.archlinux.org/packages/extra/any/pyxdg/ pyxdg] требуется Openbox для xdg-autostart}}<br />
{{Note|"dbus-launch" должна быть помещена после "ck-launch-session", иначе будут проблемы с монтированием устройств}}<br />
<br />
== Openbox в качестве оконного менеджера для других окружений рабочих столов==<br />
<br />
Openbox может быть использован как заменяемый менеджер окон для законченных окружений рабочих столов. Этот метод развертывания Openbox требует окружение рабочего стола.<br />
<br />
=== GNOME 2.24 и 2.26 ===<br />
Создайте {{ic|/usr/share/applications/openbox.desktop}} следующего содержания:<br />
[Desktop Entry]<br />
Type=Application<br />
Encoding=UTF-8<br />
Name=OpenBox<br />
Exec=openbox<br />
NoDisplay=true<br />
# name of loadable control center module<br />
X-GNOME-WMSettingsModule=openbox<br />
# name we put on the WM spec check window<br />
X-GNOME-WMName=OpenBox<br />
В gconf, установите '''{{Ic|/desktop/gnome/session/required_components/windowmanager}}''' в '''{{Ic|openbox}}:'''<br />
$ gconftool-2 -s -t string /desktop/gnome/session/required_components/windowmanager openbox<br />
В завершении, выберите сессию '''GNOME''' в GDM меню сессий.<br />
<br />
=== GNOME 2.26 Redux ===<br />
'''''Если предыдущее руководство для GNOME 2.24 не работает:'''''<br />
<br />
Если когда вы пытаетесь сойти в сессию "Gnome/Openbox" session -- и сделать это не получается, попытайтесь так, как написано здесь. Это один из путей использовать Openbox в качестве оконного менеджера в любое время, когда вы используете сессию Gnome:<br />
<br />
#Войдите в вашу сессию Gnome (она должна использовать Metacity в качестве оконного менеджера);<br />
#Установите Openbox если вы этого еще не сделали;<br />
#В главном меню ''System &rarr; Preferences &rarr; Startup Applications'' (может называться 'Session' в старых версиях Gnome);<br />
#Откройте Startup Application, выберите '+ Add' и введите текст, показанный ниже. Комментариями можно пренебречь (#);<br />
#Кликните на кнопку 'Add' для того, чтобы закрыть окно. Убедитесь, что переключатель точки выхода был выбран;<br />
#Покиньте вашу сессию Gnome и войдите снова;<br />
#Теперь в качестве оконного менеджера должен запуститься Openbox.<br />
<br />
Name: Openbox Windox Manager # Можно изменить<br />
Command: openbox --replace # Этот текст нельзя удалять или менять, но можно добавить другие опции<br />
Comment: Replaces metacity with openbox # Можно изменить<br />
<br />
Этот ярлык будет автоматически запускаться каждый раз, когда запускается сессия пользователя в Gnome.<br />
<br />
=== GNOME 2.22 и ниже ===<br />
# Если вы используете GDM, выберите "GNOME/Openbox"<br />
# Если вы используете команду {{Ic|startx}}, добавьте {{Ic|exec openbox-gnome-session}} в {{ic|~/.xinitrc}}<br />
# И выполните из терминала команду:<br />
$ xinit /usr/bin/openbox-gnome-session<br />
<br />
=== KDE ===<br />
# Если вы используете KDM, выберите "KDE/Openbox"<br />
# Если вы используете команду startx, добавьте {{Ic|exec openbox-kde-session}} в {{ic|~/.xinitrc}}<br />
# И выполните из терминала команду:<br />
$ xinit /usr/bin/openbox-kde-session<br />
<br />
=== Xfce4 ===<br />
Загрузитесь в обычную Xfce4 сессию. И наберите в терминале команду:<br />
$ killall xfwm4 ; openbox & exit<br />
<br />
Тем самым вы убьете xfwm4, запустите Openbox, и закроете терминал. Теперь можно выйти из системы, но предварительно проверьте, что выбрали ''"Save session for future logins"''. При следующей загрузке Xfce4 в качестве оконного менеджера должен быть '''Openbox'''.<br />
<br />
Для того, чтобы включить выход из сессии используя ''xfce4-session,'' отредактируйте '''{{ic|~/.config/openbox/menu.xml}}'''. Если этот файл отсутствует, скопируйте его из {{ic|/etc/xdg/openbox/}}. Посмотрите на его содержимое, он выглядит так:<br />
<item label="Exit Openbox"><br />
<action name="Exit"><br />
<prompt>yes</prompt><br />
</action><br />
</item><br />
<br />
Приведите его к такому виду:<br />
<item label="Exit Openbox"><br />
<action name="Execute"><br />
<prompt>yes</prompt><br />
<command>xfce4-session-logout</command><br />
</action><br />
</item><br />
<br />
Другой путь, выбрать "Exit" из главного меню Openbox, чтобы выйти из него, теперь у вас не будет запущенного оконного менеджера.<br />
<br />
Если у вас проблемы с переключением между виртуальными столами с помощью колеса мыши - пропускаются рабочие столы, то отредактируйте '''{{ic|~/.config/openbox/rc.xml}}'''. Измените привязку к клавишам мыши для действий "DesktopPrevious" и "DesktopNext" в подгруппе ''Desktop'' в группе ''Root''.<br />
<br />
Когда используете главное меню Openbox вместо главного меню Xfce, вы должны выйти из Xfdesktop скомандовав из терминала:<br />
$ xfdesktop --quit<br />
Xfdesktop управляет обоями и значками на рабочем столе, поэтому вам могут потребоваться такие утилиты, как ROX для решения этих задач.<br />
<br />
(После закрытия Xfdesktop проблема с виртуальными рабочими столами отпадает.)<br />
<br />
== Openbox для пользователей с несколькими мониторами ==<br />
<br />
Пока Openbox обеспечивает лучше, чем среднюю поддержку нескольких мониторов, проект развивающий эту тему называется [https://aur.archlinux.org/packages.php?ID=51460 Openbox Multihead] и доступен в репозитории AUR это дает пользователям возможность воспользоваться его удобством. Эта модель обычно не основана на плавающих оконных менеджерах, но существует в основном в тайтловых оконных менеджерах. Она хорошо пояснена на сайте [http://xmonad.org/tour.html#workspace Xmonad]. Также, пожалуйста ознакомьтесь с [https://github.com/BurntSushi/openbox-multihead/blob/multihead/README.MULTIHEAD README.MULTIHEAD] для того, чтобы понять все новые возможности и правильно настроить Openbox Multihead.<br />
<br />
Openbox Multihead функционирует также, как и обычный Openbox когда доступен только один монитор.<br />
<br />
Обратная сторона медали Openbox Multihead в том, что это ломает EWMH (Extended Window Manager Hints), т.к. предполагается, что один и только один рабочий стол доступен в данный момент времени. Таким образом, существующие менеджеры не могут работать корректно именно по этой причине. Чтобы исправить это попробуйте [https://aur.archlinux.org/packages.php?ID=51536 pager-multihead], который вы можете найти в репозитории AUR, он совместим с Openbox Multihead. [http://imgur.com/a/cnZeq#y04nk Скриншоты].<br />
<br />
В завершение, новая версия [https://aur.archlinux.org/packages.php?ID=51626 pytyle] может быть найдена в репозитории AUR она работает с Openbox Multihead.<br />
<br />
Обе pytyle3 и pager-multihead работают и без Openbox Multihead если только один монитор активен.<br />
<br />
== Настройка ==<br />
<br />
Здесь несколько опций для настройки параметров Openbox:<br />
<br />
=== Ручная настройка ===<br />
Для настройки Openbox вручную отредактируйте файл {{ic|~/.config/openbox/rc.xml}} с помощью текстового редактора. Он содержит множество поясняющих комментариев. Смотрите [http://openbox.org/wiki/Help:Configuration Help:Configuration openbox wiki] для того, чтобы узнать больше.<br />
<br />
=== ObConf ===<br />
[http://openbox.org/wiki/ObConf:About ObConf] это графическая утилита для настройки Openbox. Она может быть использована для установки множества общих настроек, таких как темы, виртуальные рабочие столы, свойства окон и рабочих столов. Ее можно установить используя pacman:<br />
<br />
# pacman -S obconf<br />
<br />
ObConf не может быть использован для настройки сочетаний клавиш и некоторых других функций. Для изменения этих параметров редактируйте {{ic|rc.xml}} вручную. В качестве альтернатив можно воспользоваться {{AUR|obkey}} из [[AUR]].<br />
<br />
=== Настройка приложений ===<br />
<br />
Openbox позволяет настроить приложения. Это позволяет вам определять правила для программ. Например:<br />
* Запустить ваш браузер на отдельном виртуальном рабочем столе.<br />
* Открыть ваш терминал без оконного обрамления.<br />
* Сделать так, чтобы ваш bit-torrent клиент открывался в заданной позиции экрана.<br />
<br />
Настройки приложений определяются в файле {{ic|~/.config/openbox/rc.xml}}. Настройки в файле прокомментированы. Подробности смотрите в [http://openbox.org/wiki/Help:Applications Help:Applications openbox wiki].<br />
<br />
== Меню ==<br />
<br />
По умолчанию Openbox включает целый ряд элементов меню. Множество из них ярлыки для запуска программ которых у вас еще не установлены или которые вы никогда не будете устанавливать. Вы конечно можете отредактировать это меню, за него отвечает файл'''{{ic|menu.xml}}'''. Ниже описаны несколько способов это сделать.<br />
<br />
=== Ручная настройка меню ===<br />
<br />
Вы можете отредактировать {{ic|~/.config/openbox/menu.xml}} текстовым редактором. Множество настроек не требуют пояснения. В этой статье меню описано более подробно [http://openbox.org/wiki/Help:Menus Help:Menus].<br />
<br />
===Иконки в меню===<br />
<br />
Начиная с версии 3.5.0 вы можете добавлять иконки рядом с ярлыками запуска программ в меню. Сделать это можно так:<br />
# добавьте <showIcons>yes</showIcons> в секцию <menu> в файл {{ic|rc.xml}}<br />
# отредактируйте описание ярлыка в меню в файле {{ic|menu.xml}} добавив в него icons="<path>" выглядит это примерно так :<br />
<menu id="apps-menu" label="SomeApp" icon="/home/user/.icons/application.png"><br />
<br />
затем выполните openbox --reconfigure или openbox --restart если у вас возникают проблемы с обновлением меню :)<br />
<br />
=== MenuMaker ===<br />
<br />
[http://menumaker.sourceforge.net/ MenuMaker] это утилита создания XML меню для нескольких оконных менеджеров включая Openbox. MenuMaker сканирует ваш компьютер на исполняемые файлы и генерирует меню по результатам сканирования. Она может быть сконфигурирована так, чтобы исключить определенные типы приложений (GNOME, KDE, или другие), если вам это требуется.<br />
# pacman -S menumaker # Установка MenuMaker из репозитория<br />
<br />
Послу установки сгенерируйте файл меню (named {{ic|menu.xml}}) запустив программу.<br />
$ mmaker -v OpenBox3 # Не перезаписывать существующий файл меню.<br />
$ mmaker -vf OpenBox3 # Принудительно перезаписать файл меню.<br />
$ mmaker --help # Просмотр всех доступных опций MenuMaker.<br />
<br />
MenuMaker создает очень большой файл меню {{ic|menu.xml}}. Вы можете его отредактировать вручную или сгенерировать заново после установки программ.<br />
<br />
=== Obmenu ===<br />
<br />
Obmenu это редактор меню для Openbox. Это графическое приложение - лучший выбор для тех, кто не любит или не хочет редактировать XML код. Obmenu доступно из репозитория сообщества:<br />
# pacman -S obmenu<br />
<br />
После установки и запуска {{Ic|obmenu}} вы сможете добавлять и удалять приложения из меню как вам будет угодно.<br />
<br />
=== openbox-menu ===<br />
<br />
Openbox-menu использует [http://sourceforge.net/projects/lxde/files/menu-cache/ menu-cache] из проекта LXDE для создания динамического меню для Openbox.<br />
<br />
Домашняя страничка проекта:<br />
[http://mimasgpc.free.fr/openbox-menu_en.html http://mimasgpc.free.fr/openbox-menu_en.html]<br />
<br />
Страница в репозитории AUR:<br />
[https://aur.archlinux.org/packages.php?ID=31605 https://aur.archlinux.org/packages.php?ID=31605]<br />
<br />
==== Obm-xdg ====<br />
<br />
{{Ic|obm-xdg}} это консольная утилита, входящая в состав Obmenu. Эта утилита распределяет по категориям в подменю установленные GTK/GNOME приложения.<br />
<br />
Для использования obm-xdg с другими меню, добавьте в файл '''{{ic|~/.config/openbox/menu.xml}}''' такую строку:<br />
<menu execute="obm-xdg" id="xdg-menu" label="xdg"/><br />
<br />
Затем после линии с вашим 'root-menu' добавьте такую троку в том месте, где бы вы хотели чтобы появилось меню:<br />
<menu id="xdg-menu"/><br />
<br />
Для использования obm-xdg самостоятельно создайте '''{{ic|~/.config/openbox/menu.xml}}''' только такого содержания:<br />
<openbox_menu><br />
<menu execute="obm-xdg" id="root-menu" label="apps"/><br />
</openbox_menu><br />
<br />
<br />
Затем запустите {{Ic|openbox --reconfigure}} для того чтобы обновить меню Openbox. Теперь вы должны увидеть подменю с именем '''xdg''' в вашем меню.<br />
<br />
{{Note|Если у вас не установлен GNOME, то вам необходимо установить пакет '''gnome-menus''' для obm-xdg.}}<br />
<br />
=== Основанный на Python скрипт меню xdg ===<br />
<br />
Этот скрипт находится в Openbox пакетах дистрибутива Fedora. Поэтому вы можете только скопировать скрипт куда-нибудь и создать для него точку входа в файле меню.<br />
<br />
Найти его можно по этой ссылке: [http://pkgs.fedoraproject.org/gitweb/?p=openbox.git;f=xdg-menu;hb=HEAD последняя версия]<br />
<br />
Скачайте из репозитория выше. Поместите в любую, удобную для вас папку.<br />
<br />
Откройте файл '''{{ic|menu.xml}}''' с помощью вашего текстового редактора и добавьте следующие строки, конечно, вы можете изменить метку, если хотите.<br />
<menu id="apps-menu" label="xdg-menu" execute="python2 <path>/xdg-menu"/><br />
<br />
Сохраните файл и запустите '''{{Ic|openbox --reconfigure}}'''.<br />
<br />
{{Note|Если у вас не установлен GNOME, то вам необходимо установить пакет '''gnome-menus''' для xdg-menu.}}<br />
<br />
=== Генератор меню для Openbox ===<br />
<br />
Он находится в репозитории AUR под именем [https://aur.archlinux.org/packages.php?ID=27300 obmenugen-bin,] генератор меню для Openbox позволяет создать меню из файлов *.desktop. Obmenugen представляет текстовые файлы, как фильтры для элементов меню.<br />
$ obmenugen # Создать файл меню<br />
$ openbox --reconfigure # Чтобы увидеть результат в вашем меню<br />
<br />
=== Pipe меню ===<br />
<br />
Как в других оконных менеджерах, в Openbox возможно использование скриптов для генерирования динамического меню (меню на лету). Например, мониторы системных ресурсов, управление медиа плеерами или мониторы погоды. Примеры скриптов Pipe меню можно найти здесь [http://openbox.org/wiki/Openbox:Pipemenus Openbox:Pipemenus] это одна из страниц проекта Openbox.<br />
<br />
Пользователь ''Xyne'' создал браузер файлов pipe меню, а пользователь ''brisbin33'' создал pipe меню для сканирования и подключения к беспроводным сетям (используется netcfg). Темы форума этих утилит по ссылкам ниже: [http://bbs.archlinux.org/viewtopic.php?id=77197&p=1 браузер файлов], [http://bbs.archlinux.org/viewtopic.php?id=78290 wifi].<br />
<br />
Пользователь ''jnguyen'' создал pipe меню для управления съемными носителями с использованием Udisks. Тема на форуме по этой ссылке: [https://bbs.archlinux.org/viewtopic.php?id=114702 obdevicemenu].<br />
<br />
== Автозапуск программ ==<br />
<br />
Openbox поддерживает автозапуск программ. Это обеспечивается командой '''openbox-session'''.<br />
<br />
=== Включение автозапуска ===<br />
<br />
Есть два способа включить автозапуск:<br />
# Если вы используете команду startx или xinit для запуска X сессии, отредактируйте {{ic|~/.xinitrc}}. Замените в линии запуска '''''openbox''''' на '''openbox-session'''.<br />
# Если вы используете GDM или KDM, выберите ''Openbox'' в этом случае автозапуск программ произойдет автоматически.<br />
<br />
=== Скрипт автозапуска ===<br />
<br />
Openbox запускает все программы описанные в файле {{ic|~/.config/openbox/autostart}}. Этот скрипт ''не'' создается по умолчанию. При отсутствии этого скрипта в домашней папке пользователя, Openbox использует системный скрипт {{ic|/etc/xdg/openbox/autostart}}. Системный скрипт не используется, если существует пользовательский скрипт.<br />
<br />
Для создания пользовательского скрипта автозапуска скопируйте системный скрипт в вашу папку с настройками {{ic|~/.config/openbox/}} и добавьте в него свои команды. Это не гарантирует вам работоспособность окружения должным образом.<br />
<br />
Полная инструкция доступна по ссылке [http://openbox.org/wiki/Help:Autostart Help:Autostart] на сайте проекта Openbox.<br />
<br />
{{Note|Этот файл назывался autostart.sh до версии OpenBox 3.5.0. Если вы обновляетесь, то проверьте переименовали вы ли его, удалив в имени старого файла окончание .sh.}}<br />
<br />
== Темы и оформление ==<br />
<br />
:{{Box YELLOW||Дополнительная статья на эту тематику '''[[Openbox_Themes_and_Apps|Openbox Themes and Apps]]''' расскажет вам подробнее об изменении внешнего вида Openbox.}}<br />
<br />
=== Темы Openbox ===<br />
<br />
Темы управляют внешним видом окон, заголовков и кнопок. Также они контроллируют появление меню и режимы поступления информации на экран. Дополнительные темы доступны из стандартного репозитория.<br />
# pacman -S openbox-themes<br />
<br />
=== Курсоры, иконки, обои рабочего стола ===<br />
<br />
Пожалуйста смотрите [[Openbox_Themes_and_Apps#X11_Mouse_cursors|Openbox Themes and Apps]] для получения информации о перенастройке этих параметров.<br />
<br />
== Рекомендуемые программы ==<br />
:{{Box YELLOW||Дополнительная статья в wiki '''[[Openbox_Themes_and_Apps#Recommended_programs|Openbox Themes and Apps]]''' содержит информацию о приложениях, которые вам могут пригодиться при использовании Openbox.<br>Статья расскажет подробнее о панелях, треях, элементах управления звуком и других виджетах рабочего стола.}}<br />
<br />
По этой ссылке находится список [[Lightweight_Applications|Легковесных Программ]] из wiki. Большинство из них отлично работают с Openbox.<br />
<br />
=== Менеджеры входа в систему ===<br />
<br />
[http://slim.berlios.de/ SLiM] это графический менеджер входа в систему. Отличный выбор, если вы используете Openbox в качестве отдельного менеджера окон. Ссылка на статью о [[SLiM]] в wiki.<br />
<br />
[http://qingy.sourceforge.net/ Qingy] легкий, перенастраиваемый графический менеджер входа в систему. поддерживает вход в систему в консоль или X сессию. Qingy использует [http://www.directfb.org DirectFB]. Qingy не запускает X сессию пока вы не выберете сессию входа в X. Прочитайте статью в Arch wiki о [[Qingy|Qingy.]]<br />
<br />
=== Композитные эффекты для рабочего стола ===<br />
<br />
[[Xcompmgr]] это композитный оконный менеджер, способный отрисовывать тени, затухания и прозрачные окна для Openbox и других оконных менеджеров.<br />
{{Note|Xcompmgr больше не обновляется. Он имеет несколько проблем и маловероятно, что они будут исправлены. (Например, Xcompmgr имеется проблема с ''tint2 0.9'': значки в системном трее искажаются.)}}<br />
<br />
[[Cairo Compmgr]] это многоцелевой композитный оконный менеджер [http://en.wikipedia.org/wiki/Cairo_(software) Cairo]. И обычно он более подходящий выбор.<br />
<br />
=== Панели и треи ===<br />
<br />
Дополнительные материалы можно найти здесь [[Openbox_Themes_and_Apps#Panels, trays, pagers|Openbox Themes and Apps]].<br />
<br />
=== Файловые менеджеры ===<br />
<br />
Тройка популярнейших файловых менеджеров:<br />
* [[Thunar]]. Thunar поддерживает автомонтирование носителей и другие функции через плагины и дополнения. <br />
# pacman -S thunar<br />
* [http://roscidus.com/desktop/ ROX] (ROX также может отображать иконки на рабочем столе)<br />
# pacman -S rox<br />
* [http://pcmanfm.sourceforge.net PCManFM]<br />
# pacman -S pcmanfm # PcManFM также может отображать иконки на рабочем столе.<br />
# pacman -S ntfs-3g # Позволит PCManFM работать с NTFS разделами и устройствами.<br />
<br />
Больше информации можно найти по ссылке [[Openbox_Themes_and_Apps#File_managers|Openbox Themes and Apps]]. Дополнительная статья о других удобных утилитах: диалог запуска программ [http://sourceforge.net/projects/gmrun gmrun], менеджеры буфера обмена, регуляторы громкости звука, и т.д..<br />
<br />
== Советы и хитрости ==<br />
<br />
===Поведение подобное Aero Snap===<br />
Windows 7 поддерживает уникальную функцию поведения окон, она заключается в том, что при перемещении окна к краю экрана оно цепляется за него. Этот эффект может быть включен в Openbox. Подробнее написано [http://ubuntuforums.org/showthread.php?t=1796793 здесь].<br />
<br />
=== Ассоциации файлов ===<br />
Openbox и другие приложения, которые вы используете с ним, не интегрированы друг в друга, поэтому вы можете столкнуться с проблемами при открытии файлов в вашем файловом менеджере. Просто ваш менеджер файлов может не знать с помощью, какой программы открывать данный тип файла.<br />
<br />
Пакет в AUR называемый [https://aur.archlinux.org/packages.php?ID=23170 gnome-defaults-list] содержит список типов файлов и связанных с ними программ для рабочего стола Gnome. Этот список устанавливается в {{ic|/etc/gnome/defaults.list.}}<br />
<br />
Откройте этот файл с помощью вашего текстового редактора. Теперь вы можете заменить предложенные там приложения на те, которые вы выбрали. Например, totem <=> vlc или eog <=> mirage. Сохраните файл {{ic|~/.local/share/applications/defaults.list}}.<br />
<br />
Другой способ установить ассоциации - установить пакет ''perl-file-mimeinfo'' из репозитория и вызвать '''mimeopen''', например, так:<br />
mimeopen -d /path/to/file<br />
У вас спросят каким приложением открыть /path/to/file:<br />
Please choose a default application for files of type text/plain<br />
1) notepad (wine-extension-txt)<br />
2) Leafpad (leafpad)<br />
3) OpenOffice.org Writer (writer)<br />
4) gVim (gvim)<br />
5) Other...<br />
Ваш ответ установит приложение по умолчанию для открытия всех файлов данного типа. Описание ассоциаций приложений к типам файлов {{ic|/usr/bin/perlbin/vendor/mimetype}}.<br />
<br />
=== Копирование и вставка ===<br />
<br />
Из терминала '''Ctrl+Insert''' для копирования и '''Shift+Insert''' для вставки.<br />
<br />
Также '''Ctrl+Shift+C''' для копирования и '''mouse middle-click''' для вставки (в терминалах).<br />
<br />
Другие приложения возможно используют другие сочетания клавиш для копирования и вставки.<br />
<br />
=== Прозрачность окон ===<br />
<br />
Программа transset-df (практически такая же как ''transset'') устанавливается с помощью команды pacman -S transset-df. С помощью transset-df вы сможете включать прозрачность окон на лету.<br />
<br />
Для этого поместите в строки представленные ниже {{ic|~/.config/openbox/rc.xml}} таким образом вы сможете с помощью скроллинга мыши регулировать прозрачность окон когда курсор мыши находится над заголовком окна (это внутри секции <mouse>):<br />
<br />
<context name="Titlebar"><br />
. . .<br />
<mousebind button="Up" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --inc </execute><br />
</action><br />
</mousebind><br />
<mousebind button="Down" action="Click"><br />
<action name= "Execute" ><br />
<execute>transset-df -p .2 --dec </execute><br />
</action><br />
</mousebind><br />
. . .<br />
</context><br />
Это будет работать только когда нет каких-то дополнительных действий назначенных в этой группе действий.<br />
<br />
=== Значения Xprop для приложений ===<br />
Если вы используете специальные настройки для приложений, вы можете найти этот удобный алиас для bash:<br />
<br />
alias xp='xprop | grep "WM_WINDOW_ROLE\|WM_CLASS" && echo "WM_CLASS(STRING) = \"NAME\", \"CLASS\""'<br />
<br />
Для использования запустите xp и кликните на запущенную программу, для которой вы хотите определить собственные настройки. Результат отобразит только информацию, требуемую для Openbox, а именно WM_WINDOW_ROLE и WM_CLASS (имя и класс):<br />
<br />
[thayer@dublin:~] $ xp<br />
WM_WINDOW_ROLE(STRING) = "roster"<br />
WM_CLASS(STRING) = "gajim.py", "Gajim.py"<br />
WM_CLASS(STRING) = "NAME", "CLASS"<br />
<br />
==== Xprop для Firefox ====<br />
<br />
В любом случае, Firefox и подобные приложения игнорируют правила (e.g. <desktop>) не меньше {{Ic|class&#61;"Firefox*"}} используется. Это применяет любое значение xprop может сообщить для программного класса WM_CLASS.<br />
<br />
=== Привязка меню к кнопке ===<br />
<br />
Некоторым людям может потребоваться привязать меню Openbox (или другое меню) к кнопке. Это полезно для создания панели кнопок всплывающего меню. This is useful for creating a panel button to pop up a menu. Хотя Openbox не поддерживает это, программа '''xdotool''' эмулирует нажатие клавиш. Openbox может быть настроен так, что при нажатии клавиши выполняется действие ''ShowMenu''.<br />
<br />
Пакет [https://aur.archlinux.org/packages.php?do_Details=1&ID=14789&O=0&L=0&C=0&K=xdotool&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd xdotool] доступен в AUR. После установки ''xdotool'', добавьте следующее в секцию <keyboard> в вашем файле '''{{ic|rc.xml}}''':<br />
<keybind key="A-C-q"><br />
<action name="ShowMenu"><br />
<menu>root-menu</menu><br />
</action><br />
</keybind><br />
Перезапустите/переконфигурируйте Openbox. Эта команда вызовет меню в точке, где находится курсор мыши. Команда распространяется как есть, привязка к объектам, или размещение в скрипте.<br />
$ xdotool key ctrl+alt+q<br />
<br />
Конечно, вы можете изменить ключевые ярлыки на ваш вкус. Рассмотрим отрывок для '''tint2''' (панель задач) файл настроек, который показывает выпадающее меню по клику по области с часами. Каждая комбинация клавиш установлена на открытие файла конфигурации '''{{ic|rc.xml}}''' меню Openbox. Отличие right?click от left?click:<br />
clock_rclick_command = xdotool key --clearmodifiers "ctrl+XF86PowerOff"<br />
clock_lclick_command = xdotool key --clearmodifiers "alt+XF86PowerOff"<br />
<br />
=== Urxvt в качестве фона рабочего стола ===<br />
<br />
С Openbox запустить терминал в качестве фона рабочего стола крайне просто. Вам не потребуется использовать '''devilspie'''.<br />
<br />
Сначала вы должны включить прозрачность, откройте ваш {{ic|~/.Xdefaults}} (если он не существует, то создайте его в домашней директории).<br />
URxvt*transparent:true<br />
URxvt*scrollBar:false<br />
URxvt*geometry:124x24 #Я не использую полный экран, если вы хотите терминал на весь экран, то не беспокойтесь как это сделать написано ниже.<br />
URxvt*borderLess:true<br />
URxvt*foreground:Black #Цвет шрифта. Мои обои рабочего стола белые, возможно вы захотите изменить его на белый.<br />
<br />
Затем отредактируйте файл {{ic|.config/openbox/rc.xml}}:<br />
<application name="URxvt"><br />
<decor>no</decor><br />
<focus>yes</focus><br />
<position><br />
<x>center</x><br />
<y>20</y><br />
</position><br />
<layer>below</layer><br />
<desktop>all</desktop><br />
<maximized>true</maximized> #Используйте только если вы хотите терминал на весь экран.<br />
</application><br />
<br />
''Магия'' приходит со строчкой {{Ic|<layer>below</layer>}}, которая помещает приложение под все остальные. Здесь Urxvt отображен на всех рабочих столах, измените это для вашего удобства.<br />
<br />
{{Note|Вместо использования <application name="URxvt"> вы можете дать другое имя (например, "URxvt-bg"), и использовать опцию -name при запуске uxrvt. Такой способ работает только для urxvt, для которого вы выбрали имя URxvt-bg введите и модифицируйте правила для этого приложения в rc.xml. Например: urxvt -name URxvt-bg (учитывая регистр)}}<br />
<br />
====Переключение между рабочими столами====<br />
<br />
<s>Вышеописанный метод минимизирует Urxvt когда вы используете команду ToggleShowDesktop. Во избежание этого воспользуйтесь [https://bbs.archlinux.org/viewtopic.php?pid=865844#p865844 этим постом]. Здесь требуется редактировать исходный код Urxvt.</s><br />
{{Note|Этот метод возможно уже не работает после недавнего обновления, сейчас происходит утечка памяти когда запущен пропатченный Urxvt.}}<br />
Рабочим остается только метод, описанный [https://bbs.archlinux.org/viewtopic.php?pid=929792#p929792 здесь]. Он делает ToggleShowDesktop таким, чтобы не восстанавливал другие приложения на рабочем столе, когда ToggleShowDesktop запущен второй раз. Это так же дает возможность использовать различные терминалы, а не только Urxvt.<br />
<br />
=== Клавиши регулирования громкости на клавиатуре ===<br />
====ALSA====<br />
Если вы используете ALSA для вывода звука, вы можете воспользоваться программой amixer для регулирования громкости звука. Вы можете использовать сочетания клавиш и назначить им команды в Openbox. (Или в качестве альтернативы, вы можете попытаться найти настоящие имена для ваших мультимедийных клавиш и их карту.) Например, в секции <keyboard> файла rc.xml:<br />
<br />
<keybind key="W-Up"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+</command><br />
</action><br />
</keybind><br />
<br />
Таким образом, вы назначите комбинации клавиш Windows key + Up arrow возможность повысить уровень громкости канала Master. Соответственно, чтобы понизить:<br />
<br />
<keybind key="W-Down"><br />
<action name="Execute"><br />
<command>amixer set Master 5%-</command><br />
</action><br />
</keybind><br />
<br />
В качестве другого примера - XF86Audio:<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
Пример, приведенный выше должен работать для большинства мультимедийных клавиатур. Он должен увеличивать, уменьшать и выключать звук канала Master для вашего аудиоустройства. Помните так же об этом:<br />
<br />
* Клавиша "Mute" должна включать канал Master если он уже выключен.<br />
* Клавиши "Raise" и "Lower" должны включать канал Master если он выключен.<br />
<br />
====Pulseaudio====<br />
Если вместе с ALSA вы используете pulseaudio, то в этом случае настройки несколько отличаются, amixer должен использовать pulse.<br />
<br />
<keybind key="XF86AudioRaiseVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%+ unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioLowerVolume"><br />
<action name="Execute"><br />
<command>amixer -D pulse set Master 5%- unmute</command><br />
</action><br />
</keybind><br />
<keybind key="XF86AudioMute"><br />
<action name="Execute"><br />
<command>amixer set Master toggle</command><br />
</action><br />
</keybind><br />
<br />
Эти сочетания клавиш должны работать для большинства систем. Другие примеры можно найти [http://ubuntuforums.org/showthread.php?t=987149 здесь].<br />
<br />
== Устранение неисправностей Openbox 3.5 ==<br />
=== X server ''падает'' ===<br />
Проблема была обнаружена после обновления до версии 3.5, поэтому X server может ''падать'' при попытке запуска Openbox, в конце вы получаете такое сообщение:<br />
(metacity:25137): GLib-WARNING **: In call to g_spawn_sync(), exit status of a child process \<br />
was requested but SIGCHLD action was set to SIG_IGN and ECHILD was received by waitpid(), so exit \<br />
status can't be returned. This is a bug in the program calling g_spawn_sync(); either do not request \<br />
the exit status, or do not set the SIGCHLD action.<br />
xinit: connection to X server lost<br />
waiting for X server to shut down<br />
В этом случае, какие-то проблемы с пакетом metacity привели к ''падению'' X server. Удаление пакетов metacity и compiz-decorator-gtk решит проблему. Хотя, позже было замечено, что просто переустановка пакета может помочь, но сначала надо удалить старый пакет, а только потом ставить новый.<br />
<br />
Притом, много похожих вариантов можно найти в Интернете, поэтому не только пакет metacity может быть причиной ''падения'' X server.<br />
Итак, если от какого-то другого пакета, кроме metacity вами было получено сообщение об ошибке, попробуйте переустановить его (или удалить) в попытке избавиться от этого сообщения X server.<br />
<br />
=== Автозапуск лишних приложений в 3.5 ===<br />
Лишние приложения запускаются с вашей сессией Openbox, даже если они не находятся в вашем скрипте автозапуска ~/.config/openbox/autostart ?<br />
<br />
Проверьте папку ~/.config/autostart/ , она может содержать файлы от прошлых ваших окружений рабочего стола (Gnome, KDE, etc.), и удалите ненужные файлы.<br />
<br />
=== SSH агент больше не запускается ===<br />
В то время как Openbox 3.4.x разрешалось запускать SSH агента из $XDG_CONFIG_HOME/openbox/autostart{,.sh}, с 3.5 это больше не работает. Вам требуется положить ваш код в: $XDG_CONFIG_HOME/openbox/environment, например:<br />
<br />
<pre><br />
SSHAGENT="/usr/bin/ssh-agent"<br />
SSHAGENTARGS="-s"<br />
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then<br />
eval `$SSHAGENT $SSHAGENTARGS`<br />
trap "kill $SSH_AGENT_PID" 0<br />
fi<br />
</pre><br />
<br />
=== Openbox не запускает сессию с D-Bus ===<br />
Точно так де как и с SSH агентом, множество людей используют D-Bus код в $XDG_CONFIG_HOME/openbox/autostart{,.sh} - это больше не работает (например Thunar больше не видит ни одного съемного устройства).<br />
<br />
Чтобы исправить это переместите код в $XDG_CONFIG_HOME/openbox/environment:<br />
<pre><br />
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then<br />
eval `dbus-launch --sh-syntax --exit-with-session`<br />
fi<br />
</pre><br />
<br />
Или же вы можете начинать сессию openbox-session с dbus-launch например, через файл ~/.xinitrc.<br />
<br />
== Ресурсы ==<br />
<br />
* [http://openbox.org/ Openbox Website] &ndash; Официальный веб-сайт<br />
* [http://planetob.openmonkey.com/ Planet Openbox] &ndash; Портал новостей о Openbox<br />
* [http://www.box-look.org/ Box-Look.org] &ndash; Хороший ресурс с темами и соответствующими артами<br />
* [https://bbs.archlinux.org/viewtopic.php?id=93126 Openbox Hacks and Configs Thread] @ Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=45692 Openbox Screenshots Thread] @ Arch Linux Forums<br />
* [http://snott.net/linux/using-gnome3-with-openbox/ Installation and configuration tutorial] Использование gnome3 с Openbox<br />
* [http://ru.wikibooks.org/wiki/OpenBox_Action Викиучебник] по настройке Openbox</div>
Vas
https://wiki.archlinux.org/index.php?title=Graphical_pacman_frontends_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=201079
Graphical pacman frontends (Русский)
2012-05-11T11:18:45Z
<p>Vas: corrected translation</p>
<hr />
<div>[[Category:Управление пакетами (Русский)]]<br />
[[Category:Русский]]<br />
{{i18n|Pacman GUI Frontends}}<br />
<br />
Здесь представлен список графических оболочек для [[pacman]]. В список включены полнофункциональные графические интерфейсы, информационные инструмены и различные уведомители для системного трея. Перечень програмного обеспечения разбит на категории в зависимости от использования Gtk или Qt.<br />
<br />
{{Warning|Ни одна из представленных ниже программ не поддерживается оффициальными разработчиками Arch Linux/Pacman.}}<br />
<br />
== Оболочки для Pacman ==<br />
=== X11 ===<br />
* {{App|1=PacmanXG4|2=Графическая оболочка для pacman. Не требует GTK и QT, только Хorg. Позволяет решать следующие задачи:<br />
:* Установка/удаление/обновление пакетов.<br />
:* Поиск пакетов / фильтр пакетов.<br />
:* Предоставление информации о пакетах, включая скриншоты.<br />
:* Откат пакетов (требуется утилита downgrade из AUR).<br />
:* Обновление базы данных пакетов, синхронизация зеркал.<br />
:* Обновление системы в один клик.<br />
:* Поддержка YAOURT (тестируется).<br />
:'''Скриншоты:''' http://almin-soft.nx0.ru/photo-cat-photo-cat-pacmanxg.html <br><br />
:'''Прямая ссылка на бинарник:''' http://almin-soft.nx0.ru/media/files/binaries/download.php?get=pacmanXG4.tar.bz2<br />
|3=http://almin-soft.nx0.ru/openiandifree/pacmanxg.html|4={{AUR|pacmanxg4-bin}}}}<br />
<br />
=== GNOME/GTK+ ===<br />
* {{App|Wakka|Основанный на gtk пакетный менеджер для Arch Linux, являющийся продолжением GtkPacman. Цель проекта: почистить код и переработать программу для увеличения стабильности и расширяемости.<br />
:'''Скриншоты:''' http://mibloglinux.wordpress.com/2011/05/23/wakka-interfaz-grafica-para-pacman/<br />
|https://code.google.com/p/wakka-package-manager/|{{AUR|wakka}}}}<br />
<br />
* {{App|GNOME PackageKit|набор утилит для управления пакетами, поддерживающему различные пакетные менеджеры. Использует консольный пакетных менеджер alpm и обладает следующим функционалом:<br />
:* Установка и удаление пакетов из репозиториев.<br />
:* Периодическая синхронизация базы данных пакетов и предложение обновиться.<br />
:* Установка пакетов из архивов.<br />
:* Поиск пакетов по названию, описанию, категории или файлам.<br />
:* Отображение зависимостей пакетов, файлов и обратных зависимостей.<br />
:* Игнорирование пакетов с IgnorePkgs и "заморозка" с HoldPkgs.<br />
:* Показ дополнительных зависимостей, файлов .pacnew, и т.д.<br />
:Вы можете изменить ключ удаления с -Rc на -Rsc. Для этого следует в DConf установить ключ org.gnome.packagekit.enable-autoremove.<br />
:{{Tip|Вместо PulseAudio можно установить из AUR пакет {{AUR|gnome-settings-daemon-nopulse}}.}}<br />
|http://packagekit.org/|{{Pkg|gnome-packagekit}}}}<br />
<br />
=== KDE/Qt ===<br />
* {{App|1=KPackageKit/Apper|2=графическая оболочка для [http://www.packagekit.org/ PackageKit]. Интеграция с pacman осуществляется с пакетом {{Pkg|packagekit}}, получившего поддержку со стороны pacman. Из системных настроек KDE, с помощью данного графического инструмента, можно выполнить следующее:<br />
:* Установка/удаление/обновление пакетов.<br />
:* Поиск пакетов / фильтр пакетов.<br />
:* Предоставление информации о пакетах.<br />
:* Обновление базы данных пакетов.<br />
:* Выбор репозиториев для обновления.<br />
:* Автоматическое обновление базы данных (ежечасно, ежедневно и т.д.)<br />
:* Автоматическое обновление пакетов.<br />
:Несмотря на то, что pacman поддерживает PackageKit недавно, серьезных проблем замечено небыло, при этом обеспечивается простота в использовании и хорошая интеграция с KDE (и PolicyKit).<br />
:'''Скриншоты:''' http://kde-apps.org/content/show.php/Apper?content=84745<br />
|3=http://kde-apps.org/content/show.php/Apper?content=84745|4={{Pkg|apper}}}}<br />
<br />
* {{App|1=AppSet|2=современная и функциональная графическая оболочка для пакетных менеджеров. AppSet имеет следующие особенности:<br />
:* Сортировка программ по разделам (игры, оффис, мультимедиа, интернет и т.д.)<br />
:* Показ во встроенном веб-браузере домашних страниц выбранных пакетов.<br />
:* Отображение новостей.<br />
:* Обновление, установка и удаление пакетов.<br />
:* Иконка в трее для вывода информации о доступных обновлениях.<br />
:* Периодическое обновление базы данных<br />
:* Информирование о зависимостях (например, при попытке удаления пакета, который требуется другому пакету).<br />
:* Команда очистки кэша (освобождение дискового пространства).<br />
:* Умное определение программы для получения администраторских привилегий, т.е. используется установленная в системе kdesu, gksu или, в случае использования xterm, команда sudo).<br />
:* Поддержка AUR с помощью бэкэнда Packer.<br />
:AppSet зависит только от библиотеки Qt. Может использоваться в любом окружении. В настоящее время работает только в Archlinux только с pacman.<br />
:'''Скриншоты''' http://sourceforge.net/project/screenshots.php?group_id=376825<br />
|3=http://appset.sourceforge.net/|4={{AUR|appset-qt}}}}<br />
<br />
=== NCurses ===<br />
* {{App|1=pcurses|2=оболочка к пакетному менеджеру на curses, позволяет:<br />
:* фильтрация и поиск любых пакетов по регулярным выражениям и свойствам.<br />
:* настраиваемая цветовая кодировка.<br />
:* настраиваемая сортировка.<br />
:* выполнение внешних команд.<br />
:* поддержка пользовательских макросов и горячих клавиш.<br />
:'''Скриншоты''' https://bbs.archlinux.org/viewtopic.php?id=122749<br />
|3=https://github.com/schuay/pcurses|4={{AUR|pcurses}}}}<br />
<br />
== Браузер пакетов Pacman / AUR ==<br />
* {{App|1=PkgBrowser|2=приложение для поиска и просмотра пакетов для Arch, отображает подробную информацию о выбранных пакетах.<br />
:* Поиск и просмотр пакетов для Arch, которые находятся в AUR.<br />
:* Чисто информационное приложение, которое не может быть использовано для установки, удаления и обновления пакетов. <br />
:* По сути относится к CLI-у управления пакетами в pacman.<br />
:* Более подробную информацию по использованию можно получить в меню помощи.<br />
:'''Тема на форуме:''' https://bbs.archlinux.org/viewtopic.php?id=117297 <br><br />
|3=https://code.google.com/p/pkgbrowser/|4={{AUR|pkgbrowser}}}}<br />
<br />
* {{App|Pacinfo|приложение для просмотра установленных пакетов и отображение такой информации как скриншоты, установленные файлы, дата установки и прочее. Написано на Mono/GTK#<br />
|https://code.google.com/p/pacinfo/|{{AUR|pacinfo}}}}<br />
<br />
== Вывод оповещений в системном трее ==<br />
* {{App|1=Aarchup|2=форк archup. Имеет те же возможности, что и archup, плюс некоторые дополнительные. Для поиска различий между ними изучите [https://bbs.archlinux.org/viewtopic.php?id=119129 changelog].<br />
:'''Скриншоты''': http://i.imgur.com/yTNvg.png<br />
|3=https://github.com/aericson/aarchup/|4={{AUR|aarchup}}}}<br />
<br />
* {{App|pacman-notifier|Написан на Ruby, использует Gtk. Отображает иконку в системном трее и, для новых пакетов, всплывающие уведомления (используется libnotify).<br />
:'''Скриншоты''': https://github.com/v01d/pacman-notifier/wiki<br />
|https://github.com/v01d/pacman-notifier/wiki|{{AUR|pacman-notifier}}}}<br />
<br />
* {{App|Pacupdate|маленькое приложение, уведомляющее пользователя о доступности обновлений для Arch Linux. Если Pacupdate обнаружит, что доступны обновления - будет выведено уведомление в системном трее.|https://code.google.com/p/pacupdate/|{{AUR|pacupdate-svn}}}}<br />
<br />
* {{App|1=Yapan (Yet Another Package mAnager Notifier)|2=написан на C++ и Qt. Поддерживает другие пакетные менеджеры, такие как clyde или yaourt, отображает значок в системном трее, и, при доступности обновлений, показывает соответствующее всплывающее уведомление.<br />
:'''Скриншоты''': https://bitbucket.org/otsug/yapan/wiki/Home<br />
:'''Тема на форуме''': https://bbs.archlinux.org/viewtopic.php?id=113078<br />
|3=https://bitbucket.org/otsug/yapan/wiki/Home|4={{AUR|yapan}}}}<br />
<br />
* {{App|1=ZenMan|2=оболочка для PacMan (уведомлялка в трее об обновлениях) для GTK/GNOME/zenity/libnotify.<br />
:'''Скриншоты''': http://show.harvie.cz/screenshots/zenman-screenshot-2.png<br />
|3=https://aur.archlinux.org/packages.php?ID=25948|4={{AUR|zenman}}}}<br />
<br />
* {{App|1=pkgnotify.sh|2=простой 14-ти строчный скрипт, показывающий количество доступных обновлений в заголовке окна dzen2, список обновлений - во вспомогательном окне. Зависит от dzen2, inotify-tools, package-query и, опционально, приложение для работы с AUR (по умолчанию yaourt).<br />
:'''Скриншоты''': http://andreasbwagner.tumblr.com/post/853471635/arch-linux-update-notifier-for-dzen2<br />
|3=http://pointfree.net/repo/?r=dzen2_scripts;a=headblob;f=/src/pkgnotify/pkgnotify.sh|4=pkgnotify}}<br />
<br />
* {{App|1=kalu|2=маленькое приложение на C, добавляет иконку в системный трей и выводит уведомления о новостях Arch Linux, обновлениях пакетов из репозиториев, обновлениях пакетов из AUR, и следит за обновлением самого AUR (обновления для неустановленных пакетов). Также имеет графический интерфейс для обновления системы.<br />
:'''Скриншоты''': http://mywaytoarch.tumblr.com/post/19350380240/keep-arch-linux-up-to-date-with-kalu<br />
:'''Тема на форуме''': https://bbs.archlinux.org/viewtopic.php?id=135773<br />
|3=https://bitbucket.org/jjacky/kalu|4={{AUR|kalu}}}}<br />
<br />
== Неактивные программы ==<br />
*[https://aur.archlinux.org/packages.php?ID=52039/ pacmanXG 2x series], графическая оболочка для Pacman и ''yaourt'', не зависящая от GTK или QT <br />
*[http://gtkpacman.berlios.de/ GtkPacman], оболочка на GTK<br />
*[http://guzuta.berlios.de/ Guzuta], оболочка на GTK<br />
*[http://chakra-linux.org/wiki/index.php/Shaman Shaman], GUI использующий библиотеку ''libalpm'' Pacman’а<br />
*[http://code.google.com/p/pacmon/ pacmon], графические всплывающие уведомления<br />
*[https://gna.org/projects/paku/ Paku], альтернативный GUI для Pacman<br />
*[http://www.kde-apps.org/content/show.php/YAPG+-+Yet+Another+Pacman+Gui+?content=60052 YAPG] список GUI на kde-apps.org<br />
*[http://sourceforge.net/projects/zenitypacgui/ zenity_pacgui], графическая оболочка Zenity для Pacman</div>
Vas
https://wiki.archlinux.org/index.php?title=Reset_lost_root_password_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=200047
Reset lost root password (Русский)
2012-05-02T20:19:33Z
<p>Vas: corrected translation, the article is up-to-date</p>
<hr />
<div>[[Category: System recovery (Русский)]]<br />
[[Category: Security (Русский)]]<br />
{{i18n|Password Recovery}}<br />
Эта инструкция поможет вам восстановить забытый пароль root. Существует несколько способов сделать это.<br />
<br />
== Используем LiveCD ==<br />
<br />
С помощью LiveCD вы можете выбрать любой из двух способов: изменить корневой каталог и использовать команду {{Ic|passwd}} для изменения пароля root, либо удалить (очистить) текущий пароль. Для этого подойдет любой LiveCD Linux дистрибутив, например загрузочный диск (флешка) с ArchLinux, но для изменения корневого каталога вы должны использовать загрузочный дистрибутив такой же архитектуры (x86 или x86_64) как и тот, что уже установлен на вашем компьютере.<br />
<br />
=== Изменение пароля root ===<br />
<br />
# Загрузитесь с LiveCD, и [[Change Root|измените корневой каталог]].<br />
# Используйте команду {{Ic|passwd}} для сброса вашего пароля root.<br />
# Выйдите из [[Change Root|измененного корневого каталога]].<br />
# Перезагрузитесь и больше не забывайте пароль.<br />
<br />
=== Удаление пароля ===<br />
<br />
1. Загрузитесь с LiveCD, и смонтируйте ваш корневой каталог ('''/'''). К примеру:<br />
<br />
mkdir /mnt/arch<br />
mount /dev/sda2 /mnt/arch<br />
<br />
2. Отредактируйте файл с паролями, используя текстовый редактор. Вы можете использовать редакторы vim, nano и др. К примеру, для vim:<br />
<br />
vim /mnt/arch/etc/shadow<br />
<br />
3. Удалите второе поле на строке с root (в [[Vim|vim]] это можно сделать, перейдя к первой букве/символу в поле и введя '''d/:/''' затем '''Enter'''):<br />
<br />
root:'''$1$9gDquXRP$gbOHLXuqslL.rw81q4pHc1''':14589::::::<br />
<br />
4. Сохраните измененный файл (команда ''':x''' в vim).<br />
<br />
5. После перезагрузки вы сможете использовать учетную запись root без пароля. Не забудьте задать новый пароль командой {{Ic|passwd}}!<br />
<br />
== Использование загрузчика GRUB для вызова Bash ==<br />
<br />
1. Выберите необходимую загрузочную запись в загрузчике GRUB и нажмите клавишу '''e''' для редактирования этой строки.<br />
<br />
2. Выберите запись с kernel и нажмите '''e''' для редактирования.<br />
<br />
3. Добавьте {{Ic|1=init=/bin/bash}} к концу строки.<br />
<br />
4. Нажмите клавишу '''b''' для загрузки (эти изменения временны, и не будут сохранены в файл menu.lst). После загрузки вы попадете в командную строку bash.<br />
<br />
5. Ваша корневая система смонтирована как readonly (только чтение), поэтому смонтируйте ее в режим read/write:<br />
<br />
# mount -n -o remount,rw /<br />
<br />
6. Используйте команду {{Ic|passwd}} для создания нового пароля root.<br />
<br />
7. Перезагрузитесь и больше не теряйте пароль!<br />
<br />
{{Note|Некоторые клавиатуры могут быть неправильно определены init-системой при использовании данного способа, так что вы не сможете ничего ввести в командную строку. В этом случае придется использовать другой способ.}}<br />
<br />
== Ссылки ==<br />
<br />
* [http://www.howtoforge.com/how-to-reset-a-forgotten-root-password-with-knoppix-p2 Статья] для примера.</div>
Vas
https://wiki.archlinux.org/index.php?title=USB_storage_devices_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=200045
USB storage devices (Русский)
2012-05-02T19:59:38Z
<p>Vas: /* Монтирование USB устройств */ a very small correction</p>
<hr />
<div>[[Category:Storage (Русский)]]<br />
{{i18n|USB Storage Devices}}<br />
<br />
В этом документе описываются способы использования различных USB накопителей в Linux. Это также касается и других устройств, таких как цифровые камеры или телефоны, которые распознаются как обычные USB накопители.<br />
<br />
== Монтирование USB устройств ==<br />
Если у вас свежая система со стандартным ядром Arch и современное [[Desktop Environment (Русский) | окружение рабочего стола]], USB устройство должно автоматически появляться на рабочем столе при подключении, и лезть в консоль не потребуется.<br />
<br />
Если этого не произошло см. далее.<br />
<br />
=== Автоматическое монтирование с помощью udev ===<br />
См. [[Udev_(Русский)#Автомонтирование_USB-устройств | Udev:Автомонтирование USB-устройств]].<br />
<br />
=== Монтирование вручную ===<br />
{{Note|Перед тем, как обвинить Arch Linux в том, что он не монтирует USB устройства, стоит проверить все доступные порты. Часть разъёмов могут не обслуживаться контроллером (или не подключены к контроллеру вообще, в случае портов на передней панели), и устройства физически не смогут монтироваться. Теоретически контроллер портов может оказаться выключенным; для того, чтобы это проверить, нужно зайти в BIOS и отыскать параметр с названием вроде "Onboard USB Controller" &mdash; должен быть "Enabled".}}<br />
<br />
==== Где взять ядро, поддерживающее usb_storage ====<br />
Если не используется самодельное (самосборное) ядро, то можно скачать одно из готовых, все имеющиеся ядра Arch Linux настроены должным образом. В случае самосборного ядра, следует убедиться, что при компиляции была включена поддержка SCSI, SCSI-Disk и usb_storage. Если установлена последняя версия [[udev]], то можно просто подключить носитель, и система автоматически подгрузит все необходимые модули ядра. Более ранним версиям udev дополнительно потребуется наличие [[HotPlug (Русский) | HotPlug]]. Либо то же самое можно сделать вручную:<br />
<br />
# modprobe usb-storage<br />
# modprobe sd_mod (только для ядер без SCSI)<br />
<br />
==== Опознавание устройств ====<br />
Самое первое, что нужно знать об устройстве, так это его идентификатор, присвоенный ядром.<br />
<br />
===== Использование системных имен (node names) ( /sd* ) =====<br />
Это наиболее простой способ, но присвоение имен зависит от порядка, в котором устройства были подключены. способы получения системных имён (именований по шине):<br />
<br />
* поиск среди результатов вывода команды {{Ic|dmesg}} системного имени устройства, для удобства можно использовать в сочетании с {{Ic|grep}}:<br />
$ dmesg | egrep "sd[a-z]"<br />
* выполнением команды:<br />
# fdisk -l<br />
которая отобразит все доступные таблицы разделов.<br />
<br />
{{Note|Если среди результатов нет устройства, то можно использовать команду {{Ic|lsusb}}, чтобы убедиться, что оно действительно было опознано системой.}}<br />
<br />
===== Использование UUID =====<br />
Для каждого устройства существует [[Wikipedia:UUID|UUID]] (Universally Unique Identifier &mdash; уникальный идентификатор как один из методов постоянных именований устройств), эти идентификаторы предназначены для отслеживания устройств в независимости от их системных имен, а значит расположения на шине и порядка обнаружения (например {{Ic|/dev/sda}}).<br />
<br />
Чтобы узнать все UUIDы, известные системе, нужно выполнить:<br />
{{hc|# blkid -o list -c /dev/null|<nowiki><br />
device fs_type label mount point UUID<br />
------------------------------------------------------------------------------------------<br />
/dev/sda1 ext2 /boot 7f4cef7e-7ee2-489a-b759-d52ba23b692c<br />
/dev/sda2 swap (not mounted) a807fff3-e89f-46d0-ab17-9b7ad3efa7b5<br />
/dev/sda3 ext4 / 81917291-fd1a-4ffe-b95f-61c05cfba76f<br />
/dev/sda4 ext4 /home c4c23598-19fb-4562-892b-6fb18a09c7d3<br />
/dev/sdb1 ext4 X2 /mnt/X1 4bf265f7-da17-4575-8758-acd40885617b<br />
/dev/sdc1 ext4 X1 /mnt/X2 4bf265f7-da17-4575-8758-acd40885617b<br />
/dev/sdd1 ext4 Y2 /mnt/Y2 8a976a06-3e56-476f-b73a-ea3cad41d915<br />
/dev/sde1 ext4 Z2 /mnt/Z2 9d35eaae-983f-4eba-abc9-434ecd4da09c<br />
/dev/sdf1 ext4 Y1 /mnt/Y1 e2ec37a9-0689-46a8-a07b-0609ce2b7ea2<br />
/dev/sdg1 ext4 Z1 /mnt/Z1 9fa239c1-720f-42e0-8aed-39cf53a743ed<br />
/dev/sdj1 ext4 RAPT (not mounted) a9ed7ecb-96ce-40fe-92fa-e07a532ed157<br />
/dev/sdj2 swap <swap> 20826c74-eb6d-46f8-84d8-69b933a4bf3f<br />
</nowiki>}}<br />
<br />
'' Здесь можно видеть целый список дисков, видимых системой, и длинные строчки с символами. Так вот эти строчки и есть те самые uuidы.''<br />
<br />
* Теперь нужно подключить USB устройство и подождать несколько секунд . . . <br />
<br />
* Заново выполнить {{Ic|blkid -o list -c /dev/null}}<br />
'' Появилось новое устройство и UUID? Это и есть USB накопитель''<br />
<br />
{{Tip| Если {{Ic|blkid}} не работает так, как ожидалось (или не работает вообще), то можно заглянуть в поисках UUIDов в {{Ic|/dev/disk/by-uuid/}}:<br />
<br />
$ ls -lF /dev/disk/by-uuid/<br />
<br />
}}<br />
<br />
==== Монтирование USB флэш-памяти ====<br />
Для этого нужно создать папку, в которую в дальнейшем будет монтироваться флэшка:<br />
# mkdir /mnt/usbstick<br />
<br />
===== От имени суперпользователя (root) =====<br />
Монтировать устройство рутом при помощи команды (только нужно заменить '''device_node''' найденным устройством, как было показано выше):<br />
# mount '''device_node''' /mnt/usbstick<br />
или<br />
# mount -U '''UUID''' /mnt/usbstick<br />
<br />
Если {{Ic|mount}} не распознаёт формат устройства (файловой системы), то можно попробовать с ключом {{Ic|-t <тип файловой системы>}}, а также глянуть в {{Ic|man mount}} для просвещения.<br />
<br />
{{Note|Если же вообще ничего не помогло, то, возможно, нужно чинить флэшку, см. [[Format a device]]. Но перед этим имеет смысл попробовать на другом компьютере или операционной системе.}}<br />
<br />
===== От имени обычного пользователя при помощи mount =====<br />
Чтобы непривилегированные пользователи могли записывать данные на USB носитель, нужно прописать следующую команду:<br />
<br />
$ sudo mount -o gid=users,fmask=113,dmask=002 /dev/sda1 /mnt/usbstick<br />
<br />
===== От имени обычного пользователя посредством fstab =====<br />
Для того, чтобы простой поьзователь мог спокойно монтировать USB-накопитель через [[fstab]], нужно добавить следующую строку в файл {{ic|/etc/fstab}}:<br />
/dev/sda1 /mnt/usbstick vfat '''user''',noauto,noatime,flush 0 0<br />
или, что ещё лучше:<br />
UUID=E8F1-5438 /mnt/usbstick vfat '''user''',noauto,noatime,flush 0 0<br />
(см. описание для '''user''' и других параметров в статье [[Fstab|main article]])<br />
<br />
{{Note|Здесь {{Ic|/dev/sda1}} должно быть заменено на имя флэшки (если оно не /dev/sda1, конечно). Если непонятно, см. [[USB_Storage_Devices#Mounting_USB_memory|Mounting USB memory]].}}<br />
<br />
Все, теперь любой пользователь может монтировать флэшку при помощи:<br />
$ mount /mnt/usbstick<br />
<br />
И отмонтировать, используя:<br />
$ umount /mnt/usbstick<br />
<br />
{{Note|Извлекать флэшку, не выполнив размонтирование, опасно.}}</div>
Vas
https://wiki.archlinux.org/index.php?title=USB_storage_devices_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=200044
USB storage devices (Русский)
2012-05-02T19:57:54Z
<p>Vas: corrected translation, the article is up-to-date</p>
<hr />
<div>[[Category:Storage (Русский)]]<br />
{{i18n|USB Storage Devices}}<br />
<br />
В этом документе описываются способы использования различных USB накопителей в Linux. Это также касается и других устройств, таких как цифровые камеры или телефоны, которые распознаются как обычные USB накопители.<br />
<br />
== Монтирование USB устройств ==<br />
Если у вас свежая система со стандартным ядром Arch и современное [[Desktop Environment (Русский) | окружение рабочего стола]], USB устройство должно автоматически появляться на рабочем столе при подключении, и лезть в консоль не требуется.<br />
<br />
Если этого не произошло см. далее.<br />
<br />
=== Автоматическое монтирование с помощью udev ===<br />
См. [[Udev_(Русский)#Автомонтирование_USB-устройств | Udev:Автомонтирование USB-устройств]].<br />
<br />
=== Монтирование вручную ===<br />
{{Note|Перед тем, как обвинить Arch Linux в том, что он не монтирует USB устройства, стоит проверить все доступные порты. Часть разъёмов могут не обслуживаться контроллером (или не подключены к контроллеру вообще, в случае портов на передней панели), и устройства физически не смогут монтироваться. Теоретически контроллер портов может оказаться выключенным; для того, чтобы это проверить, нужно зайти в BIOS и отыскать параметр с названием вроде "Onboard USB Controller" &mdash; должен быть "Enabled".}}<br />
<br />
==== Где взять ядро, поддерживающее usb_storage ====<br />
Если не используется самодельное (самосборное) ядро, то можно скачать одно из готовых, все имеющиеся ядра Arch Linux настроены должным образом. В случае самосборного ядра, следует убедиться, что при компиляции была включена поддержка SCSI, SCSI-Disk и usb_storage. Если установлена последняя версия [[udev]], то можно просто подключить носитель, и система автоматически подгрузит все необходимые модули ядра. Более ранним версиям udev дополнительно потребуется наличие [[HotPlug (Русский) | HotPlug]]. Либо то же самое можно сделать вручную:<br />
<br />
# modprobe usb-storage<br />
# modprobe sd_mod (только для ядер без SCSI)<br />
<br />
==== Опознавание устройств ====<br />
Самое первое, что нужно знать об устройстве, так это его идентификатор, присвоенный ядром.<br />
<br />
===== Использование системных имен (node names) ( /sd* ) =====<br />
Это наиболее простой способ, но присвоение имен зависит от порядка, в котором устройства были подключены. способы получения системных имён (именований по шине):<br />
<br />
* поиск среди результатов вывода команды {{Ic|dmesg}} системного имени устройства, для удобства можно использовать в сочетании с {{Ic|grep}}:<br />
$ dmesg | egrep "sd[a-z]"<br />
* выполнением команды:<br />
# fdisk -l<br />
которая отобразит все доступные таблицы разделов.<br />
<br />
{{Note|Если среди результатов нет устройства, то можно использовать команду {{Ic|lsusb}}, чтобы убедиться, что оно действительно было опознано системой.}}<br />
<br />
===== Использование UUID =====<br />
Для каждого устройства существует [[Wikipedia:UUID|UUID]] (Universally Unique Identifier &mdash; уникальный идентификатор как один из методов постоянных именований устройств), эти идентификаторы предназначены для отслеживания устройств в независимости от их системных имен, а значит расположения на шине и порядка обнаружения (например {{Ic|/dev/sda}}).<br />
<br />
Чтобы узнать все UUIDы, известные системе, нужно выполнить:<br />
{{hc|# blkid -o list -c /dev/null|<nowiki><br />
device fs_type label mount point UUID<br />
------------------------------------------------------------------------------------------<br />
/dev/sda1 ext2 /boot 7f4cef7e-7ee2-489a-b759-d52ba23b692c<br />
/dev/sda2 swap (not mounted) a807fff3-e89f-46d0-ab17-9b7ad3efa7b5<br />
/dev/sda3 ext4 / 81917291-fd1a-4ffe-b95f-61c05cfba76f<br />
/dev/sda4 ext4 /home c4c23598-19fb-4562-892b-6fb18a09c7d3<br />
/dev/sdb1 ext4 X2 /mnt/X1 4bf265f7-da17-4575-8758-acd40885617b<br />
/dev/sdc1 ext4 X1 /mnt/X2 4bf265f7-da17-4575-8758-acd40885617b<br />
/dev/sdd1 ext4 Y2 /mnt/Y2 8a976a06-3e56-476f-b73a-ea3cad41d915<br />
/dev/sde1 ext4 Z2 /mnt/Z2 9d35eaae-983f-4eba-abc9-434ecd4da09c<br />
/dev/sdf1 ext4 Y1 /mnt/Y1 e2ec37a9-0689-46a8-a07b-0609ce2b7ea2<br />
/dev/sdg1 ext4 Z1 /mnt/Z1 9fa239c1-720f-42e0-8aed-39cf53a743ed<br />
/dev/sdj1 ext4 RAPT (not mounted) a9ed7ecb-96ce-40fe-92fa-e07a532ed157<br />
/dev/sdj2 swap <swap> 20826c74-eb6d-46f8-84d8-69b933a4bf3f<br />
</nowiki>}}<br />
<br />
'' Здесь можно видеть целый список дисков, видимых системой, и длинные строчки с символами. Так вот эти строчки и есть те самые uuidы.''<br />
<br />
* Теперь нужно подключить USB устройство и подождать несколько секунд . . . <br />
<br />
* Заново выполнить {{Ic|blkid -o list -c /dev/null}}<br />
'' Появилось новое устройство и UUID? Это и есть USB накопитель''<br />
<br />
{{Tip| Если {{Ic|blkid}} не работает так, как ожидалось (или не работает вообще), то можно заглянуть в поисках UUIDов в {{Ic|/dev/disk/by-uuid/}}:<br />
<br />
$ ls -lF /dev/disk/by-uuid/<br />
<br />
}}<br />
<br />
==== Монтирование USB флэш-памяти ====<br />
Для этого нужно создать папку, в которую в дальнейшем будет монтироваться флэшка:<br />
# mkdir /mnt/usbstick<br />
<br />
===== От имени суперпользователя (root) =====<br />
Монтировать устройство рутом при помощи команды (только нужно заменить '''device_node''' найденным устройством, как было показано выше):<br />
# mount '''device_node''' /mnt/usbstick<br />
или<br />
# mount -U '''UUID''' /mnt/usbstick<br />
<br />
Если {{Ic|mount}} не распознаёт формат устройства (файловой системы), то можно попробовать с ключом {{Ic|-t <тип файловой системы>}}, а также глянуть в {{Ic|man mount}} для просвещения.<br />
<br />
{{Note|Если же вообще ничего не помогло, то, возможно, нужно чинить флэшку, см. [[Format a device]]. Но перед этим имеет смысл попробовать на другом компьютере или операционной системе.}}<br />
<br />
===== От имени обычного пользователя при помощи mount =====<br />
Чтобы непривилегированные пользователи могли записывать данные на USB носитель, нужно прописать следующую команду:<br />
<br />
$ sudo mount -o gid=users,fmask=113,dmask=002 /dev/sda1 /mnt/usbstick<br />
<br />
===== От имени обычного пользователя посредством fstab =====<br />
Для того, чтобы простой поьзователь мог спокойно монтировать USB-накопитель через [[fstab]], нужно добавить следующую строку в файл {{ic|/etc/fstab}}:<br />
/dev/sda1 /mnt/usbstick vfat '''user''',noauto,noatime,flush 0 0<br />
или, что ещё лучше:<br />
UUID=E8F1-5438 /mnt/usbstick vfat '''user''',noauto,noatime,flush 0 0<br />
(см. описание для '''user''' и других параметров в статье [[Fstab|main article]])<br />
<br />
{{Note|Здесь {{Ic|/dev/sda1}} должно быть заменено на имя флэшки (если оно не /dev/sda1, конечно). Если непонятно, см. [[USB_Storage_Devices#Mounting_USB_memory|Mounting USB memory]].}}<br />
<br />
Все, теперь любой пользователь может монтировать флэшку при помощи:<br />
$ mount /mnt/usbstick<br />
<br />
И отмонтировать, используя:<br />
$ umount /mnt/usbstick<br />
<br />
{{Note|Извлекать флэшку, не выполнив размонтирование, опасно.}}</div>
Vas
https://wiki.archlinux.org/index.php?title=Arch_User_Repository_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=200019
Arch User Repository (Русский)
2012-05-02T14:21:05Z
<p>Vas: corrected translation</p>
<hr />
<div>[[Category:Русский]]<br />
{{i18n|Arch User Repository}}<br />
<br />
{{Article summary start|Описание}}<br />
{{Article summary text|Обзор пользовательского репозитория Arch.}}<br />
{{Article summary heading|Обзор}}<br />
{{Article summary text|{{Package management overview}}}}<br />
{{Article summary heading|Дополнительно}}<br />
{{Article summary wiki|AUR Helpers}}<br />
{{Article summary wiki|AUR Trusted User Guidelines}}<br />
{{Article summary heading|Полезные ссылки}}<br />
{{Article summary link|AUR Web Interface|https://aur.archlinux.org}}<br />
{{Article summary link|AUR Mailing List|http://www.archlinux.org/mailman/listinfo/aur-general}}<br />
{{Article summary end}}<br />
<br />
[[Arch User Repository|Пользовательский репозиторий Arch]] (AUR) &mdash; это разрабатываемое сообществом хранилище ПО для пользователей Arch. Он содержит описания пакетов, которые позволят вам скомпилировать пакет из исходников с помощью [[makepkg]] и затем установить его, используя [[pacman]]. AUR был создан, чтобы объединить и предоставить в общий доступ новые пакеты от коммьюнити и способствовать скорому включению популярных пакетов в [[#.5Bcommunity.5D|[комммьюнити]]] хранилище. Этот документ объясняет, как пользователи могут использовать AUR.<br />
<br />
Большое количество пакетов, которые вошли в официальные репозитории, начинали свой путь в AUR. В AUR пользователи могут добавить свои собственные пакеты. Сообществу предоставлена возможность голосовать за или против пакетов, размещенных в репозитории. Если пакет становится популярным, распространяется под подходящей лицензией и может быть собран без дополнительных сложностей, то ,вероятно, он будет перенесен в репозиторий [community] (непосредственно доступный с помощью утилит {{ic|pacman}} или {{ic|abs}}).<br />
<br />
==Предисловие==<br />
<br />
Пользователи смогут найти и скачать файлы [[PKGBUILD]], используя [https://aur.archlinux.org Веб-интерфейс AUR]. Эти файлы используются для сборки пакетов, которые в последствии можно установить с помощью менеджера пакетов [[pacman]].<br />
<br />
* Следующие разделы этой статьи помогут лучше понять способы работы с репозиторием AUR:<br />
**[[#Installing Packages from the AUR|краткое руководство по установке пакетов из репозитория AUR]] <br />
**[[#.5Bcommunity.5D|как использовать репозиторий [community]]] в утилитах pacman и ABS.<br />
* Посетите [https://aur.archlinux.org Веб-интерфейс AUR], чтобы получить информацию об обновлениях. Там же вы найдете статистику и ежедневно обновляемый список пакетов, доступных в репозитории AUR.<br />
* Ознакомьтесь с [[#FAQ]], чтобы получить ответы на часто задаваемые вопросы.<br />
* Возможно вы захотите поправить {{ic|/etc/makepkg.conf}}, чтобы настроить оптимизацию сборки пакетов для вашей системы. Значительное улучшение во времени компиляции может быть получено на многопроцессорных системах правкой переменной MAKEFLAGS. Пользователи так же могут настроить оптимизацию на основе аппаратных характеристик своего компьютера с помощью переменной CFLAGS. Об этом можно найти больше информации на странице [[makepkg.conf]].<br />
* Установите группу пакетов "base-devel" ({{Ic|pacman -S base-devel}}), потому что без них невозможна сборка пакетов из репозитория AUR. (Больше информации об этом вы найдете на [http://bbs.archlinux.org/viewtopic.php?pid=632355 форуме]).<br />
<br />
==История==<br />
{{Note|Следующие адреса оставлены только для истории. С тех пор они были заменены AUR-ом и теперь недоступны.}}<br />
<br />
В начале была {{ic|<nowiki>ftp://ftp.archlinux.org/incoming</nowiki>}}, и люди вносили свой вклад путем простой закачки [[PKGBUILD]], необходимых дополнительных файлов и собранного пакета на сервер. Пакет и связанные с ним файлы оставались на сервере, пока [[Package Maintainer]] не просматривал программу и адаптировал ее.<br />
<br />
После были созданы Trusted User Repositories. Нескольким лицам сообщества было разрешено содержать свои собственные репозитории с общим доступом. AUR был создан с целью предоставить более гибкую и удобную систему. На самом деле, AUR мэйнтейнеры до сих пор упоминаются как TU (Trusted Users).<br />
<br />
==Поиск на AUR==<br />
Web-интерфейс AUR может быть найден [https://aur.archlinux.org/ здесь], а интерфес, который может быть, к примеру, использован для доступа к AUR из скриптов, может быть найден [https://aur.archlinux.org/rpc.php здесь].<br />
Поиск названий пакетов и их описание идет при помощи сравнения LIKE в MySQL. Это дает возможность более гибких запросов (к примеру, попробуйте поискать 'tool%like%grep' вместо 'tool like grep'). Если вам необходимо искать описание, в котором содержится '%', экранируйте его так: '\%'.<br />
<br />
==Установка пакетов из AUR’а==<br />
Установка пакетов из AUR’а (также известного как репозиторий [unsupported]) относительно проста (вообще-то она абсолютно проста ;-). Необходимо:<br />
# Скачать [[PKGBUILD]] и другие требуемые файлы (например, патчи). Все они содержатся в архиве, доступном по соответствующей ссылке («Архив» или «Tarball» в англоязычной версии AUR’а);<br />
# Перейти в директорию, содержащую [[PKGBUILD]] и выполнить [[makepkg]] (команда «makepkg -s» автоматически разрешит все зависимости с помощью [[pacman]]);<br />
# Установить получившийся пакет с помощью [[pacman]]:<br />
<br />
$ pacman -U /path/to/pkg.tar.xz<br />
<br />
[[AUR Helpers]] добавляют прямой доступ к AUR. Они различаются по возможностям, но все они страются помочь в поиске, получении, сборке и установке из PKGBUILD, которые находятся в AUR. Все эти скрипты могут быть найдены в репозитории [unsupported].<br />
<br />
{{Note|В Arch Linux нет и никогда не будет ''официальных'' механизмов для инсталляции из репозитория [unsupported]. Пользователи должны сами проводить сборку пакетов.}}<br />
<br />
Далее следует подробный пример установки некоторого пакета, названного "foo".<br />
<br />
===Подготовка===<br />
Для начала установите необходимые утилиты. Группы пакетов base-devel должно быть достаточно. Она включает утилиту ''make'' и другие команды, необходимые для компиляции из исходников.<br />
<br />
{{Warning|Пакеты в AUR предполагают, что "base-devel" уже установлен, и не будут указывать эту группу в качестве зависимости, даже если пакет не сможет собраться без них. Пожалуйста убедитесь в том, что эта группа пакетов установлена, прежде чем сообщать об ошибках.}}<br />
<br />
# pacman -S base-devel<br />
<br />
Затем выберите директорию для сборки. Вы можете выбрать любую пустую директорию в которой будет происходить компиляция пакета. Обычно выбирают что-то наподобие:<br />
<br />
~/builds<br />
<br />
или, если используется ABS ([[Arch Build System]]), то:<br />
<br />
/var/abs/local<br />
<br />
Более подробно о ABS читайте статью [[Arch Build System]]. Этот пример будет использовать {{ic|~/builds}} в качестве директории для сборки.<br />
<br />
===Получение файлов===<br />
Найдите пакет в AUR. Это делается с помощью поиска (текстовое поле наверху страницы [https://aur.archlinux.org/ AUR home page]). После перехода по одной из ссылок из списка найденных результатов, откроется страница информации о выбранном пакете. Прочтите описание и убедитесь, что это то, что вы искали, обратите внимание когда пакет последний раз обновлялся и прочтите все комментарии.<br />
<br />
Скачайте необходимые файлы для сборки. Для этого на странице информации о пакете скачайте архив {{ic|*.tar.gz}} по ссылке в левом углу описания пакета. Этот файл должен быть сохранен в директорию для сборки или скопирован туда после скачивания. Для нашего примера архив будет называться {{ic|foo.tar.gz}} (архив должны выглядеть как {{ic|<имяпакета>.tar.gz}}, если он был правильно закачан в AUR).<br />
<br />
===Сборка пакета===<br />
Распакуйте tar-архив. Для этого перейдите в директорию для сборки и выполните:<br />
<br />
$ cd ~/builds<br />
$ tar -xvzf foo.tar.gz<br />
<br />
После этого в директории для сборки появится новая поддиректория "foo".<br />
<br />
{{Warning|'''Внимательно проверьте все файлы.''' Перейдите в новую поддиректорию и внимательно проверьте {{ic|PKGBUILD}} и все {{ic|.install}} файлы на злонамеренные команды, которые могут повредить/заразить ваш компьютер. Если сомневаетесь, то НЕ собирайте пакет и обратитесь за советом на форум или почтовую рассылку.}}<br />
<br />
$ cd foo<br />
$ nano PKGBUILD<br />
$ nano foo.install<br />
<br />
Соберите пакет. После ручной проверки целостности файлов, запустите [[makepkg]] от обычного пользователя в директории, где находится {{ic|PKGBUILD}}.<br />
<br />
$ makepkg -s<br />
<br />
Опция {{Ic|-s}} воспользуется [[sudo]], для установки необходимых зависимостей. Если использование sudo нежелательно, то заранее самостоятельно установите необходимые зависимости и уберите опцию {{Ic|-s}} из вышеуказанной команды.<br />
<br />
===Установка пакета===<br />
Установите пакет, используя [[pacman]]. Созданный пакет должен иметь имя:<br />
<br />
<application name>-<version number>-<architecture>.pkg.tar.xz<br />
<br />
Установите его при помощи команды [[pacman]] "upgrade" :<br />
<br />
# pacman -U foo-0.1-i686.pkg.tar.xz <br />
<br />
{{Note|Выше было приведено краткое описание сборки пакета. На страницах о [[makepkg]] и [[ABS]] информации гораздо больше и они очень рекомендуются к прочтению начинающим пользователям.}}<br />
<br />
==Добавление PKGBUILDs в UNSUPPORTED==<br />
Пользователи играют существенную роль в AUR, без их поддержки, участия и вклада, AUR не сможет реализовать весь свой потенциал. Жизненный цикл пакета в AUR начинается и заканчивается при поддержке пользователя и требует его непосредственного участия.<br />
<br />
Пользователи могут '''обмениваться''' [[PKGBUILD]] при помощи раздела UNSUPPORTED в AUR. UNSUPPORTED не содержит бинарных пакетов, но позволяет пользователям загружать PKGBUILD, который потом может быть скачан другими участниками AUR. Такие PKGBUILD официально не поддерживаются и не проходят тщательную проверку, поэтому должны быть использованы на ваш риск.<br />
<br />
===Обратная связь===<br />
Через комментарии пользователи могут сообщить мэйнтейнеру PKGBUILD о предложениях и улучшениях. Тем не менее, не стоит добавлять патчи или PKGBUILD в свои комментарии, так как они очень быстро устаревают и, в итоге, просто занимают место. Вместо этого отправляйте такие файлы на email мэйнтейнера, или используйте сервисы [[pastebin Clients|pastebin]] такие как http://aur.pastebin.com.<br />
<br />
Одним из самых простых действий для '''всех''' пользователей Arch Linux будет '''голосование''' за понравившиеся пакеты через online интерфейс AUR. У всех пакетов есть право быть адоптированными TU и быть включенными в [community]. Количество голосов -- один из критериев для включения в [community].<br />
<br />
==Отправка пакетов в UNSUPPORTED==<br />
После авторизации в AUR, пользователь может [https://aur.archlinux.org/pkgsubmit.php отправить] архив {{ic|*.tar.gz}} директории с файлами пакета. Директория внутри архива должна содержать {{ic|PKGBUILD}}, все {{ic|.install}}, патчи и т.д (НО НЕ СКОМПИЛИРОВАННЫЕ ИСХОДНИКИ). Примеры того, что может содержаться в такой директории можно найти в {{ic|/var/abs}} (если был установлен [[ABS]]).<br />
<br />
Простейшим способом создания такого архива является команда:<br />
$ makepkg --source<br />
<br />
Предположим, что вы создаете пакет для ''libfoo'', тогда содержимое архива должно быть похоже на это:<br />
<br />
# List contents of tarball.<br />
$ tar tf libfoo-0.1-1.src.tar.gz<br />
libfoo/<br />
libfoo/PKGBUILD<br />
libfoo/libfoo.install<br />
<br />
Когда создаете пакет придерживайтесь следующих правил:<br />
* Проверьте [core], [extra], и [community] на наличие в них уже готового пакета. Если пакет уже существует, но поврежден или в нем отсутствует необходимая функциональность, то напишите об ошибке на [http://bugs.archlinux.org/ FlySpray].<br />
* Поищите пакет в UNSUPPORTED (т.е. в AUR). Если он поддерживается, то о необходимых изменениях можно написать в комментариях.<br />
* Внимательно проверьте, что то, что вы отправляете, не содержит ошибок. При создании PKGBUILD обязательно прочтите и придерживайтесь [[Arch Packaging Standards]]. Это необходимо для нормального функционирования и успешной работы AUR. Уважайте личное время каждого пользователя и не тратьте его на исправление плохих PKGBUILD.<br />
* Пакеты, которые содержат бинарники или, если они созданы без должной аккуратности, могут быть удалены без предупреждения.<br />
* Если вы сомневаетесь в пакете (или в каком либо из шагов его создания), то отправьте PKGBUILD в почтовую рассылку AUR (AUR Mailing List) или на форум в тему AUR, прежде чем добавлять его непосредственно в AUR.<br />
* Убедитесь, что пакет является полезным. Будет ли кто-нибудь еще его использовать? Не очень ли он узкоспециализированный? Если он будет полезен более, чем ограниченной группе людей, то пакет подходит для AUR.<br />
* Возможно, вам потребуется потренироваться перед тем как отправить пакет в AUR. Попробуйте создать несколько пакетов для того, чтобы освоить процесс создания.<br />
* Если вы отправляете архив {{ic|package.tar.gz}} и в нем содержится файл '{{ic|package}}', то вы получите ошибку 'Could not change to directory {{ic|/home/aur/unsupported/package/package}}'. Чтобы решить эту проблему, переименуйте файл '{{ic|package}}' во что-нибудь другое, например '{{ic|package.rc}}'. Во время установки в директории {{ic|pkg}} вы сможете переименовать его обратно в '{{ic|package}}'.<br />
<br />
==Поддержка и сопровождение пакетов в AUR==<br />
* Если вы сопровождаете некоторый пакет и хотите обновить PKBUILD для вашего пакета, то просто отправьте его еще раз.<br />
* Поддерживайте обратную связь и наблюдайте за комментариями других пользователей; пробуйте добавлять любые улучшения, которые они предлагают; относитесь к этому, как к процессу обучения!<br />
* Пожалуйста НЕ отправляйте пакет просто так и НЕ забывайте о нем! Пока пакет находится в AUR, то именно создатель пакета должен его сопровождать, проверять обновления, и улучшать PKGBUILD.<br />
* Если вы по каким-то причинам больше не хотите продолжать сопровождать пакет, то {{ic|disown}} пакет при помощи web-интерфейса AUR и/или отправьте сообщение в почтовую рассылку AUR.<br />
<br />
==[community]==<br />
Репозиторий [community], поддерживаемый [[Trusted Users]], содержит самые популярные пакеты с AUR. По умолчанию он подключен в {{ic|pacman.conf}}. Если же он отключен/удален, его можно подключить разкоментировав/добавив 2 строки:<br />
<br />
{{hc|/etc/pacman.conf<br />
|2=<nowiki><br />
...<br />
[community]<br />
Include = /etc/pacman.d/mirrorlist<br />
...<br />
</nowiki>}}<br />
<br />
[community], в отличии от AUR, содержит бинарные пакеты, которые могут быть установлены непосредственно через [[pacman]]. Так же файлы для сборки из исходников доступны в [[ABS]]. Некоторые из этих пакетов через некоторое время могут быть перемещены в [core] или [extra] репозитории если разработчики посчитают их важными для дистрибутива. <br />
<br />
Пользователи так же могут получить доступ к сборочным файлам [community] правкой {{ic|/etc/abs.conf}}, подключив репозиторий community в {{Ic|REPOS}} массиве.<br />
<br />
==FAQ==<br />
<br />
{{FAQ<br />
|question=Что такое AUR?<br />
|answer=AUR (Arch User Repository) - это место, куда пользователи Arch Linux могут загружать файлы [[PKGBUILD]] для приложений, библиотек и т.д., и предоставлять к ним доступ всему коммьюнити. Пользователи могут голосовать за понравившиеся им пакеты для перемещения их в репозиторий [community], после чего пакеты станут доступны для пользователей в бинарной форме.}}<br />
<br />
{{FAQ<br />
|question=Какие типы пакетов разрешены на AUR?<br />
|answer=Пакеты AUR - это просто рецепты сборки исполнимых файлов для последующей их установки [[pacman]]'ом. Обычно разрешено все, что удовлетворяет лицензионным требованиям программного обеспечения. Но в некоторых случаях прямо указано, что запрещено создавать ссылки на скачивание(контент запрещен к распространению). Это означает, что пользователь должен заранее подготовить ограниченный контент(restricted source) в каталоге сборки, до самой сборки пакета. Пиратство не поощряется, так что "варез" абсолютно не допустим. Если вы сомневаетесь в правовых аспектах, лучше сначала спросить.}}<br />
<br />
{{FAQ<br />
|question=Кто такие TU?<br />
|answer=[[AUR Trusted User Guidelines|TU (Trusted User)]] - это люди следящие за AUR и репозиторием [community]. Они поддерживают популярные PKGBUILDы в [community], помечают PKGBUILDы, как безопасные, и в целом поддерживают работу AUR.}}<br />
<br />
{{FAQ<br />
|question=Какая разница между [unsupported] и [community]?<br />
|answer=[unsupported] это место, где хранятся все PKGBUILDы присланные пользователями.Они должны быть собраны вручную с помощью [makepkg]. Когда PKGBUILDы набирают достаточное количество голосов, они перемещаются в репозиторий [community], где TU поддерживают бинарные пакеты, которые могут быть установлены с помощью [[pacman]].}}<br />
<br />
{{FAQ<br />
|question=Сколько голосов нужно набрать PKGBUILDу для перемещения его в [community]?<br />
|answer=Обычно нужно как минимум 10 голосов для перемещения PKGBUILDа в [community]. Однако, если TU захочет сопровождать пакет, он скорее всего появится в репозитории.}}<br />
<br />
{{FAQ<br />
|question=Как я могу создать PKGBUILD?<br />
|answer=Лучшее руководство здесь - [[Creating Packages]]. Перед созданием PKGBUILDа посмотрите - нет ли его в AUR, чтобы исключить дублирование.}}<br />
<br />
{{FAQ<br />
|question=Я пробую запустить {{Ic|pacman -S foo}}; но получаю ошибку, хотя знаю, что пакет находится в [community]<br />
|answer=Скорее всего Вы не разрешили использование репозитория [community] в {{ic|/etc/pacman.conf}}. Просто раскомментируйте строки связанные с этим репозиторием.}}<br />
<br />
{{FAQ<br />
|question=Пакет Foo в AUR устаревший; что я могу сделать?<br />
|answer=Во-первых, Вы можете пометить пакет как устаревший. Если пакет будет находиться в этом состоянии долгое время, можете написать человеку, поддерживающему пакет. Если Вы не получите ответа, Вы можете написать в список рассылки aur-general, чтобы TU пометил PKGBUILD как бесхозный, если вы готовы поддерживать пакет самостоятельно.}}<br />
<br />
{{FAQ<br />
|question=Я хочу предоставить свой PKGBUILD; кто-нибудь может проверить его на наличие ошибок?<br />
|answer=Если вы хотите, чтобы сообщество обсудило ваш PKGBUILD, отправьте его в список рассылки aur-general. Вы также можете получить помощь на [[ArchChannel|IRC канале]] #archlinux в сети irc.freenode.net. Вы можете использовать [[namcap]] для проверки вашего PKGBUILD и собранного пакета на наличие ошибок.}}<br />
<br />
{{FAQ<br />
|question=Пакет Foo из AUR не собирается, когда я запускаю {{Ic|makepkg}}; Что мне делать?<br />
|answer=Скорее всего вы упустили какие-то мелочи.<br />
<br />
# Запустите {{Ic|pacman -Syyu}} перед сборкой чего-либо с помощью {{Ic|makepkg}}. Возможно ваша система не обновлена.<br />
# Убедитесь что установлены группы "base" и "base-devel".<br />
# Попробуйте использовать опцию "{{Ic|-s}}" с {{Ic|makepkg}} для проверки и установки необходимых для сборки зависимостей.<br />
<br />
Возможно, причина гораздо серьезнее. Пользовательские установки CFLAGS, LDFLAGS и MAKEFLAGS могут вызвать ошибку. Возможно, PKGBUILD содержит ошибки. Если Вы не можете исправить ошибки самостоятельно - сообщите человеку поддерживающему пакет.}}<br />
<br />
{{FAQ<br />
|question=Можно ли ускорить повторяющийся процесс сборки?<br />
|answer=Если вы часто компилируете код используя GCC - скажем, GIT или SVN пакет. В таком случае, вы можете найти полезной утилиту [[ccache]] (compiler cache)}}<br />
<br />
{{FAQ<br />
|question=Как я могу получить доступ к неподдерживаемым пакетам?<br />
|answer=Смотрите [[#Установка пакетов из AUR’а]]}}<br />
<br />
{{FAQ<br />
|question=Как я могу загрузить файлы в AUR не пользуясь web-интерфейсом?<br />
|answer=Посмотритке [https://aur.archlinux.org/packages.php?ID=23393 aurploader] или [https://aur.archlinux.org/packages.php?ID=37216 burp] -- оба с интерфейсом командной строки.}}</div>
Vas
https://wiki.archlinux.org/index.php?title=Plymouth_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=200004
Plymouth (Русский)
2012-05-02T12:01:44Z
<p>Vas: a very minor edit</p>
<hr />
<div>[[Category:Bootsplash (Русский)]]<br />
[[Category:Русский]]<br />
[[Category:Красивости (Русский)]]<br />
[[Category:Загрузка (Русский)]]<br />
{{i18n|Plymouth}}<br />
<br />
[http://fedoraproject.org/wiki/Releases/FeatureBetterStartup Plymouth] &mdash; это проект из Fedora, обеспечивающий загрузку системы без бегущих надписей (логов) на экране. Он базируется на [[kernel mode setting]] (KMS, установка разрешения и глубины цвета на уровне ядра) для обеспечения родного разрешения экрана на раннем этапе загрузки, после чего отображает привлекательный загрузочный экран вплоть до этапа выбора пользователя.<br />
<br />
== Подготовка ==<br />
{{Warning|Plymouth в настоящее время находится в активной разработке и может содержать ошибки.}}<br />
Plymouth главным образом использует KMS для обработки графики. Если вы знаете что это такое и уже настроили, смело переходите к [[#Установка|Установка]]. <br />
<br />
В противном случае у вас есть два варианта: <br />
# Установить и настроить KMS: пожалуйста, обратитесь к инструкциям для видеокарт [[ATI#AMD.2FAti_cards_and_KernelModeSetting_.28KMS.29|ATI]], [[Intel#KMS_.28Kernel_Mode_Setting.29|Intel]] или [[Nouveau#KMS|Nvidia]]. Все они требуют редактирования/пересборки ядра. Это будет описано позже в этой статье, поэтому редактирование образа ядра пока может быть пропущено.<br />
# Несмотря на то, что использование KMS предпочтительно, Plymouth может работать без них. Если у вас нет возможности использовать KMS, то вам понадобится [[Framebuffer#Framebuffer_Resolution|framebuffer]]. Рекомендуется использовать драйвер Uvesafb, так как он поддерживает разрешения широкоформатных дисплеев.<br />
<br />
Если у вас не настроены ни KMS ни framebuffer, то Plymouth вернется в текстовый режим.<br />
<br />
==Установка==<br />
Plymouth пока недоступен в [[Official Repositories|официальных репозиториях]] и должен быть установлен из [[AUR]].<br />
<br />
Стабильная версия называется {{AUR|plymouth}}, но поскольку последний стабильный релиз был в мае 2010 [http://www.freedesktop.org/software/plymouth/releases/?C=M;O=D], то лучше использовать версию {{AUR|plymouth-git}}.<br />
<br />
==Конфигурация==<br />
<br />
===Включение Plymouth в Initcpio===<br />
<br />
Добавьте Plymouth в HOOKS в [[mkinitcpio.conf]]. Он обязательно '''должен''' быть добавлен ''после'' '''base''', '''udev''' и '''autodetect''':<br />
{{hc|/etc/mkinitcpio.conf|2=HOOKS="base udev autodetect [...] plymouth"}}<br />
<br />
{{Warning|Если используется [[System Encryption with LUKS for dm-crypt|шифрование жестких дисков]] с '''encrypt''' hook, ''необходимо'' заменить его на '''plymouth-encrypt''' чтобы получить доступ к запросу пароля TTY.}}<br />
<br />
Для более раннего запуска KMS надо добавить модуль [[radeon]] (для видеокарт radeon), [[Intel|i915]] (для видеокарт Intel) или [[nouveau]] (для видеокарт nvidia) в строку MODULES в {{ic|/etc/mkinitcpio.conf}}:<br />
<br />
{{hc|/etc/mkinitcpio.conf|2=MODULES="i915"<br />
'''или'''<br />
MODULES="radeon"<br />
'''или'''<br />
MODULES="nouveau"}}<br />
<br />
Переконфигурация образа ядра (см. статью [[mkinitcpio]] для более детальной информации):<br />
{{bc|# mkinitcpio -p [имя вашего ядра]}}<br />
<br />
<br />
===Командная строка ядра===<br />
<br />
Неоходимо установить '''quiet splash''' режим ядра в параметрах командной линии загрузчика. Ниже пример для [[Grub2]] и {{ic|/boot/grub/grub.cfg}} (для [[Grub]] и [[Lilo]] шаблон аналогичен):<br />
linux /boot/vmlinuz-linux root=/dev/... ro quiet splash<br />
<br />
Можно заставить KMS принудительно запускаться раньше добавив "''radeon.modeset=1''" (для видеокарт radeon) or "''i915.modeset=1''" (для видеокарт Intel) в опции ядра:<br />
<br />
linux /boot/vmlinuz-linux root=/dev/... radeon.modeset=1<br />
<br />
linux /boot/vmlinuz-linux root=/dev/... i915.modeset=1<br />
<br />
Так же можно отредактировать файл {{ic|/etc/default/grub}} и добавить опции ядра в строке ''GRUB_CMDLINE_LINUX_DEFAULT=""''. Чтобы сгенерировать {{ic|grub.cfg}} выполните:<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
===Изменение темы===<br />
<br />
Plymouth имеет на выбор темы:<br />
#Fade-in: "Простая тема с затухающими и разгорающимися мерцающими звездами"<br />
#Glow: "Производственная тема, показывающая процесс загрузки в виде круговой диаграммы"<br />
#Script: "Пример скрипта" (Несмотря на описание выглядит очень симпатичной темой Arch)<br />
#Solar: "Космическая тема, голубая звезда с протуберанцами" and <br />
#Spinfinity: "Простая тема показывающая вращающийся знак бесконечности в центре экрана"<br />
#''(Text: "Текстовый режим с трехцветной полосой прогресса")''<br />
#''(Details: "Резервная тема с подробностями загрузки")''<br />
Список установленных тем можно вызвать командой:<br />
<br />
plymouth-set-default-theme -l<br />
<br />
Для просмотра тем без перезагрузки. Нажать Ctrl+Alt+F2 для переключения консоли, войти как root и набрать:<br />
<br />
plymouthd<br />
plymouth --show-splash<br />
<br />
Для выхода из просмотра нажать Ctrl+Alt+F2 снова и набрать:<br />
<br />
plymouth --quit<br />
<br />
Установить желаемую тему можно утилитой '''plymouth-set-default-theme''', например:<br />
# plymouth-set-default-theme spinfinity<br />
<br />
Соберите образ ядра:<br />
# mkinitcpio -p [name of your kernel preset]<br />
<br />
Перезагрузитесь.<br />
<br />
==Устранение неполадок==<br />
<br />
===Маленькие черные квадраты===<br />
<br />
По каким-то причинам после выполнения команды выйти, Plymouth может оставить черные квадраты вверху экрана видимые поверх всех окон. Два подтвержденных случая, это ноутбук с видеокартой ATI при использовании KMS, и десктоп с видеокартой nVidia использующий framebuffer. Источником проблемы является опция {{ic|--retain-splash}} , которая требуется для максимально плавного отображения в процессе загрузки. Обходным путем является принудительное закрытие Plymouth ''после'' логина, когда опция {{ic|--retain-splash}}более не требуется.<br />
<br />
Нужно отредактировать {{ic|~/.xinitrc}} и добавить следующую линию '''перед''' линией запускающей менеджер окружения рабочего стола (подобной "exec ck-launch-session openbox-session") чтобы выключить Plymouth:<br />
sudo /bin/plymouth quit &<br />
<br />
{{Note|Отсутствие <code>--retain-splash</code> и дополнительный знак <code>&</code> требуются чтобы xinitrc мог продолжать запуск графического окружения и оставить Plymouth выключаться в фоновом режиме.}}<br />
<br />
{{Warning|Если не вставить это '''перед''' строкой запуска сессии рабочего стола (к примеру "exec startxfce4") '''приведет''' в результате к '''незапускаемой''' сессии.}}<br />
<br />
Чтобы получить разрешение на принудительное отключение Plymouth без пароля, нужно отредактировать {{ic|/etc/sudoers}}:<br />
$ su<br />
# EDITOR=nano visudo<br />
<br />
и добавить:<br />
''Ваш_Логин'' ALL=(ALL) NOPASSWD: /bin/plymouth<br />
<br />
После этого необходимо перезагрузиться.<br />
<br />
===Выключение <code><-- Все еще проблема?</code>===<br />
<br />
Если имеется проблема с выключением Power Off, к примеру компьютер перезагружается вместо выключения, причиной может быть или KMS или Plymouth. Если причина в Plymouth, то необходимо или запустить "plymouth --mode ..." в случае перезагрузки или halt или отредактировать {{ic|/etc/rc.d/functions.d/plymouth.functions}} и закомментировать следующий блок: <br />
<br />
if [ "$0" == "/etc/rc.shutdown" ]; then<br />
...<br />
fi<br />
<br />
==Также смотри==<br />
[http://bbs.archlinux.org/viewtopic.php?id=81406 Обсуждение на форуме]</div>
Vas
https://wiki.archlinux.org/index.php?title=Plymouth_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=200003
Plymouth (Русский)
2012-05-02T12:00:49Z
<p>Vas: corrected translation</p>
<hr />
<div>[[Category:Bootsplash (Русский)]]<br />
[[Category:Русский]]<br />
[[Category:Красивости (Русский)]]<br />
[[Category:Загрузка (Русский)]]<br />
{{i18n|Plymouth}}<br />
<br />
[http://fedoraproject.org/wiki/Releases/FeatureBetterStartup Plymouth] &mdash; это проект из Fedora, обеспечивающий загрузку системы без бегущих надписей (логов) на экране. Он базируется на [[kernel mode setting]] (KMS, установка разрешения и глубины цвета на уровне ядра) для обеспечения родного разрешения экрана на раннем этапе загрузки, после чего отображает привлекательный загрузочный экран вплоть до этапа выбора пользователя.<br />
<br />
== Подготовка ==<br />
{{Warning|Plymouth в настоящее время находится в активной разработке и может содержать ошибки.}}<br />
Plymouth главным образом использует KMS для обработки графики. Если вы знаете что это такое и уже настроили, смело переходите к [[#Установка|Установка]]. <br />
<br />
В противном случае у вас есть два варианта: <br />
# Установить и настроить KMS: пожалуйста, обратитесь к инструкциям для видеокарт [[ATI#AMD.2FAti_cards_and_KernelModeSetting_.28KMS.29|ATI]], [[Intel#KMS_.28Kernel_Mode_Setting.29|Intel]] или [[Nouveau#KMS|Nvidia]]. Все они требуют редактирования/пересборки ядра. Это будет описано позже в этой статье, поэтому редактирование образа ядра пока может быть пропущено.<br />
# Несмотря на то, что использование KMS предпочтительно, Plymouth может работать без них. Если у вас нет возможности использовать KMS, то вам понадобится [[Framebuffer#Framebuffer_Resolution|framebuffer]]. Рекомендуется использовать драйвер Uvesafb, так как он поддерживает разрешения широкоформатных дисплеев.<br />
<br />
Если у вас не настроены ни KMS ни framebuffer, то Plymouth вернется в текстовый режим.<br />
<br />
==Установка==<br />
Plymouth пока недоступен в [[Official Repositories|официальных репозиториях]] и должен быть установлен из [[AUR]].<br />
<br />
Стабильная версия называется {{AUR|plymouth}}, но поскольку последний стабильный релиз был в мае 2010 [http://www.freedesktop.org/software/plymouth/releases/?C=M;O=D], то лучше использовать версию {{AUR|plymouth-git}}.<br />
<br />
==Конфигурация==<br />
<br />
===Включение Plymouth в Initcpio===<br />
<br />
Добавьте Plymouth в HOOKS в [[mkinitcpio.conf]]. Он обязательно '''должен''' быть добавлен ''после'' '''base''', '''udev''' и '''autodetect''':<br />
{{hc|/etc/mkinitcpio.conf|2=HOOKS="base udev autodetect [...] plymouth"}}<br />
<br />
{{Warning|Если используется [[System Encryption with LUKS for dm-crypt|шифрование жестких дисков]] с '''encrypt''' hook, ''необходимо'' заменить его на '''plymouth-encrypt''' чтобы получить доступ к запросу пароля TTY.}}<br />
<br />
Для более раннего запуска KMS надо добавить модуль [[radeon]] (для видеокарт radeon), [[Intel|i915]] (для видеокарт Intel) или [[nouveau]] (для видеокарт nvidia) в строку MODULES в {{ic|/etc/mkinitcpio.conf}}:<br />
<br />
{{hc|/etc/mkinitcpio.conf|2=MODULES="i915"<br />
'''or'''<br />
MODULES="radeon"<br />
'''or'''<br />
MODULES="nouveau"}}<br />
<br />
Переконфигурация образа ядра (см. статью [[mkinitcpio]] для более детальной информации):<br />
{{bc|# mkinitcpio -p [имя вашего ядра]}}<br />
<br />
<br />
===Командная строка ядра===<br />
<br />
Неоходимо установить '''quiet splash''' режим ядра в параметрах командной линии загрузчика. Ниже пример для [[Grub2]] и {{ic|/boot/grub/grub.cfg}} (для [[Grub]] и [[Lilo]] шаблон аналогичен):<br />
linux /boot/vmlinuz-linux root=/dev/... ro quiet splash<br />
<br />
Можно заставить KMS принудительно запускаться раньше добавив "''radeon.modeset=1''" (для видеокарт radeon) or "''i915.modeset=1''" (для видеокарт Intel) в опции ядра:<br />
<br />
linux /boot/vmlinuz-linux root=/dev/... radeon.modeset=1<br />
<br />
linux /boot/vmlinuz-linux root=/dev/... i915.modeset=1<br />
<br />
Так же можно отредактировать файл {{ic|/etc/default/grub}} и добавить опции ядра в строке ''GRUB_CMDLINE_LINUX_DEFAULT=""''. Чтобы сгенерировать {{ic|grub.cfg}} выполните:<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
===Изменение темы===<br />
<br />
Plymouth имеет на выбор темы:<br />
#Fade-in: "Простая тема с затухающими и разгорающимися мерцающими звездами"<br />
#Glow: "Производственная тема, показывающая процесс загрузки в виде круговой диаграммы"<br />
#Script: "Пример скрипта" (Несмотря на описание выглядит очень симпатичной темой Arch)<br />
#Solar: "Космическая тема, голубая звезда с протуберанцами" and <br />
#Spinfinity: "Простая тема показывающая вращающийся знак бесконечности в центре экрана"<br />
#''(Text: "Текстовый режим с трехцветной полосой прогресса")''<br />
#''(Details: "Резервная тема с подробностями загрузки")''<br />
Список установленных тем можно вызвать командой:<br />
<br />
plymouth-set-default-theme -l<br />
<br />
Для просмотра тем без перезагрузки. Нажать Ctrl+Alt+F2 для переключения консоли, войти как root и набрать:<br />
<br />
plymouthd<br />
plymouth --show-splash<br />
<br />
Для выхода из просмотра нажать Ctrl+Alt+F2 снова и набрать:<br />
<br />
plymouth --quit<br />
<br />
Установить желаемую тему можно утилитой '''plymouth-set-default-theme''', например:<br />
# plymouth-set-default-theme spinfinity<br />
<br />
Соберите образ ядра:<br />
# mkinitcpio -p [name of your kernel preset]<br />
<br />
Перезагрузитесь.<br />
<br />
==Устранение неполадок==<br />
<br />
===Маленькие черные квадраты===<br />
<br />
По каким-то причинам после выполнения команды выйти, Plymouth может оставить черные квадраты вверху экрана видимые поверх всех окон. Два подтвержденных случая, это ноутбук с видеокартой ATI при использовании KMS, и десктоп с видеокартой nVidia использующий framebuffer. Источником проблемы является опция {{ic|--retain-splash}} , которая требуется для максимально плавного отображения в процессе загрузки. Обходным путем является принудительное закрытие Plymouth ''после'' логина, когда опция {{ic|--retain-splash}}более не требуется.<br />
<br />
Нужно отредактировать {{ic|~/.xinitrc}} и добавить следующую линию '''перед''' линией запускающей менеджер окружения рабочего стола (подобной "exec ck-launch-session openbox-session") чтобы выключить Plymouth:<br />
sudo /bin/plymouth quit &<br />
<br />
{{Note|Отсутствие <code>--retain-splash</code> и дополнительный знак <code>&</code> требуются чтобы xinitrc мог продолжать запуск графического окружения и оставить Plymouth выключаться в фоновом режиме.}}<br />
<br />
{{Warning|Если не вставить это '''перед''' строкой запуска сессии рабочего стола (к примеру "exec startxfce4") '''приведет''' в результате к '''незапускаемой''' сессии.}}<br />
<br />
Чтобы получить разрешение на принудительное отключение Plymouth без пароля, нужно отредактировать {{ic|/etc/sudoers}}:<br />
$ su<br />
# EDITOR=nano visudo<br />
<br />
и добавить:<br />
''Ваш_Логин'' ALL=(ALL) NOPASSWD: /bin/plymouth<br />
<br />
После этого необходимо перезагрузиться.<br />
<br />
===Выключение <code><-- Все еще проблема?</code>===<br />
<br />
Если имеется проблема с выключением Power Off, к примеру компьютер перезагружается вместо выключения, причиной может быть или KMS или Plymouth. Если причина в Plymouth, то необходимо или запустить "plymouth --mode ..." в случае перезагрузки или halt или отредактировать {{ic|/etc/rc.d/functions.d/plymouth.functions}} и закомментировать следующий блок: <br />
<br />
if [ "$0" == "/etc/rc.shutdown" ]; then<br />
...<br />
fi<br />
<br />
==Также смотри==<br />
[http://bbs.archlinux.org/viewtopic.php?id=81406 Обсуждение на форуме]</div>
Vas
https://wiki.archlinux.org/index.php?title=Arch_User_Repository_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=199965
Arch User Repository (Русский)
2012-05-02T05:55:55Z
<p>Vas: corrected translation</p>
<hr />
<div>[[Category:Русский]]<br />
{{i18n|Arch User Repository}}<br />
<br />
{{Article summary start|Описание}}<br />
{{Article summary text|Обзор пользовательского репозитария Arch.}}<br />
{{Article summary heading|Обзор}}<br />
{{Article summary text|{{Package management overview}}}}<br />
{{Article summary heading|Дополнительно}}<br />
{{Article summary wiki|AUR Helpers}}<br />
{{Article summary wiki|AUR Trusted User Guidelines}}<br />
{{Article summary heading|Полезные ссылки}}<br />
{{Article summary link|AUR Web Interface|https://aur.archlinux.org}}<br />
{{Article summary link|AUR Mailing List|http://www.archlinux.org/mailman/listinfo/aur-general}}<br />
{{Article summary end}}<br />
<br />
[[Arch User Repository|Пользовательский репозитарий Arch]] (AUR) это разрабатываемое сообществом хранилище для пользователей Arch. Он содержит описания пакетов, которые позволят вам скомпилировать пакет из исходников с помощью [[makepkg]] и затем установить его, используя [[pacman]]. AUR был создан, чтобы объединить и предоставить в общий доступ новые пакеты от коммьюнити и способствовать скорому включению популярных пакетов в [[#.5Bcommunity.5D|[комммьюнити]]] хранилище. Этот документ объясняет, как пользователи могут использовать AUR.<br />
<br />
Большое количество новых пакетов, которые вошли в официальные репозитории, начинали свой путь в AUR. В AUR пользователи могут добавить свои собственные пакеты. Сообществу предоставлена возможность голосовать за или против пакетов, размещенных в репозитории. Если пакет становится популярным, распространяется под подходящей лицензией и может быть собран без дополнительных сложностей, то возможно, что пакет будет перенесен в репозиторий [community] (непосредственно доступный с помощью утилит {{ic|pacman}} или {{ic|abs}}).<br />
<br />
==Предисловие==<br />
<br />
Пользователи смогут найти и скачать файлы [[PKGBUILD]], используя [https://aur.archlinux.org Веб-интерфейс AUR]. Эти файлы используются для сборки пакетов, которые в последствии можно установить с помощью утилиты [[pacman]].<br />
<br />
* Следующие разделы этой статьи помогут лучше понять способы работы с репозиторием AUR:<br />
**[[#Installing Packages from the AUR|краткое руководство по установке пакетов из репозитория AUR]] <br />
**[[#.5Bcommunity.5D|как использовать репозиторий [community]]] в утилитах pacman и ABS.<br />
* Посетите [https://aur.archlinux.org Веб-интерфейс AUR], чтобы получить информацию об обновлениях. Там же вы найдете статистику и ежедневно обновляемый список пакетов доступных в репозитории AUR.<br />
* Ознакомьтесь с [[#FAQ]], чтобы получить ответы на часто задаваемые вопросы.<br />
* Возможно, что вы захотите исправить {{ic|/etc/makepkg.conf}}, чтобы настроить оптимизацию сборки пакетов для вашей системы. Значительное улучшение во времени компиляции может быть получено на многопроцессорных системах правкой переменной MAKEFLAGS. Пользователи так же могут настроить оптимизацию на основе аппаратных характеристик своего компьютера с помощью переменной CFLAGS. Об этом можно найти больше информации на странице [[makepkg.conf]].<br />
* Установите группу пакетов "base-devel" ({{Ic|pacman -S base-devel}}), потому что без них невозможна сборка пакетов из репозитория AUR. (Больше информации об этом вы найдете на [http://bbs.archlinux.org/viewtopic.php?pid=632355 форуме]).<br />
<br />
==История==<br />
Следующие адреса оставлены только для истории. С тех пор они были заменены AUR-ом и теперь недоступны.<br />
<br />
В начале была {{ic|<nowiki>ftp://ftp.archlinux.org/incoming</nowiki>}}, и люди вносили свой вклад путем простой закачки [[PKGBUILD]], необходимых дополнительных файлов и собранного пакета на сервер. Пакет и связанные с ним файлы оставались на сервере, пока [[Package Maintainer]] не просматривал программу и адаптировал ее.<br />
<br />
После были созданы Trusted User Repositories. Нескольким лицам сообщества было разрешено содержать свои собственные репозитории с общим доступом. AUR был создан с целью предоставить более гибкую и удобную систему. На самом деле, AUR мэйнтейнеры до сих пор упоминаются как TU (Trusted Users).<br />
<br />
==Поиск на AUR==<br />
Web-интерфейс AUR может быть найден [https://aur.archlinux.org/ здесь], а интерфес, который может быть, к примеру, использован для доступа к AUR из скриптов, может быть найден [https://aur.archlinux.org/rpc.php здесь].<br />
Поиск названий пакетов и их описание идет при помощи сравнения LIKE в MySQL. Это дает возможность более гибких запросов (к примеру, попробуйте поискать 'tool%like%grep' вместо 'tool like grep'). Если вам необходимо искать описание, в котором содержится '%', экранируйте его так: '\%'.<br />
<br />
==Установка пакетов из AUR’а==<br />
Установка пакетов из AUR’а (также известного как репозиторий [unsupported]) относительно проста (вообще-то она абсолютно проста ;-). Необходимо:<br />
# Скачать [[PKGBUILD]] и другие требуемые файлы (например, патчи). Все они содержатся в архиве, доступном по соответствующей ссылке («Архив» или «Tarball» в англоязычной версии AUR’а);<br />
# Перейти в директорию, содержащую [[PKGBUILD]] и выполнить [[makepkg]] (команда «makepkg -s» автоматически разрешит все зависимости с помощью [[pacman]]);<br />
# Установить получившийся пакет с помощью [[pacman]]:<br />
<br />
$ pacman -U /path/to/pkg.tar.xz<br />
<br />
[[AUR Helpers]] добавляют прямой доступ к AUR. Они различаются по возможностям, но все они страются помочь в поиске, получении, сборке и установке из PKGBUILD, которые находятся в AUR. Все эти скрипты могут быть найдены в репозитории [unsupported].<br />
<br />
{{Note|В Arch Linux нет и никогда не будет ''официальных'' механизмов для инсталляции из репозитория [unsupported]. Пользователи должны сами проводить сборку пакетов.}}<br />
<br />
Далее следует подробный пример установки некоторого пакета, названного "foo".<br />
<br />
===Подготовка===<br />
Для начала установите необходимые утилиты. Группы пакетов base-devel должно быть достаточно. Она включает утилиту ''make'' и другие команды, необходимые для компиляции из исходников.<br />
<br />
{{Warning|Пакеты в AUR предполагают, что "base-devel" уже установлен, и не будут указывать эту группу в качестве зависимости, даже если пакет не сможет собраться без них. Пожалуйста убедитесь в том, что эта группа пакетов установлена, прежде чем сообщать об ошибках.}}<br />
<br />
# pacman -S base-devel<br />
<br />
Затем выберите директорию для сборки. Вы можете выбрать любую пустую директорию в которой будет происходить компиляция пакета. Обычно выбирают что-то наподобие:<br />
<br />
~/builds<br />
<br />
или, если используется ABS ([[Arch Build System]]), то:<br />
<br />
/var/abs/local<br />
<br />
Более подробно о ABS читайте статью [[Arch Build System]]. Этот пример будет использовать {{ic|~/builds}} в качестве директории для сборки.<br />
<br />
===Получение файлов===<br />
Найдите пакет в AUR. Это делается с помощью поиска (текстовое поле на верху страницы [https://aur.archlinux.org/ AUR home page]). После перехода по одной из ссылок из списка найденных результатов, откроется страница информации о выбранном пакете. Прочтите описание и убедитесь, что это то, что вы искали, обратите внимание когда пакет последний раз обновлялся и прочтите все комментарии.<br />
<br />
Скачайте необходимые файлы для сборки. Для этого на странице информации о пакете скачайте архив {{ic|*.tar.gz}} по ссылке в левом углу описания пакета. Этот файл должен быть сохранен в директорию для сборки или скопирован туда после скачивания. Для нашего примера архив будет называться {{ic|foo.tar.gz}} (архив должны выглядеть как {{ic|<имяпакета>.tar.gz}}, если он был правильно закачан в AUR).<br />
<br />
===Сборка пакета===<br />
Распакуйте tar-архив. Для этого перейдите в директорию для сборки и выполните:<br />
<br />
$ cd ~/builds<br />
$ tar -xvzf foo.tar.gz<br />
<br />
После этого в директории для сборки появится новая поддиректория "foo".<br />
<br />
{{Warning|'''Внимательно проверьте все файлы.''' Перейдите в новую поддиректорию и внимательно проверьте {{ic|PKGBUILD}} и все {{ic|.install}} файлы на злонамеренные команды, которые могут повредить/заразить ваш компьютер. Если сомневаетесь, то НЕ собирайте пакет и обратитесь за советом на форум или почтовую рассылку.}}<br />
<br />
$ cd foo<br />
$ nano PKGBUILD<br />
$ nano foo.install<br />
<br />
Соберите пакет. После ручной проверки целостности файлов, запустите [[makepkg]] от обычного пользователя в директории, где находится {{ic|PKGBUILD}}.<br />
<br />
$ makepkg -s<br />
<br />
Опция {{Ic|-s}} воспользуется [[sudo]], для установки необходимых зависимостей. Если использование sudo нежелательно, то заранее самостоятельно установите необходимые зависимости и уберите опцию {{Ic|-s}} из вышеуказанной команды.<br />
<br />
===Установка пакета===<br />
Установите пакет, используя [[pacman]]. Созданный пакет должен иметь имя:<br />
<br />
<application name>-<version number>-<architecture>.pkg.tar.xz<br />
<br />
Установите его при помощи команды [[pacman]] "upgrade" :<br />
<br />
# pacman -U foo-0.1-i686.pkg.tar.xz <br />
<br />
{{Note|Выше было приведено краткое описание сборки пакета. На страницах о [[makepkg]] и [[ABS]] информации гораздо больше и они очень рекомендуются к прочтению начинающим пользователям.}}<br />
<br />
==Добавление PKGBUILDs в UNSUPPORTED==<br />
Пользователи играют существенную роль в AUR, без их поддержки, участия и вклада, AUR не сможет реализовать весь свой потенциал. Жизненный цикл пакета в AUR начинается и заканчивается при поддержке пользователя и требует его непосредственного участия.<br />
<br />
Пользователи могут '''обмениваться''' [[PKGBUILD]] при помощи раздела UNSUPPORTED в AUR. UNSUPPORTED не содержит бинарных пакетов, но позволяет пользователям загружать PKGBUILD, который потом может быть скачан другими участниками AUR. Такие PKGBUILD официально не поддерживаются и не проходят тщательную проверку, поэтому должны быть использованы на ваш риск.<br />
<br />
===Обратная связь===<br />
Через комментарии пользователи могут сообщить мэйнтейнеру PKGBUILD о предложениях и улучшениях. Тем не менее, не стоит добавлять патчи или PKGBUILD в свои комментарии, так как они очень быстро устаревают и, в итоге, просто занимают место. Вместо этого отправляйте такие файлы на email мэйнтейнера, или используйте сервисы [[pastebin Clients|pastebin]] такие как http://aur.pastebin.com.<br />
<br />
Одним из самых простых действий для '''всех''' пользователей Arch Linux будет '''голосование''' за понравившиеся пакеты через online интерфейс AUR. У всех пакетов есть право быть адоптированными TU и быть включенными в [community]. Количество голосов -- один из критериев для включения в [community].<br />
<br />
==Отправка пакетов в UNSUPPORTED==<br />
После авторизации в AUR, пользователь может [https://aur.archlinux.org/pkgsubmit.php отправить] архив {{ic|*.tar.gz}} директории с файлами пакета. Директория внутри архива должна содержать {{ic|PKGBUILD}}, все {{ic|.install}}, патчи и т.д (НО НЕ СКОМПИЛИРОВАННЫЕ ИСХОДНИКИ). Примеры того, что может содержаться в такой директории можно найти в {{ic|/var/abs}} (если был установлен [[ABS]]).<br />
<br />
Простейшим способом создания такого архива является команда:<br />
$ makepkg --source<br />
<br />
Предположим, что вы создаете пакет для ''libfoo'', тогда содержимое архива должно быть похоже на это:<br />
<br />
# List contents of tarball.<br />
$ tar tf libfoo-0.1-1.src.tar.gz<br />
libfoo/<br />
libfoo/PKGBUILD<br />
libfoo/libfoo.install<br />
<br />
Когда создаете пакет придерживайтесь следующих правил:<br />
* Проверьте [core], [extra], и [community] на наличие в них уже готового пакета. Если пакет уже существует, но поврежден или в нем отсутствует необходимая функциональность, то напишите об ошибке на [http://bugs.archlinux.org/ FlySpray].<br />
* Поищите пакет в UNSUPPORTED (т.е. в AUR). Если он поддерживается, то о необходимых изменениях можно написать в комментариях.<br />
* Внимательно проверьте, что то, что вы отправляете, не содержит ошибок. При создании PKGBUILD обязательно прочтите и придерживайтесь [[Arch Packaging Standards]]. Это необходимо для нормального функционирования и успешной работы AUR. Уважайте личное время каждого пользователя и не тратьте его на исправление плохих PKGBUILD.<br />
* Пакеты, которые содержат бинарники или, если они созданы без должной аккуратности, могут быть удалены без предупреждения.<br />
* Если вы сомневаетесь в пакете (или в каком либо из шагов его создания), то отправьте PKGBUILD в почтовую рассылку AUR (AUR Mailing List) или на форум в тему AUR, прежде чем добавлять его непосредственно в AUR.<br />
* Убедитесь, что пакет является полезным. Будет ли кто-нибудь еще его использовать? Не очень ли он узкоспециализированный? Если он будет полезен более, чем ограниченной группе людей, то пакет подходит для AUR.<br />
* Возможно, вам потребуется потренироваться перед тем как отправить пакет в AUR. Попробуйте создать несколько пакетов для того, чтобы освоить процесс создания.<br />
* Если вы отправляете архив {{ic|package.tar.gz}} и в нем содержится файл '{{ic|package}}', то вы получите ошибку 'Could not change to directory {{ic|/home/aur/unsupported/package/package}}'. Чтобы решить эту проблему, переименуйте файл '{{ic|package}}' во что-нибудь другое, например '{{ic|package.rc}}'. Во время установки в директории {{ic|pkg}} вы сможете переименовать его обратно в '{{ic|package}}'.<br />
<br />
==Поддержка и сопровождение пакетов в AUR==<br />
* Если вы сопровождаете некоторый пакет и хотите обновить PKBUILD для вашего пакета, то просто отправьте его еще раз.<br />
* Поддерживайте обратную связь и наблюдайте за комментариями других пользователей; пробуйте добавлять любые улучшения, которые они предлагают; относитесь к этому, как к процессу обучения!<br />
* Пожалуйста НЕ отправляйте пакет просто так и НЕ забывайте о нем! Пока пакет находится в AUR, то именно создатель пакета должен его сопровождать, проверять обновления, и улучшать PKGBUILD.<br />
* Если вы по каким-то причинам больше не хотите продолжать сопровождать пакет, то {{ic|disown}} пакет при помощи web-интерфейса AUR и/или отправьте сообщение в почтовую рассылку AUR.<br />
<br />
==[community]==<br />
Репозиторий [community], поддерживаемый [[Trusted Users]], содержит самые популярные пакеты с AUR. По умолчанию он подключен в {{ic|pacman.conf}}. Если же он отключен/удален, его можно подключить разкоментировав/добавив 2 строки:<br />
<br />
{{hc|/etc/pacman.conf<br />
|2=<nowiki><br />
...<br />
[community]<br />
Include = /etc/pacman.d/mirrorlist<br />
...<br />
</nowiki>}}<br />
<br />
[community], в отличии от AUR, содержит бинарные пакеты, которые могут быть установлены непосредственно через [[pacman]]. Так же файлы для сборки из исходников доступны в [[ABS]]. Некоторые из этих пакетов через некоторое время могут быть перемещены в [core] или [extra] репозитории если разработчики посчитают их важными для дистрибутива. <br />
<br />
Пользователи так же могут получить доступ к сборочным файлам [community] правкой {{ic|/etc/abs.conf}}, подключив репозиторий community в {{Ic|REPOS}} массиве.<br />
<br />
==FAQ==<br />
<br />
{{FAQ<br />
|question=Что такое AUR?<br />
|answer=AUR (Arch User Repository) - это место, куда пользователи Arch Linux могут загружать файлы [[PKGBUILD]] для приложений, библиотек и т.д., и предоставлять к ним доступ всему коммьюнити. Пользователи могут голосовать за понравившиеся им пакеты для перемещения их в репозиторий [community], после чего пакеты станут доступны для пользователей в бинарной форме.}}<br />
<br />
{{FAQ<br />
|question=Какие типы пакетов разрешены на AUR?<br />
|answer=Пакеты AUR - это просто рецепты сборки исполнимых файлов для последующей их установки [[pacman]]'ом. Обычно разрешено все, что удовлетворяет лицензионным требованиям программного обеспечения. Но в некоторых случаях прямо указано, что запрещено создавать ссылки на скачивание(контент запрещен к распространению). Это означает, что пользователь должен заранее подготовить ограниченный контент(restricted source) в каталоге сборки, до самой сборки пакета. Пиратство не поощряется, так что "варез" абсолютно не допустим. Если вы сомневаетесь в правовых аспектах, лучше сначала спросить.}}<br />
<br />
{{FAQ<br />
|question=Кто такие TU?<br />
|answer=[[AUR Trusted User Guidelines|TU (Trusted User)]] - это люди следящие за AUR и репозиторием [community]. Они поддерживают популярные PKGBUILDы в [community], помечают PKGBUILDы, как безопасные, и в целом поддерживают работу AUR.}}<br />
<br />
{{FAQ<br />
|question=Какая разница между [unsupported] и [community]?<br />
|answer=[unsupported] это место, где хранятся все PKGBUILDы присланные пользователями.Они должны быть собраны вручную с помощью [makepkg]. Когда PKGBUILDы набирают достаточное количество голосов, они перемещаются в репозиторий [community], где TU поддерживают бинарные пакеты, которые могут быть установлены с помощью [[pacman]].}}<br />
<br />
{{FAQ<br />
|question=Сколько голосов нужно набрать PKGBUILDу для перемещения его в [community]?<br />
|answer=Обычно нужно как минимум 10 голосов для перемещения PKGBUILDа в [community]. Однако, если TU захочет сопровождать пакет, он скорее всего появится в репозитории.}}<br />
<br />
{{FAQ<br />
|question=Как я могу создать PKGBUILD?<br />
|answer=Лучшее руководство здесь - [[Creating Packages]]. Перед созданием PKGBUILDа посмотрите - нет ли его в AUR, чтобы исключить дублирование.}}<br />
<br />
{{FAQ<br />
|question=Я пробую запустить {{Ic|pacman -S foo}}; но получаю ошибку, хотя знаю, что пакет находится в [community]<br />
|answer=Скорее всего Вы не разрешили использование репозитория [community] в {{ic|/etc/pacman.conf}}. Просто раскомментируйте строки связанные с этим репозиторием.}}<br />
<br />
{{FAQ<br />
|question=Пакет Foo в AUR устаревший; что я могу сделать?<br />
|answer=Во-первых, Вы можете пометить пакет как устаревший. Если пакет будет находиться в этом состоянии долгое время, можете написать человеку, поддерживающему пакет. Если Вы не получите ответа, Вы можете написать в список рассылки aur-general, чтобы TU пометил PKGBUILD как бесхозный, если вы готовы поддерживать пакет самостоятельно.}}<br />
<br />
{{FAQ<br />
|question=Я хочу предоставить свой PKGBUILD; кто-нибудь может проверить его на наличие ошибок?<br />
|answer=Если вы хотите, чтобы сообщество обсудило ваш PKGBUILD, отправьте его в список рассылки aur-general. Вы также можете получить помощь на [[ArchChannel|IRC канале]] #archlinux в сети irc.freenode.net. Вы можете использовать [[namcap]] для проверки вашего PKGBUILD и собранного пакета на наличие ошибок.}}<br />
<br />
{{FAQ<br />
|question=Пакет Foo из AUR не собирается, когда я запускаю {{Ic|makepkg}}; Что мне делать?<br />
|answer=Скорее всего вы упустили какие-то мелочи.<br />
<br />
# Запустите {{Ic|pacman -Syyu}} перед сборкой чего-либо с помощью {{Ic|makepkg}}. Возможно ваша система не обновлена.<br />
# Убедитесь что установлены группы "base" и "base-devel".<br />
# Попробуйте использовать опцию "{{Ic|-s}}" с {{Ic|makepkg}} для проверки и установки необходимых для сборки зависимостей.<br />
<br />
Возможно, причина гораздо серьезнее. Пользовательские установки CFLAGS, LDFLAGS и MAKEFLAGS могут вызвать ошибку. Возможно, PKGBUILD содержит ошибки. Если Вы не можете исправить ошибки самостоятельно - сообщите человеку поддерживающему пакет.}}<br />
<br />
{{FAQ<br />
|question=Можно ли ускорить повторяющийся процесс сборки?<br />
|answer=Если вы часто компилируете код используя GCC - скажем, GIT или SVN пакет. В таком случае, вы можете найти полезной утилиту [[ccache]] (compiler cache)}}<br />
<br />
{{FAQ<br />
|question=Как я могу получить доступ к неподдерживаемым пакетам?<br />
|answer=Смотрите [[#Установка пакетов из AUR’а]]}}<br />
<br />
{{FAQ<br />
|question=Как я могу загрузить файлы в AUR не пользуясь web-интерфейсом?<br />
|answer=Посмотритке [https://aur.archlinux.org/packages.php?ID=23393 aurploader] или [https://aur.archlinux.org/packages.php?ID=37216 burp] -- оба с интерфейсом командной строки.}}</div>
Vas
https://wiki.archlinux.org/index.php?title=Getting_involved_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=199465
Getting involved (Русский)
2012-04-27T14:51:19Z
<p>Vas: updated the page</p>
<hr />
<div>[[Category:About Arch (Русский)]]<br />
{{i18n|Getting Involved}}<br />
[[fr:Aider]]<br />
{{Article summary start}}<br />
{{Article summary text|Эта статья описывает то, как пользователи (как новички так и опытные) могут внести вклад в сообщество Arch. Заметьте, что это далеко не полный список.}}<br />
{{Article summary heading|См. также}}<br />
{{Article summary wiki|Arch User Repository (Русский)}}<br />
{{Article summary wiki|Help:Editing (Русский)}}<br />
{{Article summary wiki|Help:Style (Русский)}}<br />
{{Article summary end}}<br />
<br />
{{Bad translation}}<br />
<br />
В биологии [[Wikipedia:Mutualism_(biology)|мутуализм]] &mdash; взаимовыгодные отношения между организмами. Этот принцип можно применить и к активным членам сообщества Arch, желающим внести свой вклад в их любимый дистрибутив GNU/Linux. Такое участие приносит пользу не только членам сообщества, но и в перспективе всем сторонникам [[Wikipedia:Free and open source software|свободного и открытого программного обеспечения]].<br />
<br />
== Помощь официальному проекту Arch Linux ==<br />
<br />
===Общайтесь на форуме Arch Linux===<br />
<br />
Один из простейших способов поддержки &mdash; это участие в [http://bbs.archlinux.org/ Форуме Arch Linux (англоязычный)]. Пожалуйста прочитайте [[Forum Etiquette]] перед тем, как начать что-либо писать.<br />
<br />
=== Улучшайте ArchWiki ===<br />
<br />
[[AboutWiki|ArchWiki]] &mdash; это документация, составляемая коллективом пользователей Arch Linux. Любой пользователь способен внести вклад.<br />
<br />
Если вы чувствуете в себе силы [[Help:Editing|редактировать wiki страницы]], то пожалуйста помогите [[ArchWiki:Tasks|wiki tasks]].<br />
<br />
=== Присоединяйтесь к IRC рассылке ===<br />
<br />
You can help other users to solve problems on the [[IRC Channel]]. It is of vital importance however, that you read both the [[IRC Channel#archlinux_rules|rules]] and [[IRC Channel#archlinux_guidelines|guidelines]] before participating. [[IRC Channels|Further channels]] are available for specific topics.<br />
<br />
=== Сообщайте об ошибках ===<br />
<br />
Reporting and fixing bugs on the [http://bugs.archlinux.org/ bug tracker] is one of the possible ways to help the community.<br />
<br />
However, ineffective use can be counter-productive. Please read the [[Reporting Bug Guidelines|bug reporting guidelines]].<br />
<br />
=== Create and adopt AUR packages ===<br />
<br />
The [[Arch User Repository]] contains community-made package scripts so that users can easily install software that is not in the official repositories. Popular packages get included into the official [[Arch User Repository#.5Bcommunity.5D|[community]]] repository.<br />
<br />
You can help by creating and adopting packages.<br />
<br />
=== Official software projects ===<br />
<br />
You can get involved in the development of [http://projects.archlinux.org/ official Arch Linux software projects].<br />
<br />
=== Участвуйте в мероприятиях ===<br />
<br />
There are yearly and monthly events for bugfixing, translating and cleanup. You can find forthcoming events in the [[Arch Linux Event Calendar]].<br />
<br />
===Сделайте пожертвование===<br />
<br />
Arch Linux существует благодаря неустанным усилиям многих людей. Есть много способов поддержать Arch. Если разработка ПО, написание документации или техническая поддержка не самые сильные ваши стороны, вы можете помочь нам, [http://www.archlinux.org/donate/ пожертвовав некоторую сумму].<br />
<br />
==Помощь проектам сообщества==<br />
<br />
{{Note|All projects listed here are community projects. None of these projects are considered ''official'' Arch projects.}}<br />
<br />
Arch's community maintains many projects. Feel free to include yours!<br />
<br />
<!--<br />
#############################################<br />
<br />
1. Please sort projects alphabetically, breaking-out into additional category pages when needed<br />
2. Categories should be alphabetically listed<br />
3. When adding your project, include a link, start date and one or two sentences of description<br />
4. Скорее всего этот кусок обновится, когда вы возьметесь его переводить<br />
<br />
#############################################<br />
--><br />
==== Groups ====<br />
Arch-specific groups that you can engage in.<br />
; [[ArchMap]]<br />
: Google Earth Arch user map<br />
<br />
; [http://archaudio.org ArchAudio]<br />
: A third-party package repository and online discussion board for Arch Linux pro-audio users<br />
<br />
; [[Arch Linux User Group]]<br />
: Local meet-up for users.<br />
<br />
; [http://archwomen.org/ Arch Women]<br />
: Group with the intention of resolving possible hurdles for female Arch users ([https://bbs.archlinux.org/viewtopic.php?id=136184 forum thread])<br />
<br />
; [http://www.linkedin.com/groups?gid=1399787 LinkedIn Group]<br />
: Arch Linux group for users and professionals.<br />
<br />
==== Software ====<br />
Community-developed software that focuses on Arch Linux.<br />
<br />
; [[Arch Based Distributions]]<br />
: Linux distributions based on Arch Linux<br />
<br />
; [[AUR Helpers]]<br />
: Utilities to aid end users in using the [[Arch User Repository]]<br />
<br />
; [[Pacman GUI Frontends]]<br />
: Graphical front-ends for [[pacman]]<br />
<br />
; [[Rc.conf GUI Frontends]]<br />
: Graphical front-ends for configuring [[rc.conf]]<br />
<br />
==== Services ====<br />
Services specifically made for Arch users.<br />
<br />
; [http://archlinux.us ArchLinux.us]<br />
: Gmail-based @archlinux.us emails<br />
: Mobile access at [http://archlinux.mobi archlinux.mobi]<br />
<br />
; [http://archlinux.me ArchLinux.me]<br />
: Arch Linux Blogs, to register read [https://bbs.archlinux.org/viewtopic.php?id=73622 this forum post]<br />
<br />
==== Other ====<br />
<br />
; [http://wiki.gotux.net/archlinux TuxLyn's Arch Linux Wiki]<br />
: Personal Arch-related wiki<br />
<br />
; [http://xyne.archlinux.ca Xyne's Arch Linux Stuff]<br />
: A trusted user's arch-related site<br />
<br />
== FAQ ==<br />
<br />
{{FAQ<br />
|question=How can I become an Arch Developer?<br />
|answer=The main motivation for your work on Arch should be helping the whole community, and not simply trying to become an ''Arch developer'' by any means.<br /><br />
<br />
Usually, new developers are picked by the existing developers as the workload increases. Sometimes they post a position and you can apply to fill it, but more often, they just invite somebody they know would be good at it and would fit in well with the rest of the team. Having a portfolio of Arch contributions is the best way to make it on the team.<br />
<br />
Here is a list of things that you may do in order to gain some "popularity" towards Arch's developers:<br />
<br />
* Establish a reputation as being helpful by offering assistance whenever possible<br />
* Answer questions on the forum, IRC, and mailing lists<br />
* Join the Trusted Users to gain packaging experience to show your skills<br />
* Submit packages to the AUR<br />
* Join one of the offshoot projects that may be incorporated into Arch mainstream someday, or start your own<br />
* Work on pacman, makepkg, initscripts, or other source code and submit patches to the bug tracker<br />
* Traverse the bug tracker and fix existing bugs<br />
* Find and submit new bugs<br />
* Fix wiki errors, add new pages, clean up existing pages, and make sure the procedures are up-to-date<br />
* Submit translations}}<br />
<br />
{{FAQ<br />
|question=How can I become a Trusted User?<br />
|answer=Please read [[Trusted Users#How to become TU?]].<br />
}}<br />
<br />
{{FAQ<br />
|question=What can I do as an artist?<br />
|answer=Feel free to share wallpapers, splash screens, color palettes, widgets, themes, etc. with the community on the [http://bbs.archlinux.org/viewforum.php?id=47 art subforum].<br /><br />
See also [http://www.archlinux.org/art/ Arch Linux Art].<br />
}}</div>
Vas
https://wiki.archlinux.org/index.php?title=Getting_involved_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=199463
Getting involved (Русский)
2012-04-27T14:40:04Z
<p>Vas: corrected translation</p>
<hr />
<div>[[Category:About Arch (Русский)]]<br />
{{i18n|Getting Involved}}<br />
[[fr:Aider]]<br />
{{Article summary start}}<br />
{{Article summary text|Эта статья описывает то, как пользователи (как новички так и опытные) могут внести вклад в сообщество Arch. Заметьте, что это далеко не полный список.}}<br />
{{Article summary heading|См. также}}<br />
{{Article summary wiki|Arch User Repository (Русский)}}<br />
{{Article summary wiki|Help:Editing (Русский)}}<br />
{{Article summary wiki|Help:Style (Русский)}}<br />
{{Article summary end}}<br />
<br />
{{Bad translation}}<br />
<br />
В биологии [[Wikipedia:Mutualism_(biology)|мутуализм]] &mdash; взаимовыгодные отношения между организмами. Этот принцип можно применить и к активным членам сообщества Arch, желающим внести свой вклад в их любимый дистрибутив GNU/Linux. Такое участие приносит пользу не только членам сообщества, но и в перспективе всем сторонникам [[Wikipedia:Free and open source software|свободного и открытого программного обеспечения]].<br />
<br />
== Помощь официальному проекту Arch Linux ==<br />
<br />
===Общайтесь на форуме Arch Linux===<br />
<br />
Один из простейших способов поддержки &mdash; это участие в [http://bbs.archlinux.org/ Форуме Arch Linux (англоязычный)]. Пожалуйста прочитайте [[Forum Etiquette]] перед тем, как начать что-либо писать.<br />
<br />
=== Улучшайте ArchWiki ===<br />
<br />
[[AboutWiki|ArchWiki]] &mdash; это документация, составляемая коллективом пользователей Arch Linux. Любой пользователь способен внести вклад.<br />
<br />
Если вы чувствуете в себе силы [[Help:Editing|редактировать wiki страницы]], то пожалуйста помогите [[ArchWiki:Tasks|wiki tasks]].<br />
<br />
===Пожертвование===<br />
<br />
Arch Linux существует благодаря неустанным усилиям многих людей. Никто из нас не получает денег за работы, и у нас нет личных средств на поддержание работы серверов. Есть много способов поддержать Arch. Если разработка ПО, документация, или техническая поддержка не самые сильные ваши стороны, вы можете помочь нам, [http://www.archlinux.org/donate/ пожертвовав некоторую сумму].<br />
<br />
===Wiki===<br />
<br />
Wikis, by design, thrive on collaboration. <br />
<br />
[[AboutWiki|ArchWiki]] is a ''community'' documentation process. The contents are created ''by'' the community ''for'' the community. Contributors volunteer their time and energy to share their knowledge and skill with the community. ''All'' users are encouraged to contribute. Tasks on ArchWiki can roughly be divided into the following:<br />
<br />
* Technical maintenance<br />
* Content management<br />
* Content editing<br />
* Content creation and [[ArchWiki Translation Team|translation]]<br />
<br />
If you feel capable of [[Help:Editing|editing wiki pages]], please see if you can manage tasks outlined in this section.<br />
<br />
# Flag articles with appropriate [[:Category:Template#Article status templates|article status templates]] (e.g. {{Ic|<nowiki>{{Deletion}}</nowiki>}}, {{Ic|<nowiki>{{Out of date}}</nowiki>}}, {{Ic|<nowiki>{{Translateme}}</nowiki>}}, etc.)<br />
# Add content to [[Special:WhatLinksHere/Template:Stub|stubs]] and [[Special:WhatLinksHere/Template:Expansion|expand]] incomplete or poorly-written articles.<br />
# [[Special:WhatLinksHere/Template:Translateme|Add]] or [[Special:WhatLinksHere/Template:Bad translation|improve]] translations; ensure that translations are in sync with each other.<br />
# Reduce and [[Special:WhatLinksHere/Template:Merge|combine]] duplicate pages.<br />
# Correct [[Special:WhatLinksHere/Template:Accuracy|inaccurate]] or [[Special:WhatLinksHere/Template:Out of date|outdated]] content, spelling, grammar, language, and [[Help:Style|style]]. <br />
# Reduce the number of [[Special:Categories|categories]]. Scan the wiki for similar categories that should be combined; improve wiki [[Table of Contents|navigation]].<br />
# [[Special:UncategorizedPages|Categorize uncategorized pages]].<br />
# Add [[Writing Article Overviews|article summary]] boxes to all articles.<br />
# Update the [[FAQ]] with relevant questions from the forum and remove obsolete questions.<br />
<br />
Other useful pages for cleanup:<br />
<br />
* [[ArchWiki:Requests|Requests]]<br />
* [[ArchWiki:Reports|Reports]]<br />
* [[ArchWiki:Spam|Spam]]<br />
* [[Special:BrokenRedirects|Broken redirects]]<br />
* [[Special:DoubleRedirects|Double redirects]]<br />
* [[Special:Shortpages|Short pages]]<br />
<br />
In the long run, the goal is a professional and easily-navigated wiki, such that supplementary guides, documenters, etc. are unnecessary. This is a community effort, but wiki maintenance is often a tedious and thankless task. If you take on the task seriously, a formal position as a wiki maintainer may be in order. This gives the job purpose and recognition.<br />
<br />
==Bugs==<br />
<br />
Opening (and closing) bug reports on the [http://bugs.archlinux.org/ Arch Linux Bugtracker] is one of the possible ways to help the community. However, ineffective use of the bug-tracker can be counter-productive instead of being useful. [[Reporting Bug Guidelines|This article]] will guide anyone wanting to help the community efficiently by reporting or hunting bugs.<br />
<br />
See also: [[Bug Squashing Day]]<br />
<br />
==AUR==<br />
<br />
The [[Arch User Repository]] is a community-driven repository of PKGBUILDs for Arch users. Packages in the AUR are built by the PKGBUILDs and are not pre-built binaries like from the official repositories. The AUR was created to organize and share new packages from the community and to help expedite popular packages' inclusion into the {{ic|[community]}} repository.<br />
<br />
=='Rolling Release' ezine==<br />
<br />
Contribute to [http://rollingrelease.com Rolling Release], the official Arch Linux ezine. It is a community-backed, web-based publication that is always looking for contributers, artists, and the like.<br />
<br />
==Arch projects==<br />
<br />
You can find here the list of git repositories for [http://projects.archlinux.org/ official Arch Projects].<br />
<br />
==Community projects==<br />
<br />
Arch has a vital and active community of software developers and contributing projects. If you have a project you would like to link to, this is a great place to do it. Include a link to your project, the date your project started, and a brief (one or two sentence) description of your project.<br />
<br />
{{Note|All projects listed here are community projects. None of these projects are considered '''''official''''' Arch projects.}}<br />
<!--<br />
#############################################<br />
<br />
Please sort projects alphabetically, breaking-out into additional category pages when needed. Categories should also be alphabetically listed.<br />
<br />
#############################################<br />
--><br />
<br />
====[[Arch Based Distributions]]====<br />
:Other distributions based on Arch Linux<br />
-----<br />
<br />
====[[AUR Helpers]]====<br />
:Utilities to aid end users in using the [[AUR]]<br />
-----<br />
<br />
====[[Pacman GUI Frontends]]====<br />
:Graphical front-ends for [[pacman]]<br />
-----<br />
<br />
====[[Rc.conf GUI Frontends]]====<br />
:Graphical front-ends for [[rc.conf]]<br />
-----<br />
<br />
====Other====<br />
:Projects that do not quite fit into any existing category<br />
<br />
* [[ArchMap]]<br />
:Google Earth Arch user map<br />
<br />
* [http://archaudio.org ArchAudio]<br />
:A third-party package repository and online discussion board for Arch Linux pro-audio users<br />
<br />
* [http://github.com/Arch-Games/arch-games/wiki Arch Linux Gaming Repository]<br />
:A collection of some of the popular games in [unsupported], to save archers compilation time. They've also patched up many broken games that wouldn't compile.<br />
<br />
* [http://archlinux.us ArchLinux.us]<br />
:@archlinux.us emails, Gmail based<br />
<br />
* [http://archlinux.me ArchLinux.me]<br />
:Arch Linux Blogs<br />
<br />
* [http://archlinux.mobi ArchLinux.mobi]<br />
:Mobile access to the @archlinux.us emails<br />
<br />
* [[Namcap Reports]]<br />
:[http://github.com/abhidg/namcap-reports namcap] is an utility for Arch Linux which helps in automatic detection of common mistakes and errors in PKGBUILDs. This page is an automatically generated report obtained after running namcap against the core, extra and community trees.<br />
<br />
* Pacman on OS X]<br />
:Arch-OS X - Package management for OS X via {{ic|pacman}}. [https://bbs.archlinux.org/viewtopic.php?id=70396 Here] is the forum thread.<br />
<br />
* [http://www.github.com/sebnow/parched Parched]<br />
:An ALPM package and PKGBUILD parser in Python<br />
<br />
* [http://xyne.archlinux.ca Xyne's Arch Linux Stuff]<br />
:Xyne's contributions to the Arch Linux community<br />
<br />
==As a developer...==<br />
<br />
Firstly, remember that the main motivation for your work on Arch should be helping the whole community, and not trying to become an ''"Arch developer"'' by any means. Secondly, you are also part of the community; to provide help to others means you will also help yourself.<br />
<br />
{{FAQ<br />
|question=What can I do?<br />
|answer=Here is a list, in no particular order, of things that you may want to do in order to make yourself useful to the community:<br />
<br />
* Establish a reputation as being helpful by offering assistance whenever possible<br />
* Answer questions on the forum, IRC, and mailing lists<br />
* Join the Trusted Users to gain packaging experience to show your skills<br />
* Submit packages to the AUR<br />
* Join one of the offshoot projects that may be incorporated into Arch mainstream someday, or start your own<br />
* Work on pacman, makepkg, initscripts, or other source code and submit patches to the bug tracker<br />
* Traverse the bug tracker and fix existing bugs<br />
* Find and submit new bugs<br />
* Fix wiki errors, add new pages, clean up existing pages, and make sure the procedures are up-to-date<br />
* Help patrolling the Recent Changes in the wiki<br />
* Submit translations}}<br />
<br />
{{FAQ<br />
|question=How can I become an Arch developer?<br />
|answer=Usually, new developers are picked by the existing developers as the workload increases. Sometimes they post a position and you can apply to fill it, but more often, they just invite somebody they know would be good at it and would fit in well with the rest of the team. Having a portfolio of Arch contributions is the best way to make it on the team.}}<br />
<br />
==As an artist...==<br />
<br />
Feel free to share wallpapers, splash screens, color palettes, widgets, themes, etc. with the community on the forum.<br />
<br />
See also: http://www.archlinux.org/art/</div>
Vas
https://wiki.archlinux.org/index.php?title=Arch_compared_to_other_distributions_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=199454
Arch compared to other distributions (Русский)
2012-04-27T14:16:48Z
<p>Vas: corrected translation</p>
<hr />
<div>[[Category:Русский]]<br />
{{i18n|Arch Compared to Other Distributions}}<br />
{{Article summary start}}<br />
{{Article summary text|краткое сравнение Arch Linux с другими популярными дистрибутивами GNU/Linux и BSD.}}<br />
{{Article summary heading|См. также}}<br />
{{Article summary wiki|Arch Linux (Русский)}}<br />
{{Article summary wiki|The Arch Way (Русский)}}<br />
{{Article summary heading|Внешние ссылки}}<br />
{{Article summary link|DistroWatch.com|http://distrowatch.com/}}<br />
{{Article summary end}}<br />
<br />
Эта страница написана с целью показать сходства и различия между Arch и другими популярными дистрибутивами GNU/Linux. Этот вопрос задают очень часто и хорошо было бы иметь стандартный ответ. Тем не менее, учтите: лучший способ сравнить дистрибутивы между собой &mdash; установить и попробовать самому. Текст ниже призван лишь дать достаточно информации, чтобы вы решили, подходит вам Arch или нет.<br />
<br />
==Arch и Gentoo==<br />
Оба эти дистрибутива основаны на системе ''плавающих релизов''. Это приводит к тому, что новые версии пакетов почти сразу становятся доступными в репозиториях.<br />
Поскольку Arch - бинарный дистрибутив, он требует меньше времени на поддержку, чем Gentoo. Gentoo имеет большее количество пакетов и позволяет вам выбирать их версии. Arch позволяет как установку бинарных пакетов, так и сборку их из исходных кодов, и установка пакета, которого нет в репозитории, в Arch гораздо проще. PKGBUILD'ы создавать гораздо проще, чем ebuild'ы. Gentoo - более портируем на различные платформы, поскольку пакеты собираются из исходных текстов под специфическую архитектуру. Arch же разрабатывается только для i686 и x86_64. Не существует убедительного подтверждения, что Gentoo работает быстрее, чем Arch.<br />
<br />
==Arch и Sorcerer/Lunar-linux/Source Mage==<br />
Sorcerer/Lunar-linux/Sourcemage (SLS) - это все дистрибутивы, основанные на сборке из исходных кодов (т.н. source based), очень похожие на Gentoo. Эти дистрибутивы используют простой набор скриптов для создания описания процесса сборки пакета. В них используется глобальный конфигурационный файл для настройки компиляции пакетов, очень похожей на ABS в Arch. Утилиты в SLS совершают проверку зависимостей (включая опциональные) и слежение за пакетами (для удаления и обновления). Для семейства SLS не существует бинарных пакетов, однако, в них легко откатиться на старую версию пакета.<br />
<br />
Установка состоит в извлечении базовой системы (очень похожа на устновку Arch: оптимизация под i686, CLI и меню на ncurses, только базовые утилиты), после чего эту базовую систему можно пересобрать (опционально). Очевидно, что в процессе установки базовой системы не устанавливается никаких оконных сред и даже X-сервера. Однако есть возможность легкой установки одного из нескольких серверов (xorg 6.8/7, xfree86).<br />
<br />
SLS имеют очень сложную историю. Лучшее повествование об этом можно найти здесь: http://wiki.sourcemage.org/Our_History<br />
<br />
Lunar Linux: http://lunar-linux.org/<br />
SourceMage: http://www.sourcemage.org/<br />
Sorcerer: http://sorcerer.berlios.de/<br />
<br />
==Arch и Crux==<br />
Arch Linux изначально произошел от Crux. Джадд однажды описал различия::&quot;Я использовал Crux, прежде чем начать работу над Arch. Arch начинался из Crux. Затем я написал pacman и makepkg, которыми я заменил мои скрипты на bash (для начала я построил Arch из LFS). Вообще, это два отдельных дистрибутива, но технически они во многом схожи. У нас есть официальная поддержка зависимостей, например, однако Crux имеет сообщество, которое предоставляет другие преимущества. prt-get имеет зачатки контроля зависимостей. Crux имеет множество проблем, которые есть и у нас, это очень минималистичный набор пакетов, например.<br />
<br />
==Arch и Rock==<br />
<br />
Из описания http://www.rocklinux.org/wiki/About<br />
<br />
ROCK Linux &mdash; гибкий набор инструментов и деталей для создания дистрибутива Linux, то есть каркас для сборки собственного дистрибутива. Смотрите также наш Бюллетень Задач. Если же вы не планируете собирать свой собственный дистрибутив, а просто заинтересованы в получении хорошего, универсального дистрибутива, то вам стоит обратить внимание на Crystal ROCK. http://www.rocklinux.org/wiki/Crystal_ROCK<br />
<br />
Дистрибутив основан для того чтобы быть инструментом. В сравнении с Arch; те же проблемы связанные с требуемым временем для установки из исходников и т.д. Похоже, что работает на многих типах процессоров таких как SPARC, ARM и т.д.<br />
<br />
==Arch vs T2==<br />
???<br />
<br />
==Arch и графические дистрибутивы==<br />
Все "графические дистрибутивы" имеют множество сходств и Arch очень отличается от любого из них. Arch ориентирован на использование командной строки. Arch &mdash; лучший дистрибутив, если вы действительно хотите изучить Linux. Графические дистрибутивы обычно имеют графические инсталляторы (вроде Anaconda в Fedora Core) и графические же утилиты для конфигурирования системы (вроде YaST в SUSE). Специфические различия между дистрибутивами описаны ниже.<br />
<br />
==Arch и Slackware==<br />
Slackware и Arch - 'простые' дистрибутивы. Оба используют систему инициализации в BSD-стиле. Arch предлагает намного более мощную систему управления пакетами (pacman), которая, в отличие от стандартных утилит Slackware, позволяет производить автоматическое обновление системы. Slackware более консервативен в своем релиз-цикле, предоставляя только стабильные пакеты. Arch значительно более либерален в этом плане. Arch заточен под i686, в то время как Slackware запускается на i486. Arch очень хорош для тех пользователей Slackware, которые нуждаются в хорошем менеджере пакетов и более свежих версиях программ.<br />
<br />
==Arch и Debian==<br />
Arch проще, чем Debian. В Arch'е меньше пакетов. Arch предлагает лучшую поддержку для сборки своих собственных пакетов. Arch более снисходителен к так называемым 'несвободным' ('non-free') пакетам. Arch оптимизирован для i686 и поэтому работает быстрее чем Debian (документальных подтверждений нет). Пакеты Arch гораздо свежее, чем в Debian (current в Arch часто новее, чем Debian testing!).<br />
<br />
==Arch и Ubuntu==<br />
Arch имеет более простую иерархию, чем Ubuntu. Если вы любите компилировать собственные ядра, пробовать свежие программы из CVS или собирать программу из исходников, Arch вам подойдет больше. Если вы хотите быстрого развертывания системы и не хотите изучать ее внутренности, Ubuntu будет лучшим выбором. Вообще, разработчикам и энтузиастам Arch нравится больше, чем Ubuntu.<br />
<br />
==Arch и RPM-дистрибутивы==<br />
RPM пакеты доступны во множестве мест, однако сторонние программы часто имеют проблемы с зависимостями, например, требуют более старые версии библиотек. Еще есть несоответствие между RPM, собранными для Red Hat и RPM, собранными для Mandriva. (Эти сложности у меня возникли, когда я был новичком и использовал Mandrake 8.2). Pacman более мощен и надежен, чем RPM.<br />
<br />
==Arch и Fedora==<br />
Fedora - наследник дистрибутива Red Hat, являющийся в данное время одним из самых популярных дистрибутивов. Следовательно, он имеет большое сообщество и множество готовых пакетов, а также хорошую поддержку. Как и во всех RPM-дистрибутивах, управление пакетами доставляет немало проблем. Fedora включает в себя Yum в качестве фронтэнда к RPM, который самостоятельно скачивает пакеты разрешает зависимости. Fedora всегда содержит множество инноваций и заработала славу интеграцией с SELinux и скомпилированными GCJ Java-программами (что лишает необходимости устанавливать Sun JRE). Fedora не пытается поддерживать mp3 из-за патентных проблем.<br />
<br />
==Arch и Mandriva==<br />
Mandriva (ранее Mandrake) - очень дружественный к пользователю дистрибутив, известный своим инсталлятором, который через некоторое время использования может начать разочаровывать. Основной проблемой является проблема с RPM, описанная ранее. Arch дает больше свободны действий и менее дружественен к пользователю. С ним вы по-настоящему научитесь использовать Linux.<br />
<br />
==Arch и SUSE==<br />
SUSE весь опутан настройщиком YaST, из которого можно сконфигурировать практически все. Arch не предоставляет вам ничего подобного (см. [[Путь_Arch]]). SUSE больше подходит для менее подготовленных пользователей и для тех, кто хочет, чтобы система работала сразу "из коробки", после минимальной настройки. SUSE не предоставляет поддержку mp3 сразу после установки, однако она может быть добавлена через YaST.<br />
<br />
==Arch и Frugalware==<br />
Arch ориентирован на использование утилит командной строки (пользователь должен хотеть учиться). Frugalware &mdash; система, основанная на Slackware. Frugalware предоставляет лучшую поддержку различных языков. Также Frugalware поставляется с большим количеством документации. Frugalware претендует на то, чтобы быть быстрее, чем Arch.<br />
Оба дистрибутива используют pacman. Однако пакеты не очень-то совместимы.</div>
Vas
https://wiki.archlinux.org/index.php?title=Frequently_asked_questions_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=199426
Frequently asked questions (Русский)
2012-04-27T11:39:50Z
<p>Vas: very small correction</p>
<hr />
<div>[[Category:Об ArchLinux (Русский)]]<br />
[[Category:Русский]]<br />
{{i18n|FAQ}}<br />
<br />
Кроме данного FAQ вы можете найти полезными [[Путь Arch|путь Arch Linux]] и [[ArchLinux_(Русский)|про Arch Linux]]. Обе статьи содержат достаточный набор информации об Arch Linux.<br />
<br />
=Общие вопросы=<br />
==В) Что такое Arch Linux?==<br />
'''О)''' См. статью [[ArchLinux_(Русский)|про Arch Linux]].<br />
<br />
==В) Почему мне стоит использовать Arch?==<br />
'''О)''' Если после прочтения статьи [[Путь Arch|путь Arch Linux]] о философии вы пришли к выводу, что подход "сделай сам" вам нравится, и вам нужен простой, компактный, настраиваемый, своевременно обновляемый дистрибутив GNU/Linux &mdash; попробуйте Arch Linux.<br />
<br />
==В) Почему мне не стоит использовать Arch?==<br />
'''О)''' Вам может '''не''' подойти Arch Linux, если:<br />
* после прочтения статьи [[Путь Arch|путь Arch Linux]], вы не согласны с философией развития Arch Linux.<br />
* у вас нет возможностей/времени/желания для использования дистрибутива "сделай сам".<br />
* вам нужна поддержка других архитектур, помимо x86_64 и i686.<br />
* вы занимаете решительную позицию использовать только те дистрибутивы, в состав которых входит исключительно свободное (в определении GNU) ПО.<br />
* вам нужна операционная система, в которой бы все настраивалось автоматически и работало "из коробки", и имеющая в составе носителя полный набор настольного ПО.<br />
* вам не нужны последние версии программных продуктов и дистрибутив с плавающей системой релизов.<br />
* вы вполне довольны используемой в настоящее время ОС.<br />
<br />
==В) На каком дистрибутиве основан Arch? ==<br />
'''О)''' Arch &mdash; независимый дистрибутив, был построен с нуля и не основан ни на одном из других дистрибутивов GNU/Linux. До создания Arch, Джадд Вайнет (Judd Vinet) использовал CRUX, отличный минималистичный дистрибутив, созданный Пиром Лайденом (Per Liden). Изначально основанный на схожих с CRUX идеях, Arch был построен с нуля, а затем был написан [[pacman (Русский)|pacman]].<br />
<br />
==В) Я полный новичок в GNU/Linux. Стоит ли мне использовать Arch?==<br />
'''О)''' Это широко обсуждаемый вопрос. Arch нацелен на относительно опытных пользователей GNU/Linux, но некоторые считают Arch "хорошим местом для старта". Если вы новичок и желаете использовать Arch, имейте ввиду, что вам придется набраться терпения и потратить значительное время на постройку и освоение новой системы, а также принять тот факт, что Arch во многом является "конструктором". Именно пользователь собирает систему и определяет то, какой она должна быть. Перед тем, как задать любой вопрос, проведите собственное исследование проблемы: используйте Google, поиск в Arch Wiki, FAQ, и на официальном форуме. Также примите во внимание, что большинство людей не любит отвечать снова и снова на одни и те же вопросы начинающих пользователей, именно по этой причине были созданы вышеуказанные информационные ресурсы, на наполнение которых ушли тысячи человеко-часов добровольного труда.<br />
<br />
Рекомендуем прочесть: [[Beginners Guide (Русский)|Руководство для начинающих]].<br />
<br />
==В) Arch требует слишком большого количества усилий и времени на установку и использование. Также, сообщество в ответ на мои вопросы отсылает меня к документации.==<br />
'''О)''' Arch рассчитан на специфическую аудиторию. Может быть, он просто не для вас.<br />
<br />
==В) Является ли Arch серверным дистрибутивом? Или он оптимизирован для ПК/рабочих станций?==<br />
'''О)''' Arch не является узкоспециализированным дистрибутивом. Скорее можно сказать, что он создан под определенного вида пользователей &mdash; опытных пользователей Linux, которым подходит принцип "сделай сам", и которые используют его для оптимизации и "допиливания" системы под собственные нужды. Таким образом, в руках представителя целевой аудитории Arch может быть использован практически для любых задач. Многие используют Arch на ПК и рабочих станциях, и, конечно archlinux.org работает на Arch'е.<br />
<br />
==В) Мне действительно нравится Arch, вот только команде разработчиков нужно реализовать то-то.==<br />
'''О)''' Для начала, &mdash; прочли ли вы статью [[The Arch Way (Русский)|Путь Arch]]? Предоставили ли вы способ реализации нужной возможности или решение проблемы? Соответствует ли ваш запрос принципам ''минимализма'' и принципу ''корректность кода прежде удобства''? Присоединяйтесь, внесите свой вклад в виде программного кода или решений. Если он будет хорошо принят сообществом и командой разработчиков, то, возможно, ваш код войдет в состав дистрибутива.<br />
<br />
==В) Когда будет выпущен новый релиз?==<br />
'''О)''' Релизы Arch Linux во многом являются срезами текущего состояния репозитория ''/core'' с добавлением различных новых возможностей и модификаций установочного скрипта. Модель плавающих релизов позволяет поддерживать Arch Linux в максимально современном состоянии.<br />
<br />
По этой причине, выпуск релизов не является очень важным для Arch, так как система плавающих релизов делает новый релиз устаревшим после обновления какого-либо пакета. Если вам нужно получить последний релиз Arch Linux, то необходимости в переустановке нет. Просто запустите команду {{ic|pacman -Syu}} и ваша система будет соответствовать свежеустановленной.<br />
<br />
Новые релизы Arch Linux обычно не содержат новых потрясающих возможностей. Новые потрясающие возможности могут появиться с выпуском новых пакетов, которые могут быть мгновенно получены через {{ic|pacman -Syu}}.<br />
<br />
==В) Является ли Arch Linux стабильным дистрибутивом? Или мне ждать регулярных проблем?==<br />
'''О)''' Arch Linux является стабильным ровно настолько, насколько сделаете его стабильным ''вы''.<br />
<br />
''Вы'' занимаетесь сборкой системы на базе Arch поверх базовой среды и именно ''вы'' контролируете системные обновления. Очевидно, что более крупная и сложная система, включающий множество пакетов, многочисленные инструменты и окружения рабочего стола, вероятно, будет испытывать больше проблем с конфигурацией из-за изменений, сделанных разработчиком, чем легковесная, более простая система. Arch ориентирован на способных, активных пользователей. Общая осведомленность в вопросах администрирования UNIX-систем также играет большую роль в получении стабильной системы на базе Arch. Напомним также, что пакеты Arch представлены, в основном, в исходном виде, без каких-либо дополнительных патчей, поэтому источник большинства проблем с приложениями находится непосредственно в изначальном исходном коде.<br />
<br />
Таким образом, в системе с плавающими релизами именно пользователь несет ответственность за общую стабильность системы. Пользователь решает, когда именно нужно произвести обновление. Если пользователь обращается к сообществу за помощью, ее предоставят достаточно быстро. Разница между Arch и другими дистрибутивами состоит в том, что Arch является настоящим дистрибутивом в стиле "сделай сам"; простые жалобы на поломки являются ошибочными и непродуктивными, поскольку изменения, сделанные в исходных кодах разработчиком не входят в сферу ответственности разработчиков Arch.<br />
<br />
==В) Что собой представляет BSD-подобная init-система?==<br />
'''О)''' Частью наследия BSD является реализованная в них простая init-система. Основное различие между BSD init'ом и SysV init'ом состоит в том, что BSD-подобный init в Arch использует всего одну строку в едином файле {{ic|/etc/rc.conf}} для указания на запускаемые из единого каталога {{ic|/etc/rc.d/}} скрипты для всех системных сервисов, вне зависимости от runlevel'а.<br />
<br />
Init в SysV, с другой стороны, использует систему с несколькими каталогами (обычно 7 по умолчанию), по одному на каждый runlevel: {{ic|/etc/rc.0,1,2,3,4,5,6}}. Каждый каталог содержит большое количество символических ссылок, по одной на каждый сервис. Каждая ссылка указывает на соответствующий скрипт в каталоге {{ic|/etc/init.d/}}. Вряд ли стоит объяснять, что SysV init является более сложным, так как в каждом каталоге {{ic|/etc/rc.0,1,2,3,4,5,6}} находятся десятки ссылок в дополнение к скриптам запуска из каталога {{ic|/etc/init.d/}}.<br />
В соответствии со своей философией минимализма Arch Linux использует BSD-подобный init.<br />
<br />
==В) Arch нужно больше освещения в прессе (в т.ч. и рекламы)==<br />
'''О)''' Arch и так получает достаточно прессы. Цель Arch Linux не в разрастании проекта, а в сохранении минималистичного и современного дистрибутива, основанного на простоте и корректности кода. Органичный, устойчивый рост происходит сам собой в среде пользователей.<br />
<br />
==В) Arch'у нужно больше разработчиков==<br />
'''О)''' Возможно. Не стесняйтесь пожертвовать свое собственное время! Почитайте [http://bbs.archlinux.org форумы], [[IRC_Channel|IRC каналы]], и [http://mailman.archlinux.org/mailman/listinfo/ почтовые рассылки] &mdash; посмотрите, какие задачи требуют решения. Вовлечение в работу сообщества &mdash; хороший способ начать что-то делать.<br />
<br />
==В) Почему Arch такой медленный? Программы запускаются медленно или не запускаются совсем!==<br />
'''О)''' Убедитесь, что у вас правильно настроено имя хоста в файле {{ic|/etc/hosts}}, оно должно совпадать с именем в {{ic|/etc/rc.conf}}. Загляните в раздел "Конфигурирование системы" [[Beginners' Guide (Русский)#.D0.9A.D0.BE.D0.BD.D1.84.D0.B8.D0.B3.D1.83.D1.80.D0.B8.D1.80.D0.BE.D0.B2.D0.B0.D0.BD.D0.B8.D0.B5_.D1.81.D0.B8.D1.81.D1.82.D0.B5.D0.BC.D1.8B|Руководства для начинающих]]. Если имена хостов не совпадают, некоторые приложения могут запускаться очень долго.<br />
<br />
==В) Почему у меня такая низкая скорость соединения с интернетом по сравнению с другими ОС?==<br />
'''О)''' Правильно ли у вас настроена сеть? Проверьте параметры в файлах {{ic|/etc/rc.conf}}, {{ic|/etc/hosts}} и {{ic|/etc/resolv.conf}}. Загляните в раздел "Конфигурирование системы" [[Beginners' Guide (Русский)#.D0.9A.D0.BE.D0.BD.D1.84.D0.B8.D0.B3.D1.83.D1.80.D0.B8.D1.80.D0.BE.D0.B2.D0.B0.D0.BD.D0.B8.D0.B5_.D1.81.D0.B8.D1.81.D1.82.D0.B5.D0.BC.D1.8B|Руководства для начинающих]].<br />
<br />
==В) Почему Arch использует всю оперативную память?==<br />
'''О)''' Строго говоря, если у вас есть неиспользуемая память, то она напрасно простаивает.<br />
<br />
Многие начинающие пользователи обращают внимание на то, что ядро Linux непривычно для них обращается с памятью. Так как доступ к данным в оперативной памяти осуществляется намного быстрее, чем к диску, ядро кэширует часто используемые данные в памяти. Кэш очищается только при нехватке свободной памяти для новых данных.<br />
<br />
Самым популярным способом разобраться в этом недоразумении является команда {{ic|free}}:<br />
<br />
{{hc|$ free -m|<nowiki> total used free shared buffers cached<br />
Mem: 1009 741 267 0 104 359<br />
-/+ buffers/cache: 278 731<br />
Swap: 1537 0 1537</nowiki>}}<br />
<br />
Обратите внимание, что строка {{ic|-/+ buffers/cache:}} отображает объем памяти, находящейся в активном использовании и объем доступной памяти, вместо неиспользуемой.<br />
<br />
В вышеприведенном примере ноутбук с 1ГБ оперативной памяти использует из нее 741МБ, при этом не запущено ничего, за исключением пары терминалов и веб-браузера. Но из значений в вышеупомянутой строке следует, что только 278МБ находится в активном использовании, а 731МБ являются доступными для приложений. Очевидно, 104МБ+359МБ этой используемой памяти используются для кэширования дисковой подсистемы, и этот кэш может быть очищен при необходимости.<br />
<br />
Результат? Высокая производительность!<br />
<br />
См. [http://www.linuxjournal.com/article/2770 эту статью], если этот момент с управлением памятью в Linux вам интересен.<br />
<br />
==В) Куда ушло свободное место на диске?==<br />
'''О)''' Ответ на данный вопрос зависит от вашей системы. Существует множество [[Common Applications#Disk Usage Display Programs|отличных утилит]], которые вам помогут.<br />
<br />
=Управление пакетами=<br />
==В) Что внутри пакета X?==<br />
<br />
Это можно узнать при с помощью pkgfile (из пакета {{Pkg|pkgtools}}).<br />
<br />
Пример:<br />
{{hc|$ pkgfile glxinfo|extra/mesa-demos}}<br />
<br />
==В) Я нашел ошибку в пакете X. Что мне делать?==<br />
'''О)''' Прежде всего нужно выяснить, может ли быть эта ошибка исправлена командой разработчиков Arch. Иногда это не так (например, за проблему с падением браузера Firefox отвечают разработчики Mozilla Foundation), что называется "ошибкой в исходных текстах" (''upstream error''). Если проблема связана с Arch, то вот несколько шагов, которые можно предпринять:<br />
#Поищите информацию на форумах. Обратите внимание, сталкивался ли кто-нибудь еще с аналогичной ошибкой.<br />
#Отправьте [[Reporting Bug Guidelines (Русский)|сообщение об ошибке (баг-репорт)]] с подробной информацией на http://bugs.archlinux.org.<br />
#При желании можно описать проблему на форуме, не забыв указать, что вы уже отправили баг-репорт. Это поможет другим людям не дублировать сообщение об одной и той же ошибке.<br />
<br />
==В) В Arch следует использовать другое расширение для файлов с пакетами: .pkg.tar.gz и .pkg.tar.xz - это слишком длинно и запутанно.==<br />
'''О)''' Это обсуждалось в списках рассылки Arch. Кто-то предлагал расширение .pac. Но на сегодняшний день никаких планов по смене расширения для пакетов.<br />
Как отметил один из разработчиков Arch Тобиас Кислих (Tobias Kieslich): "Пакет '''является''' упакованым в gzip [xz] архивом tar! И он может быть распакован, изучен и подвергнут необходимым изменениям при помощи любого ПО. Более того, данный mime-type распознается большинством приложений."<br />
<br />
==В) Pacman нуждается в библиотеке для предоставления другим приложениям доступа к информации о пакетах ==<br />
'''О)''' Начиная с версии 3.0.0 pacman является фронтендом к libalpm, библиотеке управления пакетами Arch. Данная библиотека дает возможность создания альтернативных фронтендов (например, GUI-фронтендов).<br />
<br />
==В) Почему у Pacman'а нет официального GUI-фронтенда?==<br />
'''О)''' Прочтите, пожалуйста, статьи [[The Arch Way (Русский)]] и [[Arch Linux (Русский)]]. Ответ заключается в том, что команда разработчиков Arch не будет заниматься созданием такого фронтенда. Вы можете использовать любой из GUI-фронтендов, разработанных пользователями. См. список в статье [[Pacman GUI Frontends]].<br />
<br />
==В) В Pacman нужна ''"возможность X"!''==<br />
'''О)''' Прочтите, пожалуйста, статьи [[The Arch Way (Русский)]] и [[Arch Linux (Русский)]]. Философия Arch &mdash; "не умножай сущностей без необходимости". Если вы считаете, что ваша идея заслуживает внимания и не противоречит этой философии, то вы можете обсудить ее на [http://bbs.archlinux.org/ данном форуме]. Также можно заглянуть на [http://bugs.archlinux.org баг-трекер], на котором публикуются запросы новых возможностей, если они действительно необходимы.<br />
Но все же, лучшим способом добавить какую-либо возможность в Pacman или Arch Linux является самостоятельная ее реализация. Возможно, ваш код и не будет принят официально, но другие пользователи помогут вам в разработке и тестировании.<br />
<br />
==В) Arch нуждается в форке со стабильными пакетами==<br />
См. [http://www.archserver.org/ ArchServer].<br />
<br />
{{Note|1=Начиная с 12.09.2011 проект ArchServer официально объявлен мертвым. Подробности - [http://www.archserver.org/index.php?mact=News,cntnt01,detail,0&cntnt01articleid=52&cntnt01origid=15&cntnt01returnid=22 тут].}}<br />
<br />
==В) В чем разница между всеми этими репозиториями?==<br />
'''О)''' См. [[Official Repositories (Русский)]].<br />
<br />
==В) Я только что установил пакет X. Как его запустить?==<br />
'''О)''' Если вы используете среды рабочего стола [[KDE]] или [[GNOME]], то программа автоматически появится в вашем меню. Если вы хотите запустить программу в терминале и не знаете имени исполняемого файла, попробуйте запустить {{ic|<nowiki>pacman -Ql имя_пакета | grep bin</nowiki>}}. Распространённой проблемой с такими пакетами, как Firefox или OPenOffice является то, что они устанавливаются в {{ic|/opt}}, который не находится в переменной окружения {{ic|$PATH}} - вы можете выполнить {{ic|source /etc/profile}} или перелогиниться для исправления этой проблемы.<br />
<br />
==В) Почему в репозиториях есть только одна версия каждой библиотеки? ==<br />
'''О)''' Некоторые дистрибутивы, например, Debian, имеют несколько версий пакетов с разделяемыми библиотеками: {{ic|libfoo1}}, {{ic|libfoo2}}, {{ic|libfoo3}} и так далее. В этом случае становится возможным одновременно использовать приложения, скомпилированные с поддержкой разных версий такой библиотеки.<br />
<br />
В отличие от Debian, Arch является дистрибутивом с плавающими релизами и максимально современными версиями пакетов. Наиболее заметным преимуществом такого дистрибутива является наличие последних версий ПО в репозиториях. В случае Arch это означает еще и то, что официально поддерживаются только последние версии всех пакетов. Избавляя от поддержки устаревшего ПО, разработчики пакетов имеют в распоряжении больше времени для проверки работоспособности последних версий. Как только выходит последняя версия библиотеки, она тут же добавляется в репозитории и все зависящие от нее пакеты пересобираются.<br />
<br />
==В) Что будет, если я запущу {{ic|pacman -Syu}} и произойдет обновление библиотеки, но не будет обновлений для приложений, использующих её? ==<br />
'''О)''' Подобный сценарий вообще не должен случиться. Предположим, что приложение {{ic|foobaz}} находится в одном из официальных репозиториев и собрано с поддержкой новой версии библиотеки {{ic|libbaz}}. В этом случае оно будет обновлено вместе с библиотекой {{ic|libbaz}}. Если приложение не собрано с поддержкой новой библиотеки, то пакет {{ic|foobaz}} будет иметь версионную зависимость, например<br />
libbaz=1.5<br />
и будет удален pacman'ом при обновлении {{ic|libbaz}} из-за конфликта.<br />
<br />
Если {{ic|foobaz}} &mdash; пакет, собранный вами из исходников или установленный из AUR, то вам следует попробовать пересобрать {{ic|foobaz}} с поддержкой новой версии {{ic|libbaz}}. Если сборка пройдет неудачно, сообщите об ошибке разработчикам {{ic|foobaz}}.<br />
<br />
==В) Возможна ли ситуация, в которой произойдет обновление ядра в репозитории, но некоторые пакеты с драйверами не будут иметь обновлений для нового ядра?==<br />
'''О)''' Нет, подобная ситуация невозможна. Крупные обновления ядра, например с {{ic|2.6.x}} до {{ic|2.6.x+1}} всегда сопровождаются пересборкой всех зависимых от ядра пакетов. В то же время, если у вас есть неподдерживаемый пакет, например, {{AUR|catalyst}}, то обновление ядра приведет к неработоспособности этого пакета, что может быть исправлено его ручной пересборкой. Ответственность за обновление неподдерживаемых пакетов несут пользователи.<br />
<br />
==В) Использует ли Arch подпись пакетов?==<br />
'''О)''' Да. Подпись пакетов [[pacman]] существует начиная с 4-ой версии. См. [[package signing]] для дополнительной информации.<br />
<br />
=Установка=<br />
==В) Arch нуждается в лучшем инсталляторе, возможно, графическом.==<br />
'''О)''' Вопрос "лучшего" инсталлятора является субъективным. Лучшим способом решения подобных споров является приведение инсталлятора к виду, соответствующему [[The Arch Way (Русский)|философии Arch]]. Если предложения об улучшении инсталлятора подкреплены весомыми аргументами, то их примут во внимание при дальнейшей разработке. Поскольку установка системы с нуля &mdash; явление нечастое (см. вопрос о плавающих релизах), то улучшение инсталлятора не является высокоприоритетным для пользователей или разработчиков. Попробуйте использовать [[archiso]] или [[larch]] [http://larch.berlios.de/].<br />
<br />
==В) Я установил Arch и вижу командную строку bash с предложением ввести логин. Что делать дальше?==<br />
'''О)''' Теперь самое время почитать статью [[Beginners' Guide (Русский)|Быстрый старт]].<br />
<br />
==В) Какую среду рабочего стола или оконный менеджер мне следует использовать?==<br />
'''О)''' Доступных вариантов много, используйте тот, который лучше всего подойдет для ваших задач. См. статью [[Desktop_Environment|Среды рабочего стола]].<br />
<br />
==В) Что делает Arch уникальным среди других минималистичных дистрибутивов?==<br />
'''О)''' Некоторые дистрибутивы также могут обеспечивать минималистичные способы установки, разделяя их с дургими аспектами процесса установки Arch. Однако, стоит обратить внимание на некоторые моменты:<br />
# Arch изначально разрабатывался как легковесная минималистичная базовая среда, служащая фундаментом для расширения системы.<br />
# Вне зависимости от того, какой образ, ''Netinstall'' или ''Core'' используется, ''единственным'' способом установки Arch является ручная постройка из минимальной базовой среды.<br />
# Инсталлятор, базовая система и весь дистрибутив отвечают принципу "не умножай сущностей без необходимости" (keep it simple, stupid), что делает Arch идеально подходящим для целевой аудитории.<br />
# Система пакетов Arch разработана с учетом минимальных зависимостей. Необязательные пакеты никогда не устанавливаются автоматически.<br />
# Arch обеспечивает качественную, максимально полную документацию по построению системы.<br />
<br />
=Прочее=<br />
==В) Каждый раз при использовании pacman я получаю ошибку: 'warning: current locale is invalid; using default "C" locale'. Что мне делать?==<br />
'''О)''' Из данного сообщения следует, что у вас неправильно настроена локаль. Посмотрите страницу [[Configuring locales (Русский)|настройка локализации]].<br />
<br />
==В) Как подключиться к беспроводной сети?==<br />
'''О)''' См. [[Wireless Setup]].<br />
<br />
==В) Как подключиться к проводной сети?==<br />
'''О)''' См. [[Configuring Network]].<br />
<br />
==В) Что такое AUR?==<br />
'''О)''' См. [[Arch User Repository#FAQ]].<br />
<br />
==В) Почему экран становится зеленым, когда я пытаюсь посмотреть видео?==<br />
'''О)''' Возможно, у вас неправильно настроена глубина цвета. Нужно установить глубину цвета 24 бит вместо 16-ти, например.<br />
<br />
==В) Проверка орфографии выделяет весь мой текст, как ошибочный!==<br />
'''О)''' Установлен ли у вас словарь {{ic|aspell}}? Запустите {{ic|pacman -Ss aspell}} для просмотра всех доступных для загрузки словарей. Если установка словарей aspell не решает этой проблемы, то возможно, есть проблема с {{ic|enchant}}. Во-первых, проверьте, о каких словарных файлах известно aspell'у, при помощи команды {{ic|aspell dicts}}:<br />
$ aspell dicts<br />
Вывод:<br />
en<br />
en_GB<br />
...и т.п.<br />
<br />
Если словарь с нужным вам языком есть в списке, добавьте следующую строку в {{ic|/usr/share/enchant/enchant.ordering}}:<br />
language:aspell<br />
en_GB:aspell # Example</div>
Vas
https://wiki.archlinux.org/index.php?title=Frequently_asked_questions_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=199425
Frequently asked questions (Русский)
2012-04-27T11:38:58Z
<p>Vas: corrected translation, the article is up-to-date</p>
<hr />
<div>[[Category:Об ArchLinux (Русский)]]<br />
[[Category:Русский]]<br />
{{i18n|FAQ}}<br />
<br />
Кроме данного FAQ вы можете найти полезными [[Путь Arch|путь Arch Linux]] и [[ArchLinux_(Русский)|про Arch Linux]]. Обе статьи содержат достаточный набор информации об Arch Linux.<br />
<br />
=Общие вопросы=<br />
==В) Что такое Arch Linux?==<br />
'''О)''' См. статью [[ArchLinux_(Русский)|про Arch Linux]].<br />
<br />
==В) Почему мне стоит использовать Arch?==<br />
'''О)''' Если после прочтения статьи [[Путь Arch|путь Arch Linux]] о философии вы пришли к выводу, что подход "сделай сам" вам нравится, и вам нужен простой, компактный, настраиваемый, своевременно обновляемый дистрибутив GNU/Linux &mdash; попробуйте Arch Linux.<br />
<br />
==В) Почему мне не стоит использовать Arch?==<br />
'''О)''' Вам может '''не''' подойти Arch Linux, если:<br />
* после прочтения статьи [[Путь Arch|путь Arch Linux]], вы не согласны с философией развития Arch Linux.<br />
* у вас нет возможностей/времени/желания для использования дистрибутива "сделай сам".<br />
* вам нужна поддержка других архитектур, помимо x86_64 и i686.<br />
* вы занимаете решительную позицию использовать только те дистрибутивы, в состав которых входит исключительно свободное (в определении GNU) ПО.<br />
* вам нужна операционная система, в которой бы все настраивалось автоматически и работало "из коробки", и имеющая в составе носителя полный набор настольного ПО.<br />
* вам не нужны последние версии программных продуктов и дистрибутив с плавающей системой релизов.<br />
* вы вполне довольны используемой в настоящее время ОС.<br />
<br />
==В) На каком дистрибутиве основан Arch? ==<br />
'''О)''' Arch &mdash; независимый дистрибутив, был построен с нуля и не основан ни на одном из других дистрибутивов GNU/Linux. До создания Arch, Джадд Вайнет (Judd Vinet) использовал CRUX, отличный минималистичный дистрибутив, созданный Пиром Лайденом (Per Liden). Изначально основанный на схожих с CRUX идеях, Arch был построен с нуля, а затем был написан [[pacman (Русский)|pacman]].<br />
<br />
==В) Я полный новичок в GNU/Linux. Стоит ли мне использовать Arch?==<br />
'''О)''' Это широко обсуждаемый вопрос. Arch нацелен на относительно опытных пользователей GNU/Linux, но некоторые считают Arch "хорошим местом для старта". Если вы новичок и желаете использовать Arch, имейте ввиду, что вам придется набраться терпения и потратить значительное время на постройку и освоение новой системы, а также принять тот факт, что Arch во многом является "конструктором". Именно пользователь собирает систему и определяет то, какой она должна быть. Перед тем, как задать любой вопрос, проведите собственное исследование проблемы: используйте Google, поиск в Arch Wiki, FAQ, и на официальном форуме. Также примите во внимание, что большинство людей не любит отвечать снова и снова на одни и те же вопросы начинающих пользователей, именно по этой причине были созданы вышеуказанные информационные ресурсы, на наполнение которых ушли тысячи человеко-часов добровольного труда.<br />
<br />
Рекомендуем прочесть: [[Beginners Guide (Русский)|Руководство для начинающих]].<br />
<br />
==В) Arch требует слишком большого количества усилий и времени на установку и использование. Также, сообщество в ответ на мои вопросы отсылает меня к документации.==<br />
'''О)''' Arch рассчитан на специфическую аудиторию. Может быть, он просто не для вас.<br />
<br />
==В) Является ли Arch серверным дистрибутивом? Или он оптимизирован для ПК/рабочих станций?==<br />
'''О)''' Arch не является узкоспециализированным дистрибутивом. Скорее можно сказать, что он создан под определенного вида пользователей &mdash; опытных пользователей Linux, которым подходит принцип "сделай сам", и которые используют его для оптимизации и "допиливания" системы под собственные нужды. Таким образом, в руках представителя целевой аудитории Arch может быть использован практически для любых задач. Многие используют Arch на ПК и рабочих станциях, и, конечно archlinux.org работает на Arch'е.<br />
<br />
==В) Мне действительно нравится Arch, вот только команде разработчиков нужно реализовать то-то.==<br />
'''О)''' Для начала, &mdash; прочли ли вы статью [[The Arch Way (Русский)|Путь Arch]]? Предоставили ли вы способ реализации нужной возможности или решение проблемы? Соответствует ли ваш запрос принципам ''минимализма'' и принципу ''корректность кода прежде удобства''? Присоединяйтесь, внесите свой вклад в виде программного кода или решений. Если он будет хорошо принят сообществом и командой разработчиков, то, возможно, ваш код войдет в состав дистрибутива.<br />
<br />
==В) Когда будет выпущен новый релиз?==<br />
'''О)''' Релизы Arch Linux во многом являются срезами текущего состояния репозитория ''/core'' с добавлением различных новых возможностей и модификаций установочного скрипта. Модель плавающих релизов позволяет поддерживать Arch Linux в максимально современном состоянии.<br />
<br />
По этой причине, выпуск релизов не является очень важным для Arch, так как система плавающих релизов делает новый релиз устаревшим после обновления какого-либо пакета. Если вам нужно получить последний релиз Arch Linux, то необходимости в переустановке нет. Просто запустите команду {{ic|pacman -Syu}} и ваша система будет соответствовать свежеустановленной.<br />
<br />
Новые релизы Arch Linux обычно не содержат новых потрясающих возможностей. Новые потрясающие возможности могут появиться с выпуском новых пакетов, которые могут быть мгновенно получены через {{ic|pacman -Syu}}.<br />
<br />
==В) Является ли Arch Linux стабильным дистрибутивом? Или мне ждать регулярных проблем?==<br />
'''О)''' Arch Linux является стабильным ровно настолько, насколько сделаете его стабильным ''вы''.<br />
<br />
''Вы'' занимаетесь сборкой системы на базе Arch поверх базовой среды и именно ''вы'' контролируете системные обновления. Очевидно, что более крупная и сложная система, включающий множество пакетов, многочисленные инструменты и окружения рабочего стола, вероятно, будет испытывать больше проблем с конфигурацией из-за изменений, сделанных разработчиком, чем легковесная, более простая система. Arch ориентирован на способных, активных пользователей. Общая осведомленность в вопросах администрирования UNIX-систем также играет большую роль в получении стабильной системы на базе Arch. Напомним также, что пакеты Arch представлены, в основном, в исходном виде, без каких-либо дополнительных патчей, поэтому источник большинства проблем с приложениями находится непосредственно в изначальном исходном коде.<br />
<br />
Таким образом, в системе с плавающими релизами именно пользователь несет ответственность за общую стабильность системы. Пользователь решает, когда именно нужно произвести обновление. Если пользователь обращается к сообществу за помощью, ее предоставят достаточно быстро. Разница между Arch и другими дистрибутивами состоит в том, что Arch является настоящим дистрибутивом в стиле "сделай сам"; простые жалобы на поломки являются ошибочными и непродуктивными, поскольку изменения, сделанные в исходных кодах разработчиком не входят в сферу ответственности разработчиков Arch.<br />
<br />
==В) Что собой представляет BSD-подобная init-система?==<br />
'''О)''' Частью наследия BSD является реализованная в них простая init-система. Основное различие между BSD init'ом и SysV init'ом состоит в том, что BSD-подобный init в Arch использует всего одну строку в едином файле {{ic|/etc/rc.conf}} для указания на запускаемые из единого каталога {{ic|/etc/rc.d/}} скрипты для всех системных сервисов, вне зависимости от runlevel'а.<br />
<br />
Init в SysV, с другой стороны, использует систему с несколькими каталогами (обычно 7 по умолчанию), по одному на каждый runlevel: {{ic|/etc/rc.0,1,2,3,4,5,6}}. Каждый каталог содержит большое количество символических ссылок, по одной на каждый сервис. Каждая ссылка указывает на соответствующий скрипт в каталоге {{ic|/etc/init.d/}}. Вряд ли стоит объяснять, что SysV init является более сложным, так как в каждом каталоге {{ic|/etc/rc.0,1,2,3,4,5,6}} находятся десятки ссылок в дополнение к скриптам запуска из каталога {{ic|/etc/init.d/}}.<br />
В соответствии со своей философией минимализма Arch Linux использует BSD-подобный init.<br />
<br />
==В) Arch нужно больше освещения в прессе (в т.ч. и рекламы)==<br />
'''О)''' Arch и так получает достаточно прессы. Цель Arch Linux не в разрастании проекта, а в сохранении минималистичного и современного дистрибутива, основанного на простоте и корректности кода. Органичный, устойчивый рост происходит сам собой в среде пользователей.<br />
<br />
==В) Arch'у нужно больше разработчиков==<br />
'''О)''' Возможно. Не стесняйтесь пожертвовать свое собственное время! Почитайте [http://bbs.archlinux.org форумы], [[IRC_Channel|IRC каналы]], и [http://mailman.archlinux.org/mailman/listinfo/ почтовые рассылки] &mdash; посмотрите, какие задачи требуют решения. Вовлечение в работу сообщества &mdash; хороший способ начать что-то делать.<br />
<br />
==В) Почему Arch такой медленный? Программы запускаются медленно или не запускаются совсем!==<br />
'''О)''' Убедитесь, что у вас правильно настроено имя хоста в файле {{ic|/etc/hosts}}, оно должно совпадать с именем в {{ic|/etc/rc.conf}}. Загляните в раздел "Конфигурирование системы" [[Beginners' Guide (Русский)#.D0.9A.D0.BE.D0.BD.D1.84.D0.B8.D0.B3.D1.83.D1.80.D0.B8.D1.80.D0.BE.D0.B2.D0.B0.D0.BD.D0.B8.D0.B5_.D1.81.D0.B8.D1.81.D1.82.D0.B5.D0.BC.D1.8B|Руководства для начинающих]]. Если имена хостов не совпадают, некоторые приложения могут запускаться очень долго.<br />
<br />
==В) Почему у меня такая низкая скорость соединения с интернетом по сравнению с другими ОС?==<br />
'''О)''' Правильно ли у вас настроена сеть? Проверьте параметры в файлах {{ic|/etc/rc.conf}}, {{ic|/etc/hosts}} и {{ic|/etc/resolv.conf}}. Загляните в раздел "Конфигурирование системы" [[Beginners' Guide (Русский)#.D0.9A.D0.BE.D0.BD.D1.84.D0.B8.D0.B3.D1.83.D1.80.D0.B8.D1.80.D0.BE.D0.B2.D0.B0.D0.BD.D0.B8.D0.B5_.D1.81.D0.B8.D1.81.D1.82.D0.B5.D0.BC.D1.8B|Руководства для начинающих]].<br />
<br />
==В) Почему Arch используюет всю оперативную память?==<br />
'''О)''' Строго говоря, если у вас есть неиспользуемая память, то она напрасно простаивает.<br />
<br />
Многие начинающие пользователи обращают внимание на то, что ядро Linux непривычно для них обращается с памятью. Так как доступ к данным в оперативной памяти осуществляется намного быстрее, чем к диску, ядро кэширует часто используемые данные в памяти. Кэш очищается только при нехватке свободной памяти для новых данных.<br />
<br />
Самым популярным способом разобраться в этом недоразумении является команда {{ic|free}}:<br />
<br />
{{hc|$ free -m|<nowiki> total used free shared buffers cached<br />
Mem: 1009 741 267 0 104 359<br />
-/+ buffers/cache: 278 731<br />
Swap: 1537 0 1537</nowiki>}}<br />
<br />
Обратите внимание, что строка {{ic|-/+ buffers/cache:}} отображает объем памяти, находящейся в активном использовании и объем доступной памяти, вместо неиспользуемой.<br />
<br />
В вышеприведенном примере ноутбук с 1ГБ оперативной памяти использует из нее 741МБ, при этом не запущено ничего, за исключением пары терминалов и веб-браузера. Но из значений в вышеупомянутой строке следует, что только 278МБ находится в активном использовании, а 731МБ являются доступными для приложений. Очевидно, 104МБ+359МБ этой используемой памяти используются для кэширования дисковой подсистемы, и этот кэш может быть очищен при необходимости.<br />
<br />
Результат? Высокая производительность!<br />
<br />
См. [http://www.linuxjournal.com/article/2770 эту статью], если этот момент с управлением памятью в Linux вам интересен.<br />
<br />
==В) Куда ушло свободное место на диске?==<br />
'''О)''' Ответ на данный вопрос зависит от вашей системы. Существует множество [[Common Applications#Disk Usage Display Programs|отличных утилит]], которые вам помогут.<br />
<br />
=Управление пакетами=<br />
==В) Что внутри пакета X?==<br />
<br />
Это можно узнать при с помощью pkgfile (из пакета {{Pkg|pkgtools}}).<br />
<br />
Пример:<br />
{{hc|$ pkgfile glxinfo|extra/mesa-demos}}<br />
<br />
==В) Я нашел ошибку в пакете X. Что мне делать?==<br />
'''О)''' Прежде всего нужно выяснить, может ли быть эта ошибка исправлена командой разработчиков Arch. Иногда это не так (например, за проблему с падением браузера Firefox отвечают разработчики Mozilla Foundation), что называется "ошибкой в исходных текстах" (''upstream error''). Если проблема связана с Arch, то вот несколько шагов, которые можно предпринять:<br />
#Поищите информацию на форумах. Обратите внимание, сталкивался ли кто-нибудь еще с аналогичной ошибкой.<br />
#Отправьте [[Reporting Bug Guidelines (Русский)|сообщение об ошибке (баг-репорт)]] с подробной информацией на http://bugs.archlinux.org.<br />
#При желании можно описать проблему на форуме, не забыв указать, что вы уже отправили баг-репорт. Это поможет другим людям не дублировать сообщение об одной и той же ошибке.<br />
<br />
==В) В Arch следует использовать другое расширение для файлов с пакетами: .pkg.tar.gz и .pkg.tar.xz - это слишком длинно и запутанно.==<br />
'''О)''' Это обсуждалось в списках рассылки Arch. Кто-то предлагал расширение .pac. Но на сегодняшний день никаких планов по смене расширения для пакетов.<br />
Как отметил один из разработчиков Arch Тобиас Кислих (Tobias Kieslich): "Пакет '''является''' упакованым в gzip [xz] архивом tar! И он может быть распакован, изучен и подвергнут необходимым изменениям при помощи любого ПО. Более того, данный mime-type распознается большинством приложений."<br />
<br />
==В) Pacman нуждается в библиотеке для предоставления другим приложениям доступа к информации о пакетах ==<br />
'''О)''' Начиная с версии 3.0.0 pacman является фронтендом к libalpm, библиотеке управления пакетами Arch. Данная библиотека дает возможность создания альтернативных фронтендов (например, GUI-фронтендов).<br />
<br />
==В) Почему у Pacman'а нет официального GUI-фронтенда?==<br />
'''О)''' Прочтите, пожалуйста, статьи [[The Arch Way (Русский)]] и [[Arch Linux (Русский)]]. Ответ заключается в том, что команда разработчиков Arch не будет заниматься созданием такого фронтенда. Вы можете использовать любой из GUI-фронтендов, разработанных пользователями. См. список в статье [[Pacman GUI Frontends]].<br />
<br />
==В) В Pacman нужна ''"возможность X"!''==<br />
'''О)''' Прочтите, пожалуйста, статьи [[The Arch Way (Русский)]] и [[Arch Linux (Русский)]]. Философия Arch &mdash; "не умножай сущностей без необходимости". Если вы считаете, что ваша идея заслуживает внимания и не противоречит этой философии, то вы можете обсудить ее на [http://bbs.archlinux.org/ данном форуме]. Также можно заглянуть на [http://bugs.archlinux.org баг-трекер], на котором публикуются запросы новых возможностей, если они действительно необходимы.<br />
Но все же, лучшим способом добавить какую-либо возможность в Pacman или Arch Linux является самостоятельная ее реализация. Возможно, ваш код и не будет принят официально, но другие пользователи помогут вам в разработке и тестировании.<br />
<br />
==В) Arch нуждается в форке со стабильными пакетами==<br />
См. [http://www.archserver.org/ ArchServer].<br />
<br />
{{Note|1=Начиная с 12.09.2011 проект ArchServer официально объявлен мертвым. Подробности - [http://www.archserver.org/index.php?mact=News,cntnt01,detail,0&cntnt01articleid=52&cntnt01origid=15&cntnt01returnid=22 тут].}}<br />
<br />
==В) В чем разница между всеми этими репозиториями?==<br />
'''О)''' См. [[Official Repositories (Русский)]].<br />
<br />
==В) Я только что установил пакет X. Как его запустить?==<br />
'''О)''' Если вы используете среды рабочего стола [[KDE]] или [[GNOME]], то программа автоматически появится в вашем меню. Если вы хотите запустить программу в терминале и не знаете имени исполняемого файла, попробуйте запустить {{ic|<nowiki>pacman -Ql имя_пакета | grep bin</nowiki>}}. Распространённой проблемой с такими пакетами, как Firefox или OPenOffice является то, что они устанавливаются в {{ic|/opt}}, который не находится в переменной окружения {{ic|$PATH}} - вы можете выполнить {{ic|source /etc/profile}} или перелогиниться для исправления этой проблемы.<br />
<br />
==В) Почему в репозиториях есть только одна версия каждой библиотеки? ==<br />
'''О)''' Некоторые дистрибутивы, например, Debian, имеют несколько версий пакетов с разделяемыми библиотеками: {{ic|libfoo1}}, {{ic|libfoo2}}, {{ic|libfoo3}} и так далее. В этом случае становится возможным одновременно использовать приложения, скомпилированные с поддержкой разных версий такой библиотеки.<br />
<br />
В отличие от Debian, Arch является дистрибутивом с плавающими релизами и максимально современными версиями пакетов. Наиболее заметным преимуществом такого дистрибутива является наличие последних версий ПО в репозиториях. В случае Arch это означает еще и то, что официально поддерживаются только последние версии всех пакетов. Избавляя от поддержки устаревшего ПО, разработчики пакетов имеют в распоряжении больше времени для проверки работоспособности последних версий. Как только выходит последняя версия библиотеки, она тут же добавляется в репозитории и все зависящие от нее пакеты пересобираются.<br />
<br />
==В) Что будет, если я запущу {{ic|pacman -Syu}} и произойдет обновление библиотеки, но не будет обновлений для приложений, использующих её? ==<br />
'''О)''' Подобный сценарий вообще не должен случиться. Предположим, что приложение {{ic|foobaz}} находится в одном из официальных репозиториев и собрано с поддержкой новой версии библиотеки {{ic|libbaz}}. В этом случае оно будет обновлено вместе с библиотекой {{ic|libbaz}}. Если приложение не собрано с поддержкой новой библиотеки, то пакет {{ic|foobaz}} будет иметь версионную зависимость, например<br />
libbaz=1.5<br />
и будет удален pacman'ом при обновлении {{ic|libbaz}} из-за конфликта.<br />
<br />
Если {{ic|foobaz}} &mdash; пакет, собранный вами из исходников или установленный из AUR, то вам следует попробовать пересобрать {{ic|foobaz}} с поддержкой новой версии {{ic|libbaz}}. Если сборка пройдет неудачно, сообщите об ошибке разработчикам {{ic|foobaz}}.<br />
<br />
==В) Возможна ли ситуация, в которой произойдет обновление ядра в репозитории, но некоторые пакеты с драйверами не будут иметь обновлений для нового ядра?==<br />
'''О)''' Нет, подобная ситуация невозможна. Крупные обновления ядра, например с {{ic|2.6.x}} до {{ic|2.6.x+1}} всегда сопровождаются пересборкой всех зависимых от ядра пакетов. В то же время, если у вас есть неподдерживаемый пакет, например, {{AUR|catalyst}}, то обновление ядра приведет к неработоспособности этого пакета, что может быть исправлено его ручной пересборкой. Ответственность за обновление неподдерживаемых пакетов несут пользователи.<br />
<br />
==В) Использует ли Arch подпись пакетов?==<br />
'''О)''' Да. Подпись пакетов [[pacman]] существует начиная с 4-ой версии. См. [[package signing]] для дополнительной информации.<br />
<br />
=Установка=<br />
==В) Arch нуждается в лучшем инсталляторе, возможно, графическом.==<br />
'''О)''' Вопрос "лучшего" инсталлятора является субъективным. Лучшим способом решения подобных споров является приведение инсталлятора к виду, соответствующему [[The Arch Way (Русский)|философии Arch]]. Если предложения об улучшении инсталлятора подкреплены весомыми аргументами, то их примут во внимание при дальнейшей разработке. Поскольку установка системы с нуля &mdash; явление нечастое (см. вопрос о плавающих релизах), то улучшение инсталлятора не является высокоприоритетным для пользователей или разработчиков. Попробуйте использовать [[archiso]] или [[larch]] [http://larch.berlios.de/].<br />
<br />
==В) Я установил Arch и вижу командную строку bash с предложением ввести логин. Что делать дальше?==<br />
'''О)''' Теперь самое время почитать статью [[Beginners' Guide (Русский)|Быстрый старт]].<br />
<br />
==В) Какую среду рабочего стола или оконный менеджер мне следует использовать?==<br />
'''О)''' Доступных вариантов много, используйте тот, который лучше всего подойдет для ваших задач. См. статью [[Desktop_Environment|Среды рабочего стола]].<br />
<br />
==В) Что делает Arch уникальным среди других минималистичных дистрибутивов?==<br />
'''О)''' Некоторые дистрибутивы также могут обеспечивать минималистичные способы установки, разделяя их с дургими аспектами процесса установки Arch. Однако, стоит обратить внимание на некоторые моменты:<br />
# Arch изначально разрабатывался как легковесная минималистичная базовая среда, служащая фундаментом для расширения системы.<br />
# Вне зависимости от того, какой образ, ''Netinstall'' или ''Core'' используется, ''единственным'' способом установки Arch является ручная постройка из минимальной базовой среды.<br />
# Инсталлятор, базовая система и весь дистрибутив отвечают принципу "не умножай сущностей без необходимости" (keep it simple, stupid), что делает Arch идеально подходящим для целевой аудитории.<br />
# Система пакетов Arch разработана с учетом минимальных зависимостей. Необязательные пакеты никогда не устанавливаются автоматически.<br />
# Arch обеспечивает качественную, максимально полную документацию по построению системы.<br />
<br />
=Прочее=<br />
==В) Каждый раз при использовании pacman я получаю ошибку: 'warning: current locale is invalid; using default "C" locale'. Что мне делать?==<br />
'''О)''' Из данного сообщения следует, что у вас неправильно настроена локаль. Посмотрите страницу [[Configuring locales (Русский)|настройка локализации]].<br />
<br />
==В) Как подключиться к беспроводной сети?==<br />
'''О)''' См. [[Wireless Setup]].<br />
<br />
==В) Как подключиться к проводной сети?==<br />
'''О)''' См. [[Configuring Network]].<br />
<br />
==В) Что такое AUR?==<br />
'''О)''' См. [[Arch User Repository#FAQ]].<br />
<br />
==В) Почему экран становится зеленым, когда я пытаюсь посмотреть видео?==<br />
'''О)''' Возможно, у вас неправильно настроена глубина цвета. Нужно установить глубину цвета 24 бит вместо 16-ти, например.<br />
<br />
==В) Проверка орфографии выделяет весь мой текст, как ошибочный!==<br />
'''О)''' Установлен ли у вас словарь {{ic|aspell}}? Запустите {{ic|pacman -Ss aspell}} для просмотра всех доступных для загрузки словарей. Если установка словарей aspell не решает этой проблемы, то возможно, есть проблема с {{ic|enchant}}. Во-первых, проверьте, о каких словарных файлах известно aspell'у, при помощи команды {{ic|aspell dicts}}:<br />
$ aspell dicts<br />
Вывод:<br />
en<br />
en_GB<br />
...и т.п.<br />
<br />
Если словарь с нужным вам языком есть в списке, добавьте следующую строку в {{ic|/usr/share/enchant/enchant.ordering}}:<br />
language:aspell<br />
en_GB:aspell # Example</div>
Vas
https://wiki.archlinux.org/index.php?title=Frequently_asked_questions_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=199418
Frequently asked questions (Русский)
2012-04-27T11:05:52Z
<p>Vas: corrected translation</p>
<hr />
<div>[[Category:Об ArchLinux (Русский)]]<br />
[[Category:Русский]]<br />
{{i18n|FAQ}}<br />
<br />
Кроме данного FAQ вы можете найти полезными [[Путь Arch|путь Arch Linux]] и [[ArchLinux_(Русский)|про Arch Linux]]. Обе статьи содержат достаточный набор информации об Arch Linux.<br />
<br />
=Общие вопросы=<br />
==В) Что такое Arch Linux?==<br />
'''О)''' См. статью [[ArchLinux_(Русский)|про Arch Linux]].<br />
<br />
==В) Почему мне стоит использовать Arch?==<br />
'''О)''' Если после прочтения статьи [[Путь Arch|путь Arch Linux]] о философии вы пришли к выводу, что подход "сделай сам" вам нравится, и вам нужен простой, компактный, настраиваемый, своевременно обновляемый дистрибутив GNU/Linux &mdash; попробуйте Arch Linux.<br />
<br />
==В) Почему мне не стоит использовать Arch?==<br />
'''О)''' Вам может '''не''' подойти Arch Linux, если:<br />
* после прочтения статьи [[Путь Arch|путь Arch Linux]], вы не согласны с философией развития Arch Linux.<br />
* у вас нет возможностей/времени/желания для использования дистрибутива "сделай сам".<br />
* вам нужна поддержка других архитектур, помимо x86_64 и i686.<br />
* вы занимаете решительную позицию использовать только те дистрибутивы, в состав которых входит исключительно свободное (в определении GNU) ПО.<br />
* вам нужна операционная система, в которой бы все настраивалось автоматически и работало "из коробки", и имеющая в составе носителя полный набор настольного ПО.<br />
* вам не нужны последние версии программных продуктов и дистрибутив с плавающей системой релизов.<br />
* вы вполне довольны используемой в настоящее время ОС.<br />
<br />
==В) На каком дистрибутиве основан Arch? ==<br />
'''О)''' Arch &mdash; независимый дистрибутив, был построен с нуля и не основан ни на одном из других дистрибутивов GNU/Linux. До создания Arch, Джадд Вайнет (Judd Vinet) использовал CRUX, отличный минималистичный дистрибутив, созданный Пиром Лайденом (Per Liden). Изначально основанный на схожих с CRUX идеях, Arch был построен с нуля, а затем был написан [[pacman (Русский)|pacman]].<br />
<br />
==В) Я полный новичок в GNU/Linux. Стоит ли мне использовать Arch?==<br />
'''О)''' Это широко обсуждаемый вопрос. Arch нацелен на относительно опытных пользователей GNU/Linux, но некоторые считают Arch "хорошим местом для старта". Если вы новичок и желаете использовать Arch, имейте ввиду, что вам придется набраться терпения и потратить значительное время на постройку и освоение новой системы, а также принять тот факт, что Arch во многом является "конструктором". Именно пользователь собирает систему и определяет то, какой она должна быть. Перед тем, как задать любой вопрос, проведите собственное исследование проблемы: используйте Google, поиск в Arch Wiki, FAQ, и на официальном форуме. Также примите во внимание, что большинство людей не любит отвечать снова и снова на одни и те же вопросы начинающих пользователей, именно по этой причине были созданы вышеуказанные информационные ресурсы, на наполнение которых ушли тысячи человеко-часов добровольного труда.<br />
<br />
Рекомендуем прочесть: [[Beginners Guide (Русский)|Руководство для начинающих]].<br />
<br />
==В) Arch требует слишком большого количества усилий и времени на установку и использование. Также, сообщество в ответ на мои вопросы отсылает меня к документации.==<br />
'''О)''' Arch рассчитан на специфическую аудиторию. Может быть, он просто не для вас.<br />
<br />
==В) Является ли Arch серверным дистрибутивом? Или он оптимизирован для ПК/рабочих станций?==<br />
'''О)''' Arch не является узкоспециализированным дистрибутивом. Скорее можно сказать, что он создан под определенного вида пользователей &mdash; опытных пользователей Linux, которым подходит принцип "сделай сам", и которые используют его для оптимизации и "допиливания" системы под собственные нужды. Таким образом, в руках представителя целевой аудитории Arch может быть использован практически для любых задач. Многие используют Arch на ПК и рабочих станциях, и, конечно archlinux.org работает на Arch'е.<br />
<br />
==В) Мне действительно нравится Arch, вот только команде разработчиков нужно реализовать то-то.==<br />
'''О)''' Для начала, &mdash; прочли ли вы статью [[The Arch Way (Русский)|Путь Arch]]? Предоставили ли вы способ реализации нужной возможности или решение проблемы? Соответствует ли ваш запрос принципам ''минимализма'' и принципу ''корректность кода прежде удобства''? Присоединяйтесь, внесите свой вклад в виде программного кода или решений. Если он будет хорошо принят сообществом и командой разработчиков, то, возможно, ваш код войдет в состав дистрибутива.<br />
<br />
==В) Когда будет выпущен новый релиз?==<br />
'''О)''' Релизы Arch Linux во многом являются срезами текущего состояния репозитория ''/core'' с добавлением различных новых возможностей и модификаций установочного скрипта. Модель плавающих релизов позволяет поддерживать Arch Linux в максимально современном состоянии.<br />
<br />
По этой причине, выпуск релизов не является очень важным для Arch, так как система плавающих релизов делает новый релиз устаревшим после обновления какого-либо пакета. Если вам нужно получить последний релиз Arch Linux, то необходимости в переустановке нет. Просто запустите команду {{ic|pacman -Syu}} и ваша система будет соответствовать свежеустановленной.<br />
<br />
Новые релизы Arch Linux обычно не содержат новых потрясающих возможностей. Новые потрясающие возможности могут появиться с выпуском новых пакетов, которые могут быть мгновенно получены через {{ic|pacman -Syu}}.<br />
<br />
==В) Является ли Arch Linux стабильным дистрибутивом? Или мне ждать регулярных проблем?==<br />
'''О)''' Arch Linux является стабильным ровно настолько, насколько сделаете его стабильным ''вы''.<br />
<br />
''Вы'' занимаетесь сборкой системы на базе Arch поверх базовой среды и именно ''вы'' контролируете системные обновления. Очевидно, что более крупная и сложная система, включающий множество пакетов, многочисленные инструменты и окружения рабочего стола, вероятно, будет испытывать больше проблем с конфигурацией из-за изменений, сделанных разработчиком, чем легковесная, более простая система. Arch ориентирован на способных, активных пользователей. Общая осведомленность в вопросах администрирования UNIX-систем также играет большую роль в получении стабильной системы на базе Arch. Напомним также, что пакеты Arch представлены, в основном, в исходном виде, без каких-либо дополнительных патчей, поэтому источник большинства проблем с приложениями находится непосредственно в изначальном исходном коде.<br />
<br />
Таким образом, в системе с плавающими релизами именно пользователь несет ответственность за общую стабильность системы. Пользователь решает, когда именно нужно произвести обновление. Если пользователь обращается к сообществу за помощью, ее предоставят достаточно быстро. Разница между Arch и другими дистрибутивами состоит в том, что Arch является настоящим дистрибутивом в стиле "сделай сам"; простые жалобы на поломки являются ошибочными и непродуктивными, поскольку изменения, сделанные в исходных кодах разработчиком не входят в сферу ответственности разработчиков Arch.<br />
<br />
==В) Что собой представляет BSD-подобная init-система?==<br />
'''О)''' Частью наследия BSD является реализованная в них простая init-система. Основное различие между BSD init'ом и SysV init'ом состоит в том, что BSD-подобный init в Arch использует всего одну строку в едином файле {{ic|/etc/rc.conf}} для указания на запускаемые из единого каталога {{ic|/etc/rc.d/}} скрипты для всех системных сервисов, вне зависимости от runlevel'а.<br />
<br />
Init в SysV, с другой стороны, использует систему с несколькими каталогами (обычно 7 по умолчанию), по одному на каждый runlevel: {{ic|/etc/rc.0,1,2,3,4,5,6}}. Каждый каталог содержит большое количество символических ссылок, по одной на каждый сервис. Каждая ссылка указывает на соответствующий скрипт в каталоге {{ic|/etc/init.d/}}. Вряд ли стоит объяснять, что SysV init является более сложным, так как в каждом каталоге {{ic|/etc/rc.0,1,2,3,4,5,6}} находятся десятки ссылок в дополнение к скриптам запуска из каталога {{ic|/etc/init.d/}}.<br />
В соответствии со своей философией минимализма Arch Linux использует BSD-подобный init.<br />
<br />
==В) Arch нужно больше освещения в прессе (в т.ч. и рекламы)==<br />
'''О)''' Arch и так получает достаточно прессы. Цель Arch Linux не в разрастании проекта, а в сохранении минималистичного и современного дистрибутива, основанного на простоте и корректности кода. Органичный, устойчивый рост происходит сам собой в среде пользователей.<br />
<br />
==В) Arch'у нужно больше разработчиков==<br />
'''О)''' Возможно. Не стесняйтесь пожертвовать свое собственное время! Почитайте [http://bbs.archlinux.org форумы], [[IRC_Channel|IRC каналы]], и [http://mailman.archlinux.org/mailman/listinfo/ почтовые рассылки] &mdash; посмотрите, какие задачи требуют решения. Вовлечение в работу сообщества &mdash; хороший способ начать что-то делать.<br />
<br />
==В) Почему Arch такой медленный? Программы запускаются медленно или не запускаются совсем!==<br />
'''О)''' Убедитесь, что у вас правильно настроено имя хоста в файле {{ic|/etc/hosts}}, оно должно совпадать с именем в {{ic|/etc/rc.conf}}. Загляните в раздел "Конфигурирование системы" [[Beginners' Guide (Русский)#.D0.9A.D0.BE.D0.BD.D1.84.D0.B8.D0.B3.D1.83.D1.80.D0.B8.D1.80.D0.BE.D0.B2.D0.B0.D0.BD.D0.B8.D0.B5_.D1.81.D0.B8.D1.81.D1.82.D0.B5.D0.BC.D1.8B|Руководства для начинающих]]. Если имена хостов не совпадают, некоторые приложения могут запускаться очень долго.<br />
<br />
==В) Почему у меня такая низкая скорость соединения с интернетом по сравнению с другими ОС?==<br />
'''О)''' Правильно ли у вас настроена сеть? Проверьте параметры в файлах {{ic|/etc/rc.conf}}, {{ic|/etc/hosts}} и {{ic|/etc/resolv.conf}}. Загляните в раздел "Конфигурирование системы" [[Beginners' Guide (Русский)#.D0.9A.D0.BE.D0.BD.D1.84.D0.B8.D0.B3.D1.83.D1.80.D0.B8.D1.80.D0.BE.D0.B2.D0.B0.D0.BD.D0.B8.D0.B5_.D1.81.D0.B8.D1.81.D1.82.D0.B5.D0.BC.D1.8B|Руководства для начинающих]].<br />
<br />
==В) Почему Arch используюет всю оперативную память?==<br />
'''О)''' Строго говоря, если у вас есть неиспользуемая память, то она напрасно простаивает.<br />
<br />
Многие начинающие пользователи обращают внимание на то, что ядро Linux непривычно для них обращается с памятью. Так как доступ к данным в оперативной памяти осуществляется намного быстрее, чем к диску, ядро кэширует часто используемые данные в памяти. Кэш очищается только при нехватке свободной памяти для новых данных.<br />
<br />
Самым популярным способом разобраться в этом недоразумении является команда {{ic|free}}:<br />
<br />
{{hc|$ free -m|<nowiki> total used free shared buffers cached<br />
Mem: 1009 741 267 0 104 359<br />
-/+ buffers/cache: 278 731<br />
Swap: 1537 0 1537</nowiki>}}<br />
<br />
Обратите внимание, что строка {{ic|-/+ buffers/cache:}} отображает объем памяти, находящейся в активном использовании и объем доступной памяти, вместо неиспользуемой.<br />
<br />
В вышеприведенном примере ноутбук с 1ГБ оперативной памяти использует из нее 741МБ, при этом не запущено ничего, за исключением пары терминалов и веб-браузера. Но из значений в вышеупомянутой строке следует, что только 278МБ находится в активном использовании, а 731МБ являются доступными для приложений. Очевидно, 104МБ+359МБ этой используемой памяти используются для кэширования дисковой подсистемы, и этот кэш может быть очищен при необходимости.<br />
<br />
Результат? Высокая производительность!<br />
<br />
См. [http://www.linuxjournal.com/article/2770 эту статью], если этот момент с управлением памятью в Linux вам интересен.<br />
<br />
==В) Куда ушло свободное место на диске?==<br />
'''О)''' Ответ на данный вопрос зависит от вашей системы. Существует множество [[Common Applications#Disk Usage Display Programs|отличных утилит]], которые вам помогут.<br />
<br />
=Управление пакетами=<br />
==В) Что внутри пакета X?==<br />
<br />
Это можно узнать при с помощью pkgfile (из пакета {{Pkg|pkgtools}}).<br />
<br />
Пример:<br />
{{hc|$ pkgfile glxinfo|extra/mesa-demos}}<br />
<br />
==В) Я нашел ошибку в пакете X. Что мне делать?==<br />
'''О)''' Прежде всего нужно выяснить, может ли быть эта ошибка исправлена командой разработчиков Arch. Иногда это не так (например, за проблему с падением браузера Firefox отвечают разработчики Mozilla Foundation), что называется "ошибкой в исходных текстах" (''upstream error''). Если проблема связана с Arch, то вот несколько шагов, которые можно предпринять:<br />
#Поищите информацию на форумах. Обратите внимание, сталкивался ли кто-нибудь еще с аналогичной ошибкой.<br />
#Отправьте [[Reporting Bug Guidelines (Русский)|сообщение об ошибке (баг-репорт)]] с подробной информацией на http://bugs.archlinux.org.<br />
#При желании можно описать проблему на форуме, не забыв указать, что вы уже отправили баг-репорт. Это поможет другим людям не дублировать сообщение об одной и той же ошибке.<br />
<br />
==В) В Arch следует использовать другое расширение для файлов с пакетами: .pkg.tar.gz и .pkg.tar.xz - это слишком длинно и запутанно.==<br />
'''О)''' Это обсуждалось в списках рассылки Arch. Кто-то предлагал расширение .pac. Но на сегодняшний день никаких планов по смене расширения для пакетов.<br />
Как отметил один из разработчиков Arch Тобиас Кислих (Tobias Kieslich): "Пакет '''является''' упакованым в gzip [xz] архивом tar! И он может быть распакован, изучен и подвергнут необходимым изменениям при помощи любого ПО. Более того, данный mime-type распознается большинством приложений."<br />
<br />
==В) Pacman нуждается в библиотеке для предоставления другим приложениям доступа к информации о пакетах ==<br />
'''О)''' Начиная с версии 3.0.0 pacman является фронтендом к libalpm, библиотеке управления пакетами Arch. Данная библиотека дает возможность создания альтернативных фронтендов (например, GUI-фронтендов).<br />
<br />
==В) Почему у Pacman'а нет официального GUI-фронтенда?==<br />
'''О)''' Прочтите, пожалуйста, статьи [[The Arch Way (Русский)]] и [[Arch Linux (Русский)]]. Ответ заключается в том, что команда Arch не будет заниматься разработкой такого фронтенда. Вы можете использовать любой из GUI-фронтендов, разработанных пользователями. См. список в статье [[Pacman GUI Frontends]].<br />
<br />
==В) В Pacman нужна ''"возможность X"!''==<br />
'''О)''' Прочтите, пожалуйста, статьи [[The Arch Way (Русский)]] и [[Arch Linux (Русский)]]. Философия Arch - "не умножай сущностей без необходимости". Если вы считаете, что ваша идея заслуживает внимания и не противоречит этой философии, то вы можете обсудить ее на [http://bbs.archlinux.org/ данном форуме]. Также можно заглянуть на [http://bugs.archlinux.org баг-трекер], на котором публикуются запросы новых возможностей, если они действительно необходимы.<br />
Но все же, лучшим способом добавить какую-либо возможность в Pacman или Arch Linux является самостоятельная ее реализация. Возможно, ваш код не будет принят официально, но другие пользователи помогут вам в разработке и тестировании.<br />
<br />
==В) Arch нуждается в форке со стабильными пакетами==<br />
См. [http://www.archserver.org/ ArchServer].<br />
<br />
{{Note|1=Начиная с 12.09.2011 проект ArchServer официально объявлен мертвым. Подробности - [http://www.archserver.org/index.php?mact=News,cntnt01,detail,0&cntnt01articleid=52&cntnt01origid=15&cntnt01returnid=22 тут].}}<br />
<br />
==В) В чем разница между всеми этими репозиториями?==<br />
'''О)''' См. [[Official Repositories (Русский)]].<br />
<br />
==В) Я только что установил пакет X. Как его запустить?==<br />
'''О)''' Если вы используете среды рабочего стола [[KDE]] или [[GNOME]], то программа автоматически появится в вашем меню. Если вы хотите запустить программу в терминале и не знаете имени исполняемого файла, попробуйте запустить {{ic|<nowiki>pacman -Ql имя_пакета | grep bin</nowiki>}}. Распространённой проблемой с такими пакетами, как Firefox или OPenOffice является то, что они устанавливаются в {{ic|/opt}}, который не находится в переменной окружения {{ic|$PATH}} - вы можете выполнить {{ic|source /etc/profile}} или перелогиниться для исправления этой проблемы.<br />
<br />
==В) Почему в репозиториях есть только одна версия каждой библиотеки? ==<br />
'''О)''' Некоторые дистрибутивы, например, Debian, имеют несколько версий пакетов с разделяемыми библиотеками: {{ic|libfoo1}}, {{ic|libfoo2}}, {{ic|libfoo3}} и так далее. В этом случае становиться возможным одновременно использовать приложения, скомпилированные с поддержкой разных версий такой библиотеки.<br />
<br />
В отличие от Debian, Arch является дистрибутивом с плавающими релизами и максимально современными версиями пакетов. Наиболее заметным преимуществом такого дистрибутива является наличие последних версий ПО в репозиториях. В случае Arch это означает еще и то, что официально поддерживаются только последние версии всех пакетов. Избавляя от поддержки устаревшего ПО, мэнтейнеры пакетов имеют в распоряжении больше времени для проверки работоспособности последних версий. Как только выходит последняя версия библиотеки, она тут же добавляется в репозитории и все зависящие от нее пакеты пересобираются.<br />
<br />
==В) Что будет, если я запущу {{ic|pacman -Syu}} и произойдет обновление библиотеки, но не будет обновлений для приложений, использующих её? ==<br />
'''О)''' Подобный сценарий вообще не должен случиться. Предположим, что приложение {{ic|foobaz}} находится в одном из официальных репозиториев и собрано с поддержкой новой версии библиотеки {{ic|libbaz}}. В этом случае оно будет обновлено вместе с библиотекой {{ic|libbaz}}. Если приложение не собрано с поддержкой новой библиотеки, то пакет {{ic|foobaz}} будет иметь версионную зависимость, например<br />
libbaz=1.5<br />
и будет удален pacman'ом при обновлении {{ic|libbaz}} из-за конфликта.<br />
<br />
Если {{ic|foobaz}} является самостоятельно собранным пакетом или пакетом, установленным из AUR, то вам следует попробовать пересобрать {{ic|foobaz}} с поддержкой новой версии {{ic|libbaz}}. Если сборка пройдет неудачно, сообщите об ошибке разработчикам {{ic|foobaz}}.<br />
<br />
==В) Возможна ли ситуация, в которой произойдет обновление ядра в репозитории, но некоторые пакеты с драйверами не будут иметь обновлений для нового ядра?==<br />
'''О)''' Нет, подобная ситуация невозможна. Мажорные обновления ядра, например с {{ic|2.6.x}} до {{ic|2.6.x+1}} всегда сопровождаются пересборкой всех зависимых от ядра пакетов. В то же время, если у вас есть неподдерживаемый пакет, например, {{AUR|catalyst}}, то обновление ядра приведет к неработоспособности этого пакета, что может быть исправлено его ручной пересборкой. Ответственность за обновление неподдерживаемых пакетов несут пользователи.<br />
<br />
=Установка=<br />
==В) Arch нуждается в лучшем инсталляторе, возможно, графическом.==<br />
'''О)''' Вопрос "лучшего" инсталлятора является субъективным. Лучшим способом решения подобных споров является приведение инсталлятора к виду, соответствующему [[The Arch Way (Русский)|философии Arch]]. Если предложения об улучшении инсталлятора подкреплены весомыми аргументами, то их примут во внимание при дальнейшей разработке. Так как полная установка системы - явление нечастое (см. вопрос о плавающих релизах), то улучшение инсталлятора не является высокоприоритетным для пользователей или разработчиков. Попробуйте использовать [[archiso]] или [[larch]] [http://larch.berlios.de/].<br />
<br />
==В) Я установил Arch и вижу командную строку bash с предложением ввести логин. Что дальше?==<br />
'''О)''' Теперь самое время почитать статью [[Beginners' Guide (Русский)|Быстрый старт]].<br />
<br />
==В) Какую среду рабочего стола или оконный менеджер мне следует использовать?==<br />
'''О)''' Доступных вариантов много, используйте тот, которых лучше всего подойдет для ваших задач. См. статью [[Desktop_Environment|Среды рабочего стола.]]<br />
<br />
==В) Что делает Arch уникальным среди других минималистичных дистрибутивов?==<br />
'''О)''' Некоторые дистрибутивы могут обеспечить минималистичные способы установки вместе с дургими аспектами процесса установки Arch. <br />
A few distributions may provide minimal installation methods sharing some similar aspects to the Arch installation process. Но стоит обратить внимание на некоторые моменты:<br />
# Arch изначально разрабатывался как легковесная минималистичная базовая среда, служащая фундаментом для расширения системы.<br />
# В независимости от того, какой образ, ''Netinstall'' или ''Core'' используется, ''единственным'' способом установки Arch является расширение из минимальной базовой среды.<br />
# Инсталлятор, базовая система и весь дистрибутив отвечают принципу "не умножай сущностей без необходимости", что делает Arch идеально подходящим для целевой аудитории.<br />
# Система пакетов Arch разработана с учетом минимальных зависимостей. Необязательные пакеты никогда не устанавливаются автоматически.<br />
# Arch обеспечивает качественную, максимально полную документацию.<br />
<br />
=Прочее=<br />
==В) Каждый раз при использовании pacman я получаю ошибку: 'warning: current locale is invalid; using default "C" locale'. Что мне делать?==<br />
'''О)''' Из данного сообщения следует, что у вас неправильно настроена локаль. Посмотрите страницу [[Configuring locales (Русский)|настройка локализации]].<br />
<br />
==В) Как подключиться к беспроводной сети?==<br />
'''О)''' См. [[Wireless Setup]].<br />
<br />
==В) Как подключиться к проводной сети?==<br />
'''О)''' См. [[Configuring Network]].<br />
<br />
==В) Что такое AUR?==<br />
'''О)''' См. [[Arch User Repository#FAQ]].<br />
<br />
==В) Почему экран становится зеленым, когда я пытаюсь посмотреть видео?==<br />
'''О)''' Возможно, у вас неправильно настроена глубина цвета. Нужно установить глубину цвета 24 бит вместо 16-ти, например.<br />
<br />
==В) Спеллчекер выделяет весь мой текст, как ошибочный!==<br />
'''О)''' Установлен ли у вас словарь {{ic|aspell}}? Запустите {{ic|pacman -Ss aspell}} для просмотра всех доступных для загрузки словарей.<br />
<br />
Если установка словарей aspell не решает этой проблемы, то возможно, есть проблема с {{ic|enchant}}.<br />
<br />
Во-первых, проверьте, о каких словарных файлах известно aspell'у, при помощи команды {{ic|aspell dicts}}:<br />
$ aspell dicts<br />
Вывод:<br />
en<br />
en_GB<br />
...и т.п.<br />
<br />
Если словарь с нужным вам языком есть в списке, добавьте следующую строку в {{ic|/usr/share/enchant/enchant.ordering}}:<br />
language:aspell<br />
en_GB:aspell # Example</div>
Vas
https://wiki.archlinux.org/index.php?title=Main_page_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=199404
Main page (Русский)
2012-04-27T09:47:44Z
<p>Vas: corrected translation and style</p>
<hr />
<div>__NOTOC__ __NOEDITSECTION__<br />
[[Category:Русский]]<br />
{{i18n|Main Page}}<br />
<br />
'''Добро пожаловать в wiki-раздел дистрибутива [[Arch Linux (Русский)|Arch Linux]] - Ваш источник документации по Arch Linux в интернете.'''<br />
<br />
Посетите [[Table of Contents (Русский)|Содержание]] для того, чтобы увидеть список категорий ArchWiki.<br />
<br />
== С чего начать? ==<br />
Следующие ссылки будут полезными для тех, кто хочет начать работать в Arch Linux.<br />
<br />
<div style="float: left; margin-right: 1%; width: 49%"><br />
; [[Arch Linux (Русский)|Arch Linux]]: Краткий обзор Arch Linux; в этом разделе описывается то, что можно увидеть в Arch Linux.<br />
<br />
; [[The Arch Way (Русский)|Путь Arch Linux]]: Описание принципов и философии Arch Linux.<br />
<br />
; [[Arch Compared to Other Distributions (Русский)|Сравнение дистрибутивов]]: Описание сходств и различий между Arch Linux и другими дистрибутивами Linux.<br />
<br />
; [[Getting Involved (Русский)|Принять участие]]: Описание различных путей Arch-пользователей (как новых, так и опытных) для внесения вклада в сообщество Arch Linux.<br />
<br />
; [[Forum Etiquette (Русский)|Этикет на форуме]]: Описание этикета поведения для пользователей форума Arch Linux.<br />
</div><br />
<br />
<div style="float: left; width: 50%"><br />
; [[Beginners' Guide (Русский)|Руководство для новичков]]: Детальное руководство по установке и настройке Arch Linux, написанное для новых или неопытных пользователей.<br />
<br />
; [[Official Arch Linux Install Guide (Русский)|Официальное руководство]]: Более общая документация по установке для пользователей, имеющих опыт работы в UNIX/GNU/Linux системах.<br />
<br />
; [[FAQ (Русский)|ЧаВо]]: Список самых часто задаваемых вопросов.<br />
<br />
; [[General Recommendations (Русский)| Рекомендации]]: Список других популярных статей и рекомендаций.<br />
<br />
; [[Help:Editing (Русский)|Мануал по ArchWiki]]: Небольшой мануал по редактированию и содержанию wiki-раздела Arch Linux.<br />
</div><br />
<br />
<div style="clear: both"></div> <!-- prevent spillage --><br />
<br />
== Новости wiki ==<br />
Просмотрите страницу [[Wiki News|Новостей wiki]], чтобы увидеть последние изменения.<br />
<br />
Если Вы хотите и можете внести свой вклад в wiki-раздел, посмотрите [[Getting Involved (Русский)#Wiki|этот список]] идей.<br />
<br />
== Переводы ==<br />
Предпочитаете читать статьи на своем родном языке? Нажмите [[Help:i18n#Languages|сюда]] для просмотра доступных переводов и другой информации.<br />
<br />
== Помощь ==<br />
Если Вы ищите специфическую информацию, воспользуйтесь формой поиска слева. Или же Вы можете пользоваться поиском [https://www.google.ru/ Google] по сайту, например, ввести {{Ic|site:wiki.archlinux.org}} перед поисковым запросом.<br />
<br />
Для редактирования статей из wiki Вы должны создать аккаунт. После того, как аккаунт создан, Вы можете потренироваться в [[Sandbox|Песочнице]] или в Вашей пользовательской странице для ознакомления с используемой разметкой. Доступный синтаксис Вы можете просмотреть в [[:Category:Help (Русский)|разделе Помощь Wiki]] вместе с другими полезными ресурсами.</div>
Vas
https://wiki.archlinux.org/index.php?title=Arch_compared_to_other_distributions_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=199401
Arch compared to other distributions (Русский)
2012-04-27T09:33:49Z
<p>Vas: a very minor edit</p>
<hr />
<div>[[Category:Русский]]<br />
{{i18n|Arch Compared to Other Distributions}}<br />
{{Article summary start}}<br />
{{Article summary text|краткое сравнение Arch Linux с другими популярными дистрибутивами GNU/Linux и BSD.}}<br />
{{Article summary heading|Связанные ссылки}}<br />
{{Article summary wiki|Arch Linux (Русский)}}<br />
{{Article summary wiki|The Arch Way (Русский)}}<br />
{{Article summary heading|Внешние ссылки}}<br />
{{Article summary link|DistroWatch.com|http://distrowatch.com/}}<br />
{{Article summary end}}<br />
<br />
Эта страница написана с целью показать сходства и различия между Arch и другими популярными дистрибутивами GNU/Linux. Этот вопрос задают очень часто и хорошо было бы иметь стандартный ответ. Тем не менее, учтите: лучший способ сравнить дистрибутивы между собой &mdash; установить и попробовать самому. Текст ниже призван лишь дать достаточно информации, чтобы вы решили, подходит вам Arch или нет.<br />
<br />
==Arch и Gentoo==<br />
Оба эти дистрибутива основаны на системе ''плавающих релизов''. Это приводит к тому, что новые версии пакетов почти сразу становятся доступными в репозиториях.<br />
Поскольку Arch - бинарный дистрибутив, он требует меньше времени на поддержку, чем Gentoo. Gentoo имеет большее количество пакетов и позволяет вам выбирать их версии. Arch позволяет как установку бинарных пакетов, так и сборку их из исходных кодов, и установка пакета, которого нет в репозитории, в Arch гораздо проще. PKGBUILD'ы создавать гораздо проще, чем ebuild'ы. Gentoo - более портируем на различные платформы, поскольку пакеты собираются из исходных текстов под специфическую архитектуру. Arch же разрабатывается только для i686 и x86_64. Не существует убедительного подтверждения, что Gentoo работает быстрее, чем Arch.<br />
<br />
==Arch и Sorcerer/Lunar-linux/Source Mage==<br />
Sorcerer/Lunar-linux/Sourcemage (SLS) - это все дистрибутивы, основанные на сборке из исходных кодов (т.н. source based), очень похожие на Gentoo. Эти дистрибутивы используют простой набор скриптов для создания описания процесса сборки пакета. В них используется глобальный конфигурационный файл для настройки компиляции пакетов, очень похожей на ABS в Arch. Утилиты в SLS совершают проверку зависимостей (включая опциональные) и слежение за пакетами (для удаления и обновления). Для семейства SLS не существует бинарных пакетов, однако, в них легко откатиться на старую версию пакета.<br />
<br />
Установка состоит в извлечении базовой системы (очень похожа на устновку Arch: оптимизация под i686, CLI и меню на ncurses, только базовые утилиты), после чего эту базовую систему можно пересобрать (опционально). Очевидно, что в процессе установки базовой системы не устанавливается никаких оконных сред и даже X-сервера. Однако есть возможность легкой установки одного из нескольких серверов (xorg 6.8/7, xfree86).<br />
<br />
SLS имеют очень сложную историю. Лучшее повествование об этом можно найти здесь: http://wiki.sourcemage.org/Our_History<br />
<br />
Lunar Linux: http://lunar-linux.org/<br />
SourceMage: http://www.sourcemage.org/<br />
Sorcerer: http://sorcerer.berlios.de/<br />
<br />
==Arch и Crux==<br />
Arch Linux изначально произошел от Crux. Джадд однажды описал различия::&quot;Я использовал Crux, прежде чем начать работу над Arch. Arch начинался из Crux. Затем я написал pacman и makepkg, которыми я заменил мои скрипты на bash (для начала я построил Arch из LFS). Вообще, это два отдельных дистрибутива, но технически они во многом схожи. У нас есть официальная поддержка зависимостей, например, однако Crux имеет сообщество, которое предоставляет другие преимущества. prt-get имеет зачатки контроля зависимостей. Crux имеет множество проблем, которые есть и у нас, это очень минималистичный набор пакетов, например.<br />
<br />
==Arch и Rock==<br />
<br />
Из описания http://www.rocklinux.org/wiki/About<br />
<br />
ROCK Linux &mdash; гибкий набор инструментов и деталей для создания дистрибутива Linux, то есть каркас для сборки собственного дистрибутива. Смотрите также наш Бюллетень Задач. Если же вы не планируете собирать свой собственный дистрибутив, а просто заинтересованы в получении хорошего, универсального дистрибутива, то вам стоит обратить внимание на Crystal ROCK. http://www.rocklinux.org/wiki/Crystal_ROCK<br />
<br />
Дистрибутив основан для того чтобы быть инструментом. В сравнении с Arch; те же проблемы связанные с требуемым временем для установки из исходников и т.д. Похоже, что работает на многих типах процессоров таких как SPARC, ARM и т.д.<br />
<br />
==Arch vs T2==<br />
???<br />
<br />
==Arch и графические дистрибутивы==<br />
Все "графические дистрибутивы" имеют множество сходств и Arch очень отличается от любого из них. Arch ориентирован на использование командной строки. Arch &mdash; лучший дистрибутив, если вы действительно хотите изучить Linux. Графические дистрибутивы обычно имеют графические инсталляторы (вроде Anaconda в Fedora Core) и графические же утилиты для конфигурирования системы (вроде YaST в SUSE). Специфические различия между дистрибутивами описаны ниже.<br />
<br />
==Arch и Slackware==<br />
Slackware и Arch - 'простые' дистрибутивы. Оба используют систему инициализации в BSD-стиле. Arch предлагает намного более мощную систему управления пакетами (pacman), которая, в отличие от стандартных утилит Slackware, позволяет производить автоматическое обновление системы. Slackware более консервативен в своем релиз-цикле, предоставляя только стабильные пакеты. Arch значительно более либерален в этом плане. Arch заточен под i686, в то время как Slackware запускается на i486. Arch очень хорош для тех пользователей Slackware, которые нуждаются в хорошем менеджере пакетов и более свежих версиях программ.<br />
<br />
==Arch и Debian==<br />
Arch проще, чем Debian. В Arch'е меньше пакетов. Arch предлагает лучшую поддержку для сборки своих собственных пакетов. Arch более снисходителен к так называемым 'несвободным' ('non-free') пакетам. Arch оптимизирован для i686 и поэтому работает быстрее чем Debian (документальных подтверждений нет). Пакеты Arch гораздо свежее, чем в Debian (current в Arch часто новее, чем Debian testing!).<br />
<br />
==Arch и Ubuntu==<br />
Arch имеет более простую иерархию, чем Ubuntu. Если вы любите компилировать собственные ядра, пробовать свежие программы из CVS или собирать программу из исходников, Arch вам подойдет больше. Если вы хотите быстрого развертывания системы и не хотите изучать ее внутренности, Ubuntu будет лучшим выбором. Вообще, разработчикам и энтузиастам Arch нравится больше, чем Ubuntu.<br />
<br />
==Arch и RPM-дистрибутивы==<br />
RPM пакеты доступны во множестве мест, однако сторонние программы часто имеют проблемы с зависимостями, например, требуют более старые версии библиотек. Еще есть несоответствие между RPM, собранными для Red Hat и RPM, собранными для Mandriva. (Эти сложности у меня возникли, когда я был новичком и использовал Mandrake 8.2). Pacman более мощен и надежен, чем RPM.<br />
<br />
==Arch и Fedora==<br />
Fedora - наследник дистрибутива Red Hat, являющийся в данное время одним из самых популярных дистрибутивов. Следовательно, он имеет большое сообщество и множество готовых пакетов, а также хорошую поддержку. Как и во всех RPM-дистрибутивах, управление пакетами доставляет немало проблем. Fedora включает в себя Yum в качестве фронтэнда к RPM, который самостоятельно скачивает пакеты разрешает зависимости. Fedora всегда содержит множество инноваций и заработала славу интеграцией с SELinux и скомпилированными GCJ Java-программами (что лишает необходимости устанавливать Sun JRE). Fedora не пытается поддерживать mp3 из-за патентных проблем.<br />
<br />
==Arch и Mandriva==<br />
Mandriva (ранее Mandrake) - очень дружественный к пользователю дистрибутив, известный своим инсталлятором, который через некоторое время использования может начать разочаровывать. Основной проблемой является проблема с RPM, описанная ранее. Arch дает больше свободны действий и менее дружественен к пользователю. С ним вы по-настоящему научитесь использовать Linux.<br />
<br />
==Arch и SUSE==<br />
SUSE весь опутан настройщиком YaST, из которого можно сконфигурировать практически все. Arch не предоставляет вам ничего подобного (см. [[Путь_Arch]]). SUSE больше подходит для менее подготовленных пользователей и для тех, кто хочет, чтобы система работала сразу "из коробки", после минимальной настройки. SUSE не предоставляет поддержку mp3 сразу после установки, однако она может быть добавлена через YaST.<br />
<br />
==Arch и Frugalware==<br />
Arch ориентирован на использование утилит командной строки (пользователь должен хотеть учиться). Frugalware &mdash; система, основанная на Slackware. Frugalware предоставляет лучшую поддержку различных языков. Также Frugalware поставляется с большим количеством документации. Frugalware претендует на то, чтобы быть быстрее, чем Arch.<br />
Оба дистрибутива используют pacman. Однако пакеты не очень-то совместимы.</div>
Vas
https://wiki.archlinux.org/index.php?title=Arch_compared_to_other_distributions_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=199400
Arch compared to other distributions (Русский)
2012-04-27T09:31:59Z
<p>Vas: corrected translation and style</p>
<hr />
<div>[[Category:Русский]]<br />
{{i18n|Arch Compared to Other Distributions}}<br />
{{Article summary start}}<br />
{{Article summary text|краткое сравнение Arch Linux с другими популярными дистрибутивами GNU/Linux и BSD.}}<br />
{{Article summary heading|Связанные ссылки}}<br />
{{Article summary wiki|Arch Linux (Русский)}}<br />
{{Article summary wiki|The Arch Way (Русский)}}<br />
{{Article summary heading|Внешние ссылки}}<br />
{{Article summary link|DistroWatch.com|http://distrowatch.com/}}<br />
{{Article summary end}}<br />
<br />
Эта страница написана с целью показать сходства и различия между Arch и другими популярными дистрибутивами GNU/Linux. Этот вопрос задают очень часто и хорошо было бы иметь стандартный ответ. Тем не менее, учтите: лучший способ сравнить дистрибутивы между собой &mdash установить и попробовать самому. Текст ниже призван лишь дать достаточно информации, чтобы вы решили, подходит вам Arch или нет.<br />
<br />
==Arch и Gentoo==<br />
Оба эти дистрибутива основаны на системе ''плавающих релизов''. Это приводит к тому, что новые версии пакетов почти сразу становятся доступными в репозиториях.<br />
Поскольку Arch - бинарный дистрибутив, он требует меньше времени на поддержку, чем Gentoo. Gentoo имеет большее количество пакетов и позволяет вам выбирать их версии. Arch позволяет как установку бинарных пакетов, так и сборку их из исходных кодов, и установка пакета, которого нет в репозитории, в Arch гораздо проще. PKGBUILD'ы создавать гораздо проще, чем ebuild'ы. Gentoo - более портируем на различные платформы, поскольку пакеты собираются из исходных текстов под специфическую архитектуру. Arch же разрабатывается только для i686 и x86_64. Не существует убедительного подтверждения, что Gentoo работает быстрее, чем Arch.<br />
<br />
==Arch и Sorcerer/Lunar-linux/Source Mage==<br />
Sorcerer/Lunar-linux/Sourcemage (SLS) - это все дистрибутивы, основанные на сборке из исходных кодов (т.н. source based), очень похожие на Gentoo. Эти дистрибутивы используют простой набор скриптов для создания описания процесса сборки пакета. В них используется глобальный конфигурационный файл для настройки компиляции пакетов, очень похожей на ABS в Arch. Утилиты в SLS совершают проверку зависимостей (включая опциональные) и слежение за пакетами (для удаления и обновления). Для семейства SLS не существует бинарных пакетов, однако, в них легко откатиться на старую версию пакета.<br />
<br />
Установка состоит в извлечении базовой системы (очень похожа на устновку Arch: оптимизация под i686, CLI и меню на ncurses, только базовые утилиты), после чего эту базовую систему можно пересобрать (опционально). Очевидно, что в процессе установки базовой системы не устанавливается никаких оконных сред и даже X-сервера. Однако есть возможность легкой установки одного из нескольких серверов (xorg 6.8/7, xfree86).<br />
<br />
SLS имеют очень сложную историю. Лучшее повествование об этом можно найти здесь: http://wiki.sourcemage.org/Our_History<br />
<br />
Lunar Linux: http://lunar-linux.org/<br />
SourceMage: http://www.sourcemage.org/<br />
Sorcerer: http://sorcerer.berlios.de/<br />
<br />
==Arch и Crux==<br />
Arch Linux изначально произошел от Crux. Джадд однажды описал различия::&quot;Я использовал Crux, прежде чем начать работу над Arch. Arch начинался из Crux. Затем я написал pacman и makepkg, которыми я заменил мои скрипты на bash (для начала я построил Arch из LFS). Вообще, это два отдельных дистрибутива, но технически они во многом схожи. У нас есть официальная поддержка зависимостей, например, однако Crux имеет сообщество, которое предоставляет другие преимущества. prt-get имеет зачатки контроля зависимостей. Crux имеет множество проблем, которые есть и у нас, это очень минималистичный набор пакетов, например.<br />
<br />
==Arch и Rock==<br />
<br />
Из описания http://www.rocklinux.org/wiki/About<br />
<br />
ROCK Linux &mdash гибкий набор инструментов и деталей для создания дистрибутива Linux, то есть каркас для сборки собственного дистрибутива. Смотрите также наш Бюллетень Задач. Если же вы не планируете собирать свой собственный дистрибутив, а просто заинтересованы в получении хорошего, универсального дистрибутива, то вам стоит обратить внимание на Crystal ROCK. http://www.rocklinux.org/wiki/Crystal_ROCK<br />
<br />
Дистрибутив основан для того чтобы быть инструментом. В сравнении с Arch; те же проблемы связанные с требуемым временем для установки из исходников и т.д. Похоже, что работает на многих типах процессоров таких как SPARC, ARM и т.д.<br />
<br />
==Arch vs T2==<br />
???<br />
<br />
==Arch и графические дистрибутивы==<br />
Все "графические дистрибутивы" имеют множество сходств и Arch очень отличается от любого из них. Arch ориентирован на использование командной строки. Arch &mdash лучший дистрибутив, если вы действительно хотите изучить Linux. Графические дистрибутивы обычно имеют графические инсталляторы (вроде Anaconda в Fedora Core) и графические же утилиты для конфигурирования системы (вроде YaST в SUSE). Специфические различия между дистрибутивами описаны ниже.<br />
<br />
==Arch и Slackware==<br />
Slackware и Arch - 'простые' дистрибутивы. Оба используют систему инициализации в BSD-стиле. Arch предлагает намного более мощную систему управления пакетами (pacman), которая, в отличие от стандартных утилит Slackware, позволяет производить автоматическое обновление системы. Slackware более консервативен в своем релиз-цикле, предоставляя только стабильные пакеты. Arch значительно более либерален в этом плане. Arch заточен под i686, в то время как Slackware запускается на i486. Arch очень хорош для тех пользователей Slackware, которые нуждаются в хорошем менеджере пакетов и более свежих версиях программ.<br />
<br />
==Arch и Debian==<br />
Arch проще, чем Debian. В Arch'е меньше пакетов. Arch предлагает лучшую поддержку для сборки своих собственных пакетов. Arch более снисходителен к так называемым 'несвободным' ('non-free') пакетам. Arch оптимизирован для i686 и поэтому работает быстрее чем Debian (документальных подтверждений нет). Пакеты Arch гораздо свежее, чем в Debian (current в Arch часто новее, чем Debian testing!).<br />
<br />
==Arch и Ubuntu==<br />
Arch имеет более простую иерархию, чем Ubuntu. Если вы любите компилировать собственные ядра, пробовать свежие программы из CVS или собирать программу из исходников, Arch вам подойдет больше. Если вы хотите быстрого развертывания системы и не хотите изучать ее внутренности, Ubuntu будет лучшим выбором. Вообще, разработчикам и энтузиастам Arch нравится больше, чем Ubuntu.<br />
<br />
==Arch и RPM-дистрибутивы==<br />
RPM пакеты доступны во множестве мест, однако сторонние программы часто имеют проблемы с зависимостями, например, требуют более старые версии библиотек. Еще есть несоответствие между RPM, собранными для Red Hat и RPM, собранными для Mandriva. (Эти сложности у меня возникли, когда я был новичком и использовал Mandrake 8.2). Pacman более мощен и надежен, чем RPM.<br />
<br />
==Arch и Fedora==<br />
Fedora - наследник дистрибутива Red Hat, являющийся в данное время одним из самых популярных дистрибутивов. Следовательно, он имеет большое сообщество и множество готовых пакетов, а также хорошую поддержку. Как и во всех RPM-дистрибутивах, управление пакетами доставляет немало проблем. Fedora включает в себя Yum в качестве фронтэнда к RPM, который самостоятельно скачивает пакеты разрешает зависимости. Fedora всегда содержит множество инноваций и заработала славу интеграцией с SELinux и скомпилированными GCJ Java-программами (что лишает необходимости устанавливать Sun JRE). Fedora не пытается поддерживать mp3 из-за патентных проблем.<br />
<br />
==Arch и Mandriva==<br />
Mandriva (ранее Mandrake) - очень дружественный к пользователю дистрибутив, известный своим инсталлятором, который через некоторое время использования может начать разочаровывать. Основной проблемой является проблема с RPM, описанная ранее. Arch дает больше свободны действий и менее дружественен к пользователю. С ним вы по-настоящему научитесь использовать Linux.<br />
<br />
==Arch и SUSE==<br />
SUSE весь опутан настройщиком YaST, из которого можно сконфигурировать практически все. Arch не предоставляет вам ничего подобного (см. [[Путь_Arch]]). SUSE больше подходит для менее подготовленных пользователей и для тех, кто хочет, чтобы система работала сразу "из коробки", после минимальной настройки. SUSE не предоставляет поддержку mp3 сразу после установки, однако она может быть добавлена через YaST.<br />
<br />
==Arch и Frugalware==<br />
Arch ориентирован на использование утилит командной строки (пользователь должен хотеть учиться). Frugalware &mdash система, основанная на Slackware. Frugalware предоставляет лучшую поддержку различных языков. Также Frugalware поставляется с большим количеством документации. Frugalware претендует на то, чтобы быть быстрее, чем Arch.<br />
Оба дистрибутива используют pacman. Однако пакеты не очень-то совместимы.</div>
Vas
https://wiki.archlinux.org/index.php?title=Arch_Linux_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=199393
Arch Linux (Русский)
2012-04-27T08:43:55Z
<p>Vas: corrected translation</p>
<hr />
<div>[[Category:Об ArchLinux (Русский)]]<br />
{{i18n|Arch Linux}}<br />
<br />
Arch Linux - это независимо разрабатываемый i686/x86-64 дистрибутив GNU/Linux общего назначения, достаточно гибкий для выполнения любой роли. Процесс разработки фокусируется на простоте, минимализме и элегантности кода. Arch устанавливается в виде минимальной базовой системы, настраивается пользователем под собственные нужды путем построения уникальной среды с установкой только необходимых компонентов. Инструменты настройки с графическим интерфейсом официально не предоставляются, и большая часть настроек системы выполняется из консоли путем редактирования простых текстовых файлов. Основанный на модели плавающих релизов, дистрибутив Arch стремится оставаться предельно современным и обычно предлагает последние стабильные версии большинства пакетов.<br />
<br />
== История ==<br />
Arch Linux был основан канадским программистом Джаддом Вайнетом (англ. Judd Vinet). Первый релиз, Arch Linux 0.1, был выпущен 11 марта 2002 года. Несмотря на то, что Arch является полностью независимым дистрибутивом, он черпает вдохновение в простоте других дистрибутивов включая [http://slackware.com Slackware], [http://www.crux.nu CRUX] и [[Wikipedia:BSD|BSD]]. В 2007 году Джадд Вайнет ушел с поста руководителя проекта, его заменил Аарон Гриффин (англ. Aaron Griffin), который продолжает руководить проектом на сегодняшний день.<br />
<br />
См. также: [[History of Arch Linux]] (англ.).<br />
<br />
== Простота ==<br />
Согласно философии [[The Arch Way (Русский)|The Arch Way]] ("Путь Arch") Arch Linux остается легковесным, гибким, простым и максимально UNIX-подобным. После установки предоставляется минимальная среда (без графического интерфейса) для архитектур i686/x86-64: вместо удаления ненужных пакетов, опытный пользователь имеет возможность построить систему, начиная с минимальной основы без каких-либо заранее выбранных шаблонов. Философия дизайна и реализации Arch Linux позволяет легко расширять систему для получения нужных возможностей: от минимальной консольной системы до современной сложной и функциональной настольной среды: именно ''пользователь'' решает, какой будет система на базе Arch.<br />
Начальная загрузка системы Arch'а во многом напоминает таковую у ОС семейства BSD: все вызовы производятся из единого файла ([[rc.conf (Русский)|rc.conf]]) вместо структуры каталогов ''System V'', содержащей множество символических ссылок для каждого runlevel'а. Конфигурация системы определяется путем редактирования простых текстовых файлов.<br />
<br />
== Современность ==<br />
Arch Linux старается поддерживать установку последних стабильных версий ПО, он основан на системе так называемых ''плавающих релизов'', что обеспечивает возможность однократной установки и непрерывных обновлений без необходимости переустановки всей системы или запуска обновления с одной версии на другую. Выполнением одной команды можно поддерживать систему на базе Arch Linux в актуальном состоянии.<br />
<br />
Arch включает в себя множество новых возможностей, доступных пользователям GNU/Linux, включая современные файловые системы (Ext2/3/4, Reiser, XFS, JFS, btrfs), LVM2/EVMS, программный RAID, поддержку udev и initcpio, а так же последние доступные ядра Linux.<br />
<br />
== Управление пакетами ==<br />
Arch опирается на [[Pacman (Русский)|Pacman]], удобный в использовании менеджер пакетов, позволяющий производить полное обновление системы одной командой. Pacman написан на ''C'' и является компактным, простым и очень быстрым. Arch также предоставляет [[Arch Build System (Русский)|Arch Build System]], систему, похожую на ''порты'' в BSD и обеспечивающую сборку и установку пакетов из исходников. Пакеты могут быть синхронизированы одной командой, и вы даже можете пересобрать всю систему одной командой.<br />
<br />
Поддерживая архитектуры i686 и x86-64, [[официальные репозитории]] Arch Linux обеспечивают доступ к нескольким тысячам пакетов для удовлетворения ваших нужд в программном обеспечении. Arch также поощряет рост сообщества пользователей и увеличение вклада сообщества, предлагая [[Arch User Repository (Русский)|Пользовательский Репозиторий]] (AUR - сокр. от Arch User Repository), который содержит тысячи поддерживаемых пользователями скриптов PKGBUILD для сборки установочных пакетов из исходников с использованием приложения [[makepkg (Русский)|makepkg]]. Также ничто не мешает пользователям организовывать собственные репозитории.<br />
<br />
== Целостность исходных текстов ==<br />
Arch предоставляет программное обеспечение в исходном виде, без дополнительных патчей. Пакеты собираются из первоначальных исходных текстов, в том виде, который был задуман автором. Накладывание патчей происходит в исключительно редких случаях с целью предотвратить появление серьезных ошибок из-за несоответствия версий пакетов, которое может возникнуть в связи с использованием в Arch модели плавающих релизов.<br />
<br />
== Сообщество ==<br />
Сообщество Arch является очень надежным и дружелюбным: все ''Arch'еры'' заинтересованы в принятии участия в поддержке дистрибутива, будь то разработка ключевого программного обеспечения, сопровождение пакетов, сообщение об [https://bugs.archlinux.org/ ошибках] или помощь в их исправлении, улучшение [[Заглавная Страница|документации ArchWiki]], помощь другим пользователям в решении проблем или просто обмен мнениями на [https://bbs.archlinux.org/ форумах], [https://mailman.archlinux.org/mailman/listinfo/ почтовых рассылках], [[IRC Channels| IRC]] (англ.). Члены сообщества всегда готовы поделиться знаниями или самостоятельно разработанными приложениями. Arch Linux является выбором для многих людей по всему миру, и существует несколько [[International Communities|международных сообществ]] (англ.), предоставляющих помощь и документацию на различных языках.<br />
<br />
Обратите внимание на страницу [[Getting Involved (Русский)|Способы Помощи]], если вы собираетесь стать активным членом сообщества.<br />
<br />
== Заключение ==<br />
Итого: Arch Linux - гибкий и простой дистрибутив, разработанный для удовлетворения нужд опытных пользователей Linux. Он является одновременно мощным и простым в управлении, что делает его идеальным дистрибутивом для серверов и рабочих станций. Развивайте систему на базе Arch в любом нужном направлении: если вы разделяете данный взгляд на то, каким должен быть дистрибутив GNU/Linux, тогда добро пожаловать в сообщество Arch Linux!</div>
Vas
https://wiki.archlinux.org/index.php?title=Arch_Linux_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=199392
Arch Linux (Русский)
2012-04-27T08:41:33Z
<p>Vas: corrected translation</p>
<hr />
<div>[[Category:Об ArchLinux (Русский)]]<br />
{{i18n|Arch Linux}}<br />
<br />
Arch Linux - это независимо разрабатываемый i686/x86-64 дистрибутив GNU/Linux общего назначения, достаточно гибкий для выполнения любой роли. Процесс разработки фокусируется на простоте, минимализме и элегантности кода. Arch устанавливается в виде минимальной базовой системы, настраивается пользователем под собственные нужды путем построения уникальной среды с установкой только необходимых компонентов. Инструменты настройки с графическим интерфейсом официально не предоставляются, и большая часть настроек системы выполняется из консоли путем редактирования простых текстовых файлов. Основанный на модели плавающих релизов, дистрибутив Arch стремится оставаться предельно современным и обычно предлагает последние стабильные версии большинства пакетов.<br />
<br />
== История ==<br />
Arch Linux был основан канадским программистом Джаддом Вайнетом (англ. Judd Vinet). Первый релиз, Arch Linux 0.1, был выпущен 11 марта 2002 года. Несмотря на то, что Arch является полностью независимым дистрибутивом, он черпает вдохновение в простоте других дистрибутивов включая [http://slackware.com Slackware], [http://www.crux.nu CRUX] и [[Wikipedia:BSD|BSD]]. В 2007 году Джадд Вайнет ушел с поста руководителя проекта, его заменил Аарон Гриффин (англ. Aaron Griffin), который продолжает руководить проектом на сегодняшний день.<br />
<br />
См. также: [[History of Arch Linux]] (англ.).<br />
<br />
== Простота ==<br />
Согласно философии [[The Arch Way (Русский)|The Arch Way]] ("Путь Arch") Arch Linux остается легковесным, гибким, простым и максимально UNIX-подобным. После установки предоставляется минимальная среда (без графического интерфейса) для архитектур i686/x86-64: вместо удаления ненужных пакетов, опытный пользователь имеет возможность построить систему, начиная с минимальной основы без каких-либо заранее выбранных шаблонов. Философия дизайна и реализации Arch Linux позволяет легко расширять систему для получения нужных возможностей: от минимальной консольной системы до современной сложной и функциональной настольной среды: именно ''пользователь'' решает, какой будет система на базе Arch.<br />
Начальная загрузка системы Arch'а во многом напоминает таковую у ОС семейства BSD: все вызовы производятся из единого файла ([[rc.conf (Русский)|rc.conf]]) вместо структуры каталогов ''System V'', содержащей множество символических ссылок для каждого runlevel'а. Конфигурация системы определяется путем редактирования простых текстовых файлов.<br />
<br />
== Современность ==<br />
Arch Linux старается поддерживать установку последних стабильных версий ПО, он основан на системе так называемых ''плавающих релизов'', что обеспечивает возможность однократной установки и непрерывных обновлений без необходимости переустановки всей системы или запуска обновления с одной версии на другую. Выполнением одной команды можно поддерживать систему на базе Arch Linux в актуальном состоянии.<br />
<br />
Arch включает в себя множество новых возможностей, доступных пользователям GNU/Linux, включая современные файловые системы (Ext2/3/4, Reiser, XFS, JFS, btrfs), LVM2/EVMS, программный RAID, поддержку udev и initcpio, а так же последние доступные ядра Linux.<br />
<br />
== Управление пакетами ==<br />
Arch опирается на [[Pacman (Русский)|Pacman]], удобный в использовании менеджер пакетов, позволяющий производить полное обновление системы одной командой. Pacman написан на ''C'' и является компактным, простым и очень быстрым. Arch также предоставляет [[Arch Build System (Русский)|Arch Build System]], систему, похожую на ''порты'' в BSD и обеспечивающую сборку и установку пакетов из исходников. Пакеты могут быть синхронизированы одной командой, и вы даже можете пересобрать всю систему одной командой.<br />
<br />
Поддерживая архитектуры i686 и x86-64, [[официальные репозитории]] Arch Linux обеспечивают доступ к нескольким тысячам пакетов для удовлетворения ваших нужд в программном обеспечении. Arch также поощряет рост сообщества пользователей и увеличение вклада сообщества, предлагая [[Arch User Repository (Русский)|Пользовательский Репозиторий]] (AUR - сокр. от Arch User Repository), который содержит тысячи поддерживаемых пользователями скриптов PKGBUILD для сборки установочных пакетов из исходников с использованием приложения [[makepkg (Русский)|makepkg]]. Также ничто не мешает пользователям организовывать собственные репозитории.<br />
<br />
== Целостность исходных текстов ==<br />
Arch предоставляет программное обеспечение в исходном виде, без дополнительных патчей. Пакеты собираются из первоначальных исходных текстов, в том виде, который был изначально задуман автором. Накладывание патчей происходит в исключительно редких случаях с целью предотвратить появление серьезных ошибок из-за несоответствия версий пакетов, которое возможно в связи с использованием в Arch модели плавающих релизов.<br />
<br />
== Сообщество ==<br />
Сообщество Arch является очень надежным и дружелюбным: все ''Arch'еры'' заинтересованы в принятии участия в поддержке дистрибутива, будь то разработка ключевого программного обеспечения, сопровождение пакетов, сообщение об [https://bugs.archlinux.org/ ошибках] или помощь в их исправлении, улучшение [[Заглавная Страница|документации ArchWiki]], помощь другим пользователям в решении проблем или просто обмен мнениями на [https://bbs.archlinux.org/ форумах], [https://mailman.archlinux.org/mailman/listinfo/ почтовых рассылках], [[IRC Channels| IRC]] (англ.). Члены сообщества всегда готовы поделиться знаниями или самостоятельно разработанными приложениями. Arch Linux является выбором для многих людей по всему миру, и существует несколько [[International Communities|международных сообществ]] (англ.), предоставляющих помощь и документацию на различных языках.<br />
<br />
Обратите внимание на страницу [[Getting Involved (Русский)|Способы Помощи]], если вы собираетесь стать активным членом сообщества.<br />
<br />
== Заключение ==<br />
Итого: Arch Linux - гибкий и простой дистрибутив, разработанный для удовлетворения нужд опытных пользователей Linux. Он является одновременно мощным и простым в управлении, что делает его идеальным дистрибутивом для серверов и рабочих станций. Развивайте систему на базе Arch в любом нужном направлении: если вы разделяете данный взгляд на то, каким должен быть дистрибутив GNU/Linux, тогда добро пожаловать в сообщество Arch Linux!</div>
Vas
https://wiki.archlinux.org/index.php?title=Arch_Linux_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=199333
Arch Linux (Русский)
2012-04-26T21:01:29Z
<p>Vas: corrected translation</p>
<hr />
<div>[[Category:Об ArchLinux (Русский)]]<br />
{{i18n|Arch Linux}}<br />
<br />
Arch Linux - это независимо разрабатываемый i686/x86-64 дистрибутив GNU/Linux общего назначения, достаточно гибкий для выполнения любой роли. Процесс разработки фокусируется на простоте, минимализме и элегантности кода. Arch устанавливается в виде минимальной базовой системы, настраивается пользователем под собственные нужды путем построения уникальной среды с установкой только необходимых компонентов. Инструменты настройки с графическим интерфейсом официально не предоставляются, и большая часть настроек системы выполняется из консоли путем редактирования простых текстовых файлов. Основанный на модели плавающих релизов, дистрибутив Arch стремится оставаться предельно современным и обычно предлагает последние стабильные версии большинства пакетов.<br />
<br />
== История ==<br />
Arch Linux был основан канадским программистом Джаддом Вайнетом (англ. Judd Vinet). Первый релиз, Arch Linux 0.1, был выпущен 11 марта 2002 года. Несмотря на то, что Arch является полностью независимым дистрибутивом, он черпает вдохновение в простоте других дистрибутивов включая [http://slackware.com Slackware], [http://www.crux.nu CRUX] и [[Wikipedia:BSD|BSD]]. В 2007 году Джадд Вайнет ушел с поста руководителя проекта, его заменил Аарон Гриффин (англ. Aaron Griffin), который продолжает руководить проектом на сегодняшний день.<br />
<br />
См. также: [[History of Arch Linux]] (англ.).<br />
<br />
== Простота ==<br />
Согласно философии [[The Arch Way (Русский)|The Arch Way]] ("Путь Arch") Arch Linux остается легковесным, гибким, простым и максимально UNIX-подобным. После установки предоставляется минимальная среда (без графического интерфейса) для архитектур i686/x86-64: вместо удаления ненужных пакетов, опытный пользователь имеет возможность построить систему, начиная с минимальной основы без каких-либо заранее выбранных шаблонов. Философия дизайна и реализации Arch Linux позволяет легко расширять систему для получения нужных возможностей: от минимальной консольной системы до современной сложной и функциональной настольной среды: именно ''пользователь'' решает, какой будет система на базе Arch.<br />
Начальная загрузка системы Arch'а во многом напоминает таковую у ОС семейства BSD: все вызовы производятся из единого файла ([[rc.conf (Русский)|rc.conf]]) вместо структуры каталогов ''System V'', содержащей множество символических ссылок для каждого runlevel'а. Конфигурация системы определяется путем редактирования простых текстовых файлов.<br />
<br />
== Современность ==<br />
Arch Linux старается поддерживать установку последних стабильных версий ПО, он основан на системе так называемых ''плавающих релизов'', что обеспечивает возможность однократной установки и непрерывных обновлений без необходимости переустановки всей системы или запуска обновления с одной версии на другую. Выполнением одной команды можно поддерживать систему на базе Arch Linux в актуальном состоянии.<br />
<br />
Arch включает в себя множество новых возможностей, доступных пользователям GNU/Linux, включая современные файловые системы (Ext2/3/4, Reiser, XFS, JFS, btrfs), LVM2/EVMS, программный RAID, поддержку udev и initcpio, а так же последние доступные ядра Linux.<br />
<br />
== Управление пакетами ==<br />
Arch опирается на [[Pacman (Русский)|Pacman]], удобный в использовании менеджер пакетов, позволяющий производить полное обновление системы одной командой. Pacman написан на ''C'' и является компактным, простым и очень быстрым. Arch также предоставляет [[Arch Build System (Русский)|Arch Build System]], систему, похожую на ''порты'' в BSD и обеспечивающую сборку и установку пакетов из исходников. Пакеты могут быть синхронизированы одной командой, и вы даже можете пересобрать всю систему одной командой.<br />
<br />
Поддерживая архитектуры i686 и x86-64, [[официальные репозитории]] Arch Linux обеспечивают доступ к нескольким тысячам пакетов для удовлетворения ваших нужд в программном обеспечении. Arch также стимулирует расширение сообщества и увеличение вклада сообщества предлагая [[Arch User Repository (Русский)|Пользовательский Репозиторий]] (AUR - сокр. от Arch User Repository), который содержит тысячи поддерживаемых пользователями скриптов PKGBUILD для сборки установочных пакетов из исходных текстов с использованием приложения [[makepkg (Русский)|makepkg]]. Для пользователей являются возможными сборка и поддержка своих собственных репозиториев.<br />
<br />
== Целостность исходных текстов ==<br />
Arch предоставляет программное обеспечение в исходном виде, без дополнительных патчей. Пакеты собираются из первоначальных исходных текстов, в том виде, который был изначально задуман автором. Накладывание патчей происходит в исключительно редких случаях для предотвращения серьезных ошибок при несоответствии версий пакетов, которое может произойти при использовании модели плавающих релизов.<br />
<br />
== Сообщество ==<br />
Сообщество Arch является очень надежным и дружелюбным: все ''Arch'еры'' заинтересованы в принятии участия в поддержке дистрибутива, будь то разработка ключевого программного обеспечения, сопровождение пакетов, сообщение об [https://bugs.archlinux.org/ ошибках] или помощь в их исправлении, улучшение [[Заглавная Страница|документации ArchWiki]], помощь другим пользователям в решении проблем или просто обмен мнениями на [https://bbs.archlinux.org/ форумах], [https://mailman.archlinux.org/mailman/listinfo/ почтовых рассылках], [[IRC Channels| IRC]] (англ.). Члены сообщества всегда готовы поделиться знаниями или самостоятельно разработанными приложениями. Arch Linux является выбором для многих людей по всему миру, и существует несколько [[International Communities|международных сообществ]] (англ.), предоставляющих помощь и документацию на многих языках.<br />
<br />
Обратите внимание на страницу [[Getting Involved (Русский)|Способы Помощи]], если вы собираетесь стать активным членом сообщества.<br />
<br />
== Заключение ==<br />
Итого: Arch Linux - гибкий и простой дистрибутив, разработанный для удовлетворения нужд опытных пользователей Linux. Он является одновременно мощным и простым в управлении, что делает его идеальным дистрибутивом для серверов и рабочих станций. Развивайте систему на базе Arch в любом нужном направлении: если вы разделяете данный взгляд на то, каким должен быть дистрибутив GNU/Linux, тогда добро пожаловать в сообщество Arch Linux!</div>
Vas
https://wiki.archlinux.org/index.php?title=Help:Style_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=199322
Help:Style (Русский)
2012-04-26T17:51:38Z
<p>Vas: corrected russian</p>
<hr />
<div>[[Category:Help (Русский)]]<br />
{{i18n|Help:Style}}<br />
{{Translateme}}<br />
{{Article summary start}}<br />
{{Article summary text|Зачем этой энциклопедии единый стиль, и как ему следовать.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Help:Editing (Русский)}}<br />
{{Article summary wiki|Help:Reading}}<br />
{{Article summary end}}<br />
<br />
Приведённые здесь правила призваны способствовать созданию кратких, легко читаемых статей и поддержанию единого стиля. Следуйте им как можно тщательнее в ваших правках.<br />
<br />
''Это краткое руководство по редактированию wiki страниц на Arch Linux Wiki. Для подробного изучения вопроса смотрите [[Help:Style]].''<br />
<br />
==Статьи==<br />
===Заголовок статьи===<br />
* Если предмет статьи имеет популярное краткое наименование (акроним) наряду с полным, используйте в качестве названия статьи полное, затем создайте страницу с кратким и поместите в ней [[Help:Editing (Русский)#Перенаправления|перенаправление]] на основную статью. '''Не используйте оба наименования в одном заголовке!'''<br />
* См. также [[Article Naming Guidelines]].<br />
<br />
===Структура===<br />
* Используйте следующий порядок элементов:<br />
#[[#Категории|Категории]]<br />
#[[#Шаблон i18n|Шаблон i18n]]<br />
#[[#Ссылки на иностранные Вики|Ссылки на иностранные Вики]] (необязательно)<br />
#[[#Article status templates|Шаблоны состояния]] (необязательно)<br />
#[[#Краткий обзор|Краткий обзор]] (необязательно)<br />
#[[#Вступление|Вступление]]<br />
#Содержание (генерируется автоматически)<br />
#Другие разделы, в зависимости от статьи<br />
<br />
===Категории===<br />
* Каждая статья должна находиться хотя бы в одной категории.<br />
* Статья может быть отнесена к нескольким категориям, если они не являются родительскими друг для друга.<br />
* Категории должны быть перечислены вверху. {{Совет|Этим Arch Wiki отличается от других проектов на основе MediaWiki, таких как Википедия, содержащих категории в конце статьи.}}<br />
* Во избежание появления ненужных переносов строк вверху страницы, между категориями и шаблоном i18n не должно быть пустого места.<br />
* См. также [[Recategorizing Pages]].<br />
<br />
===Шаблон i18n===<br />
* [[Template:i18n]] нужно помещать в каждую переводимую и создаваемую страницу, если есть смысл её переводить.<br />
* См. также [[Help:i18n]].<br />
<br />
===Ссылки на иностранные Вики===<br />
* Не обращайте на них внимания и не вставляйте в свои статьи. Французский, немецкий и прочие "отщепенческие" вики-проекты не станут добавлять на свои страницы ссылки на русскоязычные статьи.<br />
* См. также [[Wikipedia:Help:Interlanguage links]].<br />
<br />
===Шаблоны состояния===<br />
* [[:Category:Template#Article_status_templates|Шаблоны состояния]] могут быть помещены после [[Template:i18n]] и над кратким обзором.<br />
* Также можно помечать шаблонами состояния отдельные секции.<br />
* '''Всегда сопровождайте шаблон состояния сообщением на странице обсуждения статьи.''' Вариант "я скопировал англоязычную статью, добавил плашку <nowiki>{{translateme}}</nowiki> и был таков" не катит!<br />
<br />
===Краткий обзор===<br />
* Описывает предмет статьи и её цель.<br />
* Опционально расположен после [[Template:i18n]] и/или шаблонов состояния (если они есть).<br />
* См. также [[Writing Article Overviews]].<br />
<br />
===Вступление===<br />
*Describes the topic of the article. <br> Rather than paraphrasing or writing your own (possibly biased) description of a piece of software, you can use the upstream author's description, which can usually be found on the project's home page or about page, if it exists. An example is [[MediaTomb]].<br />
*Included right below the Article summary.<br />
*Do not explicitly make an {{Ic|1===Introduction==}} or {{Ic|1===Preface==}} section: let it appear above the first section heading. A table of contents is shown automatically between the preface and first section when there are sufficient sections in the article.<br />
*See also [[Writing Article Introductions]].<br />
<br />
===Section headings===<br />
*Headings should start from level 2 ({{Ic|1===}}), because level 1 is reserved for article titles.<br />
*Do not skip levels when making subsections, so a subsection of a level 2 needs a level 3 heading and so on.<br />
*Headings use sentence case; ''not'' title case: ''My new heading''; not ''My New Heading''.<br />
*Avoid using links in headings, since they break style consistency and do not stand out well enough. Usually the anchor text is also found in the section content, otherwise you can use a simple sentence like ''See also [[My New Page]]''. <br> For the same reason, also avoid using any kind of html or wiki markup code, including [[#Code formatting templates|code formatting templates]].<br />
*See [[Effective Use of Headers]].<br />
<br />
===Blank lines===<br />
*Avoid using multiple blank lines to space out paragraphs or sections.<br />
*See [[Help:Editing#Line breaks]] for more information.<br />
<br />
===Code formatting templates===<br />
*Use {{ic|<nowiki>{{ic|code}}</nowiki>}} for short lines of code, file names, command names, variable names and the like to be represented inline, for example: <br> foo {{ic|code}} bar.<br />
*Use {{ic|<nowiki>{{bc|code}}</nowiki>}} for single or multiple lines of code (command line input or output code and file content) to be represented in a proper frame, for example:<br />
{{bc|# iwconfig}}<br />
{{bc|1=lo no wireless extensions.<br />
eth0 no wireless extensions.<br />
wlan0 unassociated ESSID:""<br />
Mode:Managed Channel=0 Access Point: Not-Associated<br />
Bit Rate:0 kb/s Tx-Power=20 dBm Sensitivity=8/0<br />
Retry limit:7 RTS thr:off Fragment thr:off<br />
Power Management:off<br />
Link Quality:0 Signal level:0 Noise level:0<br />
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0<br />
Tx excessive retries:0 Invalid misc:0 Missed beacon:0}}<br />
{{bc|#!/bin/sh<br />
<br />
# Demo<br />
echo "Hello World"}}<br />
*For short lines of code, you can just start them with a space instead of using {{ic|<nowiki>{{bc|code}}</nowiki>}} (see [[Help:Editing]]), but note that the resulting code block will not add a horizontal scrollbar if code overflows from the screen: keep in mind that some readers may use a narrower screen than yours, or just keep the browser in a non-maximized window, so they could see the code overflowing even if you do not.<br />
*Use {{ic|<nowiki>{{hc|input|output}}</nowiki>}} when in the need of representing both command line input and output, for example:<br />
{{hc|# iwconfig|<nowiki>lo no wireless extensions.<br />
eth0 no wireless extensions.<br />
wlan0 unassociated ESSID:""<br />
Mode:Managed Channel=0 Access Point: Not-Associated<br />
Bit Rate:0 kb/s Tx-Power=20 dBm Sensitivity=8/0<br />
Retry limit:7 RTS thr:off Fragment thr:off<br />
Power Management:off<br />
Link Quality:0 Signal level:0 Noise level:0<br />
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0<br />
Tx excessive retries:0 Invalid misc:0 Missed beacon:0</nowiki>}}<br />
*When you need to represent file content and you feel it may be difficult for readers to understand which file that code refers to, you can also use {{ic|<nowiki>{{hc|filename|content}}</nowiki>}} to show the file name in the heading, for example:<br />
{{hc|~/hello_world.sh|<nowiki><br />
#!/bin/sh<br />
<br />
# Demo<br />
echo "Hello World"</nowiki>}}<br />
*For guidelines about [[Template:Keypress]], see [[#Keyboard keys]].<br />
*See also [[Help:Template]] for more information and for troubleshooting problems with template-breaking characters like {{ic|1==}} or {{ic|<nowiki>|</nowiki>}}.<br />
<br />
===Command line text===<br />
*Use {{Ic|$}} as a prompt for regular user commands; use {{Ic|#}} as a prompt for root commands. {{Note|Since {{Ic|#}} is also used to denote comments in text files, you should always make sure to avoid ambiguities, usually by explicitly writing to run the command or edit a text file.}}<br />
*The sentence introducing a command should usually end with {{Ic|:}}.<br />
*Prefer using {{Ic|# command}} instead of writing {{Ic|$ sudo command}} unless it is really necessary.<br />
*Do not assume the user uses {{ic|[[sudo]]}} or other privilege escalation utilities (e.g. {{ic|gksu}}, {{ic|kdesu}}).<br />
*{{Ic|# sudo command}} is always wrong.<br />
*Do not add comments in the same box of a command (e.g. {{Ic|# pacman -S foo #Install package foo}})<br />
*Avoid writing excessively long lines of code: use line-breaking techniques when possible.<br />
<br />
===File editing requests===<br />
*Do not assume a specific text editor (nano, vim, emacs, ...) when requesting text file edits, except when necessary.<br />
*Do not use implicit commands to request text file edits, unless strictly necessary. For example {{ic|$ echo -e "clear\nreset" >> ~/.bash_logout}} should better be:<br />
:Append the following lines to {{ic|~/.bash_logout}}:<br />
:{{bc|clear<br>reset}}<br />
<br />
===Keyboard keys===<br />
*The standard way to represent keyboard keys in articles is using instances of [[Template:Keypress]].<br />
*Letter keys should be represented in lower case: {{keypress|a}}. To represent upper-case letters, use {{keypress|Shift+a}} instead of {{keypress|Shift+A}} or {{keypress|A}}.<br />
*The correct way to represent key combinations makes use of the {{ic|+}} symbol to join keys, with no additional spaces around it, in a single instance of the template: {{keypress|Ctrl+c}}. <br> {{keypress|Ctrl + c}}, {{keypress|Ctrl}}+{{keypress|c}}, {{keypress|Ctrl-c}} are non-compliant forms, and should be avoided.<br />
*The following are the standard ways of representing some special keys:<br />
**{{keypress|Shift}} (not {{keypress|SHIFT}})<br />
**{{keypress|Ctrl}} (not {{keypress|CTRL}} or {{keypress|Control}})<br />
**{{keypress|Alt}} (not {{keypress|ALT}})<br />
**{{keypress|Super}} (not {{keypress|Windows}} or {{keypress|Mod}})<br />
**{{keypress|Enter}} (not {{keypress|ENTER}} or {{keypress|Return}})<br />
**{{keypress|Esc}} (not {{keypress|ESC}} or {{keypress|Escape}})<br />
**{{keypress|Space}} (not {{keypress|SPACE}})<br />
**{{keypress|Backspace}}<br />
**{{keypress|Tab}}<br />
**{{keypress|Ins}} (not {{keypress|INS}} or {{keypress|Insert}})<br />
**{{keypress|Del}} (not {{keypress|DEL}} or {{keypress|Delete}})<br />
**{{keypress|Print Screen}}<br />
<br />
===Package management instructions===<br />
====Official packages====<br />
*For installation instructions of official packages, use a wording like this: <br> <span style="margin:0 1em;"></span>[[pacman|Install]] {{Pkg|package}}, available in the [[Official Repositories]]. <br> The wiki code for this is {{Ic|<nowiki>[[pacman|Install]] {{Pkg|package}}, available in the [[Official Repositories]].</nowiki>}} <br> The instructions for the installation of a list of packages should appear as: <br> <span style="margin:0 1em;"></span>[[pacman|Install]] {{Pkg|package1}}, {{Pkg|package2}} and {{Pkg|package3}}, available in the [[Official Repositories]]. <br> More basic phrasing examples may be: <br> <span style="margin:0 1em;"></span>''MyApplication'' can be [[pacman|installed]] with the package {{Pkg|my-appplication}}, available in the [[Official Repositories]]. <br> <span style="margin:0 1em;"></span>You can [[pacman|install]] ''MyApplication'' with the package {{Pkg|my-appplication}}, available in the [[Official Repositories]]. <br> You are granted the flexibility to adapt the wording to your specific article.<br />
*If the package is hosted in [core], [extra] or [community], do not make reference to the repository, thus facilitating maintenance since it is not uncommon for a package to be moved to a different repository. If however the package is hosted in an official repository which is not enabled by default ([multilib], [testing], etc.), mentioning it is required, using a wording like this: <br> <span style="margin:0 1em;">[[pacman|Install]] {{Pkg|package}}, available in the [[Official Repositories]]. You must enable [[multilib|&#91;multilib&#93;]].<br />
*Giving an example of the pacman command needed for the installation is deprecated (except in the [[Beginners' Guide]] and its subpages), both for simplicity's sake (every Arch user should know [[pacman]]'s article by memory) and to avoid errors such as {{Ic|pacman -Sy package}} or possibly never-ending discussions like the choice between {{Ic|pacman -S package}} and {{Ic|pacman -Syu package}}. <br> All the more reason you should not suggest the use of pacman frontends or wrappers to install official packages.<br />
<br />
====AUR packages====<br />
*For installation instructions of AUR packages use a wording like this: <br> <span style="margin:0 1em;"></span> Install {{AUR|package}}, available in the [[Arch User Repository]]. <br> The wiki code for this is {{Ic|<nowiki>Install {{AUR|package}}, available in the [[Arch User Repository]].</nowiki>}} <br> You are granted the flexibility to adapt the wording to your specific article, although you should always make clear that the package is unofficial.<br />
*Do not give examples on how to install AUR packages, neither with the official method nor mentioning AUR helpers: every user who installs unofficial packages should have read the [[Arch User Repository]] article, and be aware of all the possible consequences on his system.<br />
<br />
===Kernel module operations===<br />
*Giving examples of how to add modules to the {{Ic|MODULES}} array in {{ic|/etc/rc.conf}} is deprecated: the standard phrasing is a simple list of the modules involved, possibly remarking dependencies or conflicts with other modules, and a link to [[Kernel modules]].<br />
*Giving examples of how to load, remove, blacklist or perform any other basic operation with modules is deprecated: the standard phrasing is a description of the actions to be performed, and a link to [[Kernel modules]].<br />
*The [[Beginners' Guide]] and its subpages are the only exceptions to the rules above.<br />
<br />
===Daemon operations===<br />
*Giving examples of how to add daemons to the {{Ic|DAEMONS}} array in {{ic|/etc/rc.conf}} is deprecated: the standard phrasing is a simple list of the daemons involved, possibly remarking dependencies or conflicts with other daemons, and a link to [[Daemon]].<br />
*Giving examples of how to ''start'', ''restart'' or ''stop'' daemons is deprecated: the standard phrasing is a description of the actions to be performed, and a link to [[Daemon]]. <br> Nevertheless, if the requested action is not one of those, an example is acceptable, and it should make use of the {{ic|rc.d}} command instead of using the full {{ic|/etc/rc.d/daemon}} command path.<br />
*The [[Beginners' Guide]] and its subpages are the only exceptions to the rules above.<br />
<br />
===Notes, Warnings, Tips===<br />
<br />
*A [[Template:Note|Note]] should be used for information that somehow diverges from what the user would naturally expect at some point in the article. This includes also information that gives more in-depth knowledge on something in particular that otherwise would be considered a bit extraneous to the article. Another example is when needing to point out a temporary announcement like a change in the name of a package. <br> A Note can also be used to highlight information that is important but easily overlooked by someone new to the subject area.<br />
*A [[Template:Warning|Warning]] should be used where the described procedure could carry severe consequences such as being reasonably difficult to undo or resulting in damage to the system. Warnings should generally indicate both the worst case scenarios as well as the conditions that could lead to or avoid such worst cases.<br />
*A [[Template:Tip|Tip]] should indicate a method or procedure that could be useful and bring benefits to somebody, albeit not needed to complete the operation being dealt with, and therefore safely ignorable.<br />
*When two or more notes, warnings or tips have to appear one after each other at the same point of an article, prefer grouping their texts in a list inside a single template, avoiding stacking the templates unless they are completely unrelated. For example:<br />
:{{Tip|<br />
:*Tip example #1.<br />
:*Tip example #2.}}<br />
<br />
===Shells===<br />
*Do not assume a particular shell as the user's shell (e.g. bash), except when really needed: try to be as shell-neutral as possible when writing or editing articles.<br />
<br />
===Hypertext metaphor===<br />
*Try to interlink your article with as many others as you can, using the various keywords in the text.<br />
*For technical terms like [[Wikipedia:system call|system call]] not covered by an article in the ArchWiki, link to the relevant Wikipedia page.<br />
*When linking to other articles of the wiki do not use full URLs, but take advantage of the special syntax for interwiki links: {{Ic|<nowiki>[[Wiki Article]]</nowiki>}}. This will also let the wiki engine keep track of the internal links hence facilitating maintenance. <br> See [[Help:Editing#Links]] for in-depth information and more advanced uses of interwiki links syntax.<br />
*Except in rare cases, you should not leave an article as a dead-end page (an article that does not link to any other) or an orphan page (an article that is not linked from any other).<br />
*Before writing a specific procedure in an article, or describing something in particular, always check if there is already an article that treats that part in detail: in that case, link that article instead of duplicating its content.<br />
*If the upstream documentation for the subject of your article is well-written and maintained, prefer just writing Arch-specific adaptations and linking to the official documentation for general information.<br />
<br />
==="Tips and tricks" sections===<br />
*Advanced tips or examples of using the software.<br />
*Standard title is ''Tips and tricks''.<br />
*The various tips and tricks should be organized in subsections.<br />
<br />
==="Troubleshooting" sections===<br />
*Frequently asked questions regarding the software, or solutions to common problems (compare to [[#"Known issues" sections]]).<br />
*Standard title is ''Troubleshooting''; ''Trouble shooting'', ''Trouble-shooting'', ''TroubleShooting'' are common mistake examples.<br />
*You can also report temporary workarounds for known bugs, but in this case it is very desirable that you provide a link to the bug report, and in case it has not been reported yet, you should report it yourself, thus increasing the chances that the bug will be properly fixed. <br> There are great benefits in linking to a bug report both for readers and editors:<br />
** For readers, the Wiki does not become a stopping point: they can find more information close to the source that may have otherwise been missed by their search efforts.<br />
** For Wiki editors, it makes clean up easier by reducing the effort involved in researching whether the reported bug is still an issue; this can even lead to greater autonomy if the reader finds new information and comes back to edit the wiki.<br />
<br />
==="Known issues" sections===<br />
*Known bugs or usage problems which do not have a solution yet (compare to [[#"Troubleshooting" sections]]).<br />
*Standard title is ''Known issues''.<br />
*If a bug report exists for the known issue, it is very desirable that you provide a link to it; otherwise, if it does not exist, you should report it yourself, thus increasing the chances that the bug will be fixed.<br />
<br />
==="See also" sections===<br />
*A list of links to references and sources of additional information.<br />
*This should be a list where each entry is started with {{Ic|*}}.<br />
*The standard title is ''See also'', other similar titles like ''External links'', ''More resources'' etc. should be avoided.<br />
<br />
===Non-pertinent content===<br />
*Please do not sign articles, nor credit article authors: the ArchWiki is a work of the community, and the history of each article is enough for crediting its contributors. <br> Reporting the sources used to write an article, though, is good practice: you can use the "See also" section for this purpose.<br />
*Uploading files is disabled for normal users, and including the existing images in articles is not allowed. As an alternative you can include links to external images or galleries, and if you need to draw simple diagrams you may use an ASCII editor like [http://www.asciiflow.com/ Asciiflow].<br />
<br />
===Language register===<br />
*Articles should be written using a formal language register.<br />
*Avoid contractions: "don't," "isn't," "you've," etc. should be "do not," "is not," "you have," for example.<br />
*Avoid unnecessary [[Wikipedia:Shortening (grammar)|shortening]] of words: for example instead of "repo," "distro," and "config," prefer "repository," "distribution," and "configuration."<br />
*Do not include personal comments on articles; use discussion pages for this purpose. In general, do not write in first person.<br />
<br />
==Discussion pages==<br />
*Add new discussions at the bottom of discussion pages and with a proper heading. You can also make use of the {{ic|+}} tag at the top of each discussion page.<br />
*Indent your answers using colons at the beginning of new lines.<br />
*Do not edit your posts if somebody has already replied, otherwise you will break the flow of the discussion and make it difficult for others to further respond. Only striking (using {{Ic|<nowiki><s></nowiki>}} tags) words or sentences is allowed, but the related explanation should be given in a regular reply.<br />
*Always append a signature ({{ic|<nowiki>~~~~</nowiki>}}) to your edits.<br />
*Discussion pages should not be categorized.<br />
*You should take care to strike the header of exhausted discussions using {{Ic|<nowiki><s></nowiki>}} tags. <br> Exhausted discussions will be deleted a while after striking.<br />
*See also [[Help:Editing#Discussion pages]].<br />
<br />
==Category pages==<br />
*Every category must be categorized under at least one parent category, except for root categories. <br> Root categories are language categories, like [[:Category:English]] and some other special categories: [[:Category:DeveloperWiki]], [[:Category:Sandbox]] and [[:Category:Template]].<br />
*A category can be categorized under more than one category, provided one is not ancestor of the others.<br />
*Avoid circular relationships: two categories cannot be reciprocal ancestors.<br />
*Categories must be included at the top of the category page.<br />
*Categories should not redirect.<br />
<br />
==Redirect pages==<br />
*Redirect pages should contain only the redirect code, nothing more.<br />
<br />
==Template pages==<br />
*See [[Template:Template]].<br />
<br />
==User pages==<br />
*User pages cannot be categorized (this rule can be infringed in very rare, admin-approved cases).<br />
<br />
==Generic rules==<br />
===Edit summary===<br />
*The changes made daily to the articles are bravely checked by dedicated and voluntary patrollers, whom you must help by making sure that all your edits are accompanied by some explanation words in the "Summary" field of the editor page.<br />
**If the edit is [[Wikipedia:Help:Minor edit|minor]], e.g. grammar or orthography corrections or the simple rewording of a sentence, a simple description of your edit is perfectly enough.<br />
**If you are performing a major change, e.g. adding, moving, modifying or removing content, besides summarizing your edit, you should make sure to explain the reason ''why'' you edited the article, even linking to a discussion on the wiki or the forums, if one exists at all.<br />
**An explanation is not mandatory in talk pages, where the ''why'' should be already evident. <br> When deleting exhausted discussions, however, some explanation words are required (e.g. "closed discussion," "fixed," etc.) and including also the title of the discussion could help retrieving it in the history in case it needs to be reopened.<br />
:{{Tip|Take a look at the edit summaries in the [[Special:RecentChanges|Recent Changes]] to get an idea of what you should write in your summary, but be warned that unfortunately not all users respect these guidelines.}}<br />
*When performing major changes to articles, you should better try to split your work in multiple edits, based on the logical steps needed to complete the change. <br> Especially when moving sections (both within the same article or between two articles), you should avoid also modifying their content in the same edit, otherwise it will be more difficult to check the consequent diff.<br />
<br />
===HTML tags===<br />
*Usage of HTML tags is generally discouraged: always prefer using wiki markup or templates when possible, see [[Help:Editing]] and related.<br />
*When tempted to use {{ic|<nowiki><pre>code</pre></nowiki>}}, always resort to {{ic|<nowiki>{{bc|code}}</nowiki>}}. When tempted to use {{ic|<nowiki><tt>text</tt></nowiki>}} or {{ic|<nowiki><code>text</code></nowiki>}}, always resort to {{ic|<nowiki>{{ic|text}}</nowiki>}}.<br />
*Especially avoid HTML comments ({{ic|<nowiki><!-- comment --></nowiki>}}): it is likely that a note added in a HTML comment can be explicitly shown in the article's discussion page. <br> You can add an appropriate [[:Category:Template#Article_status_templates|Article status template]] in place of the comment.<br />
*Use {{ic|<nowiki><br></nowiki>}} only when necessary: to start a new paragraph or break a line, put a blank line below it. <br> Common exceptions to this rule are when it is necessary to break a line in a list item and you cannot use a sub-item, or inside a template and you cannot use a list.</div>
Vas
https://wiki.archlinux.org/index.php?title=Localization_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=198971
Localization (Русский)
2012-04-25T15:18:08Z
<p>Vas: corrected russian</p>
<hr />
<div>[[Category:Русский]]<br />
{{i18n|Internationalization}}<br />
<br />
= Об этой статье =<br />
Эта статья рассказывает о том, как настроить отображение и ввод русского языка в Arch Linux.<br />
<br />
= Настройка локали =<br />
<br />
В файле /etc/locale.gen раскомментируйте следующую строку:<br />
<br />
<pre><br />
ru_RU.UTF-8 UTF-8<br />
</pre><br />
<br />
<br />
Создайте выбранную вами локаль командой:<br />
<pre><br />
/usr/sbin/locale-gen<br />
</pre><br />
<br />
<br />
Проверьте, что все заявленные локали были созданы:<br />
<pre><br />
locale -a<br />
</pre><br />
<br />
= Настройка консоли = <br />
Несколько слов о том как работает консоль. <br />
<br />
Любой вывод программы перенаправляется консольному драйверу в ядре. Ядро работает только в кодировке unicode. Если программа не использует utf-8 для вывода текста, необходима таблица ACM (Application Character Map), которая будет выполнять соответствующее преобразование из 8-битной кодироки в unicode. Если используется пакет kbd (в arch он устанавливается по умолчанию), то эту таблицу можно найти по адресу /usr/share/kbd/consoletrans. <br />
<br />
Далее ядро должно отобразить символ на экране. Таблица соответствия знаков шрифта кодам unicode называется SFM (Screen Font Map). Она либо находится внутри шрифта (в большинстве случаев), либо подгружается дополнительно (из /usr/share/kbd/unimaps). Сами шрифты располагаются в /usr/share/kbd/consolefonts. <br />
<br />
Кроме этого, нужна ещё клавиатурная раскладка - таблица по переводу скан-кодов клавиатуры в нужный код символа (соответственно может быть либо старая 8-битная либо новая unicode).<br />
<br />
Таким образом, работа по настройке консоли разбивается на пункты (рассмотрен utf вариант):<br />
<br />
#Найти нормальную клавиатурную раскладку, поддерживающую unicode и ваши любимые способы переключения языков и указать её как KEYMAP="..." в файле rc.conf.<br />
#Установить экранный шрифт, имеющий встроенную таблицу SFM и приличное начертание: CONSOLEFONT="...".<br />
#Убедиться что необходимость в ACM пропадает (CONSOLEMAP="" - остаётся пустым).<br />
<br />
Вся остальная работа по настройке kbd (типа использования утилит loadkeys и setfont) уже сделана известными людьми, написавшими стартовые файлы системы.<br />
<br />
Пакет kbd поддерживает русские раскладки в utf8. Дополнительные раскладки клавиатуры можно получить, установив пакет kbd-ru-keymaps командой<br />
<br />
<pre>pacman -S kbd-ru-keymaps</pre><br />
<br />
или cкачав одну из раскладкок вручную:<br />
<br />
*[http://mlclm.narod.ru/ru-utf.map.gz Русская UTF-8 раскладка клавиатуры с переключением по правой клавише Alt]<br />
*[http://moose.ylsoftware.com/gentoo.ru/ru-mab.map.gz Русская UTF-8 раскладка клавиатуры с переключением по Ctrl-Shift]<br />
<br />
и поместив их в каталог '''/usr/share/kbd/keymaps/i386/qwerty'''<br />
<br />
<br />
Установите шрифт Terminus из репозитория '''community''':<br />
<pre> pacman -S terminus-font</pre><br />
<br />
<br />
Отредактируйте файл /etc/rc.conf:<br />
<br />
<pre>LOCALE="ru_RU.UTF-8"<br />
KEYMAP="ru" # Или ru-mab для раскладки с переключением по Ctrl-Shift<br />
CONSOLEFONT="ter-v16v" # Можно поэкспериментировать с другими шрифтами ter-v* из /usr/share/kbd/consolefonts<br />
CONSOLEMAP=""<br />
</pre><br />
<br />
Обратите внимание, что поиск шрифта происходит в /usr/share/kbd/consolefont. При этом после установки многих шрифтов, например, terminus, файлы шрифтов хоть и попадают туда автоматически, но имеют неподдерживаемое расширение psf.gz. Чтобы определенный в переменной CONSOLEFONT шрифт был найден, необходимо переименовать файл шрифта, чтобы его расширение было psfu.gz. Например:<br />
<pre> cp /usr/share/kbd/consolefonts/ter-v16v.psf.gz /usr/share/kbd/consolefonts/ter-v16v.psfu.gz</pre><br />
<br />
Можно обойтись и без terminus, установив:<br />
CONSOLEFONT="cyr-sun16"<br />
<br />
{{Note|Обратите внимание, что значение ''<nowiki>LOCALE=</nowiki>'' может быть как ''"ru_RU.UTF-8"'', так и ''"ru_RU.utf-8"'' или ''"ru_RU.utf8"''. Но, с целью уменьшения путаницы, все же лучше использовать вариант ''<nowiki>LOCALE=</nowiki>"ru_RU.UTF-8"''.}}<br />
<br />
Можно обойтись без установки пакета kbd-ru-keymaps, вариант с переключением по Ctrl+Shift:<br />
<pre>LOCALE="ru_RU.UTF-8"<br />
HARDWARECLOCK="UTC"<br />
TIMEZONE="Europe/Moscow"<br />
KEYMAP="ru"<br />
CONSOLEFONT="ruscii_8x16"<br />
CONSOLEMAP=""<br />
USECOLOR="yes"</pre><br />
{{Note|Текущая версия initscripts не требует наличия в rc.conf переменной ''LOCALE''. Тем не менее необходимо внести в файл /etc/locale.conf следующие строки:}}<br />
<pre>LANG=ru_RU.UTF-8<br />
LC_MESSAGES=ru_RU.UTF-8</pre><br />
<br />
= Настройка X.org =<br />
Установите шрифты ttf-dejavu и ttf-liberation из репозитория '''community''':<br />
<pre>pacman -S ttf-dejavu ttf-liberation</pre><br />
== Настройки клавиатуры ==<br />
<br />
{{Note|Начиная с версии Xorg 1.8, [[HAL]] не используется для настройки}}<br />
<br />
Создайте файл /etc/hal/fdi/policy/10-keymap.fdi такого содержания:<br />
<br />
<pre><br />
<?xml version="1.0" encoding="utf-8"?><br />
<deviceinfo version="0.2"><br />
<device><br />
<match key="info.capabilities" contains="input.keypad"><br />
<merge key="input.xkb.rules" type="string">base</merge><br />
<merge key="input.xkb.model" type="string">pc105</merge><br />
<merge key="input.x11_driver" type="string">evdev</merge><br />
<merge key="input.xkb.layout" type="string">us,ru</merge><br />
<merge key="input.xkb.variant" type="string">,winkeys</merge><br />
<merge key="input.xkb.options" type="string">grp:rctrl_toggle</merge><br />
</match><br />
</device><br />
</deviceinfo><br />
</pre><br />
<br />
Это простой пример, подходящий для владельцев стандартных устройств ввода. Для владельцев ноутбуков, подключающих, допустим, выносную клавиатуру, правила будут сложнее.<br />
<br />
=== Модель клавиатуры ===<br />
<br />
Модель Вашей клавиатуры указана в ключе input.xkb.model. Различные значения для этого ключа можно увидеть в ''/usr/share/X11/xkb/rules/evdev.lst''. В данном примере модель pc105 - стандартная клавиатура.<br />
Например, для клавиатуры Logitech Generic Keyboard строка примет вид:<br />
<merge key="input.xkb.model" type="string">logitech_base</merge><br />
<br />
=== Опции раскладок ===<br />
<br />
Параметры ''xkb.layout'' и ''xkb.variant'' указывают соответственно на варианты раскладки. В примере раскладки ''us,ru'' дополнены опцией ''winkeys'' которая расставляет знаки препинания и некоторые символы в соответствии с раскладкой win.<br />
<br />
=== Переключение раскладок ===<br />
<br />
Для настройки переключения между двумя раскладками, используйте опцию значение ключа input.xkb.options. В примере переключение осуществляется по правому Ctrl.<br />
Другой пример: раскладки переключаются комбинацией Ctrl-Shift, при использовании русской раскладки горит лампочка Scroll Lock, строка опций должна выглядеть следующим образом:<br />
<br />
<merge key="input.xkb.options" type="string">grp:ctrl_shift_toggle,grp_led:scroll</merge><br />
<br />
Возможно будет удобно использовать <Menu> для переключения раскладок и поменять CapsLock и левый Ctrl. Тогда нужно написать так: <br />
<br />
<merge key="input.xkb.options" type="string">grp:menu_toggle,grp_led:scroll,ctrl:swapcaps</merge><br />
<br />
=== Переключение раскладок средствами X.org ===<br />
<br />
Описано на странице [[Xorg_%28%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9%29#.D0.9D.D0.B0.D1.81.D1.82.D1.80.D0.BE.D0.B9.D0.BA.D0.B8_.D0.BA.D0.BB.D0.B0.D0.B2.D0.B8.D0.B0.D1.82.D1.83.D1.80.D1.8B|Xorg (Русский)]]<br />
<br />
==Compose-последовательности==<br />
С помощью клавиши «Compose» можно вводить практически все варианты символов с акцентами, а также разные специальные символы, например кавычки или тире «—», которых нет в стандартных раскладках.<br />
Для этого<br />
* Добавьте в xorg.conf опцию<br />
<pre>Option "XkbOptions" "compose:menu"</pre><br />
* Присвойте переменным окружения GTK_IM_MODULE и QT_IM_MODULE значение xim. Если этот шаг пропустить, все последующие настройки на GTK приложения распространяться не будут (они будут использовать свой метод ввода).<br />
* После этого можно создать в домашнем каталоге файл ~/.XCompose. Первой его строчкой можно включить все стандартные комбинации клавиш:<br />
<pre>include "/usr/share/X11/locale/en_US.UTF-8/Compose"</pre><br />
:а затем можно и задать любые дополнительные последовательности (по образцу как в /usr/share/X11/locale/en_US.UTF-8/Compose). Например,<br />
<pre><br />
<Multi_key> <period> <space> : "…" U2026 # HORIZONTAL ELLIPSIS, многоточие<br />
<Multi_key> <apostrophe> <apostrophe> : "́" U0301 # ударение<br />
</pre><br />
<br />
После этого стало возможным набирать много интересных символов, нажимая вначале клавишу Compose, а потом набирая ту или короткую иную последовательность. Например,<br />
:Compose + O + C даёт © (символ авторского права),<br />
:Compose + O + R даёт ®<br />
[http://webcvs.freedesktop.org/xorg/xc/nls/Compose/en_US.UTF-8?view=co Полный список последовательностей.]<br />
Пример .XCompose:<br />
<pre><br />
# -*- coding: utf-8 -*-<br />
#<br />
# .XCompose<br />
#<br />
# $Id: .XCompose,v 1.31 2008/09/18 17:57:14 deskpot Exp $<br />
<br />
#<br />
# Quotation marks<br />
#<br />
<Multi_key> <Cyrillic_be> : "«" guillemotleft # LEFT DOUBLE ANGLE QUOTATION<br />
<Multi_key> <comma> : "«" guillemotleft # LEFT DOUBLE ANGLE QUOTATION<br />
<Multi_key> <Cyrillic_yu> : "»" guillemotright # RIGHT DOUBLE ANGLE QUOTATION<br />
<Multi_key> <period> : "»" guillemotright # RIGHT DOUBLE ANGLE QUOTATION<br />
<Multi_key> <Cyrillic_BE> : "„" U201e # DOUBLE LOW-9 QUOTATION MARK<br />
<Multi_key> <less> : "„" U201e # DOUBLE LOW-9 QUOTATION MARK<br />
<Multi_key> <Cyrillic_YU> : "“" U201c # LEFT DOUBLE QUOTATION MARK<br />
<Multi_key> <greater> : "“" U201c # LEFT DOUBLE QUOTATION MARK<br />
#<br />
<Multi_key> <Cyrillic_zhe> : "‘" U2018 # LEFT SINGLE QUOTATION MARK<br />
<Multi_key> <semicolon> : "‘" U2018 # LEFT SINGLE QUOTATION MARK<br />
<Multi_key> <Cyrillic_e> : "’" U2019 # RIGHT SINGLE QUOTATION MARK<br />
<Multi_key> <apostrophe> : "’" U2019 # RIGHT SINGLE QUOTATION MARK<br />
<Multi_key> <Cyrillic_ZHE> : "“" U201c # LEFT DOUBLE QUOTATION MARK<br />
<Multi_key> <colon> : "“" U201c # LEFT DOUBLE QUOTATION MARK<br />
<Multi_key> <Cyrillic_E> : "”" U201d # RIGHT DOUBLE QUOTATION MARK<br />
<Multi_key> <quotedbl> : "”" U201d # RIGHT DOUBLE QUOTATION MARK<br />
<br />
#<br />
# Dashes<br />
#<br />
<Multi_key> <minus> : "—" emdash # EM DASH<br />
<Multi_key> <underscore> : "–" endash # EN DASH<br />
<br />
#<br />
# Currencies<br />
#<br />
<Multi_key> <Cyrillic_u> : "€" EuroSign # EURO SIGN<br />
<Multi_key> <e> : "€" EuroSign # EURO SIGN<br />
<Multi_key> <Cyrillic_a> : "£" sterling # POUND SIGN<br />
<Multi_key> <f> : "£" sterling # POUND SIGN<br />
<br />
#<br />
# Trademarks<br />
#<br />
<Multi_key> <Cyrillic_es> : "©" copyright # COPYRIGHT SIGN<br />
<Multi_key> <c> : "©" copyright # COPYRIGHT SIGN<br />
<Multi_key> <Cyrillic_ka> : "®" registered # REGISTERED SIGN<br />
<Multi_key> <r> : "®" registered # REGISTERED SIGN<br />
<Multi_key> <Cyrillic_ie> : "™" U2122 # TRADE MARK SIGN<br />
<Multi_key> <t> : "™" U2122 # TRADE MARK SIGN<br />
<br />
#<br />
# Math<br />
#<br />
<Multi_key> <Cyrillic_ef> : "≈" approximate # ALMOST EQUAL TO<br />
<Multi_key> <a> : "≈" approximate # ALMOST EQUAL TO<br />
<Multi_key> <5> : "‰" U2030 # PER MILLE SIGN<br />
<Multi_key> <equal> : "≠" U2260 # NOT EQUAL TO<br />
<Multi_key> <plus> : "±" plusminus # PLUS-MINUS SIGN<br />
<br />
#<br />
# Misc. typographics<br />
#<br />
<Multi_key> <Cyrillic_yeru> : "§" section # SECTION SIG<br />
<Multi_key> <s> : "§" section # SECTION SIGN<br />
<Multi_key> <Cyrillic_shcha> : "°" degree # DEGREE SIGN<br />
<Multi_key> <o> : "°" degree # DEGREE SIGN<br />
<Multi_key> <space> : " " nobreakspace # NO-BREAK SPACE<br />
<Multi_key> <Cyrillic_ve> : "…" ellipsis # HORIZONTAL ELLIPSIS<br />
<Multi_key> <d> : "…" ellipsis # HORIZONTAL ELLIPSIS<br />
<br />
#<br />
# Missing keys in Russian layout<br />
#<br />
<Multi_key> <3> : "#" numbersign # NUMBER SIGN<br />
<Multi_key> <4> : "$" dollar # DOLLAR SIGN<br />
<Multi_key> <Cyrillic_ha> : "[" bracketleft # LEFT SQUARE BRACKET<br />
<Multi_key> <Cyrillic_hardsign> : "]" bracketright # RIGHT SQUARE BRACKET<br />
<br />
#<br />
# Bindings to ease usage with the Russian `typewriter' layout.<br />
# NB: Unable to bind dollar symbol to be Compose+4, it's Compose+Shift+4.<br />
#<br />
<Multi_key> <2> : "—" emdash # EM DASH<br />
<Multi_key> <8> : "–" endash # EN DASH<br />
<Multi_key> <slash> : "#" numbersign # NUMBER SIGN<br />
<Multi_key> <percent> : "‰" U2030 # PER MILLE SIGN<br />
<Multi_key> <bar> : "±" plusminus # PLUS-MINUS SIGN<br />
</pre><br />
<br />
= Настройка GTK1 =<br />
Отредактируйте файл /etc/gtk/gtkrc.ru :<br />
<pre>style "gtk-default-ru" {<br />
fontset = "-*-arial-medium-r-normal--12-*-*-*-*-*-iso10646-1",\<br />
-*-fixed-medium-r-*-*-14-*-*-*-*-*-iso10646-1"<br />
}<br />
class "GtkWidget" style "gtk-default-ru"</pre><br />
<br />
= Настройка ncurses приложений =<br />
== Midnight Commander (mc) ==<br />
Пакет '''mc''' с версией 4.6.1-5 из репозитория '''extra'''<br>При старом срезе - пакет из репозитория '''community''' mc-utf8.<br>Теперь mc собран с поддержкой юникодной локали и имеет приличный вид.<br />
<br />
== nano ==<br />
С версии 2.0 nano поддерживает utf-8.<br />
<br />
== ncmpc ==<br />
В репозитории extra пакет ncmpc 0.11.1 собран с ncurses без поддержки unicode, а также файл руссификации почему-то в кодировке ISO-8859-1. Решение:<br />
*Скачайте из AUR [https://aur.archlinux.org/packages.php?ID=1947 архив]<br />
*Переместите его в '''/var/abs/local/''' (если вы используете ABS) или в любую другую директорию<br />
*Разархивируйте '''tar -xzf ncmpc-svn.tar.gz'''<br />
*Перейдите в получившуюся директорию<br />
*Выполните '''makepkg -i'''<br />
<br />
== dialog ==<br />
Некоторые скрипты (например, alsaconf) используют программу dialog для вывода сообщений. Чтобы включить в ней поддержку юникода, поставьте пакет dialog-w из community или пересобирите с опцией <code>--with-ncursesw</code><br />
<br />
= Настройка русских man-страниц =<br />
<br />
Установите русские страницы командой<br />
pacman -S man-pages-ru<br />
<br />
Также позаботьтесь о том, чтобы переменная окружения ''LESSCHARSET'' имела значение ''UTF-8'', либо просто заккоментируйте строку '''export LESSCHARSET="latin1"''' в файле ''/etc/profile'', тогда less будет автоматически брать кодировку из локали.<br />
<br />
= Сделаем openoffice русским =<br />
Все просто. Поддержка языков в openoffice реализуется отдельными пакетами.<br />
Смотрим список пакетов:<br />
pacman -Ss openoffice<br />
<br />
Ставим поддержку русского языка<br />
pacman -S openoffice-ru<br />
<br />
<br />
<br />
= Перекодировка тегов MP3 =<br />
<br />
Установите пакет mutagen:<br />
pacman -S mutagen<br />
<br />
В каталоге с вашей коллекцией mp3 файлов выполните команду:<br />
find -iname '*.mp3' -print0 | xargs -0 mid3iconv -eCP1251 --remove-v1<br />
<br />
Команда перекодирует старые теги из кодировки CP1251 в UTF8, запишет тег версии id3v2.4 и удалит теги первой версии.<br />
<br />
Минус способа: не все проигрыватели из ОС Windows понимают теги формата 2.4. Поведение при этом различное: от игнорирования тега, до ругани на битый файл.<br />
<br />
Hint: в mpd после этого нужно перечитать список проигрывания, например так:<br />
mpc update (дождитесь завершения, статус можно смотреть запуская mpc без параметров)<br />
mpc clear<br />
mpc listall | mpc add<br />
<br />
Опционально:<br />
mpc rm all<br />
mpc save all<br />
<br />
[[Category:Русский]]</div>
Vas
https://wiki.archlinux.org/index.php?title=Localization_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=198967
Localization (Русский)
2012-04-25T15:03:37Z
<p>Vas: added xorg warning</p>
<hr />
<div>[[Category:Русский]]<br />
{{i18n|Internationalization}}<br />
<br />
= Об этой статье =<br />
Эта статья рассказывает о том, как настроить отображение и ввод русского языка в Arch Linux.<br />
<br />
= Настройка локали =<br />
<br />
В файле /etc/locale.gen раскомментируйте следующую строку:<br />
<br />
<pre><br />
ru_RU.UTF-8 UTF-8<br />
</pre><br />
<br />
<br />
Создайте выбранную вами локаль командой:<br />
<pre><br />
/usr/sbin/locale-gen<br />
</pre><br />
<br />
<br />
Проверьте, что все заявленные локали были созданы:<br />
<pre><br />
locale -a<br />
</pre><br />
<br />
= Настройка консоли = <br />
Несколько слов о том как работает консоль. <br />
<br />
Любой вывод программы перенаправляется консольному драйверу в ядре. Ядро работает только в кодировке unicode. Если программа не использует utf-8 для вывода текста, необходима таблица ACM (Application Character Map), которая будет выполнять соответствующее преобразование из 8-битной кодироки в unicode. Если используется пакет kbd (в arch он устанавливается по умолчанию), то эту таблицу можно найти по адресу /usr/share/kbd/consoletrans. <br />
<br />
Далее ядро должно отобразить символ на экране. Таблица соответствия знаков шрифта кодам unicode называется SFM (Screen Font Map). Она либо находится внутри шрифта (в большинстве случаев) либо подгружается дополнительно (из /usr/share/kbd/unimaps). Сами шрифты располагаются в /usr/share/kbd/consolefonts. <br />
<br />
Кроме этого, нужна ещё клавиатурная раскладка - таблица по переводу скан-кодов клавиатуры в нужный код символа (соответственно может быть либо старая 8 битная либо новая unicode).<br />
<br />
Таким образом, работа по настройке консоли разбивается на пункты (рассмотрен utf вариант)<br />
<br />
1. Найти нормальную клавиатурную раскладку, поддерживающую unicode и ваши любимые способы переключения языков и указать её как KEYMAP="..." в файле rc.conf.<br />
<br />
2. Установить экранный шрифт, имеющий встроенную таблицу SFM и приличное начертание: CONSOLEFONT="...".<br />
<br />
3. Убедиться что необходимость в ACM пропадает (CONSOLEMAP="" - остаётся пустым).<br />
<br />
Вся остальная работа по настройке kbd (типа использования утилит loadkeys и setfont) уже сделана известными людьми, написавшими стартовые файлы системы.<br />
<br />
Пакет kbd поддерживает русские раскладки в utf8. Дополнительные раскладки клавиатуры можно получить установив пакет kbd-ru-keymaps командой<br />
<br />
<pre>pacman -S kbd-ru-keymaps</pre><br />
<br />
или cкачав одну из раскладкок вручную:<br />
<br />
*[http://mlclm.narod.ru/ru-utf.map.gz Русская UTF-8 раскладка клавиатуры с переключением по правой клавише Alt]<br />
*[http://moose.ylsoftware.com/gentoo.ru/ru-mab.map.gz Русская UTF-8 раскладка клавиатуры с переключением по Ctrl-Shift]<br />
<br />
и поместив их в каталог '''/usr/share/kbd/keymaps/i386/qwerty'''<br />
<br />
<br />
Установите шрифт Terminus из репозитория '''community''':<br />
<pre> pacman -S terminus-font</pre><br />
<br />
<br />
Отредактируйте файл /etc/rc.conf :<br />
<br />
<pre>LOCALE="ru_RU.UTF-8"<br />
KEYMAP="ru" # Или ru-mab для раскладки с переключением по Ctrl-Shift<br />
CONSOLEFONT="ter-v16v" # Можно поэкспериментировать с другими шрифтами ter-v* из /usr/share/kbd/consolefonts<br />
CONSOLEMAP=""<br />
</pre><br />
<br />
Обратите внимание, что поиск шрифта происходит в /usr/share/kbd/consolefont. При этом после установки многих шрифтов, например, terminus, файлы шрифтов хоть и попадают туда автоматически, но имеют неподдерживаемое расширение psf.gz. Чтобы определенный в переменной CONSOLEFONT шрифт был найден, необходимо переименовать файл шрифта, чтобы его расширение было psfu.gz. Например:<br />
<pre> cp /usr/share/kbd/consolefonts/ter-v16v.psf.gz /usr/share/kbd/consolefonts/ter-v16v.psfu.gz</pre><br />
<br />
Можно обойтись и без terminus, установив:<br />
CONSOLEFONT="cyr-sun16"<br />
<br />
{{Note|Обратите внимание, что значение ''<nowiki>LOCALE=</nowiki>'' может быть как ''"ru_RU.UTF-8"'', так и ''"ru_RU.utf-8"'' или ''"ru_RU.utf8"''. Но, с целью уменьшения путаницы, все же лучше использовать вариант ''<nowiki>LOCALE=</nowiki>"ru_RU.UTF-8"''.}}<br />
<br />
Можно обойтись без установки пакета kbd-ru-keymaps, вариант с переключение Ctrl+Shift:<br />
<pre>LOCALE="ru_RU.UTF-8"<br />
HARDWARECLOCK="UTC"<br />
TIMEZONE="Europe/Moscow"<br />
KEYMAP="ru"<br />
CONSOLEFONT="ruscii_8x16"<br />
CONSOLEMAP=""<br />
USECOLOR="yes"</pre><br />
{{Note|Текущая версия initscripts не требует наличия в rc.conf переменной ''LOCALE''. Тем не менее необходимо внести в файл /etc/locale.conf следующие строки:}}<br />
<pre>LANG=ru_RU.UTF-8<br />
LC_MESSAGES=ru_RU.UTF-8</pre><br />
<br />
= Настройка X.org =<br />
Установите шрифты ttf-dejavu и ttf-liberation из репозитория '''community''':<br />
<pre>pacman -S ttf-dejavu ttf-liberation</pre><br />
== Настройки клавиатуры ==<br />
<br />
{{Note|Начиная с версии Xorg 1.8, [[HAL]] не используется для настройки}}<br />
<br />
Создайте файл /etc/hal/fdi/policy/10-keymap.fdi такого содержания:<br />
<br />
<pre><br />
<?xml version="1.0" encoding="utf-8"?><br />
<deviceinfo version="0.2"><br />
<device><br />
<match key="info.capabilities" contains="input.keypad"><br />
<merge key="input.xkb.rules" type="string">base</merge><br />
<merge key="input.xkb.model" type="string">pc105</merge><br />
<merge key="input.x11_driver" type="string">evdev</merge><br />
<merge key="input.xkb.layout" type="string">us,ru</merge><br />
<merge key="input.xkb.variant" type="string">,winkeys</merge><br />
<merge key="input.xkb.options" type="string">grp:rctrl_toggle</merge><br />
</match><br />
</device><br />
</deviceinfo><br />
</pre><br />
<br />
Это простой пример, подходящий для владельцев стандартных устройств ввода. Для владельцев ноутбуков, подключающих, допустим, выносную клавиатуру, правила будут сложнее.<br />
<br />
=== Модель клавиатуры ===<br />
<br />
Модель Вашей клавиатуры указана в ключе input.xkb.model. Различные значения для этого ключа можно увидеть в ''/usr/share/X11/xkb/rules/evdev.lst''. В данном примере модель pc105 - стандартная клавиатура.<br />
Например, для клавиатуры Logitech Generic Keyboard строка примет вид:<br />
<merge key="input.xkb.model" type="string">logitech_base</merge><br />
<br />
=== Опции раскладок ===<br />
<br />
Параметры ''xkb.layout'' и ''xkb.variant'' указывают соответственно на варианты раскладки. В примере раскладки ''us,ru'' дополнены опцией ''winkeys'' которая расставляет знаки препинания и некоторые символы в соответствии с раскладкой win.<br />
<br />
=== Переключение раскладок ===<br />
<br />
Для настройки переключения между двумя раскладками, используйте опцию значение ключа input.xkb.options. В примере переключение осуществляется по правому Ctrl.<br />
Другой пример: раскладки переключаются комбинацией Ctrl-Shift, при использовании русской раскладки горит лампочка Scroll Lock, строка опций должна выглядеть следующим образом:<br />
<br />
<merge key="input.xkb.options" type="string">grp:ctrl_shift_toggle,grp_led:scroll</merge><br />
<br />
Возможно будет удобно использовать <Menu> для переключения раскладок и поменять CapsLock и левый Ctrl. Тогда нужно написать так: <br />
<br />
<merge key="input.xkb.options" type="string">grp:menu_toggle,grp_led:scroll,ctrl:swapcaps</merge><br />
<br />
=== Переключение раскладок средствами X.org ===<br />
<br />
Описано на странице [[Xorg_%28%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9%29#.D0.9D.D0.B0.D1.81.D1.82.D1.80.D0.BE.D0.B9.D0.BA.D0.B8_.D0.BA.D0.BB.D0.B0.D0.B2.D0.B8.D0.B0.D1.82.D1.83.D1.80.D1.8B|Xorg (Русский)]]<br />
<br />
==Compose-последовательности==<br />
С помощью клавиши «Compose» можно вводить практически все варианты символов с акцентами, а также разные специальные символы, например кавычки или тире «—», которых нет в стандартных раскладках.<br />
Для этого<br />
* Добавьте в xorg.conf опцию<br />
<pre>Option "XkbOptions" "compose:menu"</pre><br />
* Присвойте переменным окружения GTK_IM_MODULE и QT_IM_MODULE значение xim. Если этот шаг пропустить, все последующие настройки на GTK приложения распространяться не будут (они будут использовать свой метод ввода).<br />
* После этого можно создать в домашнем каталоге файл ~/.XCompose. Первой его строчкой можно включить все стандартные комбинации клавиш:<br />
<pre>include "/usr/share/X11/locale/en_US.UTF-8/Compose"</pre><br />
:а затем можно и задать любые дополнительные последовательности (по образцу как в /usr/share/X11/locale/en_US.UTF-8/Compose). Например,<br />
<pre><br />
<Multi_key> <period> <space> : "…" U2026 # HORIZONTAL ELLIPSIS, многоточие<br />
<Multi_key> <apostrophe> <apostrophe> : "́" U0301 # ударение<br />
</pre><br />
<br />
После этого стало возможным набирать много интересных символов, нажимая вначале клавишу Compose, а потом набирая ту или короткую иную последовательность. Например,<br />
:Compose + O + C даёт © (символ авторского права),<br />
:Compose + O + R даёт ®<br />
[http://webcvs.freedesktop.org/xorg/xc/nls/Compose/en_US.UTF-8?view=co Полный список последовательностей.]<br />
Пример .XCompose:<br />
<pre><br />
# -*- coding: utf-8 -*-<br />
#<br />
# .XCompose<br />
#<br />
# $Id: .XCompose,v 1.31 2008/09/18 17:57:14 deskpot Exp $<br />
<br />
#<br />
# Quotation marks<br />
#<br />
<Multi_key> <Cyrillic_be> : "«" guillemotleft # LEFT DOUBLE ANGLE QUOTATION<br />
<Multi_key> <comma> : "«" guillemotleft # LEFT DOUBLE ANGLE QUOTATION<br />
<Multi_key> <Cyrillic_yu> : "»" guillemotright # RIGHT DOUBLE ANGLE QUOTATION<br />
<Multi_key> <period> : "»" guillemotright # RIGHT DOUBLE ANGLE QUOTATION<br />
<Multi_key> <Cyrillic_BE> : "„" U201e # DOUBLE LOW-9 QUOTATION MARK<br />
<Multi_key> <less> : "„" U201e # DOUBLE LOW-9 QUOTATION MARK<br />
<Multi_key> <Cyrillic_YU> : "“" U201c # LEFT DOUBLE QUOTATION MARK<br />
<Multi_key> <greater> : "“" U201c # LEFT DOUBLE QUOTATION MARK<br />
#<br />
<Multi_key> <Cyrillic_zhe> : "‘" U2018 # LEFT SINGLE QUOTATION MARK<br />
<Multi_key> <semicolon> : "‘" U2018 # LEFT SINGLE QUOTATION MARK<br />
<Multi_key> <Cyrillic_e> : "’" U2019 # RIGHT SINGLE QUOTATION MARK<br />
<Multi_key> <apostrophe> : "’" U2019 # RIGHT SINGLE QUOTATION MARK<br />
<Multi_key> <Cyrillic_ZHE> : "“" U201c # LEFT DOUBLE QUOTATION MARK<br />
<Multi_key> <colon> : "“" U201c # LEFT DOUBLE QUOTATION MARK<br />
<Multi_key> <Cyrillic_E> : "”" U201d # RIGHT DOUBLE QUOTATION MARK<br />
<Multi_key> <quotedbl> : "”" U201d # RIGHT DOUBLE QUOTATION MARK<br />
<br />
#<br />
# Dashes<br />
#<br />
<Multi_key> <minus> : "—" emdash # EM DASH<br />
<Multi_key> <underscore> : "–" endash # EN DASH<br />
<br />
#<br />
# Currencies<br />
#<br />
<Multi_key> <Cyrillic_u> : "€" EuroSign # EURO SIGN<br />
<Multi_key> <e> : "€" EuroSign # EURO SIGN<br />
<Multi_key> <Cyrillic_a> : "£" sterling # POUND SIGN<br />
<Multi_key> <f> : "£" sterling # POUND SIGN<br />
<br />
#<br />
# Trademarks<br />
#<br />
<Multi_key> <Cyrillic_es> : "©" copyright # COPYRIGHT SIGN<br />
<Multi_key> <c> : "©" copyright # COPYRIGHT SIGN<br />
<Multi_key> <Cyrillic_ka> : "®" registered # REGISTERED SIGN<br />
<Multi_key> <r> : "®" registered # REGISTERED SIGN<br />
<Multi_key> <Cyrillic_ie> : "™" U2122 # TRADE MARK SIGN<br />
<Multi_key> <t> : "™" U2122 # TRADE MARK SIGN<br />
<br />
#<br />
# Math<br />
#<br />
<Multi_key> <Cyrillic_ef> : "≈" approximate # ALMOST EQUAL TO<br />
<Multi_key> <a> : "≈" approximate # ALMOST EQUAL TO<br />
<Multi_key> <5> : "‰" U2030 # PER MILLE SIGN<br />
<Multi_key> <equal> : "≠" U2260 # NOT EQUAL TO<br />
<Multi_key> <plus> : "±" plusminus # PLUS-MINUS SIGN<br />
<br />
#<br />
# Misc. typographics<br />
#<br />
<Multi_key> <Cyrillic_yeru> : "§" section # SECTION SIG<br />
<Multi_key> <s> : "§" section # SECTION SIGN<br />
<Multi_key> <Cyrillic_shcha> : "°" degree # DEGREE SIGN<br />
<Multi_key> <o> : "°" degree # DEGREE SIGN<br />
<Multi_key> <space> : " " nobreakspace # NO-BREAK SPACE<br />
<Multi_key> <Cyrillic_ve> : "…" ellipsis # HORIZONTAL ELLIPSIS<br />
<Multi_key> <d> : "…" ellipsis # HORIZONTAL ELLIPSIS<br />
<br />
#<br />
# Missing keys in Russian layout<br />
#<br />
<Multi_key> <3> : "#" numbersign # NUMBER SIGN<br />
<Multi_key> <4> : "$" dollar # DOLLAR SIGN<br />
<Multi_key> <Cyrillic_ha> : "[" bracketleft # LEFT SQUARE BRACKET<br />
<Multi_key> <Cyrillic_hardsign> : "]" bracketright # RIGHT SQUARE BRACKET<br />
<br />
#<br />
# Bindings to ease usage with the Russian `typewriter' layout.<br />
# NB: Unable to bind dollar symbol to be Compose+4, it's Compose+Shift+4.<br />
#<br />
<Multi_key> <2> : "—" emdash # EM DASH<br />
<Multi_key> <8> : "–" endash # EN DASH<br />
<Multi_key> <slash> : "#" numbersign # NUMBER SIGN<br />
<Multi_key> <percent> : "‰" U2030 # PER MILLE SIGN<br />
<Multi_key> <bar> : "±" plusminus # PLUS-MINUS SIGN<br />
</pre><br />
<br />
= Настройка GTK1 =<br />
Отредактируйте файл /etc/gtk/gtkrc.ru :<br />
<pre>style "gtk-default-ru" {<br />
fontset = "-*-arial-medium-r-normal--12-*-*-*-*-*-iso10646-1",\<br />
-*-fixed-medium-r-*-*-14-*-*-*-*-*-iso10646-1"<br />
}<br />
class "GtkWidget" style "gtk-default-ru"</pre><br />
<br />
= Настройка ncurses приложений =<br />
== Midnight Commander (mc) ==<br />
Пакет '''mc''' с версией 4.6.1-5 из репозитория '''extra'''<br>При старом срезе - пакет из репозитория '''community''' mc-utf8.<br>Теперь mc собран с поддержкой юникодной локали и имеет приличный вид.<br />
<br />
== nano ==<br />
С версии 2.0 nano поддерживает utf-8.<br />
<br />
== ncmpc ==<br />
В репозитории extra пакет ncmpc 0.11.1 собран с ncurses без поддержки unicode, а также файл руссификации почему-то в кодировке ISO-8859-1. Решение:<br />
*Скачайте из AUR [https://aur.archlinux.org/packages.php?ID=1947 архив]<br />
*Переместите его в '''/var/abs/local/''' (если вы используете ABS) или в любую другую директорию<br />
*Разархивируйте '''tar -xzf ncmpc-svn.tar.gz'''<br />
*Перейдите в получившуюся директорию<br />
*Выполните '''makepkg -i'''<br />
<br />
== dialog ==<br />
Некоторые скрипты (например, alsaconf) используют программу dialog для вывода сообщений. Чтобы включить в ней поддержку юникода, поставьте пакет dialog-w из community или пересобирите с опцией <code>--with-ncursesw</code><br />
<br />
= Настройка русских man-страниц =<br />
<br />
Установите русские страницы командой<br />
pacman -S man-pages-ru<br />
<br />
Также позаботьтесь о том, чтобы переменная окружения ''LESSCHARSET'' имела значение ''UTF-8'', либо просто заккоментируйте строку '''export LESSCHARSET="latin1"''' в файле ''/etc/profile'', тогда less будет автоматически брать кодировку из локали.<br />
<br />
= Сделаем openoffice русским =<br />
Все просто. Поддержка языков в openoffice реализуется отдельными пакетами.<br />
Смотрим список пакетов:<br />
pacman -Ss openoffice<br />
<br />
Ставим поддержку русского языка<br />
pacman -S openoffice-ru<br />
<br />
<br />
<br />
= Перекодировка тегов MP3 =<br />
<br />
Установите пакет mutagen:<br />
pacman -S mutagen<br />
<br />
В каталоге с вашей коллекцией mp3 файлов выполните команду:<br />
find -iname '*.mp3' -print0 | xargs -0 mid3iconv -eCP1251 --remove-v1<br />
<br />
Команда перекодирует старые теги из кодировки CP1251 в UTF8, запишет тег версии id3v2.4 и удалит теги первой версии.<br />
<br />
Минус способа: не все проигрыватели из ОС Windows понимают теги формата 2.4. Поведение при этом различное: от игнорирования тега, до ругани на битый файл.<br />
<br />
Hint: в mpd после этого нужно перечитать список проигрывания, например так:<br />
mpc update (дождитесь завершения, статус можно смотреть запуская mpc без параметров)<br />
mpc clear<br />
mpc listall | mpc add<br />
<br />
Опционально:<br />
mpc rm all<br />
mpc save all<br />
<br />
[[Category:Русский]]</div>
Vas
https://wiki.archlinux.org/index.php?title=Xorg_(%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9)&diff=198966
Xorg (Русский)
2012-04-25T14:52:45Z
<p>Vas: corrected russian</p>
<hr />
<div>[[Category:Русский]]<br />
[[Category:XServer (Русский)]]<br />
{{i18n|Xorg}}<br />
{{out of date}}<br />
== Введение ==<br />
<br />
'''Xorg''' - это свободная открытая реализация оконной системы X11 (детальнее смотрите на [http://en.wikipedia.org/wiki/X.Org_Server статье о Xorg в wikipedia] или [http://wiki.x.org/wiki/ на wiki X.org]). В общем, если вы хотите GUI в Arch Linux, то вы захотите поставить xorg.<br />
<br />
== Установка Xorg ==<br />
<br />
<br />
Для начала сделайте следующее:<br />
<br />
Удостоверьтесь, что [[pacman]] настроен и обновлён.<br />
<br />
Далее, установите пакет xorg-server.<br />
В дополнении можно поставить группы пакетов xorg-apps и xorg-drivers полностью либо отдельные пакеты из этих групп. Установите пакет xorg-xinit.<br />
<br />
== Настройка xorg ==<br />
<br />
Как правило, настройка не требуется. Подробная и актуальная информация на данный момент содержится в английской части арч-вики.<br />
<br />
=== Настройка монитора ===<br />
<br />
В зависимости от вашего оборудования, у Xorg может не получиться обнаружить верно возможности вашего монитора или же просто вы захотите использовать меньшее разрешение, чем то. которое поддерживает ваш монитор. Возможно, вы захотите посмотреть на следующие значения в руководстве вашего монитора перед их установкой.<br />
Следующие настройки указываются в секции Monitor:<br />
<br />
==== Строчная синхронизация (horizontal sync) ====<br />
<br />
HorizSync 28-64<br />
<br />
==== Частота обновления ====<br />
<br />
VertRefresh 60<br />
<br />
Следующие настройки указываются в секции Screen:<br />
<br />
==== Глубина цветовой гаммы ====<br />
<br />
Depth 24<br />
<br />
==== Разрешение ====<br />
<br />
Modes "1280x1024" "1024x768" "800x600"<br />
<br />
=== Настройки клавиатуры ===<br />
<br />
В связи с выходом X.org 1.8, HAL больше не отвечает за переключение раскладок клавиатуры.<br />
<br />
==== Переключение раскладок средствами X.org ====<br />
<br />
Для настройки переключения раскладок необходимо поправить /etc/X11/xorg.conf.d/keyboard.conf (или создать новый файл в той же директории, например, 20-keyboard.conf, имя не критично):<br />
<br />
<pre>Section "InputClass"<br />
Identifier "evdev keyboard catchall"<br />
MatchIsKeyboard "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Driver "evdev"<br />
Option "XkbLayout" "us,ru(winkeys)"<br />
Option "XkbOptions" "grp:caps_toggle,grp_led:scroll"<br />
EndSection</pre><br />
<br />
===== Модель клавиатуры =====<br />
<br />
Чтобы изменить модель клавиатуры, используйте опцию XkbModel. Например, если у вас клавиатура Microsoft Wireless Multimedia Keyboard:<br />
<br />
Option "XkbModel" "microsoftmult"<br />
<br />
===== Сочетание клавиш для переключения раскладок =====<br />
<br />
За комбинацию клавиш переключения между двумя раскладками отвечает опция XkbOptions. Например, если вы хотите настроить переключение по Caps Lock:<br />
<br />
Option "XkbOptions" "grp:caps_toggle"<br />
<br />
Или переключение по Ctrl+Shift:<br />
<br />
Option "XkbOptions" "grp:ctrl_shift_toggle"<br />
<br />
Опция "grp_led:scroll" отвечает за включение индикатора Scroll Lock при смене на вторую раскладку (в данном случае - ru(winkeys)). Можно использовать вместо Scroll Lock и Caps Lock, и Num Lock.<br />
<br />
=== Размер дисплея/DPI ===<br />
<br />
Для того чтобы выбрать правильный размер шрифтов, размер дисплея должен быть установлен для предпочитаемого DPI.<br />
<br />
Сначала можно попробовать - настроить Xorg на автоопределение DPI и размеров экрана с помощью [http://en.wikipedia.org/wiki/Display_Data_Channel DDC].<br><br />
В <code>/etc/X11/xorg.conf</code> :<br />
...<br />
Section "Module"<br />
# support for Data Display Channel. Allows to query the monitor capabilities via the video card<br />
Load "ddc"<br />
# serial bus over which you speak the ddc protocol to get info from the monitor<br />
Load "i2c"<br />
...<br />
Section Screen<br />
...<br />
DefaultColorDepth 24<br />
SubSection "Display"<br />
Depth 24<br />
Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"<br />
EndSubSection<br />
...<br />
Не прописывайте Modeline и DisplaySize. Иногда это работает, если нет можно всё настроить вручную.<br />
<br />
<br />
В секции <code>"Monitor"</code> пропишите размер дисплея в миллиметрах:<br />
<br />
Section "Monitor"<br />
...<br />
DisplaySize 336 252 # 96 DPI @ 1280x960<br />
...<br />
EndSection<br />
<br />
Формула, рассчитывающая значение DisplaySize такова Ширина x 25.4 / DPI и Высота x 25.4 / DPI. Например, если вы запускаете Xorg с разрешением 1024x768 и хотите DPI, равное 96, используйте 1024 x 25.4 / 96 и 768 x 25.4 / 96. Округлённые значения приведены ниже.<br />
<br />
# calc: (x|y)pixels * 25.4 / dpi<br />
# DisplaySize 168 126 # 96 DPI @ 640x480<br />
# DisplaySize 210 157 # 96 DPI @ 800x600<br />
# DisplaySize 269 201 # 96 DPI @ 1024x768<br />
# DisplaySize 302 227 # 96 DPI @ 1152x864<br />
# DisplaySize 336 252 # 96 DPI @ 1280x960<br />
# DisplaySize 336 269 # 96 DPI @ 1280x1024 (соотношение сторон не 4:3)<br />
# DisplaySize 420 315 # 96 DPI @ 1600x1200<br />
<br />
<br />
Для nVidia драйверов вы, возможно, захотите отключить автоматическое определение DPI и поставить его вручную. Существует также более простой способ настройки DPI на этих картах. Любая или обе из следующих строк могут быть вставлены в секцию Device для вашей nVidia карты.<br />
<br />
Option "UseEdidDpi" "false"<br />
Option "DPI" "96 x 96"<br />
<br />
<br />
Результат может быть проверен с помощью следующей команды, которая должна вернуть 96x96 точек на дюйм, если вы установили DPI на 96.<br />
<br />
xdpyinfo | grep -B1 dot<br />
<br />
=== Проприетарные драйвера ===<br />
<br />
Если вы хотите использовать третьесторонние графические драйвера, проверьте сперва, что X сервер запускается нормально. Xorg должен запускаться без проблем без официальных драйверов, последние нужны только для дополнительных деталей, таких как 3D ускорение для игр, настройка двух мониторов, и выход TV-out. Смотрите статьи об установке драйверов [[NVIDIA (Русский)|NVIDIA]] или [[ATI]].<br />
<br />
=== Шрифты ===<br />
<br />
Некоторые советы по настройке шрифтов можно найти в [[Xorg Font Configuration|статье, посвящённой этому]].<br />
<br />
=== Примеры файлов xorg.conf ===<br />
Все, у кого есть написанный работающий файл xorg.conf, разместите здесь ссылку на него, чтобы другие могли посмотреть! Пожалуйста, не вставляйте файл здесь, а разместите где-нибудь и укажите ссылку. Спасибо!<br />
<br />
'''''to author:''' без обид, но в ряде веб-броузеров ссылки не открываются либо на момент просмотра недоступны, поэтому все-таки пару примером выложить стоит.''<br />
<br />
'''Работающий пример для видео карты GF-5200, монитор CTX, стандартные клавиатура и мышь'''<br />
<br />
Section "ServerLayout"<br />
Identifier "Minimal layout"<br />
Screen "Screen0" 0 0<br />
EndSection<br />
<br />
Section "Module"<br />
SubSection "extmod"<br />
Option "omit xfree86-dga"<br />
EndSubSection<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "CTX VL500 series, MS500 series (120 Hz)|0"<br />
DisplaySize 280 210<br />
HorizSync 30.0 - 70.0<br />
VertRefresh 50.0 - 120.0<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "Card0|0"<br />
Driver "nvidia"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "Card0|0"<br />
Monitor "CTX VL500 series, MS500 series (120 Hz)|0"<br />
DefaultDepth 24<br />
SubSection "Display"<br />
Modes "1024x768" "1024x736" "1024x600" "960x720" "848x480" "832x624" "800x600" "720x576" "640x480"<br />
EndSubSection<br />
EndSection<br />
<br />
* Shadowhand (nv и nvidia драйвера): http://people.os-zen.net/shadowhand/configs/xorg.conf<br />
* Cerebral (fglrx и radeon драйвера): http://www.student.cs.uwaterloo.ca/~tjwillar/configs/xorg.conf<br />
* raskolnikov (via unichrome и synaptics драйвера): http://athanatos.free.fr/Arch/xorg.conf<br />
* cheer (nvidia и synaptics драйвера, русская раскладка, dell 9400): http://lice.wordpress.com/dell-9400-configuration/xorgconf/<br />
<br />
== Запуск Xorg ==<br />
<br />
Просто наберите:<br />
<br />
startx<br />
<br />
Х по умолчанию является достаточно жалким зрелищем, вы наверняка захотите установить один из множества WM/DE.<br />
<br />
Если возникнут проблемы, просмотрите лог (<tt>/var/log/Xorg.0.log</tt>). Обращайте внимание на строки начинающиеся с "(ЕЕ)",которые сигнализируют об ошибках, а также ("WW"), которые означают предупреждения.<br />
<br />
'''*Обратите внимание*'''<br />
Использование startx требует файла ''~/.xinitrc'', чтобы X знал, что запускать при старте. Лучше всего скопировать ''/etc/skel/.xinitrc'' в домашний каталог и отредактировать. Закомментируйте все нежелательные 'exec' строчки, и добавьте или раскомментируйте WM, который вы хотите использовать.<br />
<br />
Кроме того, вы можете установить twm и xterm (с помощью pacman), которые будут использоваться, если ~/.xinitrc не существует (эти настройки хранятся в файле /etc/X11/xinit/xinitrc).<br />
<br />
== Усовершенствование загрузки X ==<br />
для опций X смотрите<br />
<br />
man Xserver<br />
<br />
Следующие опции могут быть добавлены к переменной "defaultserverargs" в файле /usr/bin/startx.<br />
<br />
запретить X прослушивание по tcp:<br />
-nolisten tcp<br />
избавиться от серого узора при загрузке X и заменить его чёрным фоном:<br><br />
-br<br />
включить задержку загрузки глифов для 16-битных шрифтов:<br />
-deferglyphs 16<br />
<br />
Если вы запускаете X с помощью kdm, то скрипт startx не выполняется. Эти опции могут быть добавлены к переменной "ServerCmd" в файле /opt/kde/share/config/kdm/kdmrc.<br />
<br />
== Изменения в модульном Xorg ==<br />
<br />
=== Самые распространённые пакеты ===<br />
<br />
Note: Мета-пакет 'xorg' включает в себя самые распространённые нужные пакеты - когда вы делаете '''pacman -Syu''' для обновления с Xorg 6.8, он должен обновиться до этого пакета.<br />
<br />
Удостоверьтесь, что вы установили драйвера для мыши, клавиатуры и видеокарты. Для устройств ввода пакеты '''xf86-input-keyboard''' и '''xf86-input-mouse''' должны быть установлены. Дргие пакеты вида '''xf86-input-*''' доступны для других устройств ввода.<br />
<br />
Что касается видеокарты, найдите, какой драйвер требуется и установите соответствующий пакет вида '''xf86-video-*'''. Пользователи ATI и Nvidia могут установить проприетарные драйвера для своих видеокарт ([[NVIDIA (Русский) | NVIDIA]], [[ATI | ATI]]).<br />
<br />
Для установки всех драйверов сразу доступны пакеты '''xorg-input-drivers''' и '''xorg-video-drivers'''.<br />
<br />
=== OpenGL 3D ускорение ===<br />
<br />
Xorg 7.1 в Arch Linux использует модульный вид для mesa, системы рендеринга OpenGL. Доступны некоторые реализации:<br />
* libgl-dri: свободная реализация DRI OpenGL. Возвращается к софтверному рендерингe, когда не установлен ни один из DRI драйверов.<br />
* некоторые другие, предоставляющие libGL (ati, nvidia)<br />
<br />
Когда pacman устанавливает приложение, которому требуется mesa, он установит один из этих пакетов. Чтобы быть уверенным в установке нужной библиотеки для вашей системы, установите её до установки Xorg. Установка нужного пакета после также возможна, хотя это может иногда привести к некоторым ошибкам с зависимостями, которые можно преодолеть с помощью опции -d.<br />
<br />
=== glxgears и glxinfo ===<br />
<br />
Эти приложения находятся в пакете mesa-demos.<br />
<br />
== Проблемы ==<br />
<br />
=== Если вместо всех шрифтов квадратики ===<br />
<br />
# pango-querymodules > /etc/pango/pango.modules<br />
<br />
=== Быстрое решение конфликта с Bitstream-Vera ===<br />
Если вы видите сообщение о конфликте ttf-bitstream-vera conflicts и xorg:<br />
#Выйдите из pacman'а, ответив no.<br />
#Run <code>pacman -Rd xorg</code><br />
#Run <code>pacman -Syu</code><br />
#Run <code>pacman -S xorg</code><br />
#Обновите пути в файле /etc/X11/xorg.conf<br />
<br />
=== Быстрое решение конфликтов файлов в /usr/include ===<br />
Если вы видите сообщения о конфликтах файлов в /usr/include/X11 и /usr/include/GL:<br />
#выполните <code>rm /usr/include/{GL,X11}</code><br />
#выполните <code>pacman -Su</code><br />
Каталоги, на которые были созданы символические ссылки будут удаленыи заменены реальными каталогами в новом пакете xorg, который и вызвал конфликт у файлов.<br />
<br />
=== Конфликты с libgl-dri ===<br />
<br />
Если вы видите сообщение типа:<br />
:: libgl-dri conflicts with nvidia-legacy. Remove nvidia-legacy? [Y/n]<br />
это проиходит из-за нескольких реализаций OpenGL, объяснённых в разделе OpenGL выше - pacman пытается установить libgl-dri для удовлетворения зависимостей, но ещё и хочет обновить ваш видеодрайвер, а они конфликтуют. Для разрешения проблемы попробуйте:<br />
<br />
* обновить видеодрайвер перед полным обновлением системы: <br />
pacman -S nvidia-legacy<br />
pacman -Syu<br />
<br />
или, если это не работает:<br />
* Удалить существующий видеодрайвер, обновиться, потом переустановить драйвер:<br />
$ pacman -Rd nvidia-legacy<br />
$ pacman -Syu<br />
$ pacman -S nvidia-legacy<br />
:: nvidia-legacy conflicts with libgl-dri. Remove libgl-dri? [Y/n] '''Y'''<br />
<br />
=== НЕработающее колесо мыши ===<br />
Протокол "Auto" не работает правильно в Xorg 7. В секции InputDevice для мыши, измените:<br />
Option "Protocol" "auto"<br />
на<br />
Option "Protocol" "IMPS/2"<br />
или<br />
Option "Protocol" "ExplorerPS/2"<br />
<br />
=== Дополнительные кнопки на мыши перестали работать ===<br />
Пользователи USB мышей должны прочитать [[Get_All_Mouse_Buttons_Working]].<br />
<br />
Пользователи Intellimouse (ExplorerPS/2) могут столкнуться с неработающим скроллом и боковыми кнопками. Раньше была запись в xorg.conf:<br />
Option "Buttons" "7"<br />
Option "ZAxisMapping" "6 7"<br />
и пользователи также запускали xmodmap, чтобы боковые кнопки работали, командой типа:<br />
xmodmap -e "pointer = 1 2 3 6 7 4 5"<br />
Теперь xmodmap не нужен. Вместо этого исправьте xorg.conf так:<br />
Option "Buttons" "5"<br />
Option "ZAxisMapping" "4 5"<br />
Option "ButtonMapping" "1 2 3 6 7"<br />
и боковые кнопки 7-кнопочной Intellimouse будут работать, как и прежде, без запуска xmodmap.<br />
<br />
=== Проблемы с клавиатурой ===<br />
<br />
Некоторые раскладки клавиатуры изменились. Стало невозможным:<br />
* использовать Ctrl+Alt+Fx для переключения между консолями<br />
* переключаться по раскладкам<br />
* использовать знак £ для локали gb<br />
<br />
Проблема заключается в том, что некоторые раскладки (например, ''sk_qwerty'', ''uk'') перестали существовать. Следует заменить<br />
Option "XkbLayout" "us,sk_qwerty"<br />
на<br />
Option "XkbLayout" "us,sk"<br />
Option "XkbVariant" ",qwerty"<br />
<br />
Также обратите внимание на следующие строки:<br />
Option "XkbRules" "xfree86" #должно быть "xorg"<br />
Option "XkbVariant" "nodeadkeys" #эта строчка может вызывать описанные выше проблемы, попробуйте её закомментировать.<br />
<br />
==== AltGR (Compose клавиша) не работает правильно ====<br />
<br />
Если после обновления вы не можете использовать клавишу altGr, как раньше её использовали, попробуйте добавить эту строку в раздел клавиатуры:<br />
Option "XkbOptions" "compose:ralt"<br />
<br />
Это не совсем правильный вариант активирования клавиши AltGr на немецкой клавиатуре (например, чтобы использовать знаки '|' и '@'). Просто выберите верный keyboard variant, чтобы клавиша снова заработала, например (для немецкой клавиатуры):<br />
Option "XkbLayout" "de"<br />
Option "XkbVariant" "nodeadkeys"<br />
<br />
Вышеуказанные решения не работают, если у вас итальянская клавиатура. Для того чтобы активировать клавишу AltGr на итальянской клавиатуре, проверьте правильность следующих строк:<br />
Driver "kbd"<br />
Option "XkbRules" "xorg"<br />
Option "XkbVariant" ""<br />
<br />
==== Невозможно установить раскладку командой setxkbmap ====<br />
<br />
После обновления некоторые qwerty раскладки были удалены, например sk_qwerty. Если вы хотите переключить имеющуюся раскладку на другую qwerty, используйте следующую команду:<br />
setxkbmap NAME_OF_THE_LAYOUT qwerty<br />
например, для sk_qwerty вводите:<br />
setxkbmap sk qwerty<br />
<br />
Может так получиться, что после обновления и вышеприведённой команды будет сообщение: "Error loading new keyboard description".<br />
Оказывается, xserver не имеет прав записи, исполнения и чтения в /var/tmp<br />
Просто дайте права на эту директорию и перезапустите xserver!<br />
<br />
==== Настройка франко-канадской раскладки (бывшая ca_enhanced) ====<br />
<br />
В Xorg7 "ca_enhanced" более не существует. Для получения той раскладки, которая была, придётся использовать маленький трюк.<br />
Измените<br />
Option "XkbLayout" "ca_enhanced"<br />
на<br />
Option "XkbLayout" "ca"<br />
Option "XkbVariant" "fr"<br />
<br />
То же самое, видимо, и с другими подобными раскладками. Вы можете обратиться к Gentoo HowTo по этому вопросу: http://www.gentoo.org/proj/en/desktop/x/x11/modular-x-howto.xml<br />
<br />
=== KDM/GDM не работают ===<br />
<br />
KDM/GDM не может запуститься, так как ищет X в неверном месте.<br />
<br />
<br />
* '''Исправления в конфигурационных файлах:''' отредактируйте соответствующие конфигурационные файлы для KDM/GDM (наверное, лучшее решение).<br />
<br />
Для GDM измените файл gdm.conf, заменив все встречающиеся упоминания /usr/X11R6/bin/X на /usr/bin/X<br />
<br />
vim /opt/gnome/etc/gdm/gdm.conf<br />
<br />
Команда замены для vi<br />
<br />
:%s/\/usr\/X11R6\/bin\/X/\/usr\/bin\/X/g<br />
<br />
Для KDM надо изменить файл /opt/kde/share/kdm/kdmrc.<br />
<br />
<br />
* '''Метод символических ссылок:''' вам надо запустить следующие команды для исправления ситуации:<br />
<br />
mkdir -p /usr/X11R6/bin/<br />
ln -s /usr/bin/X /usr/X11R6/bin/X<br />
<br />
попробуйте снова, должно заработать.<br />
<br />
Если вышеуказанная команда не сработала, попробуйте так:<br />
<br />
ln -s /usr/bin/ /usr/X11R6/bin<br />
<br />
Возможно, потребуется перезагрузка.<br />
<br />
=== Отсутствующие библиотеки ===<br />
* '''Помогите! Постоянно вываливается окно с сообщением об ошибке запуска моей любимой программы: "libXчто-то" не существует!'''<br><br />
В большинстве случаев всё, что вам нужно сделать, - это взять имя библиотеки (например,libXau.so.1), перевести название в нижний регистр и установить её:<br />
pacman -S libxau<br />
<br />
=== Некоторые пакеты не собираются, жалуясь на отсутствующие X11 includes ===<br />
Просто переустановите пакеты xproto и libx11, даже если они уже установлены.<br />
<br />
=== Невозможно загрузить шрифт '(null)' ===<br />
* '''Некоторые программы не работают и говорят, что не могут загрузить шрифт `(null)'.'''<br><br />
Эти пакеты хотят каких-то дополнительных шрифтов. Некоторые программы работают только с bitmap шрифтами.<br />
Доступны два больших пакета, содержащих bitmap шрифты, xorg-fonts-75dpi и xorg-fonts-100dpi. Вам не нужны оба, достаточно и одного. Чтобы найти, какой вам подходит больше, попробуйте команду:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
и выберите, что ближе (75 или 100 вместо XX)<br />
<br />
pacman -S xorg-fonts-XXdpi<br />
<br />
=== Иконки KDE в панели задач и на Десктопе не работают ===<br />
* '''Панель задач KDEне работает и исчезли иконки на рабочем столе'''<br><br />
Установите пакеты libxcomposite и libxss:<br />
<br />
pacman -S libxcomposite libxss<br />
<br />
=== Обновление с testing до current (отсутствующие файлы) ===<br />
<br />
Если вы обновились с Xorg 7 из testing до Xorg 7 из current и обнаружили, что много файлов отсутствуют (включая startx, /usr/share/X11/rgb.txt и другие), потеря могла произойти из-за того, что пакет xorg-clients был разбит на много мелких пакетов.<br><br />
<br />
Вам необходимо переустановить пакеты, которые являются зависимостями xorg-clients:<br />
pacman -S xorg-apps xorg-font-utils xorg-res-utils xorg-server-utils \<br />
xorg-twm xorg-utils xorg-xauth xorg-xdm xorg-xfs xorg-xfwp \<br />
xorg-xinit xorg-xkb-utils xorg-xsm<br />
<br />
Это должно разрешить проблему.<br />
<br />
=== Проблемы с MIME типами в различных DE ===<br />
<br />
Если вы заметили недостающие иконки и вы не можете открывать файлы по щелчку мыши в вашем DE, добавьте следующие строчки в /etc/profile или предпочитаемый скрипт загрузки и перезагрузитесь.<br />
XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share<br />
export XDG_DATA_DIRS<br />
<br />
=== DRI перестало работать с картами Matrox ===<br />
<br />
Если вы используете карту Matrox и DRI не работает после обновления до xorg7, попробуйте добавить строку<br />
Option "OldDmaInit" "On"<br />
в секцию Device, описывающую видеокарту в xorg.conf.<br />
<br />
=== Не выставляется нужное разрешение экрана ===<br />
<br />
Если Xorg запускается разрешением экрана, не соответствующим максимально возможному для вашего монитора - попробуйте расширить диапазон частот '''VertRefresh''' в секции '''Monitor'''. Некоторые мониторы не могут воспроизводить картинку своего максимального разрешения на максимальной частоте.<br />
<br />
== Полезные ссылки ==<br />
* [[Добавление экранного менеджера входа в систему (KDM, GDM или XDM) в автозагрузку]]<br />
* [[Запуск X при загрузке]]<br />
* [[Xorg Font Configuration (Русский)]]<br />
* Проприетарные видеодрайверы<br />
** [[ATI | ATI wiki]]<br />
** [[NVIDIA (Русский)]]<br />
* [[Desktop Environment]]<br />
** [[KDE]]<br />
** [[GNOME]]<br />
** [[Xfce]]<br />
** [[Enlightenment]]<br />
** [[Fluxbox]]<br />
<br />
Внешние ссылки:<br />
<br />
* [http://en.wikipedia.org/wiki/X.Org_Server X.org Wikipedia Article]<br />
* [http://wiki.x.org/wiki/ X.org]</div>
Vas