blog/void-xfce/index.html (view raw)
1<!doctype html><html lang=en><head><meta charset=UTF-8><meta content="IE=edge" http-equiv=X-UA-Compatible><meta content="text/html; charset=UTF-8" http-equiv=content-type><meta content="width=device-width,initial-scale=1,user-scalable=no" name=viewport><meta content="index, follow" name=robots><title>Modernizing XFCE</title><meta content="Modernizing XFCE" name=title><meta content="Tech and privacy ramblings from a random italian dude." name=description><meta content=website property=og:type><meta content=https://birabittoh.github.io/blog/void-xfce/ property=og:url><meta content=BiRabittoh property=og:site_name><meta content="Modernizing XFCE" property=og:title><meta content="Tech and privacy ramblings from a random italian dude." property=og:description><meta content=summary_large_image property=twitter:card><meta content=https://birabittoh.github.io/blog/void-xfce/ property=twitter:url><meta content="Modernizing XFCE" property=twitter:title><meta content="Tech and privacy ramblings from a random italian dude." property=twitter:description><link href=https://birabittoh.github.io/blog/void-xfce/ rel=canonical><link href=https://birabittoh.github.io/atom.xml rel=alternate title=RSS type=application/atom+xml><link href=https://birabittoh.github.io/css/style.css rel=stylesheet><body><div class=wrapper><header><nav class=navBar><a href=/>/home/</a><a href=/about>/about/</a><a href=/links>/links/</a><a href=/blog>/blog/</a><div class=themeSwitch><button class="themeButton light" onclick="setTheme('light')" title="Light mode">◐</button><button class="themeButton dark" onclick="setTheme('dark')" title="Dark mode">◑</button></div><script>const setTheme=a=>{document.documentElement.className=a;localStorage.setItem(`theme`,a)};const getTheme=()=>{const a=localStorage.getItem(`theme`);const b=a?a:`dark`;setTheme(b)};getTheme()</script></nav><div><a href=..>..</a>/<span class=metaData>void-xfce</span></div><time datetime=2023-02-05>Published on: <span class=metaData>2023-02-05</span></time><h1>Modernizing XFCE</h1></header><main><p>This article is more of a memo for myself. Since I often re-install Linux systems, I spend a lot of time doing repetitive tasks and often forget some steps, which leads me to waste even more time figuring out what’s wrong.<p>These instructions allow you to get a fully functional and modern-looking XFCE desktop on a fresh install of <a href=https://voidlinux.org/ rel=noopener target=_blank>Void Linux</a> (even though they can be adapted to work in any distro).<h2 id=initial-system-update>Initial system update</h2><p>First thing I tried was to update the system, but the ISO was quite old. I had to update <code>xbps</code> before anything else:<pre><code>sudo xbps-install -Su xbps
2sudo xbps-install -Su
3</code></pre><h2 id=avoid-session-saving>Avoid session saving</h2><p>One thing I hate about XFCE is its fixation to save sessions. A lot of times I get my session saved and restored even with all settings turned off.<p>A quick and easy solution to disable session saving entirely is just to create an empty file in place of the <code>sessions</code> directory.<pre><code>rm ~/.cache/sessions -rf
4touch ~/.cache/sessions
5</code></pre><p>This way, even with everything turned on, XFCE fails create a folder with that name and everything works (or doesn’t, in this case) like a charm.<h2 id=change-that-shell>Change that shell</h2><p>Your shell is the main tool you use to communicate with your system, so it makes sense to replace <code>bash</code> with something more modern and feature-rich.<pre><code>sudo xbps-install -S zsh zsh-completions curl
6chsh -s /bin/zsh
7zsh
8curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
9</code></pre><h2 id=get-some-good-sound-quality>Get some good sound quality</h2><p>I don’t like <code>pulseaudio</code>. Let’s replace it with <code>pipewire</code> and <code>wireplumber</code>.<pre><code>su
10xbps-install pipewire wireplumber
11mkdir -p /etc/pipewire/pipewire.conf.d
12sed '/path.*=.*pipewire-media-session/s/{/#{/' \
13/usr/share/pipewire/pipewire.conf > /etc/pipewire/pipewire.conf
14echo 'context.exec = [ { path = "/usr/bin/wireplumber" args = "" } ]' \
15> /etc/pipewire/pipewire.conf.d/10-wireplumber.conf
16ln -s /usr/share/applications/pipewire* /etc/xdg/autostart
17xbps-remove pulseaudio alsa-plugins-pulseaudio
18reboot
19</code></pre><h2 id=make-firefox-more-secure>Make Firefox more secure</h2><p>I like Firefox as a browser, but it doesn’t come with sane defaults as far as privacy’s concerned.<p>First, visit <a href=https://ffprofile.com/ rel=noopener target=_blank>Firefox Profilemaker</a> and create a customized <code>profile.zip</code>.<p>Then, extract your zip file to the correct destination:<pre><code>sudo xbps-install zip unzip p7zip xarchiver thunar-archive-plugin
20unzip -o ~/Downloads/profile.zip -d ~/.mozilla/firefox/xxxx.default-default/
21</code></pre><p>Some useful extensions I always install are:<ul><li><a href=https://addons.mozilla.org/en-US/firefox/addon/bitwarden-password-manager rel=noopener target=_blank>Bitwarden</a>, a password manager;<li><a href=https://addons.mozilla.org/en-US/firefox/addon/decentraleyes rel=noopener target=_blank>Decentraleyes</a>, to serve common JS libraries locally;<li><a href=https://addons.mozilla.org/en-US/firefox/addon/istilldontcareaboutcookies rel=noopener target=_blank>I still don’t care about cookies</a>, to hide and auto-reject cookie warnings;<li><a href=https://addons.mozilla.org/en-US/firefox/addon/libredirect rel=noopener target=_blank>LibRedirect</a>, a redirector for <a href=https://github.com/mendel5/alternative-front-ends rel=noopener target=_blank>alternative front-ends</a>;<li><a href=https://addons.mozilla.org/en-US/firefox/addon/sponsorblock rel=noopener target=_blank>SponsorBlock</a>, to skip YouTube sponsorships automagically;<li><a href=https://addons.mozilla.org/en-US/firefox/addon/ublock-origin rel=noopener target=_blank>uBlock Origin</a>, the best ad-blocker.</ul><h2 id=customize-your-de>Customize your DE</h2><p>Install the last required packages for desktop usability:<pre><code>sudo xbps-install -S vpm xfce4-whiskermenu-plugin xfce4-clipman-plugin \
22xfce4-pulseaudio-plugin xfce4-screenshooter xclip micro neovim mpv yt-dlp
23</code></pre><p>Remove orphaned and cached packages:<pre><code>sudo xbps-remove -Oo
24</code></pre><p>Now, open XFCE’s Settings Manager and set the following options:<ul><li>Appearance → Style → Choose “Adwaita-dark”<li>Desktop → Background → <em><Choose your favorite wallpaper></em><li>Desktop → Icons → Set “Icon type” to “None”<li>Panel → <em><Customize your panels></em><li>Screensaver → Disable “Enable Screensaver”<li>Text Editor Settings → Enable: <ul><li>“Show line numbers”,<li>“Highlight matching brackets”,<li>“Wrap long lines”</ul><li>Window Manager → Style → Button layout → Remove “Shade” button from title bar<li>Window Manager → Advanced → Windows snapping → Enable “To other windows”<li>Window Manager → Advanced → Wrap workspaces when reaching the screen edge → Disable “With a dragged window”<li>Window Manager Tweaks → Cycling → Enable: <ul><li>“Cycle through minimized windows in most recently used order”,<li>“Cycle through windows on all workspaces”,<li>“Raise windows while cycling”</ul><li>Window Manager Tweaks → Accessibility → Disable: <ul><li>“Raise windows when any mouse button is pressed”,<li>“Use mouse wheel on title bar to roll up the window”</ul><li>Window Manager Tweaks → Accessibility → Enable “Notify of urgency by making window’s decoration blink”<li>Window Manager Tweaks → Compositor → Enable “Show shadows under popup windows”<li>Xfce Terminal Settings → General → Scrolling → Set “Scrollbar is” to “Disabled”<li>Xfce Terminal Settings → Appearance → <ul><li>enable “Use system font”,<li>set “Background” to “Transparent background”,<li>set Opacity to 0.80;</ul><li>Xfce Terminal Settings → Colors → Presets → Choose “Tango”<li>Keyboard → Behavior → Enable “Restore num lock state on startup”</ul><h2 id=shortcuts>Shortcuts</h2><p>Finally, set the following shortcuts:<ul><li>Keyboard → Application Shortcuts</ul><table><thead><tr><th>Command<th>Shortcut<tbody><tr><td><code>exo-open --launch TerminalEmulator</code><td><code>Super</code> + <code>Return</code><tr><td><code>xfce4-popup-whiskermenu</code><td><code>Super</code><tr><td><code>xfce4-screenshooter --clipboard --region</code><td><code>Shift</code> + <code>Super</code> + <code>S</code><tr><td><code>xfce4-screenshooter --clipboard --window</code><td><code>Super</code> + <code>S</code><tr><td><code>xfce4-screenshooter --clipboard --fullscreen</code><td><code>Print</code><tr><td><code>sh -c 'xclip -selection clipboard -t image/png -o > "$HOME/Pictures/$(date +%Y-%m-%d_%T).png"'</code><td><code>Shift</code> + <code>Super</code> + <code>V</code><tr><td><code>xflock4</code><td><code>Super</code> + <code>L</code><tr><td><code>loginctl suspend</code><td><code>Shift</code> + <code>Super</code> + <code>L</code></table></main><footer><p class=tagsData><a href=/tags/advice>#advice</a> <a href=/tags/foss>#foss</a><hr><div class=footContainer><div class=footLeft><p>Licensed under <a rel="noopener noreferrer" href=https://fr.wikipedia.org/wiki/Licence_MIT target=_blank>MIT</a><br> Built with <a rel="noopener noreferrer" href=https://www.getzola.org target=_blank>Zola</a> using <a rel="noopener noreferrer" href=https://github.com/BiRabittoh/anemone target=_blank>anemone</a> theme & <a rel="noopener noreferrer" href=https://github.com/Speyll/veqev target=_blank>veqev</a> colors.<br></div><div class=footRight><a href=https://wobble.town/visit/528 target=_blank><img class="footGif noStyle" alt=footGif loading=lazy src=https://wobble.town/visit/528/wobble.gif></a><a rel="noopener noreferrer" title="Subscribe via RSS for updates." class=metaData href=https://birabittoh.github.io/atom.xml target=_blank>RSS</a></div></div></footer></div>