handbook-desktop.html (7070B)
1 <!doctype html> 2 <html lang="en"> 3 <head> 4 <meta charset="utf-8"> 5 <meta name="viewport" content="width=device-width, initial-scale=1"> 6 <title>X and a window manager - Chamesle</title> 7 <meta name="description" content="Any other window manager or desktop in the repos goes the same way; only the line in ~/.xinitrc changes."> 8 <link rel="canonical" href="https://chamesle.org/handbook-desktop.html"> 9 <meta property="og:type" content="website"> 10 <meta property="og:site_name" content="Chamesle"> 11 <meta property="og:title" content="X and a window manager - Chamesle"> 12 <meta property="og:description" content="Any other window manager or desktop in the repos goes the same way; only the line in ~/.xinitrc changes."> 13 <meta property="og:url" content="https://chamesle.org/handbook-desktop.html"> 14 <link rel="stylesheet" href="style.css?25"> 15 <link rel="icon" href="img/logo.png"> 16 </head> 17 <body> 18 19 <div id="page"> 20 21 <div id="top"> 22 <h1><a href="./"><img src="img/banner.png" alt="Chamesle Linux" width="223" height="56"></a></h1> 23 </div> 24 25 <div id="nav"> 26 <a href="./">Home</a> | 27 <a href="download.html">Download</a> | 28 <b>Handbook</b> | 29 <a href="packages.html">Packages</a> | 30 <a href="new.html">News</a> | 31 <a href="board.html">Board</a> | 32 <a href="chat.html">Chat</a> | 33 <a href="source.html">Source</a> | 34 <a href="https://x22.chamesle.org/">X22</a> | 35 <a href="https://github.com/tortr-rs/mag">mag</a> | 36 <a href="about.html">About</a> 37 </div> 38 39 <main> 40 <p><a href="handbook-maintaining.html">← Maintaining</a> | <a href="docs.html">Contents</a> | <a href="handbook-files.html">File reference →</a></p> 41 <h2>10. X and a window manager</h2> 42 <h2 id="s10-1">10.1 What to install</h2> 43 <pre>mag install xorg-server xinit xf86-input-libinput mesa-dri-gallium font-dejavu windowmaker st</pre> 44 <table> 45 <tr><th>package</th><th>for</th></tr> 46 <tr><td><code>xorg-server</code></td><td>X itself, with the <code>modesetting</code> driver, which drives Intel, AMD, NVIDIA and virtual graphics through the kernel</td></tr> 47 <tr><td><code>xinit</code></td><td><code>startx</code></td></tr> 48 <tr><td><code>xf86-input-libinput</code></td><td>keyboard, mouse and touchpad</td></tr> 49 <tr><td><code>mesa-dri-gallium</code></td><td>OpenGL</td></tr> 50 <tr><td><code>font-dejavu</code></td><td>a font; X programs show empty boxes without one</td></tr> 51 <tr><td><code>windowmaker</code></td><td>the window manager, and <code>WPrefs</code> for its settings</td></tr> 52 <tr><td><code>st</code></td><td>a terminal; <code>xterm</code> is another</td></tr> 53 </table> 54 <p>Any other window manager or desktop in the repos goes the same way; only the line in <code>~/.xinitrc</code> changes.</p> 55 <h2 id="s10-2">10.2 Firmware for the graphics</h2> 56 <p>The kernel's graphics drivers load firmware for most cards. Install the one for yours and reboot:</p> 57 <table> 58 <tr><th>graphics</th><th>firmware</th><th>Vulkan</th></tr> 59 <tr><td>Intel, up to 14th generation</td><td><code>linux-firmware-i915</code></td><td><code>mesa-vulkan-intel</code></td></tr> 60 <tr><td>Intel Arc, Lunar Lake and newer</td><td><code>linux-firmware-xe</code></td><td><code>mesa-vulkan-intel</code></td></tr> 61 <tr><td>AMD</td><td><code>linux-firmware-amdgpu</code>, <code>linux-firmware-radeon</code> for older cards</td><td><code>mesa-vulkan-ati</code></td></tr> 62 <tr><td>NVIDIA</td><td><code>linux-firmware-nvidia</code></td><td><code>mesa-vulkan-nouveau</code></td></tr> 63 </table> 64 <p>NVIDIA's own driver is built for glibc and is not in the repos. The open one, nouveau, runs every card; from the GTX 16 and RTX 20 on, the card's own firmware sets the clocks and it is fast, with Vulkan from NVK in <code>mesa-vulkan-nouveau</code>. On older NVIDIA cards it stays slow. <code>lspci</code> says which graphics a machine has.</p> 65 <h2 id="s10-3">10.3 Groups</h2> 66 <p>There is no logind to hand the screen and the input devices to whoever logs in. X opens them as the user, so the user needs the <code>video</code> and <code>input</code> groups (6.5):</p> 67 <pre>adduser alice video 68 adduser alice input</pre> 69 <p>Log out and in again after.</p> 70 <h2 id="s10-4">10.4 startx</h2> 71 <p><code>startx</code> runs <code>~/.xinitrc</code>, as the user, from a text login:</p> 72 <pre>echo 'exec wmaker' > ~/.xinitrc 73 startx</pre> 74 <p>X runs until <code>wmaker</code> ends: Exit in its menu. To start X at every login on tty1, at the end of <code>~/.profile</code>:</p> 75 <pre>[ "$(tty)" = /dev/tty1 ] && exec startx</pre> 76 <p>Lines in <code>.xinitrc</code> before the <code>exec</code> run first, which is the place for the keyboard layout and the screen size:</p> 77 <pre>setxkbmap fr 78 xrandr --output eDP-1 --mode 1920x1080 79 exec wmaker</pre> 80 <p><code>mag install setxkbmap xrandr</code> for those; <code>xrandr</code> alone lists the outputs and their modes.</p> 81 <h2 id="s10-5">10.5 Window Maker</h2> 82 <p>The first start makes <code>~/GNUstep</code> with Window Maker's settings. The right button on the desktop opens the menu, with programs, workspaces and Exit. The dock is in the top right corner and the clip, which switches workspaces, in the top left. Drag a program's icon to the dock to keep it there. <code>WPrefs</code> changes the rest: focus, themes, keys. The menu is <code>~/GNUstep/Defaults/WMRootMenu</code>.</p> 83 <h2 id="s10-6">10.6 Firefox</h2> 84 <pre>mag install firefox</pre> 85 <p><code>firefox-esr</code> is the long-term one. Firefox and many other programs want a D-Bus session; with <code>dbus</code> and <code>dbus-x11</code> installed and <code>dbus</code> enabled (6.2), start the window manager inside one:</p> 86 <pre>exec dbus-launch --exit-with-session wmaker</pre> 87 <h2 id="s10-7">10.7 When it fails</h2> 88 <p>X writes <code>~/.local/share/xorg/Xorg.0.log</code>; <code>grep EE</code> in it shows the errors.</p> 89 <table> 90 <tr><th>what you see</th><th>why, and what to do</th></tr> 91 <tr><td><code>open /dev/dri/card0: Permission denied</code>, then <code>no screens found</code></td><td>the user is not in <code>video</code> (10.3)</td></tr> 92 <tr><td><code>no screens found</code> with no permission error</td><td>no graphics driver came up; check <code>ls /dev/dri</code>, and the firmware (10.2)</td></tr> 93 <tr><td>no keyboard or mouse in X</td><td><code>xf86-input-libinput</code> is not installed, or the user is not in <code>input</code></td></tr> 94 <tr><td>X starts and ends at once</td><td><code>~/.xinitrc</code> is missing, or names a program that is not installed</td></tr> 95 <tr><td>boxes in place of letters</td><td>no font, <code>font-dejavu</code></td></tr> 96 </table> 97 <hr> 98 <p><a href="handbook-maintaining.html">← Maintaining</a> | <a href="docs.html">Contents</a> | <a href="handbook-files.html">File reference →</a></p> 99 </main> 100 101 <hr> 102 <div id="foot"> 103 Something wrong on this page? Tell us on the <a href="board.html">board</a>.<br> 104 Chamesle installs with <code>chamesle-install</code>, or by hand from the <a href="docs.html">handbook</a>.<br> 105 <a href="https://ko-fi.com/L6N725GI1V">Ko-fi</a><br> 106 <a href="#" id="edit-link">Edit text</a><br> 107 $Date: 2026-11-23 $ 108 </div> 109 110 </div> 111 112 <script src="edit.js"></script> 113 </body> 114 </html>