Setup-example » History » Version 5
mfxbe, 08/31/2024 05:48 PM
1 | 1 | mfxbe | # Example set up |
---|---|---|---|
2 | |||
3 | 4 | mfxbe | This page shows the software and steps needed to set up a desktop environment using *Fairynight Computing* software. While this is only one of many ways to set it up, it is currently the only setup where everything is at least somewhat tested. |
4 | 1 | mfxbe | |
5 | # Requirements |
||
6 | |||
7 | 2 | mfxbe | You will need a running base Linux system (basically, a system that boots up and lets you log in to a tty) with not too old software to be set up and ready to go. This could be Debian Sid or Archlinux, for example. **This example is using Debian sid as base,** if you use an other system you might need to change commands. |
8 | 1 | mfxbe | |
9 | Before running some of the build the commands you might need to install build dependencies (``git, libgtk4, make, ...``) as well. |
||
10 | |||
11 | # Steps |
||
12 | |||
13 | ## 1. Install wayfire |
||
14 | |||
15 | [Wayfire](https://wayfire.org/) is used as the Wayland compositor. |
||
16 | |||
17 | ``` |
||
18 | $ sudo apt install wayfire |
||
19 | ``` |
||
20 | |||
21 | If you later have problems starting Wayfire, I recommend installing Sway as well, as it pulls in more dependencies that may be missing. |
||
22 | |||
23 | ## 2. Install more dependencies |
||
24 | |||
25 | To render the desktop, you need a wallpaper utility. The most powerful solution here is [swww](https://github.com/LGFae/swww), which is unfortunately not in the repositories and is quite complicated to compile on Debian. |
||
26 | A easy way would be to download the swww binaries from the *Chaotic-AUR* [here](https://builds.garudalinux.org/repos/chaotic-aur/x86_64/) unpack the file and just copy the binaries to the right place. |
||
27 | If you do not like to do all that, just install swaybg instead: |
||
28 | |||
29 | ``` |
||
30 | $ sudo apt install swaybg |
||
31 | ``` |
||
32 | |||
33 | More useful software, not all of this packages are absolutely needed |
||
34 | |||
35 | ``` |
||
36 | $ sudo apt install grim slurp wlr-rand foot swaylock swayidle mako wlsunset light |
||
37 | ``` |
||
38 | |||
39 | ## 4. Build and install ToplevelIt |
||
40 | |||
41 | It's a small library for waylands foreign-toplevel-protocol ([Github link](https://github.com/mfxbe/ToplevelIt)). |
||
42 | |||
43 | ``` |
||
44 | $ git clone https://github.com/mfxbe/ToplevelIt |
||
45 | $ make wlscan |
||
46 | $ make |
||
47 | $ sudo make install |
||
48 | ``` |
||
49 | |||
50 | |||
51 | ## 4. Build and "install" Alice |
||
52 | |||
53 | Alice is the desktop shell providing dock, panel and more. |
||
54 | |||
55 | ``` |
||
56 | $ git clone https://dyndns.mfxbe.de/other/fcw/gitLinks/alice.git |
||
57 | $ make |
||
58 | ``` |
||
59 | |||
60 | The Makefile currently does not provide an install option. You can ether copy the files from the ``build`` directory to right position yourself or (later) just call the Alice binary from there. It should just work. |
||
61 | |||
62 | 5 | mfxbe | Currently also make sure that networkmanager and upower is installed, otherwise alice will crash at startup. |
63 | |||
64 | 1 | mfxbe | ## 5. Configure wayfire |
65 | |||
66 | Below you can find an example for the Wayfire configuration which should be placed in ``~/.config/wayfire.ini``. More information are available in the [Wayfire wiki](https://github.com/WayfireWM/wayfire/wiki/Configuration). |
||
67 | |||
68 | |||
69 | ``` |
||
70 | [input] |
||
71 | xkb_layout = de |
||
72 | tablet_motion_mode=relative |
||
73 | |||
74 | |||
75 | [core] |
||
76 | plugins = \ |
||
77 | alpha \ |
||
78 | blur \ |
||
79 | autostart \ |
||
80 | command \ |
||
81 | decoration \ |
||
82 | expo \ |
||
83 | fast-switcher \ |
||
84 | foreign-toplevel \ |
||
85 | grid \ |
||
86 | gtk-shell \ |
||
87 | idle \ |
||
88 | ipc \ |
||
89 | ipc-rules \ |
||
90 | invert \ |
||
91 | move \ |
||
92 | oswitch \ |
||
93 | place \ |
||
94 | resize \ |
||
95 | switcher \ |
||
96 | vswitch \ |
||
97 | wm-actions \ |
||
98 | zoom |
||
99 | |||
100 | close_top_view = <super> KEY_Q | <alt> KEY_F4 |
||
101 | vwidth = 2 |
||
102 | vheight = 2 |
||
103 | preferred_decoration_mode = client |
||
104 | |||
105 | [move] |
||
106 | activate = <super> BTN_LEFT |
||
107 | [resize] |
||
108 | activate = <super> BTN_RIGHT |
||
109 | [zoom] |
||
110 | modifier = <super> |
||
111 | [alpha] |
||
112 | modifier = <super> <alt> |
||
113 | [wrot] |
||
114 | activate = <super> <ctrl> BTN_RIGHT |
||
115 | |||
116 | # Startup commands ───────────────────────────────────────────────────────────── |
||
117 | |||
118 | [autostart] |
||
119 | 0_environment = dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY XAUTHORITY XDG_CURRENT_DESKTOP=Wayfire |
||
120 | |||
121 | lock_on_start = swaylock -i ~/bg.png && ~/Alice/build/bin/alice |
||
122 | lock_on_timeout = swayidle -w timeout 600 'systemctl suspend' before-sleep 'swaylock -i ~/bg.png' |
||
123 | |||
124 | background-daemon = swww-daemon |
||
125 | background-setter = sleep 1 && swww img ~/bg.png |
||
126 | |||
127 | |||
128 | autostart_wf_shell = false |
||
129 | notifications = mako |
||
130 | |||
131 | |||
132 | gamma = wlsunset -l 55.5 -L 5.5 |
||
133 | |||
134 | portal = /usr/libexec/xdg-desktop-portal |
||
135 | |||
136 | |||
137 | [command] |
||
138 | binding_alicemenu = <super> |
||
139 | command_alicemenu = gdbus call --session --dest=eu.feritale.Alice -o /eu/feritale/Alice -m org.gtk.Actions.Activate "open-menu" [''] {} |
||
140 | |||
141 | |||
142 | binding_terminal = <super> KEY_ENTER |
||
143 | command_terminal = foot |
||
144 | |||
145 | binding_lock = <super> <shift> KEY_ESC |
||
146 | command_lock = systemctl suspend |
||
147 | |||
148 | binding_logout = <super> KEY_ESC |
||
149 | command_logout = wlogout |
||
150 | |||
151 | binding_screenshot = KEY_PRINT |
||
152 | command_screenshot = grim $(date '+%F_%T').webp |
||
153 | binding_screenshot_interactive = <shift> KEY_PRINT |
||
154 | command_screenshot_interactive = slurp | grim -g - $(date '+%F_%T').webp |
||
155 | |||
156 | repeatable_binding_volume_up = KEY_VOLUMEUP |
||
157 | command_volume_up = amixer set Master 5%+ |
||
158 | repeatable_binding_volume_down = KEY_VOLUMEDOWN |
||
159 | command_volume_down = amixer set Master 5%- |
||
160 | binding_mute = KEY_MUTE |
||
161 | command_mute = amixer set Master toggle |
||
162 | |||
163 | repeatable_binding_light_up = KEY_BRIGHTNESSUP |
||
164 | command_light_up = light -A 5 |
||
165 | repeatable_binding_light_down = KEY_BRIGHTNESSDOWN |
||
166 | command_light_down = light -U 5 |
||
167 | |||
168 | |||
169 | [grid] |
||
170 | slot_bl = <super> KEY_KP1 |
||
171 | slot_b = <super> KEY_KP2 |
||
172 | slot_br = <super> KEY_KP3 |
||
173 | slot_l = <super> KEY_LEFT | <super> KEY_KP4 |
||
174 | slot_c = <super> KEY_UP | <super> KEY_KP5 |
||
175 | slot_r = <super> KEY_RIGHT | <super> KEY_KP6 |
||
176 | slot_tl = <super> KEY_KP7 |
||
177 | slot_t = <super> KEY_KP8 |
||
178 | slot_tr = <super> KEY_KP9 |
||
179 | restore = <super> KEY_DOWN | <super> KEY_KP0 |
||
180 | |||
181 | [fast-switcher] |
||
182 | activate = <alt> KEY_TAB |
||
183 | |||
184 | [vswitch] |
||
185 | binding_left = <ctrl> <super> KEY_LEFT |
||
186 | binding_down = <ctrl> <super> KEY_DOWN |
||
187 | binding_up = <ctrl> <super> KEY_UP |
||
188 | binding_right = <ctrl> <super> KEY_RIGHT |
||
189 | with_win_left = <ctrl> <super> <shift> KEY_LEFT |
||
190 | with_win_down = <ctrl> <super> <shift> KEY_DOWN |
||
191 | with_win_up = <ctrl> <super> <shift> KEY_UP |
||
192 | with_win_right = <ctrl> <super> <shift> KEY_RIGHT |
||
193 | |||
194 | |||
195 | [expo] |
||
196 | toggle = <super> KEY_A |
||
197 | select_workspace_1 = KEY_1 |
||
198 | select_workspace_2 = KEY_2 |
||
199 | select_workspace_3 = KEY_3 |
||
200 | select_workspace_4 = KEY_4 |
||
201 | select_workspace_5 = KEY_5 |
||
202 | select_workspace_6 = KEY_6 |
||
203 | select_workspace_7 = KEY_7 |
||
204 | select_workspace_8 = KEY_8 |
||
205 | select_workspace_9 = KEY_9 |
||
206 | |||
207 | [decoration] |
||
208 | active_color = 0.0,0.0,0.0,1.0 |
||
209 | inactive_color = 0.66,0.66,0.66,1.0 |
||
210 | |||
211 | [oswitch] |
||
212 | next_output = <super> KEY_O |
||
213 | next_output_with_win = <super> <shift> KEY_O |
||
214 | |||
215 | [blur] |
||
216 | blur_by_default=role is "UNMANAGED" | role is "DESKTOP_ENVIRONMENT" |
||
217 | method=gaussian |
||
218 | gaussian_offset=1 |
||
219 | gaussian_iterations=1 |
||
220 | |||
221 | ``` |
||
222 | |||
223 | It's important to at least enable the following plugins: ``foreign-toplevel, ipc, ipc-rules`` |
||
224 | |||
225 | ## 6. Autologin and start the environment |
||
226 | |||
227 | A convenient way to start the environment at boot is to autologin into tty and automatically start Wayfire and swaylock (already done in the ini). Note that this only allows one user on the system. |
||
228 | |||
229 | To enable auto login create a file the following way: |
||
230 | |||
231 | ``` |
||
232 | $ sudo nano /etc/systemd/system/getty@tty1.service.d/autologin.conf |
||
233 | ``` |
||
234 | |||
235 | And put in as content (``username`` must be your user): |
||
236 | ``` |
||
237 | [Service] |
||
238 | ExecStart= |
||
239 | ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin username %I $TERM |
||
240 | ``` |
||
241 | To start Wayfire automatically when you log in, add the following to the end of ``~/.profile``: |
||
242 | ``` |
||
243 | if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then |
||
244 | exec wayfire |
||
245 | fi |
||
246 | ``` |
||
247 | 3 | mfxbe | |
248 | 1 | mfxbe | ## 7. Install other Fairytale Computing software |
249 | |||
250 | 3 | mfxbe | Now you can install other applications. For example project:loreley to browse the internet. |
251 | 1 | mfxbe | |
252 | ## 8. Done |
||
253 | You've done it. Congratulations. |