configuring_parabola.html 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <style type="text/css">
  7. @import url('../css/main.css');
  8. </style>
  9. <title>Configuring Parabola (post-install)</title>
  10. </head>
  11. <body>
  12. <div class="section">
  13. <h1 id="pagetop">Configuring Parabola (post-install)</h1>
  14. <p>
  15. Post-installation configuration steps for Parabola GNU/Linux-libre. Parabola is extremely flexible; this is just an example.
  16. </p>
  17. <p>
  18. <a href="index.html">Back to previous index</a>
  19. </p>
  20. </div>
  21. <div class="section">
  22. <h1>Table of Contents</h1>
  23. <ul>
  24. <li>
  25. <a href="#pacman_configure">Configuring pacman</a>
  26. <ul>
  27. <li><a href="#pacman_update">Updating Parabola</a></li>
  28. <li>
  29. <a href="#pacman_maintain">Maintaining Parabola during system updates</a>
  30. <ul>
  31. <li><a href="#pacman_cacheclean">Clearing package cache after updating</a></li>
  32. <li><a href="#pacman_commandequiv">Pacman command equivalents (compared to other package managers)</a></li>
  33. </ul>
  34. </li>
  35. <li><a href="#yourfreedom">your-freedom</a></li>
  36. </ul>
  37. </li>
  38. <li><a href="#useradd">Add a user account</a></li>
  39. <li><a href="#systemd">System D</a></li>
  40. <li><a href="#interesting_repos">Interesting repositories</a></li>
  41. <li>
  42. <a href="#network">Setup a network connection in Parabola</a>
  43. <ul>
  44. <li><a href="#network_hostname">Setting hostname</a></li>
  45. <li><a href="#network_status">Network status</a></li>
  46. <li><a href="#network_devicenames">Network interface names</a></li>
  47. <li><a href="#network_setup">Network setup</a></li>
  48. </ul>
  49. </li>
  50. <li><a href="#system_maintain">System maintenance</a> - important!</li>
  51. <li>
  52. <a href="#desktop">Configuring the desktop</a>
  53. <ul>
  54. <li><a href="#desktop_xorg">Install Xorg</a></li>
  55. <li><a href="#desktop_kblayout">Xorg keyboard layout</a></li>
  56. <li><a href="#desktop_lxde">Install LXDE</a></li>
  57. <li><a href="#lxde_clock">LXDE - clock</a></li>
  58. <li><a href="#lxde_font">LXDE - font</a></li>
  59. <li><a href="#lxde_screenlock">LXDE - screenlock</a></li>
  60. <li><a href="#lxde_automount">LXDE - automounting</a></li>
  61. <li><a href="#lxde_suspend">LXDE - disable suspend</a></li>
  62. <li><a href="#lxde_battery">LXDE - battery monitor</a></li>
  63. <li><a href="#lxde_network">LXDE - network manager</a></li>
  64. </ul>
  65. </li>
  66. </ul>
  67. </div>
  68. <div class="section">
  69. <p>
  70. While not strictly related to the libreboot project, this guide
  71. is intended to be useful for those interested in installing
  72. Parabola on their libreboot machine.
  73. </p>
  74. <p>
  75. It details configuration steps that I took after installing the base system,
  76. as a follow up to <a href="encrypted_parabola.html">encrypted_parabola.html</a>.
  77. This guide is likely to become obsolete at a later date (due to the volatile
  78. 'rolling-release' model that Arch/Parabola both use), but attempts will be made to maintain it.
  79. </p>
  80. <p>
  81. <b>
  82. This guide was valid on 2014-09-21. If you see any changes that should to be made at the present date, please get in touch
  83. with the libreboot project!
  84. </b>
  85. </p>
  86. </div>
  87. <div class="section">
  88. <p>
  89. You do not necessarily have to follow this guide word-for-word; <i>parabola</i> is extremely flexible.
  90. The aim here is to provide a common setup that most users will be happy with. While Parabola
  91. can seem daunting at first glance (especially for new GNU/Linux users), with a simple guide it can provide
  92. all the same usability as Trisquel, without hiding any details from the user.
  93. </p>
  94. <p>
  95. Paradoxically, as you get more advanced Parabola can actually become <i>easier to use</i>
  96. when you want to set up your machine in a special way compared to what most distributions provide.
  97. You will find over time that other distributions tend to <i>get in your way</i>.
  98. </p>
  99. </div>
  100. <div class="section">
  101. <p>
  102. <b>
  103. This guide assumes that you already have Parabola installed. If you have not yet installed Parabola,
  104. then <a href="encrypted_parabola.html">this guide</a> is highly recommended!
  105. </b>
  106. </p>
  107. <p>
  108. A lot of the steps in this guide will refer to the Arch wiki. Arch is the upstream distribution that Parabola uses.
  109. Most of this guide will also tell you to read wiki articles, other pages, manuals, and so on. In general it tries
  110. to cherry pick the most useful information but nonetheless you are encouraged to learn as much as possible.
  111. <b>It might take you a few days to fully install your system how you like, depending on how much you need to read. Patience is key,
  112. especially for new users</b>.
  113. </p>
  114. <p>
  115. The Arch wiki will sometimes use bad language, such as calling the whole system Linux, using the term open-source (or closed-source),
  116. and it will sometimes recommend the use of proprietary software. You need to be careful about this when reading anything on the
  117. Arch wiki.
  118. </p>
  119. </div>
  120. <div class="section">
  121. <p>
  122. Some of these steps require internet access. I'll go into networking later but for now, I just connected
  123. my machine to a switch and did:<br/>
  124. # <b>systemctl start dhcpcd.service</b><br/>
  125. You can stop it later by running:<br/>
  126. # <b>systemctl stop dhcpcd.service</b><br/>
  127. For most people this should be enough, but if you don't have DHCP on your network then you should setup your network connection first:<br/>
  128. <a href="#network">Setup network connection in Parabola</a>
  129. </p>
  130. </div>
  131. <div class="section">
  132. <h2 id="pacman_configure">Configure pacman</h2>
  133. <p>
  134. pacman (<b>pac</b>kage <b>man</b>ager) is the name of the package management system in Arch, which Parabola
  135. (as a deblobbed parallel effort) also uses. Like with 'apt-get' on debian-based systems like Trisquel,
  136. this can be used to add/remove and update the software on your computer.
  137. </p>
  138. <p>
  139. Based on <a href="https://wiki.parabolagnulinux.org/Installation_Guide#Configure_pacman">https://wiki.parabolagnulinux.org/Installation_Guide#Configure_pacman</a>
  140. and from reading <a href="https://wiki.archlinux.org/index.php/Pacman">https://wiki.archlinux.org/index.php/Pacman</a> (make sure to read and understand this,
  141. it's very important) and
  142. <a href="https://wiki.parabolagnulinux.org/Official_Repositories">https://wiki.parabolagnulinux.org/Official_Repositories</a>
  143. </p>
  144. <p>
  145. <a href="#pagetop">Back to top of page.</a>
  146. </p>
  147. </div>
  148. <div class="section">
  149. <h2 id="pacman_update">Updating Parabola</h2>
  150. <p>
  151. In the end, I didn't change my configuration for pacman. When you are updating, resync with the latest package names/versions:<br/>
  152. # <b>pacman -Syy</b><br/>
  153. (according to the wiki, -Syy is better than Sy because it refreshes the package list even if it appears to be up to date,
  154. which can be useful when switching to another mirror).<br/>
  155. Then, update the system:<br/>
  156. # <b>pacman -Syu</b>
  157. </p>
  158. <p>
  159. <b>
  160. Before installing packages with 'pacman -S', always update first, using the notes above.
  161. </b>
  162. </p>
  163. <p>
  164. Keep an eye out on the output, or read it in /var/log/pacman.log. Sometimes, pacman will show messages
  165. about maintenance steps that you will need to perform with certain files (typically configurations)
  166. after the update. Also, you should check both the Parabola and Arch home pages to see if they mention any issues.
  167. If a new kernel is installed, you should also update to be able to use it (the currently running kernel will
  168. also be fine). It's generally good enough to update Parabola once every week, or maybe twice. As a
  169. rolling release distribution, it's a good idea never to leave your install too outdated; update regularly. This
  170. is simply because of the way the project works; old packages are deleted from the repositories quickly, once they are updated.
  171. A system that hasn't been updated for quite a while will mean potentially more reading of previous posts through the website,
  172. and more maintenance work.
  173. </p>
  174. <p>
  175. The Arch forum can also be useful, if others have the same issue as you (if you encounter issues, that is). The <i>Parabola</i>
  176. IRC channel (#parabola on freenode) can also help you.
  177. </p>
  178. <p>
  179. Due to this and the volatile nature of Parabola/Arch, you should only update when you have at least a couple hours of spare time
  180. in case of issues that need to be resolved. You should never update, for example, if you need your system for an important event,
  181. like a presentation or sending an email to an important person before an allocated deadline, and so on.
  182. </p>
  183. <p>
  184. Relax - packages are well-tested regularly when new updates are made to the repositories. Separate 'testing' repositories
  185. exist for this exact reason. Despite what many people will tell you, Parabola is fairly stable and trouble-free,
  186. so long as you are aware of how to check for issues, and are willing to spend some time fixing issues in
  187. the rare event that they do occur.
  188. </p>
  189. <p>
  190. <a href="#pagetop">Back to top of page.</a>
  191. </p>
  192. </div>
  193. <div class="section">
  194. <h2 id="pacman_maintain">Maintaining Parabola</h2>
  195. <p>
  196. Parabola is a very simple distro, in the sense that you are in full control
  197. and everything is made transparent to you. One consequence is
  198. that you also need to know what you are doing, and what you have done before. In general, keeping notes (such as what I have done
  199. with this page) can be very useful as a reference in the future (if you wanted to re-install it or install the distro
  200. on another computer, for example).
  201. </p>
  202. <p>
  203. <a href="#pagetop">Back to top of page.</a>
  204. </p>
  205. <h3 id="pacman_cacheclean">Cleaning the package cache</h3>
  206. <p>
  207. <b>
  208. The following is very important as you continue to use, update and maintain your Parabola system:<br/>
  209. <a href="https://wiki.archlinux.org/index.php/Pacman#Cleaning_the_package_cache">https://wiki.archlinux.org/index.php/Pacman#Cleaning_the_package_cache</a>.
  210. Essentially, this guide talks about a directory that has to be cleaned once in a while, to prevent it from growing too big (it's a cache
  211. of old package information, updated automatically when you do anything in pacman).
  212. </b>
  213. </p>
  214. <p>
  215. To clean out all old packages that are cached:<br/>
  216. # <b>pacman -Sc</b>
  217. </p>
  218. <p>
  219. The wiki cautions that this should be used with care. For example, since older packages are deleted from the repo,
  220. if you encounter issues and want to revert back to an older package then it's useful to have the caches available.
  221. Only do this if you are sure that you won't need it.
  222. </p>
  223. <p>
  224. The wiki also mentions this method for removing everything from the cache, including currently installed packages that are cached:<br/>
  225. # <b>pacman -Scc</b><br/>
  226. This is inadvisable, since it means re-downloading the package again if you wanted to quickly re-install it. This should only be used
  227. when disk space is at a premium.
  228. </p>
  229. <p>
  230. <a href="#pagetop">Back to top of page.</a>
  231. </p>
  232. <h3 id="pacman_commandequiv">pacman command equivalents</h3>
  233. <p>
  234. The following table lists other distro package manager commands, and their equivalent in pacman:<br/>
  235. <a href="https://wiki.archlinux.org/index.php/Pacman_Rosetta">https://wiki.archlinux.org/index.php/Pacman_Rosetta</a>
  236. </p>
  237. <p>
  238. <a href="#pagetop">Back to top of page.</a>
  239. </p>
  240. </div>
  241. <div class="section">
  242. <h2 id="yourfreedom">your-freedom</h2>
  243. <p>
  244. your-freedom is a package specific to Parabola, and it is installed by default. What it does is conflict with packages
  245. from Arch that are known to be non-free (proprietary) software. When migrating from Arch (there is a guide on the Parabola
  246. wiki for migrating - converting - an existing Arch system to a Parabola system), installing
  247. your-freedom will also fail if these packages are installed, citing them as conflicts; the recommended solution
  248. is then to delete the offending packages, and continue installing <i>your-freedom</i>.
  249. </p>
  250. <p>
  251. <a href="#pagetop">Back to top of page.</a>
  252. </p>
  253. </div>
  254. <div class="section">
  255. <h2 id="useradd">Add a user</h2>
  256. <p>
  257. Based on <a href="https://wiki.archlinux.org/index.php/Users_and_Groups">https://wiki.archlinux.org/index.php/Users_and_Groups</a>.
  258. </p>
  259. <p>
  260. It is important (for security reasons) to create and use a non-root (non-admin) user account for everyday use. The default 'root' account is intended
  261. only for critical administrative work, since it has complete access to the entire operating system.
  262. </p>
  263. <p>
  264. Read the entire document linked to above, and then continue.
  265. </p>
  266. <p>
  267. Add your user:<br/>
  268. # <b>useradd -m -G wheel -s /bin/bash <i>yourusername</i></b><br/>
  269. Set a password:<br/>
  270. # <b>passwd <i>yourusername</i></b>
  271. </p>
  272. <p><a href="#pagetop">Back to top of page</a></p>
  273. </div>
  274. <div class="section">
  275. <h2 id="systemd">systemd</h2>
  276. <p>
  277. This is the name of the system used for managing services in Parabola. It is a good idea to become familiar with it.
  278. Read <a href="https://wiki.archlinux.org/index.php/systemd">https://wiki.archlinux.org/index.php/systemd</a>
  279. and <a href="https://wiki.archlinux.org/index.php/systemd#Basic_systemctl_usage">https://wiki.archlinux.org/index.php/systemd#Basic_systemctl_usage</a>
  280. to gain a full understanding. <b>This is very important! Make sure to read them.</b>
  281. </p>
  282. <p>
  283. An example of a 'service' could be a webserver (such as lighttpd), or sshd (openssh), dhcp, etc. There are countless others.
  284. </p>
  285. <p>
  286. <a href="https://bbs.archlinux.org/viewtopic.php?pid=1149530#p1149530">https://bbs.archlinux.org/viewtopic.php?pid=1149530#p1149530</a> explains
  287. the background behind the decision by Arch (Parabola's upstream supplier) to use systemd.
  288. </p>
  289. <p>
  290. The manpage should also help:<br/>
  291. # <b>man systemd</b><br/>
  292. The section on 'unit types' is especially useful.
  293. </p>
  294. <p>
  295. According to the wiki, systemd 'journal' keeps logs of a size up to 10% of the total size your / partition takes up.
  296. on a 60GB root this would mean 6GB. That's not exactly practical, and can have performance implications later when the
  297. log gets too big. Based on instructions from the wiki, I will reduce the total size of the journal to 50MiB (the wiki
  298. recommends 50MiB).
  299. </p>
  300. <p>
  301. Open /etc/systemd/journald.conf and find the line that says:<br/>
  302. <i>#SystemMaxUse=</i><br/>
  303. Change it to say:<br/>
  304. <i>SystemMaxUse=50M</i>
  305. </p>
  306. <p>
  307. The wiki also recommended a method for forwarding journal output to TTY 12 (accessible by pressing ctrl+alt+f12,
  308. and you use ctrl+alt+[F1-F12] to switch between terminals). I decided not to enable it.
  309. </p>
  310. <p>
  311. Restart journald:<br/>
  312. # <b>systemctl restart systemd-journald</b>
  313. </p>
  314. <p>
  315. The wiki recommends that if the journal gets too large, you can also simply delete (rm -Rf) everything inside /var/log/journald/*
  316. but recommends backing it up. This shouldn't be necessary, since you already set the size limit above and systemd will automatically
  317. start to delete older records when the journal size reaches it's limit (according to systemd developers).
  318. </p>
  319. <p>
  320. Finally, the wiki mentions 'temporary' files and the utility for managing them.<br/>
  321. # <b>man systemd-tmpfiles</b><br/>
  322. The command for 'clean' is:<br/>
  323. # <b>systemd-tmpfiles --clean</b><br/>
  324. According to the manpage, this <i>&quot;cleans all files and directories with an age parameter&quot;</i>.
  325. According to the Arch wiki, this reads information in /etc/tmpfiles.d/ and /usr/lib/tmpfiles.d/
  326. to know what actions to perform. Therefore, it is a good idea to read what's stored in these locations
  327. to get a better understanding.
  328. </p>
  329. <p>
  330. I looked in /etc/tmpfiles.d/ and found that it was empty on my system. However, /usr/lib/tmpfiles.d/ contained some files.
  331. The first one was etc.conf, containing information and a reference to this manpage:<br/>
  332. # <b>man tmpfiles.d</b><br/>
  333. Read that manpage, and then continue studying all the files.
  334. </p>
  335. <p>
  336. The systemd developers tell me that it isn't usually necessary to touch the systemd-tmpfiles utility manually at all.
  337. </p>
  338. <p><a href="#pagetop">Back to top of page</a></p>
  339. </div>
  340. <div class="section">
  341. <h2 id="interesting_repos">Interesting repositories</h2>
  342. <p>
  343. Parabola wiki at <a href="https://wiki.parabolagnulinux.org/Repositories#kernels">https://wiki.parabolagnulinux.org/Repositories#kernels</a>
  344. mentions about a repository called [kernels] for custom kernels that aren't in the default base. It might be worth looking into what is available
  345. there, depending on your use case.
  346. </p>
  347. <p>
  348. I enabled it on my system, to see what was in it. Edit /etc/pacman.conf and below the 'extra' section add:<br/>
  349. <i>
  350. [kernels]<br/>
  351. Include = /etc/pacman.d/mirrorlist
  352. </i>
  353. </p>
  354. <p>
  355. Now sync with the repository:<br/>
  356. # <b>pacman -Syy</b>
  357. </p>
  358. <p>
  359. List all available packages in this repository:<br/>
  360. # <b>pacman -Sl kernels</b>
  361. </p>
  362. <p>
  363. In the end, I decided not to install anything from it but I kept the repository enabled regardless.
  364. </p>
  365. <p><a href="#pagetop">Back to top of page.</a></p>
  366. </div>
  367. <div class="section">
  368. <h2 id="network">Setup a network connection in Parabola</h2>
  369. <p>
  370. Read <a href="https://wiki.archlinux.org/index.php/Configuring_Network">https://wiki.archlinux.org/index.php/Configuring_Network</a>.
  371. </p>
  372. <p>
  373. <a href="#pagetop">Back to top of page.</a>
  374. </p>
  375. <h3 id="network_hostname">Set the hostname</h3>
  376. <p>
  377. This should be the same as the hostname that you set in /etc/hostname when installing Parabola. You can also do it with systemd (do so now, if you like):<br/>
  378. # <b>hostnamectl set-hostname <i>yourhostname</i></b><br/>
  379. This writes the specified hostname to /etc/hostname. More information can be found in these manpages:<br/>
  380. # <b>man hostname</b><br/>
  381. # <b>info hostname</b><br/>
  382. # <b>man hostnamectl</b>
  383. </p>
  384. <p>
  385. Add the same hostname to /etc/hosts, on each line. Example:<br/>
  386. <i>
  387. 127.0.0.1 localhost.localdomain localhost <u>myhostname</u><br/>
  388. ::1 localhost.localdomain localhost <u>myhostname</u>
  389. </i>
  390. </p>
  391. <p>
  392. You'll note that I set both lines; the 2nd line is for IPv6. More and more ISPs are providing this now (mine does)
  393. so it's good to be forward-thinking here.
  394. </p>
  395. <p>
  396. The <i>hostname</i> utility is part of the <i>inetutils</i> package and is in core/, installed by default (as part of <i>base</i>).
  397. </p>
  398. <p>
  399. <a href="#pagetop">Back to top of page.</a>
  400. </p>
  401. <h3 id="network_status">Network Status</h3>
  402. <p>
  403. According to the Arch wiki, <a href="https://wiki.archlinux.org/index.php/Udev">udev</a> should already detect the ethernet chipset
  404. and load the driver for it automatically at boot time. You can check this in the <i>&quot;Ethernet controller&quot;</i> section
  405. when running this command:<br/>
  406. # <b>lspci -v</b>
  407. </p>
  408. <p>
  409. Look at the remaining sections <i>'Kernel driver in use'</i> and <i>'Kernel modules'</i>. In my case it was as follows:<br/>
  410. <i>
  411. Kernel driver in use: e1000e<br/>
  412. Kernel modules: e1000e
  413. </i>
  414. </p>
  415. <p>
  416. Check that the driver was loaded by issuing <i>dmesg | grep module_name</i>. In my case, I did:<br/>
  417. # <b>dmesg | grep e1000e</b>
  418. </p>
  419. <h3 id="network_devicenames">Network device names</h3>
  420. <p>
  421. According to <a href="https://wiki.archlinux.org/index.php/Configuring_Network#Device_names">https://wiki.archlinux.org/index.php/Configuring_Network#Device_names</a>,
  422. it is important to note that the old interface names like eth0, wlan0, wwan0 and so on no longer apply. Instead, <i>systemd</i>
  423. creates device names starting with en (for enternet), wl (for wifi) and ww (for wwan) with a fixed identifier that systemd automatically generates.
  424. An example device name for your ethernet chipset would be <i>enp0s25</i>, where it is never supposed to change.
  425. </p>
  426. <p>
  427. If you want to enable the old names (eth0, wlan0, wwan0, etc), the Arch wiki recommends
  428. adding <i>net.ifnames=0</i> to your kernel parameters (in libreboot context, this would be accomplished by following the
  429. instructions in <a href="grub_cbfs.html">grub_cbfs.html</a>).
  430. </p>
  431. <p>
  432. For background information,
  433. read <a href="http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/">Predictable Network Interface Names</a>
  434. </p>
  435. <p>
  436. Show device names:<br/>
  437. # <b>ls /sys/class/net</b>
  438. </p>
  439. <p>
  440. Changing the device names is possible (I chose not to do it):<br/>
  441. <a href="https://wiki.archlinux.org/index.php/Configuring_Network#Change_device_name">https://wiki.archlinux.org/index.php/Configuring_Network#Change_device_name</a>
  442. </p>
  443. <p>
  444. <a href="#pagetop">Back to top of page.</a>
  445. </p>
  446. <h3 id="network_setup">Network setup</h3>
  447. <p>
  448. I actually chose to ignore most of Networking section on the wiki. Instead, I plan to set up LXDE desktop with the graphical
  449. network-manager client. Here is a list of network managers:<br/>
  450. <a href="https://wiki.archlinux.org/index.php/List_of_applications/Internet#Network_managers">https://wiki.archlinux.org/index.php/List_of_applications/Internet#Network_managers</a>.
  451. If you need to, set a static IP address (temporarily) using the networking guide and the Arch wiki, or start the dhcpcd service in systemd.
  452. NetworkManager will be setup later, after installing LXDE.
  453. </p>
  454. <p>
  455. <a href="#pagetop">Back to top of page.</a>
  456. </p>
  457. </div>
  458. <div class="section">
  459. <h2 id="system_maintain">System Maintenance</h2>
  460. <p>
  461. Read <a href="https://wiki.archlinux.org/index.php/System_maintenance">https://wiki.archlinux.org/index.php/System_maintenance</a> before continuing.
  462. Also read <a href="https://wiki.archlinux.org/index.php/Enhance_system_stability">https://wiki.archlinux.org/index.php/Enhance_system_stability</a>.
  463. <b>This is important, so make sure to read them!</b>
  464. </p>
  465. <p>
  466. Install smartmontools (it can be used to check smart data. HDDs use non-free firmware inside, but it's transparent to you
  467. but the smart data comes from it. Therefore, don't rely on it too much):<br/>
  468. # <b>pacman -S smartmontools</b><br/>
  469. Read <a href="https://wiki.archlinux.org/index.php/S.M.A.R.T.">https://wiki.archlinux.org/index.php/S.M.A.R.T.</a> to learn how to use it.
  470. </p>
  471. <p>
  472. <a href="#pagetop">Back to top of page.</a>
  473. </p>
  474. </div>
  475. <div class="section">
  476. <h2 id="desktop">Configuring the desktop</h2>
  477. <p>
  478. Based on steps from
  479. <a href="https://wiki.archlinux.org/index.php/General_recommendations#Graphical_user_interface">General Recommendations</a> on the Arch wiki.
  480. The plan is to use LXDE and LXDM/LightDM, along with everything else that you would expect on other distributions that provide LXDE
  481. by default.
  482. </p>
  483. <p>
  484. <a href="#pagetop">Back to top of page.</a>
  485. </p>
  486. <div class="subsection">
  487. <h3 id="desktop_xorg">Installing Xorg</h3>
  488. <p>
  489. Based on <a href="https://wiki.archlinux.org/index.php/Xorg">https://wiki.archlinux.org/index.php/Xorg</a>.
  490. </p>
  491. <p>
  492. Firstly, install it!<br/>
  493. # <b>pacman -S xorg-server</b><br/>
  494. I also recommend installing this (contains lots of useful tools, including <i>xrandr</i>):<br/>
  495. # <b>pacman -S xorg-server-utils</b>
  496. </p>
  497. <p>
  498. Install the driver. For me this was <i>xf86-video-intel</i> on the ThinkPad X60. T60 and macbook11/21 should be the same.<br/>
  499. # <b>pacman -S xf86-video-intel</b><br/>
  500. For other systems you can try:<br/>
  501. # <b>pacman -Ss xf86-video- | less</b><br/>
  502. Combined with looking at your <i>lspci</i> output, you can determine which driver is needed.
  503. By default, Xorg will revert to xf86-video-vesa which is a generic driver and doesn't provide true hardware acceleration.
  504. </p>
  505. <p>
  506. Other drivers (not just video) can be found by looking at the <i>xorg-drivers</i> group:<br/>
  507. # <b>pacman -Sg xorg-drivers</b><br/>
  508. </p>
  509. <p>
  510. Mostly you will rely on a display manager, but in case you ever want to start X without one:<br/>
  511. # <b>pacman -S xorg-xinit</b>
  512. </p>
  513. <p>
  514. &lt;optional&gt;<br/>
  515. &nbsp;&nbsp;&nbsp;Arch wiki recommends installing these, for testing that X works:<br/>
  516. &nbsp;&nbsp;&nbsp;# <b>pacman -S xorg-twm xorg-xclock xterm</b><br/>
  517. &nbsp;&nbsp;&nbsp;Refer to <a href="https://wiki.archlinux.org/index.php/Xinitrc">https://wiki.archlinux.org/index.php/Xinitrc</a>.
  518. and test X:<br/>
  519. &nbsp;&nbsp;&nbsp;# <b>startx</b><br/>
  520. &nbsp;&nbsp;&nbsp;When you are satisfied, type <b><i>exit</i></b> in xterm, inside the X session.<br/>
  521. &nbsp;&nbsp;&nbsp;Uninstall them (clutter. eww): # <b>pacman -S xorg-xinit xorg-twm xorg-xclock xterm</b><br/>
  522. &lt;/optional&gt;
  523. </p>
  524. <p>
  525. <a href="#pagetop">Back to top of page.</a>
  526. </p>
  527. </div>
  528. <div class="subsection">
  529. <h3 id="desktop_kblayout">Xorg keyboard layout</h3>
  530. <p>
  531. Refer to <a href="https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg">https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg</a>.
  532. </p>
  533. <p>
  534. Xorg uses a different configuration method for keyboard layouts, so you will notice that the layout you
  535. set in /etc/vconsole.conf earlier might not actually be the same in X.
  536. </p>
  537. <p>
  538. To see what layout you currently use, try this on a terminal emulator in X:<br/>
  539. # <b>setxkbmap -print -verbose 10</b>
  540. </p>
  541. <p>
  542. In my case, I wanted to use the Dvorak (UK) keyboard which is quite different from Xorg's default Qwerty (US) layout.
  543. </p>
  544. <p>
  545. I'll just say it now: <i>XkbModel</i> can be <i>pc105</i> in this case (ThinkPad X60, with a 105-key UK keyboard).
  546. If you use an American keyboard (typically 104 keys) you will want to use <i>pc104</i>.
  547. </p>
  548. <p>
  549. <i>XkbLayout</i> in my case would be <i>gb</i>, and <i>XkbVariant</i> would be <i>dvorak</i>.
  550. </p>
  551. <p>
  552. The Arch wiki recommends two different methods for setting the keyboard layout:<br/>
  553. <a href="https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg#Using_X_configuration_files">https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg#Using_X_configuration_files</a> and<br/>
  554. <a href="https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg#Using_localectl">https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg#Using_localectl</a>.
  555. </p>
  556. <p>
  557. In my case, I chose to use the <i>configuration file</i> method:<br/>
  558. Create the file /etc/X11/xorg.conf.d/10-keyboard.conf and put this inside:<br/>
  559. <i>
  560. Section "InputClass"<br/>
  561. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Identifier "system-keyboard"<br/>
  562. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MatchIsKeyboard "on"<br/>
  563. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Option "XkbLayout" "gb"<br/>
  564. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Option "XkbModel" "pc105"<br/>
  565. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Option "XkbVariant" "dvorak"<br/>
  566. EndSection
  567. </i>
  568. </p>
  569. <p>
  570. For you, the steps above may differ if you have a different layout. If you use a US Qwerty keyboard, then
  571. you don't even need to do anything (though it might help, for the sake of being explicit).
  572. </p>
  573. <p>
  574. <a href="#pagetop">Back to top of page.</a>
  575. </p>
  576. </div>
  577. <div class="subsection">
  578. <h3 id="desktop_lxde">Install LXDE</h3>
  579. <p>
  580. Desktop choice isn't that important to me, so for simplicity I decided to use LXDE. It's lightweight
  581. and does everything that I need.
  582. If you would like to try something different, refer to
  583. <a href="https://wiki.archlinux.org/index.php/Desktop_environment">https://wiki.archlinux.org/index.php/Desktop_environment</a>
  584. </p>
  585. <p>
  586. Refer to <a href="https://wiki.archlinux.org/index.php/LXDE">https://wiki.archlinux.org/index.php/LXDE</a>.
  587. </p>
  588. <p>
  589. Install it, choosing 'all' when asked for the default package list:<br/>
  590. # <b>pacman -S lxde obconf</b>
  591. </p>
  592. <p>
  593. I didn't want the following, so I removed them:<br/>
  594. # <b>pacman -R lxmusic lxtask</b>
  595. </p>
  596. <p>
  597. I also lazily installed all fonts:<br/>
  598. # <b>pacman -S $(pacman -Ssq ttf-)</b>
  599. </p>
  600. <p>
  601. LXDE comes with a terminal. You probably want a browser to go with that; I choose GNU IceCat, part of the <i><a href="https://gnu.org/">GNU project</a></i>:<br/>
  602. # <b>pacman -S icecat</b><br/>
  603. And a mail client:<br/>
  604. # <b>pacman -S icedove</b>
  605. </p>
  606. <p>
  607. In IceCat, go to <i>Preferences :: Advanced</i> and disable <i>GNU IceCat Health Report</i>.
  608. </p>
  609. <p>
  610. I also like to install these:<br/>
  611. # <b>pacman -S xsensors stress htop</b>
  612. </p>
  613. <p>
  614. Enable LXDM (the default display manager, providing a graphical login):<br/>
  615. # <b>systemctl enable lxdm.service</b><br/>
  616. It will start when you boot up the machine. To start it now, do:<br/>
  617. # <b>systemctl start lxdm.service</b>
  618. </p>
  619. <p>
  620. Log in with your standard (non-root) user that you created earlier.
  621. It is advisable to also create an xinitrc rule in case you ever want to start lxde without lxdm.
  622. Read <a href="https://wiki.archlinux.org/index.php/Xinitrc">https://wiki.archlinux.org/index.php/Xinitrc</a>.
  623. </p>
  624. <p>
  625. Open LXterminal:<br/>
  626. $ <b>cp /etc/skel/.xinitrc ~</b><br/>
  627. Open .xinitrc and add the following plus a line break at the bottom of the file.<br/>
  628. <i>
  629. # Probably not needed. The same locale info that we set before<br/>
  630. # Based on advice from the LXDE wiki
  631. export LC_ALL=en_GB.UTF-8<br/>
  632. export LANGUAGE=en_GB.UTF-8<br/>
  633. export LANG=en_GB.UTF-8<br/>
  634. <br/>
  635. # Start lxde desktop<br/>
  636. exec startlxde<br/>
  637. </i>
  638. Now make sure that it is executable:<br/>
  639. $ <b>chmod +x .xinitrc</b>
  640. </p>
  641. <p>
  642. <a href="#pagetop">Back to top of page.</a>
  643. </p>
  644. </div>
  645. <div class="subsection">
  646. <h3 id="lxde_clock">LXDE - clock</h3>
  647. <p>
  648. In <b>Digital Clock Settings</b> (right click the clock) I set the Clock Format to <i>%Y/%m/%d %H:%M:%S</i>
  649. </p>
  650. <p>
  651. <a href="#pagetop">Back to top of page.</a>
  652. </p>
  653. </div>
  654. <div class="subsection">
  655. <h3 id="lxde_font">LXDE - font</h3>
  656. <p>
  657. NOTE TO SELF: come back to this later.
  658. </p>
  659. <p>
  660. <a href="#pagetop">Back to top of page.</a>
  661. </p>
  662. </div>
  663. <div class="subsection">
  664. <h3 id="lxde_screenlock">LXDE - screenlock</h3>
  665. <p>
  666. Arch wiki recommends to use <i>xscreensaver</i>:<br/>
  667. # <b>pacman -S xscreensaver</b>
  668. </p>
  669. <p>
  670. Under <i>Preferences :: Screensaver</i> in the LXDE menu, I chose <i>Mode: Blank Screen Only</i>,
  671. setting <i>Blank After</i>, <i>Cycle After</i> and <i>Lock Screen After</i> (checked) to 10 minutes.
  672. </p>
  673. <p>
  674. You can now lock the screen with <i>Logout :: Lock Screen</i> in the LXDE menu.
  675. </p>
  676. <p>
  677. <a href="#pagetop">Back to top of page.</a>
  678. </p>
  679. </div>
  680. <div class="subsection">
  681. <h3 id="lxde_automount">LXDE - automounting</h3>
  682. <p>
  683. Refer to <a href="https://wiki.archlinux.org/index.php/File_manager_functionality">https://wiki.archlinux.org/index.php/File_manager_functionality</a>.
  684. </p>
  685. <p>
  686. I chose to ignore this for now. NOTE TO SELF: come back to this later.
  687. </p>
  688. <p>
  689. <a href="#pagetop">Back to top of page.</a>
  690. </p>
  691. </div>
  692. <div class="subsection">
  693. <h3 id="lxde_suspend">LXDE - disable suspend</h3>
  694. <p>
  695. When closing the laptop lid, the machine suspends. This is annoying at least to me.
  696. NOTE TO SELF: disable it, then document the steps here.
  697. </p>
  698. <p>
  699. <a href="#pagetop">Back to top of page.</a>
  700. </p>
  701. </div>
  702. <div class="subsection">
  703. <h3 id="lxde_battery">LXDE - battery monitor</h3>
  704. <p>
  705. Right click lxde panel and <i>Add/Remove Panel Items</i>. Click <i>Add</i> and select <i>Battery Monitor</i>, then click <i>Add</i>.
  706. Close and then right-click the applet and go to <i>Battery Monitor Settings</i>, check the box that says <i>Show Extended Information</i>.
  707. Now click <i>Close</i>. When you hover the cursor over it, it'll show information about the battery.
  708. </p>
  709. <p>
  710. <a href="#pagetop">Back to top of page.</a>
  711. </p>
  712. </div>
  713. <div class="subsection">
  714. <h3 id="lxde_network">LXDE - Network Manager</h3>
  715. <p>
  716. Refer to <a href="https://wiki.archlinux.org/index.php/LXDE#Network_Management">https://wiki.archlinux.org/index.php/LXDE#Network_Management</a>.
  717. Then I read: <a href="https://wiki.archlinux.org/index.php/NetworkManager">https://wiki.archlinux.org/index.php/NetworkManager</a>.
  718. </p>
  719. <p>
  720. Install Network Manager:<br/>
  721. # <b>pacman -S networkmanager</b>
  722. </p>
  723. <p>
  724. You will also want the graphical applet:<br/>
  725. # <b>pacman -S network-manager-applet</b><br/>
  726. Arch wiki says that an autostart rule will be written at <i>/etc/xdg/autostart/nm-applet.desktop</i>
  727. </p>
  728. <p>
  729. I want to be able to use a VPN at some point, so the wiki tells me to do:<br/>
  730. # <b>pacman -S networkmanager-openvpn</b>
  731. </p>
  732. <p>
  733. LXDE uses openbox, so I refer to:<br/>
  734. <a href="https://wiki.archlinux.org/index.php/NetworkManager#Openbox">https://wiki.archlinux.org/index.php/NetworkManager#Openbox</a>.
  735. </p>
  736. <p>
  737. It tells me for the applet I need:<br/>
  738. # <b>pacman -S xfce4-notifyd gnome-icon-theme</b><br/>
  739. Also, for storing authentication details (wifi) I need:<br/>
  740. # <b>pacman -S gnome-keyring</b>
  741. </p>
  742. <p>
  743. I wanted to quickly enable networkmanager:<br/>
  744. # <b>systemctl stop dhcpcd</b><br/>
  745. # <b>systemctl start NetworkManager</b><br/>
  746. Enable NetworkManager at boot time:<br/>
  747. # <b>systemctl enable NetworkManager</b>
  748. </p>
  749. <p>
  750. Restart LXDE (log out, and then log back in).
  751. </p>
  752. <p>
  753. I added the volume control applet to the panel (right click panel, and add a new applet).
  754. I also later changed the icons to use the gnome icon theme, in <i>lxappearance</i>.
  755. </p>
  756. <p>
  757. <a href="#pagetop">Back to top of page.</a>
  758. </p>
  759. </div>
  760. </div>
  761. <div class="section">
  762. <p>
  763. Copyright &copy; 2014, 2015 Francis Rowe &lt;info@gluglug.org.uk&gt;<br/>
  764. This document is released under the Creative Commons Attribution-ShareAlike 4.0 International Public License and all future versions.
  765. A copy of the license can be found at <a href="../cc-by-sa-4.txt">../cc-by-sa-4.txt</a>.
  766. </p>
  767. <p>
  768. This document is distributed in the hope that it will be useful,
  769. but WITHOUT ANY WARRANTY; without even the implied warranty of
  770. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See <a href="../cc-by-sa-4.txt">../cc-by-sa-4.txt</a> for more information.
  771. </p>
  772. </div>
  773. </body>
  774. </html>