https://wiki.archlinux.org/api.php?action=feedcontributions&user=Blin&feedformat=atomArchWiki - User contributions [en]2024-03-29T00:27:08ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Kernel&diff=243341Kernel2013-01-09T20:33:38Z<p>Blin: Fixed link for applied kernel patches</p>
<hr />
<div>[[Category:Kernel]]<br />
[[cs:Kernel Compilation]]<br />
[[es:Kernel Compilation]]<br />
[[it:Kernels]]<br />
[[zh-CN:Kernels]]<br />
{{Article summary start}}<br />
{{Article summary text|This article discusses kernels in Arch, kernel patches and kernel compilation.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Kernel modules}}<br />
{{Article summary wiki|Kernel Panics}}<br />
{{Article summary wiki|Linux-ck}}<br />
{{Article summary wiki|sysctl}}<br />
{{Article summary end}}<br />
<br />
From [[Wikipedia:Kernel (computing)|Wikipedia]]:<br />
:''the kernel is the main component of most computer operating systems; it is a bridge between applications and the actual data processing done at the hardware level. The kernel's responsibilities include managing the system's resources (the communication between hardware and software components).''<br />
<br />
There are various alternative kernels available for Arch Linux in addition to the mainline Linux kernel. This article lists some of the options available in the repositories with a brief description of each. There is also a description of patches that can be applied to the system's kernel. The article ends with an overview of custom kernel compilation with links to various methods.<br />
<br />
==Precompiled kernels==<br />
===Official packages===<br />
;{{Pkg|linux}}<br />
:The Linux kernel and modules from the [core] repository. Vanilla kernel with [https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/linux three patches applied].<br />
<br />
;{{Pkg|linux-lts}}<br />
:Long term support (LTS) Linux kernel and modules from the [core] repository.<br />
<br />
===AUR packages===<br />
;{{AUR|linux-bfs}}<br />
:Linux kernel and modules with the [[Wikipedia:Brain_Fuck_Scheduler|Brain Fuck Scheduler]] (BFS) - created by Con Kolivas for desktop computers with fewer than 4096 cores, with BFQ I/O scheduler as optional.<br />
<br />
;{{AUR|linux-ck}}<br />
:Linux Kernel built with Con Kolivas' ck1 patchset.<br />
:Additional options which can be toggled on/off in the [[PKGBUILD]] include: BFQ scheduler, nconfig, localmodconfig and use running kernel's config.<br />
:These are patches designed to improve system responsiveness with specific emphasis on the desktop, but suitable to any workload. The ck patches include BFS.<br />
:For further information and installation instructions, please read the [[linux-ck]] main article.<br />
<br />
;{{AUR|linux-eee-ck}}<br />
:The Linux Kernel and modules for the Asus Eee PC 701, built with Con Kolivas' ck1 patchset.<br />
<br />
;{{AUR|linux-fbcondecor}}<br />
:The Linux Kernel and modules with fbcondecor support.<br />
<br />
;{{AUR|linux-grsec}}<br />
:The Linux Kernel and modules with grsecurity and PaX patches for increased security.<br />
<br />
;{{AUR|linux-ice}}<br />
:The Linux Kernel and modules with gentoo-sources patchset and TuxOnIce support.<br />
<br />
;{{AUR|linux-lqx}}<br />
:[http://liquorix.net Liquorix] is a distro kernel replacement built using the best configuration and kernel sources for desktop, multimedia, and gaming workloads, often used as a Debian Linux performance replacement kernel. damentz, the maintainer of the Liquorix patchset, is a developer for the Zen patchset as well, so many of the improvements there are found in this patchset.<br />
<br />
;{{AUR|linux-pax}}<br />
:The Linux Kernel and modules with PaX patches for increased security.<br />
<br />
;{{AUR|linux-pf}}<br />
:Linux kernel and modules with the [http://pf.natalenko.name/ pf-kernel] patchset [-ck patchset (BFS included), TuxOnIce, BFQ], aufs2 and squashfs-lzma.<br />
<br />
;{{AUR|linux-zen}}<br />
:The [http://zen-kernel.org Zen Kernel] is a the result of a collaborative effort of kernel hackers to provide the best Linux kernel possible for every day systems.<br />
<br />
;{{AUR|kernel-netbook}}<br />
:Static kernel for netbooks with Intel Atom N270/N280/N450/N550 such as the Eee PC with the add-on of external firmware ({{AUR|broadcom-wl}}) and patchset (BFS + TuxOnIce + BFQ optional) - Only Intel GPU<br />
<br />
;{{AUR|linux-lts-tresor}}<br />
:The stable LTS Linux Kernel and modules with integrated [http://www1.informatik.uni-erlangen.de/tresor TRESOR]<br />
<br />
==Patches and Patchsets==<br />
<br />
There are lots of reasons to patch your kernel, the major ones are for performance or support for non-mainline features such as reiser4 file system support. Other reasons might include fun and to see how it is done and what the improvements are.<br />
<br />
However, it is important to note that the best way to increase the speed of your system is to first tailor your kernel to your system, especially the architecture and processor type. For this reason using pre-packaged versions of custom kernels with generic architecture settings is not recommended or really worth it. A further benefit is that you can reduce the size of your kernel (and therefore build time) by not including support for things you do not have or use. For example, I always start with the stock kernel config when a new kernel version is released and I remove support for things like bluetooth, video4linux, 1000Mbit ethernet, etc. Stuff '''I''' know I won't use '''before''' I build my next kernel! However, this page is not about customizing your kernel config but I would recommend that as a first step to be combined with a patchset later.<br />
<br />
===How to install===<br />
<br />
The installation process of custom kernel packages relies on the Arch Build System (ABS). If you haven't built any custom packages yet you may consult the following articles: [[Arch Build System]] and [[Creating Packages]].<br />
<br />
If you haven't actually patched or customized a kernel before it is not that hard and there are many PKGBUILDs on the forum for individual patchsets. However, I would advise you to start from scratch with a bit of research on the benefits of each patchset rather than jumping on the nearest bandwagon! This way you'll learn much more about what you are doing rather than just choosing a kernel at startup and wondering what it actually does.<br />
<br />
See [[#Compilation]].<br />
<br />
===Major patchsets===<br />
<br />
First of all it is important to note that patchsets are developed by a variety of people. Some of these people are actually involved in the production of the linux kernel and others are hobbyists, which may reflect its level of reliability and stability.<br />
<br />
It is also worth noting that some patchsets are built on the back of other patchsets (which may or may not be reflected in the title of the patch). Patchsets (and kernel updates) can be released '''very''' frequently and often it is not worth keeping up with ALL of them so do not go crazy, unless you make it your hobby!<br />
<br />
You can search google for more sets - remember to use quotes {{ic|"-nitro"}} for example otherwise google will deliberately '''NOT''' show the results you want!<br />
<br />
{{note|This section is for '''information only''' - clearly no guarantees of stability or reliability are implied by inclusion on this page.}}<br />
<br />
====-ck ====<br />
<br />
These are patches designed to improve system responsiveness with specific emphasis on the desktop, but suitable to any workload. The patches are created and maintained by Con Kolivas, his site is at http://users.on.net/~ckolivas/kernel/. Con maintains a full set but also provides the patches broken down so you can add only those you prefer.<br />
<br />
The -ck patches can be found at http://ck.kolivas.org/patches/3.0/<br />
<br />
====-rt====<br />
<br />
This patchset is maintained by a small group of core developers, led by Ingo Molnar. This patch allows nearly all of the kernel to be preempted, with the exception of a few very small regions of code ("raw_spinlock critical regions"). This is done by replacing most kernel spinlocks with mutexes that support priority inheritance, as well as moving all interrupt and software interrupts to kernel threads. <br />
<br />
It further incorporates high resolution timers - a patch set, which is independently maintained.<br />
<br />
[as said from the [http://rt.wiki.kernel.org/index.php/CONFIG_PREEMPT_RT_Patch Real-Time Linux Wiki]]<br />
<br />
patch at http://www.kernel.org/pub/linux/kernel/projects/rt/<br />
<br />
====-bld====<br />
<br />
BLD is best described as a O(1) CPU picking technique. Which is done by reordering CPU runqueues based on runqueue loads. In other words, it keeps the scheduler aware of the load changes, which helps scheduler to keep runqueues in an order. This technique doesn't depend on scheduler ticks. The two most simple things in this technique are: load tracking and runqueue ordering; these are relatively simpler operations. Load tracking will be done whenever a load change happens on the system and based on this load change runqueue will be ordered. So, if we have an ordered runqueue from lowest to highest, then picking the less (or even busiest) runqueue is easy. Scheduler can pick the lowest runqueue without calculation and comparison at the time of placing a task in a runqueue. And while trying to distribute load at sched_exec and sched_fork our best choice is to pick the lowest busiest runqueue of the system. And in this way, system remains balanced without doing any load balancing. At the time of try_to_wake_up picking the idlest runqueue is topmost priority but it has been done as per domain basis to utilize CPU cache properly and it's an area where more concentration is requires.<br />
<br />
Google code Webpage: http://code.google.com/p/bld/<br />
<br />
Patches are only available for 3.3-rc3, 3.4-rc4 and 3.5.0.<br />
<br />
{{Warning|This scheduler is highly in development.}}<br />
<br />
====-grsecurity====<br />
<br />
Grsecurity is a security focused patchset. It adds numerous security related features such as Role-Based Access Control and utilizes features of the PaX project. It can be used on a desktop but a public server would receive the greatest benefit. Some applications are incompatible with the additional security measures implemented by this patchset. If this occurs, consider using a lower security level.<br />
<br />
The -grsecurity patches can be found at http://grsecurity.net<br />
<br />
====Tiny-Patches====<br />
The goal of [http://elinux.org/Linux_Tiny Linux Tiny] is to reduce its memory and disk footprint, as well as to add features to aid working on small systems. Target users are developers of embedded system and users of small or legacy machines such as 386s.<br />
<br />
Patch releases against the mainstream Linux kernel have been discontinued. The developers chose to focus on a few patches and spend their time trying to get them merged into the mainline kernel.<br />
<br />
====-pf====<br />
{{AUR|pf-kernel}} is yet another Linux kernel fork which provides you with a handful of awesome features not merged into mainline. It is based on neither existing Linux fork nor patchset, although some unofficial ports may be used if required patches haven't been released officially.<br />
The most prominent patches of linux-pf are TuxOnIce, the CK patchset (most notably BFS), AUFS3, LinuxIMQ, l7 filter and BFQ.<br />
<br />
===Individual patches===<br />
<br />
These are patches which can be simply included in any build of a vanilla kernel or incorporated (probably with some major tweaking) into another patchset. I have included some common ones for starters.<br />
<br />
====Reiser4====<br />
<br />
[[Reiser4]]<br />
<br />
====Gensplash/fbsplash====<br />
[[Gensplash]] - http://dev.gentoo.org/~spock/projects/<br />
<br />
== Compilation ==<br />
Arch Linux provides for several methods of kernel compilation.<br />
<br />
=== Using the Arch Build System (recommended) ===<br />
Using the [[Arch Build System]] is recommended to take advantage of the high quality of the existing {{Pkg|linux}} [[PKGBUILD]] and the benefits of [[Wikipedia:Package management system|package management]]. The PKGBUILD is structured so that you can stop the build after the source is downloaded and configure the kernel.<br />
<br />
See [[Kernels/Compilation/Arch Build System]].<br />
<br />
=== Traditional ===<br />
This method involves manually downloading a source tarball, and building in your home directory as normal user. Once configured, two compilation/installation methods are offered; the traditional manual method as well as makepkg/pacman.<br />
<br />
An advantage of the traditional method is that it will work on other Linux distributions. <br />
<br />
See [[Kernels/Compilation/Traditional]].<br />
<br />
===Proprietary NVIDIA driver===<br />
See [[NVIDIA#Alternate install: custom kernel]] for instructions on using the proprietary NVIDIA driver with a custom kernel.<br />
<br />
== See also ==<br />
*[http://www.kroah.com/lkn/ O'Reilly - Linux Kernel in a Nutshell] (free ebook)</div>Blinhttps://wiki.archlinux.org/index.php?title=Steam&diff=237624Steam2012-12-02T11:17:05Z<p>Blin: Amnesia: The Dark Descent troubleshooting</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
[[ja:Steam]]<br />
{{Article summary start}}<br />
{{Article summary text|[http://store.steampowered.com/about/ Steam] is a content delivery system made by Valve Software. It is best known as the platform needed to play Source Engine games (e.g. Half-Life 2, Counter-Strike). Today it offers many games from many other developers.}}<br />
<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Wine}}<br />
{{Article summary end}}<br />
<br />
See the [[Wikipedia:Steam_(software)|project Wiki page]] and the page in the [http://appdb.winehq.org/objectManager.php?sClass=version&iId=19444 Application Database] for more info.<br />
<br />
== Native Steam on Linux ==<br />
<br />
{{Note|At the moment the beta is closed to the general public. Arch Linux is not [https://support.steampowered.com/kb_article.php?ref&#61;1504-QHXN-8366 officially supported].}}<br />
<br />
{{Note|Some games may need additional dependencies.}}<br />
<br />
{{Note|Because the Steam client is a 32-bit application, you need to enable [[Multilib]] in pacman '''if you have a pure 64-bit installation'''. It may also make sense to install multilib-devel to provide some important multilib libraries. You also most likely need to install the 32-bit version of your graphics driver to run steam.}}<br />
<br />
Install {{aur|steam}} from the [[AUR]].<br />
(Current licensing prevents steam from being put in the community/multilib repository, see the [https://mailman.archlinux.org/pipermail/arch-dev-public/2012-November/024046.html mailing list thread])<br />
<br />
Even without being in the private beta, it can be started by opening a steam URL {{ic|steam://open/games}}. You can enter this url into web browser, or terminal emulator.<br />
<br />
===Fixes/Bugs/Error Messages===<br />
<br />
Steam is ''beta software'' which is '''not supported''' on this distribution. As such some fixes are needed on the users part to get things functioning properly. Several games have dependencies which may be missing from your system. If a game fails to launch (often without error messages) then make sure all of the libraries listed below that game are installed. (Please help us expand on this list)<br />
<br />
====GUI problems with KDE====<br />
<br />
If you are using KDE and you have problems with the GUI (such as lag or random crashes) modify the compositing type to OpenGL/Raster. So don't use the XRender!<br />
<br />
====Mouse Cursor Overwritten ====<br />
Steam overwrites the [[Cursor Themes|X11 Cursor theme]] when it launches. This is a problem with Gnome and other WMs/DMs that do not set a cursor theme. You can overcome this for Gnome by setting a mouse cursor theme.<br />
<br />
To fix this issue, become root and put the following into {{ic|/usr/share/icons/default/index.theme}} (creating the directory {{ic|/usr/share/icons/default}} if necessary):<br />
{{hc|/usr/share/icons/default/index.theme|<nowiki><br />
[Icon Theme]<br />
Inherits=Adwaita<br />
</nowiki>}}<br />
<br />
Note: Instead of "Adwaita", you can choose another cursor theme (e.g. Human).<br />
Alternatively, you can install {{AUR|gnome-cursors-fix}} from the [[AUR]].<br />
<br />
With other WMs/DMs you may have to find another way of setting the cursor theme.<br />
<br />
If the cursor gets stuck pointing in the wrong direction after exiting Steam, a workaround is to run <code>xsetroot -cursor_name left_ptr</code> (From [http://awesome.naquadah.org/wiki/FAQ#How_to_change_the_cursor_theme.3F the awesomewm wiki]).<br />
<br />
====And Yet It Moves====<br />
=====Dependencies=====<br />
* {{aur|lib32-libtheora}}<br />
* {{aur|lib32-libjpeg6}}<br />
* {{aur|lib32-libtiff4}}<br />
<br />
=====Compatibility=====<br />
Game refuses to launch and following message can be observed on console<br />
readlink: extra operand ‘Yet’<br />
Try 'readlink --help' for more information.<br />
To fix this, open {{ic|~/.steam/root/SteamApps/common/And Yet It Moves/AndYetItMovesSteam.sh}} in text editor and replace line<br />
ayim_dir="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"<br />
with<br />
<br />
ayim_dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"<br />
<br />
====The Book of Unwritten Tales====<br />
=====Dependencies=====<br />
* {{aur|lib32-libxaw}}<br />
* {{aur|lib32-jasper}}<br />
<br />
<br />
====Superbrothers: Sword & Sworcery EP====<br />
=====Dependencies=====<br />
<br />
* {{aur|lib32-curl}}<br />
* {{Pkg|lib32-glu}}<br />
<br />
====Team Fortress 2 ====<br />
=====Dependencies=====<br />
<br />
* {{aur|lib32-libtxc_dxtn}}<br />
<br />
=====Troubleshooting=====<br />
======No audio======<br />
It happens if there is no PulseAudio in your system.<br />
If you want to use Alsa, you need to launch the Steam or game directly with {{ic|SDL_AUDIODRIVER&#61;alsa}} <br />
(From [http://steamcommunity.com/app/221410/discussions/0/882966056462819091/#c882966056470753683 SteamCommunity]).<br />
<br />
======Start with black screen======<br />
Launch the Steam or game directly with {{ic|LC_NUMERIC&#61;POSIX}}.<br />
(From the same [http://steamcommunity.com/app/221410/discussions/0/882966056473048081/?tscn=1353343840#c882966056479647883 SteamCommunity]).<br />
<br />
For launching the game direclty you need to quit the Steam at first and then:<br />
SDL_AUDIODRIVER=alsa LC_NUMERIC=POSIX steam steam://rungameid/440<br />
<br />
====Amnesia: The Dark Descent====<br />
=====Dependencies=====<br />
<br />
* {{pkg|lib32-libxmu}}<br />
* {{pkg|lib32-glu}}<br />
<br />
=====Troubleshooting=====<br />
======Segfault======<br />
If you are using open source drivers you will need {{aur|lib32-libtxc_dxtn}} . See [http://www.frictionalgames.com/forum/thread-10924.html oficial forum] for details<br />
<br />
======Running from steam displays empty window======<br />
${install_dir}/run_steam.sh uses `arch` to check if the system is 32 or 64 bit. Replace `arch` with `uname -m`.<br />
<br />
====Serious Sam 3: BFE====<br />
=====Dependencies=====<br />
<br />
* {{aur|lib32-pciutils}}<br />
<br />
====Steel Storm: Burning Retribution====<br />
=====Troubleshooting=====<br />
======Start with black screen======<br />
The game tries to launch in 1024x768 resolution with fullscreen mode by default. It is impossible on some devices.<br />
(for example laptop Samsung Series9 with intel hd4000 video).<br />
But you can try to launch the game in windowed mode. <br />
<br />
Open game Properties in Steam, in General tab select "Set launch options..." and type "-window".<br />
<br />
Then you can change a resolution in game.<br />
<br />
======No English fonts======<br />
If you use intel video card, just disable S3TC in DriConf.<br />
<br />
====Trine 2====<br />
=====Dependencies=====<br />
<br />
* {{pkg|lib32-mesa}}<br />
<br />
====Killing Floor====<br />
=====Troubleshooting=====<br />
======screen resolution======<br />
--[[User:RAfitiiixxx|RAfitiiixxx]] 15:39, 22 November 2012 (UTC)<br />
<br />
Killing Floor runs pretty much from scratch, altough you might have to change in-game resolution screen as the default one is '''800x600''' and a '''4:3''' screen format.<br />
If you try to modify screen resolution in-game, it might crash your desktop enviroment.<br />
To fix this, please set the desired resolution screen size by modifing your {{ic|<nowiki>${HOME}/.killingfloor/System/KillingFloor.ini</nowiki>}} with your prefered editor.<br />
{{hc|# nano /root/.killingfloor/System/KillingFloor.ini|<nowiki><br />
...<br />
<br />
[WinDrv.WindowsClient]<br />
WindowedViewportX=????<br />
WindowedViewportY=????<br />
FullscreenViewportX=????<br />
FullscreenViewportY=????<br />
MenuViewportX=???<br />
MenuViewportY=???<br />
<br />
...<br />
<br />
[SDLDrv.SDLClient]<br />
WindowedViewportX=????<br />
WindowedViewportY=????<br />
FullscreenViewportX=????<br />
FullscreenViewportY=????<br />
MenuViewportX=????<br />
MenuViewportY=????<br />
<br />
...<br />
</nowiki>}}<br />
{{Note|Replace all the '''????''' with the corresponding numbers according the desired resolution. If you have an 1366x768 screen and want to use it at it's fullest, change all the Viewport fields to something like '''ViewportX&#61;1366''' and '''ViewportY&#61;768''' in the corresponding areas.}}<br />
{{Note| The dots in the middle indicate that there are more fields in that .ini file. But for screen resolution troubleshooting, you don't need to modify anything else.}}<br />
<br />
Save the file and restart the game, it should work now.<br />
<br />
== Steam on Wine ==<br />
<br />
Install {{Pkg|wine}} from the official repositories and follow the instructions provided in the [[Wine|article]].<br />
<br />
Install the required Microsoft fonts {{AUR|ttf-microsoft-tahoma}} and {{AUR|ttf-ms-fonts}} from the [[AUR]] or through {{AUR|winetricks-svn}}.<br />
{{Note|If you have access to Windows discs, you may want to install {{AUR|ttf-win7-fonts}} instead.}}<br />
<br />
If you have an old Wine prefix ({{ic|~/.wine}}), you should remove it and let Wine create a new one to avoid problems (you can transfer over anything you want to keep to the new Wine prefix).<br />
<br />
===Installation===<br />
<br />
Download and run the Steam installer from [http://store.steampowered.com/about/ steampowered.com]. It is no longer an {{ic|.exe}} file so you have to start it with {{ic|msiexec}}: <br />
$ msiexec /i SteamInstall.msi<br />
<br />
===Starting Steam===<br />
<br />
On x86:<br />
$ wine ~/.wine/drive_c/Program\ Files/Steam/Steam.exe<br />
<br />
On x86_64 (with steam installed to a clean wine prefix):<br />
$ wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe<br />
<br />
Alternatively, you may use this method:<br />
<br />
$ wine "C:\\Program Files\\Steam\\steam.exe" <br />
<br />
You should consider making an alias to easily start steam (and put it in your shell's rc file), example:<br />
alias steam='wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe >/dev/null 2>&1 &'<br />
<br />
{{Note|If you are using an nvidia card through bumblebee, you should prefix those commands with {{ic|optirun}}.}}<br />
<br />
===Tips===<br />
<br />
====Performance====<br />
<br />
Consider disabling wine debugging output by adding this to your shell rc file:<br />
export WINEDEBUG=-all<br />
or, just add it to your steam alias to only disable it for steam:<br />
alias steam='WINEDEBUG=-all wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe >/dev/null 2>&1 &'<br />
Additionally, Source games rely on a paged pool memory size specification for audio, and WINE by default does not have this set. To set it:<br />
wine reg add "HKLM\\System\\CurrentControlSet\\Control\\Session Manager\\Memory Management\\" /v PagedPoolSize /t REG_DWORD /d 402653184 /f<br />
<br />
==== Application Launch Options ====<br />
Go to "Properties" -> "Set Launch Options", e.g.:<br />
{{bc|-console -dxlevel 90 -width 1280 -height 1024<br />
}}<br />
* {{ic|console}}<br />
Activate the console in the application to change detailed applications settings.<br />
* {{ic|dxlevel}}<br />
Set the application's DirectX level, e.g. 90 for DirectX Version 9.0. It is recommended to use the video card's DirectX version to prevent crashes. See the official Valve Software Wiki http://developer.valvesoftware.com/wiki/DirectX_Versions for details.<br />
* {{ic|width}} and {{ic|height}}<br />
Set the screen resolution. In some cases the graphic settings are not saved in the application and the applications always starts in the default resolution.<br />
Please refer to http://developer.valvesoftware.com/wiki/Launch_options for a complete list of launch options.<br />
<br />
==== Using a Pre-Existing Steam Install ====<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to {{ic|~/.wine/drive_c/Program Files/Steam/}} . However, be sure to do '''all''' the previous steps in this wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
{{Note|If you have trouble starting Steam after symlinking the entire Steam folder, try linking only the {{ic|steamapps}} subdirectory in your existing wine steam folder instead.}}<br />
<br />
====Running Steam in a second X Server====<br />
<br />
Assuming you are using the script above to start Steam, make a new script, called {{ic|x.steam.sh}}. You should run this when you want to start Steam in a new X server, and {{ic|steam.sh}} if you want Steam to start in the current X server. <br />
<br />
If due to misconfiguration a black screen is shown, you could always close down the second X server by pressing {{Keypress|Ctrl}} + {{Keypress|Alt}} + {{Keypress|Backspace}}.<br />
<br />
{{bc|1=<br />
#!/bin/bash <br />
<br />
DISPLAY=:1.0<br />
<br />
xinit $HOME/steam.sh $* -- :1<br />
}}<br />
<br />
Now you can use {{Keypress|Ctrl}} + {{Keypress|Alt}} + {{Keypress|F7}} to get to your first X server with your normal desktop, and {{Keypress|Ctrl}} + {{Keypress|Alt}} + {{Keypress|F8}} to go back to your game. <br />
<br />
Because the second X server is ''only'' running the game and the first X server with all your programs is backgrounded, performance should increase. In addition, it is much more convenient to switch X servers while in game to access other resources, rather than having to exit the game completely or {{Keypress|Alt}}-{{Keypress|Tab}} out. Finally, it is useful for when Steam or WINE goes haywire and leaves a bunch of processes in memory after Steam crashes. Simply {{Keypress|Ctrl}} + {{Keypress|Alt}} + {{Keypress|Backspace}} on the second X server to kill that X and all processes on that desktop will terminate as well. <br />
<br />
'''If you get errors that look like "Xlib: connection to ":1.0" refused by server" when starting the second X''': You will need to adjust your X permissions.<br />
<br />
'''If you lose the ability to use the keyboard while using Steam''': This is an odd bug that does not happen with other games. A solution is to use a WM in the second X as well. Thankfully, you do not need to run a large WM. Openbox and icewm have been confirmed to fix this bug (evilwm, pekwm, lwm ''do not'' work), but the icewm taskbar shows up on the bottom of the game, thus it's recommended to use [[Openbox]]. Install {{Pkg|openbox}} from the [[official repositories]], then add {{Ic|openbox &}} to the top of your {{ic|steam.sh}} file. Note you can run other programs (ex. Teamspeak &) or set X settings (ex. xset, xmodmap) before the WINE call as well.<br />
<br />
====Steam Links in Firefox, Chrome, Etc====<br />
To make steam:// urls in your browser connect with steam in wine, there are several things you can do. One involves making steam url-handler keys in gconf, another involves making protocol files for kde, others involve tinkering with desktop files or the Local State file for chromium. These seem to only work in firefox or under certain desktop configurations. One way to do it that works more globally is using mimeo, a tool made by Xyne (an Arch TU) which follows. For another working and less invasive (but firefox-only) way, see the first post [http://ubuntuforums.org/showthread.php?t=433548 here] .<br />
<br />
* Make {{ic| /usr/bin/steam}} with your favorite editor and paste:<br />
<br />
{{bc|<br />
#!/bin/sh<br />
#<br />
# Steam wrapper script<br />
#<br />
exec wine "c:\\program files\\steam\\steam.exe" "$@"<br />
}}<br />
<br />
* Make it executable.<br />
<br />
# chmod +x /usr/bin/steam<br />
<br />
* Install {{AUR|mimeo}} and {{AUR|xdg-utils-mimeo}} from AUR. You will need to replace the existing {{pkg|xdg-utils}} if installed. In XFCE, you will also need {{pkg|xorg-utils}}.<br />
<br />
* Make {{ic|$HOME/.config/mimeo.conf}} with your favorite editor and paste:<br />
<br />
{{bc|<br />
/usr/bin/steam %u<br />
^steam://<br />
}}<br />
<br />
* Lastly, open {{ic|/usr/bin/xdg-open}} in your favorite editor. Go to the {{ic|detectDE()}} section and change it to look as follows:<br />
<br />
{{bc|<nowiki><br />
detectDE()<br />
{<br />
#if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;<br />
#elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;<br />
#elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;<br />
#elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;<br />
#elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;<br />
#else DE=""<br />
#fi<br />
DE=""<br />
}<br />
</nowiki>}}<br />
<br />
* Restart the browser and you should be good to go. In chromium, you cannot enter a {{ic|steam://}} link in the url box like you can with firefox. The forum link above has a {{ic|steam://open/friends}} link to try if needed.<br />
<br />
{{Note|If you have any problems with file associations after doing this, simply revert to regular xdg-utils and undo your changes to {{ic|/usr/bin/xdg-open}}.}}<br />
{{Note|Those on other distributions that stumble upon this page, see the link above for firefox specific instructions. No easy way to get it working on Chromium on other distros exists.}}<br />
<br />
====No text rendered problem====<br />
If there is no text/font rendered when starting steam you should try to start steam with the parameter {{ic|-no-dwrite}}. Read more in [https://bbs.archlinux.org/viewtopic.php?id=146223 the forum thread about it.]<br />
{{bc|wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe -no-dwrite}}</div>Blinhttps://wiki.archlinux.org/index.php?title=Steam&diff=237609Steam2012-12-02T10:55:01Z<p>Blin: Amnesia: The Dark Descent dependency</p>
<hr />
<div>[[Category:Gaming]]<br />
[[Category:Wine]]<br />
[[ja:Steam]]<br />
{{Article summary start}}<br />
{{Article summary text|[http://store.steampowered.com/about/ Steam] is a content delivery system made by Valve Software. It is best known as the platform needed to play Source Engine games (e.g. Half-Life 2, Counter-Strike). Today it offers many games from many other developers.}}<br />
<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Wine}}<br />
{{Article summary end}}<br />
<br />
See the [[Wikipedia:Steam_(software)|project Wiki page]] and the page in the [http://appdb.winehq.org/objectManager.php?sClass=version&iId=19444 Application Database] for more info.<br />
<br />
== Native Steam on Linux ==<br />
<br />
{{Note|At the moment the beta is closed to the general public. Arch Linux is not [https://support.steampowered.com/kb_article.php?ref&#61;1504-QHXN-8366 officially supported].}}<br />
<br />
{{Note|Some games may need additional dependencies.}}<br />
<br />
{{Note|Because the Steam client is a 32-bit application, you need to enable [[Multilib]] in pacman '''if you have a pure 64-bit installation'''. It may also make sense to install multilib-devel to provide some important multilib libraries. You also most likely need to install the 32-bit version of your graphics driver to run steam.}}<br />
<br />
Install {{aur|steam}} from the [[AUR]].<br />
(Current licensing prevents steam from being put in the community/multilib repository, see the [https://mailman.archlinux.org/pipermail/arch-dev-public/2012-November/024046.html mailing list thread])<br />
<br />
Even without being in the private beta, it can be started by opening a steam URL {{ic|steam://open/games}}. You can enter this url into web browser, or terminal emulator.<br />
<br />
===Fixes/Bugs/Error Messages===<br />
<br />
Steam is ''beta software'' which is '''not supported''' on this distribution. As such some fixes are needed on the users part to get things functioning properly. Several games have dependencies which may be missing from your system. If a game fails to launch (often without error messages) then make sure all of the libraries listed below that game are installed. (Please help us expand on this list)<br />
<br />
====GUI problems with KDE====<br />
<br />
If you are using KDE and you have problems with the GUI (such as lag or random crashes) modify the compositing type to OpenGL/Raster. So don't use the XRender!<br />
<br />
====Mouse Cursor Overwritten ====<br />
Steam overwrites the [[Cursor Themes|X11 Cursor theme]] when it launches. This is a problem with Gnome and other WMs/DMs that do not set a cursor theme. You can overcome this for Gnome by setting a mouse cursor theme.<br />
<br />
To fix this issue, become root and put the following into {{ic|/usr/share/icons/default/index.theme}} (creating the directory {{ic|/usr/share/icons/default}} if necessary):<br />
{{hc|/usr/share/icons/default/index.theme|<nowiki><br />
[Icon Theme]<br />
Inherits=Adwaita<br />
</nowiki>}}<br />
<br />
Note: Instead of "Adwaita", you can choose another cursor theme (e.g. Human).<br />
Alternatively, you can install {{AUR|gnome-cursors-fix}} from the [[AUR]].<br />
<br />
With other WMs/DMs you may have to find another way of setting the cursor theme.<br />
<br />
If the cursor gets stuck pointing in the wrong direction after exiting Steam, a workaround is to run <code>xsetroot -cursor_name left_ptr</code> (From [http://awesome.naquadah.org/wiki/FAQ#How_to_change_the_cursor_theme.3F the awesomewm wiki]).<br />
<br />
====And Yet It Moves====<br />
=====Dependencies=====<br />
* {{aur|lib32-libtheora}}<br />
* {{aur|lib32-libjpeg6}}<br />
* {{aur|lib32-libtiff4}}<br />
<br />
=====Compatibility=====<br />
Game refuses to launch and following message can be observed on console<br />
readlink: extra operand ‘Yet’<br />
Try 'readlink --help' for more information.<br />
To fix this, open {{ic|~/.steam/root/SteamApps/common/And Yet It Moves/AndYetItMovesSteam.sh}} in text editor and replace line<br />
ayim_dir="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"<br />
with<br />
<br />
ayim_dir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"<br />
<br />
====The Book of Unwritten Tales====<br />
=====Dependencies=====<br />
* {{aur|lib32-libxaw}}<br />
* {{aur|lib32-jasper}}<br />
<br />
<br />
====Superbrothers: Sword & Sworcery EP====<br />
=====Dependencies=====<br />
<br />
* {{aur|lib32-curl}}<br />
* {{Pkg|lib32-glu}}<br />
<br />
====Team Fortress 2 ====<br />
=====Dependencies=====<br />
<br />
* {{aur|lib32-libtxc_dxtn}}<br />
<br />
=====Troubleshooting=====<br />
======No audio======<br />
It happens if there is no PulseAudio in your system.<br />
If you want to use Alsa, you need to launch the Steam or game directly with {{ic|SDL_AUDIODRIVER&#61;alsa}} <br />
(From [http://steamcommunity.com/app/221410/discussions/0/882966056462819091/#c882966056470753683 SteamCommunity]).<br />
<br />
======Start with black screen======<br />
Launch the Steam or game directly with {{ic|LC_NUMERIC&#61;POSIX}}.<br />
(From the same [http://steamcommunity.com/app/221410/discussions/0/882966056473048081/?tscn=1353343840#c882966056479647883 SteamCommunity]).<br />
<br />
For launching the game direclty you need to quit the Steam at first and then:<br />
SDL_AUDIODRIVER=alsa LC_NUMERIC=POSIX steam steam://rungameid/440<br />
<br />
====Amnesia: The Dark Descent====<br />
=====Dependencies=====<br />
<br />
* {{pkg|lib32-libxmu}}<br />
* {{pkg|lib32-glu}}<br />
<br />
=====Troubleshooting=====<br />
If you get segfault and are using open source drivers you will need {{aur|lib32-libtxc_dxtn}} . See [http://www.frictionalgames.com/forum/thread-10924.html oficial forum] for details<br />
<br />
====Serious Sam 3: BFE====<br />
=====Dependencies=====<br />
<br />
* {{aur|lib32-pciutils}}<br />
<br />
====Steel Storm: Burning Retribution====<br />
=====Troubleshooting=====<br />
======Start with black screen======<br />
The game tries to launch in 1024x768 resolution with fullscreen mode by default. It is impossible on some devices.<br />
(for example laptop Samsung Series9 with intel hd4000 video).<br />
But you can try to launch the game in windowed mode. <br />
<br />
Open game Properties in Steam, in General tab select "Set launch options..." and type "-window".<br />
<br />
Then you can change a resolution in game.<br />
<br />
======No English fonts======<br />
If you use intel video card, just disable S3TC in DriConf.<br />
<br />
====Trine 2====<br />
=====Dependencies=====<br />
<br />
* {{pkg|lib32-mesa}}<br />
<br />
====Killing Floor====<br />
=====Troubleshooting=====<br />
======screen resolution======<br />
--[[User:RAfitiiixxx|RAfitiiixxx]] 15:39, 22 November 2012 (UTC)<br />
<br />
Killing Floor runs pretty much from scratch, altough you might have to change in-game resolution screen as the default one is '''800x600''' and a '''4:3''' screen format.<br />
If you try to modify screen resolution in-game, it might crash your desktop enviroment.<br />
To fix this, please set the desired resolution screen size by modifing your {{ic|<nowiki>${HOME}/.killingfloor/System/KillingFloor.ini</nowiki>}} with your prefered editor.<br />
{{hc|# nano /root/.killingfloor/System/KillingFloor.ini|<nowiki><br />
...<br />
<br />
[WinDrv.WindowsClient]<br />
WindowedViewportX=????<br />
WindowedViewportY=????<br />
FullscreenViewportX=????<br />
FullscreenViewportY=????<br />
MenuViewportX=???<br />
MenuViewportY=???<br />
<br />
...<br />
<br />
[SDLDrv.SDLClient]<br />
WindowedViewportX=????<br />
WindowedViewportY=????<br />
FullscreenViewportX=????<br />
FullscreenViewportY=????<br />
MenuViewportX=????<br />
MenuViewportY=????<br />
<br />
...<br />
</nowiki>}}<br />
{{Note|Replace all the '''????''' with the corresponding numbers according the desired resolution. If you have an 1366x768 screen and want to use it at it's fullest, change all the Viewport fields to something like '''ViewportX&#61;1366''' and '''ViewportY&#61;768''' in the corresponding areas.}}<br />
{{Note| The dots in the middle indicate that there are more fields in that .ini file. But for screen resolution troubleshooting, you don't need to modify anything else.}}<br />
<br />
Save the file and restart the game, it should work now.<br />
<br />
== Steam on Wine ==<br />
<br />
Install {{Pkg|wine}} from the official repositories and follow the instructions provided in the [[Wine|article]].<br />
<br />
Install the required Microsoft fonts {{AUR|ttf-microsoft-tahoma}} and {{AUR|ttf-ms-fonts}} from the [[AUR]] or through {{AUR|winetricks-svn}}.<br />
{{Note|If you have access to Windows discs, you may want to install {{AUR|ttf-win7-fonts}} instead.}}<br />
<br />
If you have an old Wine prefix ({{ic|~/.wine}}), you should remove it and let Wine create a new one to avoid problems (you can transfer over anything you want to keep to the new Wine prefix).<br />
<br />
===Installation===<br />
<br />
Download and run the Steam installer from [http://store.steampowered.com/about/ steampowered.com]. It is no longer an {{ic|.exe}} file so you have to start it with {{ic|msiexec}}: <br />
$ msiexec /i SteamInstall.msi<br />
<br />
===Starting Steam===<br />
<br />
On x86:<br />
$ wine ~/.wine/drive_c/Program\ Files/Steam/Steam.exe<br />
<br />
On x86_64 (with steam installed to a clean wine prefix):<br />
$ wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe<br />
<br />
Alternatively, you may use this method:<br />
<br />
$ wine "C:\\Program Files\\Steam\\steam.exe" <br />
<br />
You should consider making an alias to easily start steam (and put it in your shell's rc file), example:<br />
alias steam='wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe >/dev/null 2>&1 &'<br />
<br />
{{Note|If you are using an nvidia card through bumblebee, you should prefix those commands with {{ic|optirun}}.}}<br />
<br />
===Tips===<br />
<br />
====Performance====<br />
<br />
Consider disabling wine debugging output by adding this to your shell rc file:<br />
export WINEDEBUG=-all<br />
or, just add it to your steam alias to only disable it for steam:<br />
alias steam='WINEDEBUG=-all wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe >/dev/null 2>&1 &'<br />
Additionally, Source games rely on a paged pool memory size specification for audio, and WINE by default does not have this set. To set it:<br />
wine reg add "HKLM\\System\\CurrentControlSet\\Control\\Session Manager\\Memory Management\\" /v PagedPoolSize /t REG_DWORD /d 402653184 /f<br />
<br />
==== Application Launch Options ====<br />
Go to "Properties" -> "Set Launch Options", e.g.:<br />
{{bc|-console -dxlevel 90 -width 1280 -height 1024<br />
}}<br />
* {{ic|console}}<br />
Activate the console in the application to change detailed applications settings.<br />
* {{ic|dxlevel}}<br />
Set the application's DirectX level, e.g. 90 for DirectX Version 9.0. It is recommended to use the video card's DirectX version to prevent crashes. See the official Valve Software Wiki http://developer.valvesoftware.com/wiki/DirectX_Versions for details.<br />
* {{ic|width}} and {{ic|height}}<br />
Set the screen resolution. In some cases the graphic settings are not saved in the application and the applications always starts in the default resolution.<br />
Please refer to http://developer.valvesoftware.com/wiki/Launch_options for a complete list of launch options.<br />
<br />
==== Using a Pre-Existing Steam Install ====<br />
<br />
If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to {{ic|~/.wine/drive_c/Program Files/Steam/}} . However, be sure to do '''all''' the previous steps in this wiki. Confirm Steam launches and logs into your account, ''then'' do this:<br />
<br />
cd ~/.wine/drive_c/Program\ Files/ <br />
mv Steam/ Steam.backup/ (or you can just delete the directory)<br />
ln -s /mnt/windows_partition/Program\ Files/Steam/<br />
<br />
{{Note|If you have trouble starting Steam after symlinking the entire Steam folder, try linking only the {{ic|steamapps}} subdirectory in your existing wine steam folder instead.}}<br />
<br />
====Running Steam in a second X Server====<br />
<br />
Assuming you are using the script above to start Steam, make a new script, called {{ic|x.steam.sh}}. You should run this when you want to start Steam in a new X server, and {{ic|steam.sh}} if you want Steam to start in the current X server. <br />
<br />
If due to misconfiguration a black screen is shown, you could always close down the second X server by pressing {{Keypress|Ctrl}} + {{Keypress|Alt}} + {{Keypress|Backspace}}.<br />
<br />
{{bc|1=<br />
#!/bin/bash <br />
<br />
DISPLAY=:1.0<br />
<br />
xinit $HOME/steam.sh $* -- :1<br />
}}<br />
<br />
Now you can use {{Keypress|Ctrl}} + {{Keypress|Alt}} + {{Keypress|F7}} to get to your first X server with your normal desktop, and {{Keypress|Ctrl}} + {{Keypress|Alt}} + {{Keypress|F8}} to go back to your game. <br />
<br />
Because the second X server is ''only'' running the game and the first X server with all your programs is backgrounded, performance should increase. In addition, it is much more convenient to switch X servers while in game to access other resources, rather than having to exit the game completely or {{Keypress|Alt}}-{{Keypress|Tab}} out. Finally, it is useful for when Steam or WINE goes haywire and leaves a bunch of processes in memory after Steam crashes. Simply {{Keypress|Ctrl}} + {{Keypress|Alt}} + {{Keypress|Backspace}} on the second X server to kill that X and all processes on that desktop will terminate as well. <br />
<br />
'''If you get errors that look like "Xlib: connection to ":1.0" refused by server" when starting the second X''': You will need to adjust your X permissions.<br />
<br />
'''If you lose the ability to use the keyboard while using Steam''': This is an odd bug that does not happen with other games. A solution is to use a WM in the second X as well. Thankfully, you do not need to run a large WM. Openbox and icewm have been confirmed to fix this bug (evilwm, pekwm, lwm ''do not'' work), but the icewm taskbar shows up on the bottom of the game, thus it's recommended to use [[Openbox]]. Install {{Pkg|openbox}} from the [[official repositories]], then add {{Ic|openbox &}} to the top of your {{ic|steam.sh}} file. Note you can run other programs (ex. Teamspeak &) or set X settings (ex. xset, xmodmap) before the WINE call as well.<br />
<br />
====Steam Links in Firefox, Chrome, Etc====<br />
To make steam:// urls in your browser connect with steam in wine, there are several things you can do. One involves making steam url-handler keys in gconf, another involves making protocol files for kde, others involve tinkering with desktop files or the Local State file for chromium. These seem to only work in firefox or under certain desktop configurations. One way to do it that works more globally is using mimeo, a tool made by Xyne (an Arch TU) which follows. For another working and less invasive (but firefox-only) way, see the first post [http://ubuntuforums.org/showthread.php?t=433548 here] .<br />
<br />
* Make {{ic| /usr/bin/steam}} with your favorite editor and paste:<br />
<br />
{{bc|<br />
#!/bin/sh<br />
#<br />
# Steam wrapper script<br />
#<br />
exec wine "c:\\program files\\steam\\steam.exe" "$@"<br />
}}<br />
<br />
* Make it executable.<br />
<br />
# chmod +x /usr/bin/steam<br />
<br />
* Install {{AUR|mimeo}} and {{AUR|xdg-utils-mimeo}} from AUR. You will need to replace the existing {{pkg|xdg-utils}} if installed. In XFCE, you will also need {{pkg|xorg-utils}}.<br />
<br />
* Make {{ic|$HOME/.config/mimeo.conf}} with your favorite editor and paste:<br />
<br />
{{bc|<br />
/usr/bin/steam %u<br />
^steam://<br />
}}<br />
<br />
* Lastly, open {{ic|/usr/bin/xdg-open}} in your favorite editor. Go to the {{ic|detectDE()}} section and change it to look as follows:<br />
<br />
{{bc|<nowiki><br />
detectDE()<br />
{<br />
#if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;<br />
#elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;<br />
#elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;<br />
#elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;<br />
#elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;<br />
#else DE=""<br />
#fi<br />
DE=""<br />
}<br />
</nowiki>}}<br />
<br />
* Restart the browser and you should be good to go. In chromium, you cannot enter a {{ic|steam://}} link in the url box like you can with firefox. The forum link above has a {{ic|steam://open/friends}} link to try if needed.<br />
<br />
{{Note|If you have any problems with file associations after doing this, simply revert to regular xdg-utils and undo your changes to {{ic|/usr/bin/xdg-open}}.}}<br />
{{Note|Those on other distributions that stumble upon this page, see the link above for firefox specific instructions. No easy way to get it working on Chromium on other distros exists.}}<br />
<br />
====No text rendered problem====<br />
If there is no text/font rendered when starting steam you should try to start steam with the parameter {{ic|-no-dwrite}}. Read more in [https://bbs.archlinux.org/viewtopic.php?id=146223 the forum thread about it.]<br />
{{bc|wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe -no-dwrite}}</div>Blinhttps://wiki.archlinux.org/index.php?title=WMFS&diff=128387WMFS2011-01-18T10:12:51Z<p>Blin: </p>
<hr />
<div>[[Category:Dynamic WMs (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n|WMFS}} {{DISPLAYTITLE:WMFS}}<br />
{{Article summary start|Summary}}<br />
{{Article summary text|Information on installing and configuring WMFS}}<br />
{{Article summary end}}<br />
<br />
== Introduction ==<br />
[http://wmfs.info/ WMFS] (Window Manager From Scratch) is a lightweight and highly configurable tiling window manager for X. It can be configured with a configuration file, supports Xft ([http://www.freetype.org/ Freetype]) fonts and is compliant with the Extended Window Manager Hints ([http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html EWMH]) specifications. It's still under heavy development <br />
<br />
== Installation ==<br />
WMFS is in [[AUR]]. Due the high development rate its recommended to use the [http://aur.archlinux.org/packages.php?ID=26924 git] version.<br />
<br />
You can install it with an AUR helper, or build it yourself.<br />
<br />
WMFS will look for a configuration file in {{filename|$XDG_CONFIG_HOME/wmfs}}. To configure WMFS to your liking, you will need to create a config file; for most users this will be {{filename|~/.config/wmfs/wmfsrc}}. If {{filename|~/.config/wmfs}} doesn't exist, create it:<br />
mkdir -p ~/.config/wmfs<br />
<br />
A default file is located in your XDG directory, normally in /etc/xdg/wmfs, called wmfsrc. Copy it to your newly created {{filename|.config/wmfs}} folder and you can begin to modify it.<br />
cp /etc/xdg/wmfs/wmfsrc ~/.config/wmfs<br />
<br />
To use wmfs as windowmanager, add it to your {{filename|.xinitrc}}:<br />
echo "exec wmfs" >> ~/.xinitrc<br />
<br />
== Configuration ==<br />
===Config file===<br />
The config file is well commented. Make small changes cumulatively and reload WMFS (default key to restart is {{Keypress|Alt}}+{{Keypress|Ctrl}}+{{Keypress|r}}) to test them.<br />
<br />
By default two different mod keys are used for keybindings ({{Keypress|Ctrl}} and {{Keypress|Alt}}) which may conflict with your pre-exisitng set-up. These can be changed in {{filename|wmfsrc}}. For example, if you want to use the Win-key instead of Alt, replace "Alt" with "Super" or "Mod4" in the config file, e.g:<br />
<br />
[key] mod = { "Super" } key = "p" func = "launcher" cmd = "launcher_exec" [/key]<br />
<br />
Or in a single command<br />
<br />
sed --in-place=.bak 's/"Alt"/"Mod4"/' wmfsrc<br />
<br />
To bind commands to special symbols you need to specify their name, like "slash" for "/". You can find symbol names by using xev and typing the symbol in question:<br />
xev | grep keycode<br />
state 0x10, keycode 61 (keysym 0x2f, slash), same_screen YES,<br />
state 0x10, keycode 60 (keysym 0x2e, period), same_screen YES,<br />
state 0x10, keycode 59 (keysym 0x2c, comma), same_screen YES,<br />
<br />
<br />
<br />
===Tags & Rules===<br />
Assigning clients to a tag, eg., having [[Uzbl]] open in tag 2, is done through rules. In {{filename|wmfsrc}}, write a new rule in the [rules] section:<br />
<br />
[rule] instance = "Uzbl" screen = 0 tag = "2" max = "false" [/rule]<br />
<br />
This will open Uzbl in tag 2 unmaximized. To specify a layout for that tag, under [tags]:<br />
[tag] name = "WWW" screen = 0 layout = "tile_right" [/tag] <br />
<br />
For some rules, eg., where an application is opened in a terminal, you may need to specify a class as well as an instance:<br />
<br />
[rule] instance = "mutt" class = "mutt" screen = 0 tag = "3" max = "true" [/rule]<br />
<br />
Use [http://www.xfree86.org/current/xprop.1.html xprop] to determine the values for your rule.<br />
<br />
===Key Bindings===<br />
The [keys] section of {{filename|wmfsrc}} allows you to customize your keybindings. As described above, this could mean just changing the default modifier from {{Keypress|Alt}} to {{Keypress|Super}}. <br />
<br />
By default, WMFS is set up to cycle through the 9 available layouts. You might, for example, wish to include a keybind to set a specific layout, say tile_right (the classic tiled mode). You could bind that function to {{Keypress|Super}}+{{Keypress|t}} like so:<br />
<br />
[key] mod = {"Mod4"} key = "t" func = "set_layout" cmd = "tile_right" [/key]<br />
<br />
Similarly, you can customize keybinds for any of the other functions. A full list of the functions can be found in {{filename|/src/config.c}} - search for "func_name_list_t".<br />
<br />
====Scratchpad====<br />
By combining a rule with a keybind, you can create a basic scratchpad - a terminal bound to a keypress that will open in floating mode in any tag in a specific position; for example:<br />
<br />
[key] mod = {"Control", "Alt"} key = "p" func = "spawn" cmd = "urxvtc -name scratchpad -geometry 64x10+480+34" [/key]<br />
<br />
[rule] instance = "scratchpad" name = "scratchpad" free = "true" [/rule]<br />
<br />
<br />
===Statusbar configuration===<br />
The text shown in the status bars (or infobars) is set on a running wmfs instance using the "wmfs -s" command. You can set a different bar for each screen. The bars can also be positioned at the top or bottom of each tag in the configuration file. For example<br />
wmfs -s "hello world, I am visible on all screens"<br />
wmfs -s 3 "hello world, I am visible on screen 4 only" # screens begin at 0<br />
<br />
Colors may be encoded like this:<br />
wmfs -s "This text is \#ff0000\red, \#00ff00\green and \#0000ff\blue"<br />
<br />
Rectangles may be drawn like this:<br />
wmfs -s "<--look rectangles \b[700;9;14;5;#00ff00]\ \b[715;4;14;10;#00ff00]\ \b[730;3;14;11;#ff0000]\ "<br />
<br />
The format is \b[xx;yy;ww;hh;#cccccc]\ where xx and yy are absolute (not relative) x and y positions, ww and hh are width and height, and cccccc is a color. This feature could be used to create CPU barcharts, volume displays and the like. Note: the absolute positioning makes it difficult to accurately interleave text and graphics.<br />
<br />
To pipe data to the bar, write a bash script with the relevant data you wish to display and source it in your {{filename|wmfsrc}}. WMFS will call it at the interval you specify:<br />
status_path = ".config/wmfs/wmfs-status"<br />
status_timing = 5<br />
<br />
Note that the output in the status.sh is as explained before.<br />
wmfs -s "What ever you want to be displayed"<br />
<br />
Some example status scripts are on the [http://wmfs.info/ WMFS] website.<br />
<br />
===Conky===<br />
<br />
You can use [[Conky]] to pipe output to wmfs' statusbar with the command:<br />
<br />
conky | while read -r; do wmfs -s -name "$REPLY"; done<br />
<br />
== Usage ==<br />
<br />
The keybinding {{Keypress|Alt}}+{{Keypress|p}} starts a launcher in the titlebar (similar to [[dmenu]]). It supports tab-completion and command-line parameters. Multiple presses of the tab key iterate through possible completions.<br />
<br />
WMFS can be controlled from the command line with commands such as<br />
<br />
wmfs -V :ln<br />
<br />
which selects the next layout. Equivalently press {{Keypress|Alt}}+{{Keypress|Escape}} followed by ":ln". Type "wmfs -V help" to see the full list.<br />
<br />
==Resources==<br />
* [http://wmfs.info/ WMFS] website<br />
* [https://bbs.archlinux.org/viewtopic.php?pid=870703#p870703 WMFS Forum Thread]</div>Blin