diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 170 |
1 files changed, 170 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..3a7dcf2 --- /dev/null +++ b/README.md | |||
@@ -0,0 +1,170 @@ | |||
1 | --- | ||
2 | author: | ||
3 | - Robert Alessi | ||
4 | title: 'The my-x200 package – README file' | ||
5 | subtitle: 'A Debian/Devuan service dedicated to Thinkpads X200' | ||
6 | --- | ||
7 | |||
8 | License and Disclamer | ||
9 | ===================== | ||
10 | `my-x200` - A Debian/Devuan service dedicated to Thinkpads X200 | ||
11 | Copyright (C) 2021 Robert Alessi <alessi@robertalessi.net> | ||
12 | |||
13 | This program is free software; you can redistribute it and/or | ||
14 | modify it under the terms of the GNU General Public License | ||
15 | as published by the Free Software Foundation; either version 3 | ||
16 | of the License, or (at your option) any later version. | ||
17 | |||
18 | This program is distributed in the hope that it will be useful, | ||
19 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
21 | GNU General Public License for more details. | ||
22 | |||
23 | You should have received a copy of the GNU General Public License | ||
24 | along with this program; if not, write to the Free Software | ||
25 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
26 | 02110-1301, USA. | ||
27 | |||
28 | Overview | ||
29 | ======== | ||
30 | `my-x200` is a simple script primarily designed to make the distinctive | ||
31 | whining noise of Thinkpads X200 disappear. But it can also be used on | ||
32 | other laptops. | ||
33 | |||
34 | It is written to be used on [Devuan | ||
35 | GNU+Linux](https://www.devuan.org/) but it should work on other | ||
36 | Debian-based distributions. | ||
37 | |||
38 | Configuration | ||
39 | ------------- | ||
40 | Once installed, `my-x200` is configured by editing | ||
41 | `/etc/default/my-x200`. | ||
42 | |||
43 | Noise Removal | ||
44 | ------------- | ||
45 | Set the variable `is_thinkpad_x200` to `yes` (which is the default | ||
46 | value). The default frequency rate should work. It may be change by | ||
47 | modifying the value of `PWMFREQ_RATE`. | ||
48 | |||
49 | Privacy Settings | ||
50 | ---------------- | ||
51 | `/etc/default/my-x200` also provides a “Privacy settings” section: if | ||
52 | `enable_privacy` is set to `true`, then the wired internet interface | ||
53 | that may or may not be connected to the internet will have its MAC | ||
54 | address spoofed at startup. (The wireless interfaces must also be | ||
55 | spoofed, but this can be handled by wpa_supplicant: see below.) | ||
56 | Additionally, `my-x200` will delete `/var/lib/dhcpcd/duid`, and use | ||
57 | `/proc/sys/kernel/random/boot_id` to generate a new DUID-LLT based | ||
58 | file with an updated timestamp. A new DUID is generated each time the | ||
59 | computer is started. | ||
60 | |||
61 | Backup | ||
62 | ------ | ||
63 | Finally `my-x200` has the ability to backup essential files or | ||
64 | directories—for instance to a backup disk mounted inside the dock. Of | ||
65 | course, the backup process is triggered on certain conditions only: | ||
66 | |||
67 | 1. The option must be enabled in the `/etc/default/my-x200` file. | ||
68 | 2. The disk must be mounted. | ||
69 | 3. An (empty) `dobackup` file must be present in the backup directory. | ||
70 | |||
71 | Then, once these conditions are met, the backup process is triggered | ||
72 | whenever the service is stopped. | ||
73 | |||
74 | Installation | ||
75 | ============ | ||
76 | |||
77 | 1. Clone this repository locally. | ||
78 | 2. Do `make debian`. | ||
79 | 3. Install the generated `my-x200` `.deb` package as root with `dpkg | ||
80 | -i`. | ||
81 | 4. Edit `/etc/default/my-x200`. | ||
82 | |||
83 | Alternatively, a `.deb` file ready to be installed and its associated | ||
84 | `.dsc` source package file are provided in this repository. Once | ||
85 | these two files and the corresponding two source files `.orig.tar.gz` | ||
86 | and `debian.tar.xz` are downloaded in the same directory, it is | ||
87 | advisable to verify the signature like so:— | ||
88 | |||
89 | 1. Download `my-x200` master tarball: <> | ||
90 | 2. Import the developer's [public PGP | ||
91 | key](https://pgp.ocf.berkeley.edu/pks/lookup?search=0x1773e9248085c8c7), | ||
92 | like so: `gpg --recv-keys 8085C8C7` | ||
93 | 3. Verify the signature: `dscverify --keyring ~/.gnupg/pubring.gpg | ||
94 | my-x200_<ver>.dsc` (Replace `<ver>` with the actual release | ||
95 | number.) | ||
96 | |||
97 | For a good GPG cheat sheet, see [here](https://guides.library.illinois.edu/data_encryption/gpgcheatsheet). | ||
98 | |||
99 | Use and recommended configuration | ||
100 | --------------------------------- | ||
101 | > The command `rc-update` that is used below refer to `openrc`. Other | ||
102 | > init systems use other commands. Please adapt. | ||
103 | |||
104 | It is advisable to use my-x200 in conjunction with `wpa_supplicant` | ||
105 | and `dhcpcd` only. In addition, `wpagui` and `dhcpcd-gtk` are also | ||
106 | recommended to be able to configure the network from systray | ||
107 | applets. If so, `wicd` may be disabled: as root, simply do `rc-update | ||
108 | del wicd`. | ||
109 | |||
110 | ### `wpa_supplicant` | ||
111 | For this to work properly, it is important to have these lines in | ||
112 | `/etc/wpa_supplicant/wpa_supplicant.conf`: | ||
113 | |||
114 | ```` | ||
115 | ctrl_interface=DIR=/run/wpa_supplicant GROUP=netdev | ||
116 | update_config=1 | ||
117 | mac_addr=1 | ||
118 | preassoc_mac_addr=1 | ||
119 | ```` | ||
120 | |||
121 | (For additional security, do (as root) `chmod 700 | ||
122 | /etc/wpa_supplicant`) | ||
123 | |||
124 | ### `dhcpcd` | ||
125 | And these settings in `/etc/dhcpcd.conf`: | ||
126 | |||
127 | ```` | ||
128 | hostname "localhost" | ||
129 | hostname_short | ||
130 | ```` | ||
131 | |||
132 | ### `/etc/network/interfaces` | ||
133 | Finally, `/etc/network/interfaces` should look like this:— | ||
134 | |||
135 | ```` | ||
136 | # This file describes the network interfaces available on your system | ||
137 | # and how to activate them. For more information, see interfaces(5). | ||
138 | |||
139 | source /etc/network/interfaces.d/* | ||
140 | |||
141 | # The loopback network interface | ||
142 | auto lo | ||
143 | iface lo inet loopback | ||
144 | |||
145 | # The primary network interface | ||
146 | allow-hotplug eth0 | ||
147 | iface eth0 inet manual | ||
148 | |||
149 | # wlan interface | ||
150 | allow-hotplug wlan0 | ||
151 | iface wlan0 inet manual | ||
152 | wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf | ||
153 | ```` | ||
154 | |||
155 | Do Not Use | ||
156 | ---------- | ||
157 | 1. NetworkManager | ||
158 | 2. Avahi | ||
159 | |||
160 | To disable `avahi`, do (as root): | ||
161 | |||
162 | ```` | ||
163 | rc-update del avahi-daemon | ||
164 | chmod -x /etc/network/if-up.d/avahi-daemon | ||
165 | ```` | ||
166 | |||
167 | Further Information | ||
168 | ------------------- | ||
169 | More information in `my-x200` initd file: | ||
170 | <https://git.robertalessi.net/my-x200/tree/my-x200.confd> | ||