<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: svhl</title>
    <description>The latest articles on DEV Community by svhl (@svhl).</description>
    <link>https://dev.to/svhl</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2826110%2Fad77ec0b-76c6-4f21-a639-d3b0c8bcdca7.png</url>
      <title>DEV Community: svhl</title>
      <link>https://dev.to/svhl</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/svhl"/>
    <language>en</language>
    <item>
      <title>Spoofing terminal screenshots</title>
      <dc:creator>svhl</dc:creator>
      <pubDate>Sun, 01 Feb 2026 03:30:00 +0000</pubDate>
      <link>https://dev.to/svhl/spoofing-terminal-screenshots-cne</link>
      <guid>https://dev.to/svhl/spoofing-terminal-screenshots-cne</guid>
      <description>&lt;p&gt;r/unixporn is a popular subreddit for sharing screenshots of your Linux rice. It also acts as a hardware and software survey, by letting everyone know your computer's specs and your workflow. If you don't want to make this information public, you can always spoof it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8fcfxo5o6l4m4wbqglyp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8fcfxo5o6l4m4wbqglyp.png" alt="My Linux rice with the Pinkish color scheme" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a screenshot of my own rice. However, the programs, the specs, the music library... they're all fake. I'll break down how you can spoof each of these components below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Application icons
&lt;/h2&gt;

&lt;p&gt;For a new application, create a file called &lt;code&gt;[application_name].desktop&lt;/code&gt; at &lt;code&gt;~/.local/share/applications&lt;/code&gt;. For example, let's create a file for Firefox. Add the snippet below to &lt;code&gt;firefox.desktop&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Desktop Entry]
Icon=firefox
Name=Firefox
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;Icon&lt;/code&gt; parameter should be a valid icon name from your icon theme. If you want a custom image as the icon, provide the path to the image instead.&lt;/p&gt;

&lt;p&gt;Obviously, you can't launch this since there isn't an &lt;code&gt;Exec&lt;/code&gt; parameter, but we can use this method to populate the taskbar without needing to actually install these programs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Neofetch
&lt;/h2&gt;

&lt;p&gt;This is a terminal utility to display system information about your computer. Conveniently, it also allows you to set custom output in its config file located at &lt;code&gt;~/.config/neofetch/config.conf&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To change the ASCII art, set a distro name in the &lt;code&gt;ascii_distro&lt;/code&gt; variable. A list of valid distros are provided in the comments above the variable. For example, to set the Debian logo,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;ascii_distro&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"debian"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To change the text regarding hardware and software information, comment out the necessary lines, and set custom output using &lt;code&gt;prin&lt;/code&gt; commands. In my case, I set a custom title, OS, and host using the below snippet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#info title&lt;/span&gt;
prin &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;color 1&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;kde&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;color 255&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;@&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;color 1&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;optiplex"&lt;/span&gt;

&lt;span class="c"&gt;#info "OS" distro&lt;/span&gt;
&lt;span class="c"&gt;#info "Host" model&lt;/span&gt;
prin &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;color 1&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;OS: Debian GNU/Linux 13 (trixie) x86_64"&lt;/span&gt;
prin &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;color 1&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;Host: OptiPlex 7080"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Music library
&lt;/h2&gt;

&lt;p&gt;If you want to showcase your custom CLI music player rice, but don't want others to know your music taste, use &lt;a href="https://github.com/svhl/musicfakez" rel="noopener noreferrer"&gt;MusicFakez&lt;/a&gt;. Provide an album name to generate empty songs filled with silence, complete with metadata, to make others believe you actually listen to them. This saves your bandwidth by not actually downloading the songs, just faking it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ilfpomzyw58867q23r5.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ilfpomzyw58867q23r5.gif" alt="A demo of MusicFakez" width="760" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To use the tool, make sure Python and FFmpeg are installed first. Then, run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/svhl/musicfakez
&lt;span class="nb"&gt;cd &lt;/span&gt;musicfakez
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; venv venv
&lt;span class="nb"&gt;source &lt;/span&gt;venv/bin/activate
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
python3 musicfakez.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it!&lt;/p&gt;

&lt;p&gt;Now you no longer have to pretend your Manjaro rice is Arch. You can just gaslight people into believing it is.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>python</category>
    </item>
    <item>
      <title>The better way to shorten Linux commands (it's not alias)</title>
      <dc:creator>svhl</dc:creator>
      <pubDate>Sat, 13 Dec 2025 03:30:00 +0000</pubDate>
      <link>https://dev.to/svhl/the-better-way-to-shorten-linux-commands-its-not-alias-17f6</link>
      <guid>https://dev.to/svhl/the-better-way-to-shorten-linux-commands-its-not-alias-17f6</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;apup&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'sudo apt update'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;apug&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'sudo apt upgrade'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;apls&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'apt list'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;apsr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'apt search'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're a new Linux user, you might have a &lt;code&gt;~/.bash_aliases&lt;/code&gt; like this. Aliases are useful when you want to shorten lengthy commands, but aliasing like this isn't the best method for a few reasons.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not alias?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Too many aliases mess with autocompletion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In most Linux shells, pressing the tab key when typing out a command shows autocompletion suggestions. However, too many aliases beginning with the same prefix can clutter up these suggestions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;user@host:~&lt;span class="nv"&gt;$ &lt;/span&gt;ap
apls                    apsr
apt                     apug
apt-add-repository      apup
apt-cache               apt-get
aptitude                apt-mark
user@host:~&lt;span class="nv"&gt;$ &lt;/span&gt;ap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Aliases don't support taking parameters&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sure, aliases allow arguments at the end of the expanded command, but not in between the command. This limits the kinds of commands that can be shortened using an alias. Hence, &lt;code&gt;ffmpeg&lt;/code&gt; or &lt;code&gt;magick&lt;/code&gt; can't be shortened this way since they take arguments for an input as well as output file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Aliases hide the command's syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;gtad&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git add .'&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;gtcm&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git commit -m '&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;gtps&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'git push origin main'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Aliases like these prevent you from learning the actual command's structure. For example, to commit only a specific file, &lt;code&gt;gtad&lt;/code&gt; won't work, so you'll have to type out the whole command anyway. In such cases where the hardcoded arguments may change, learning the actual command is better than aliasing it and forgetting it.&lt;/p&gt;

&lt;h2&gt;
  
  
  When should you alias?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;sql&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'sudo mysql -u root -p'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a good example of an alias. Once you've set up MySQL, you'll only ever use the command to login to the interactive shell. &lt;code&gt;~/.bashrc&lt;/code&gt; by default also contains some useful aliases like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;la&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'ls -A'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, &lt;code&gt;sql&lt;/code&gt; alias is still a bit restrictive, since the username is hardcoded. These limitations can be addressed with...&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapper scripts!
&lt;/h2&gt;

&lt;p&gt;These provide the complete flexibility of Bash (or whatever shell you're using). You can read parameters, perform operations within the script, and much more.&lt;/p&gt;

&lt;p&gt;Let's take Git for example. You might always run certain commands with fixed parameters, such as using your token to connect to a Git repo. A wrapper script could be used to simplify this.&lt;/p&gt;

&lt;p&gt;Create a script at &lt;code&gt;~/.local/bin&lt;/code&gt;. Don't forget to set &lt;code&gt;GIT_TOKEN&lt;/code&gt; in &lt;code&gt;~/.bashrc&lt;/code&gt; or somewhere else. This way, such variables are kept in one place, making them easy to modify if needed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;$1&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"sync"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
    /usr/bin/git remote set-url origin https://&lt;span class="nv"&gt;$GIT_TOKEN&lt;/span&gt;@github.com/&lt;span class="nv"&gt;$2&lt;/span&gt;
&lt;span class="c"&gt;# one more thing...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To make this wrapper script seem seamless, we can even change its name to &lt;code&gt;git&lt;/code&gt;. This overrides the Git binary in &lt;code&gt;/usr/bin&lt;/code&gt;. Add an else statement to let it handle all other parameters as usual.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# add this as well&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;
    /usr/bin/git &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$@&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, to connect to a repo, just type&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git sync [github_username]/[repo_name]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These scripts can also be modified to match the structure of the other commands of the package (for example, choosing between &lt;code&gt;sync&lt;/code&gt;, &lt;code&gt;-sync&lt;/code&gt;, or &lt;code&gt;-s&lt;/code&gt; depending on if it's &lt;code&gt;git&lt;/code&gt;, &lt;code&gt;magick&lt;/code&gt;, or &lt;code&gt;yt-dlp&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;(Btw, if you wanna see more of my Git wrapper scripts, check them out &lt;a href="https://dev.to/svhl/some-useful-git-commands-20n0"&gt;here&lt;/a&gt;!)&lt;/p&gt;

</description>
      <category>linux</category>
      <category>cli</category>
      <category>bash</category>
    </item>
    <item>
      <title>Is copy-pasting from the clipboard in Vim broken for you on Wayland?</title>
      <dc:creator>svhl</dc:creator>
      <pubDate>Sat, 29 Nov 2025 03:30:00 +0000</pubDate>
      <link>https://dev.to/svhl/is-copy-pasting-from-the-clipboard-in-vim-broken-for-you-on-wayland-3lgi</link>
      <guid>https://dev.to/svhl/is-copy-pasting-from-the-clipboard-in-vim-broken-for-you-on-wayland-3lgi</guid>
      <description>&lt;p&gt;Vim uses registers to store copied text and paste from, rather than the system clipboard. When copy-pasting from another app, this isn't ideal, since the clipboard is inaccessible within Vim.&lt;/p&gt;

&lt;p&gt;To avoid this, the clipboard flag needs to be set. To check it, run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;vim &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This output contains all the flags that are set. If you see &lt;code&gt;+clipboard&lt;/code&gt;, you're good. Otherwise, you'll have to recompile Vim with this flag, but the easier solution would be to additionally install &lt;code&gt;vim-gtk3&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Then, add&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;set clipboard=unnamedplus
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to your &lt;code&gt;~/.vimrc&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;The above solution used to work on X11, but it only partially works on Wayland.&lt;/p&gt;

&lt;p&gt;Yanking text copies it to the clipboard, but pasting still uses Vim's internal register. Even explicitly pasting from the clipboard register with &lt;code&gt;"+p&lt;/code&gt; doesn't work.&lt;/p&gt;

&lt;p&gt;If you are also facing this issue, check whether &lt;code&gt;wayland&lt;/code&gt; and &lt;code&gt;wayland_clipboard&lt;/code&gt; flags are set. If they aren't present, clipboard functionality wont properly.&lt;/p&gt;

&lt;h2&gt;
  
  
  The solution
&lt;/h2&gt;

&lt;p&gt;This solution is meant for KDE Plasma, since it uses &lt;code&gt;qdbus&lt;/code&gt;. An alternative solution is also provided below.&lt;/p&gt;

&lt;p&gt;The output of&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;qdbus6 org.kde.klipper /klipper getClipboardContents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;shows the last copied clipboard content followed by a line break. We could just directly use this command via command-line mode in Vim, but the trailing newline causes problems. When pasting the same text multiple times, these unnecessary line breaks add up in between.&lt;/p&gt;

&lt;p&gt;To avoid this, a custom script can be utilized to format the output. Within &lt;code&gt;/usr/bin&lt;/code&gt;, create a script called &lt;code&gt;kpaste&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nv"&gt;REAL_USER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;SUDO_USER&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;logname&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="nv"&gt;REAL_UID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$REAL_USER&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;DBUS_ADDR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"unix:path=/run/user/&lt;/span&gt;&lt;span class="nv"&gt;$REAL_UID&lt;/span&gt;&lt;span class="s2"&gt;/bus"&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$EUID&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;-eq&lt;/span&gt; 0 &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;exec sudo&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$REAL_USER&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nv"&gt;DBUS_SESSION_BUS_ADDRESS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$DBUS_ADDR&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$0&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;fi

&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;qdbus6 org.kde.klipper /klipper getClipboardContents&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only the last line is required if the script is run as a regular user, but if we're editing a file as sudo (via &lt;code&gt;sudo -E vim&lt;/code&gt;), the script won't work since root doesn't have access to the user's clipboard.&lt;/p&gt;

&lt;p&gt;Therefore, we obtain the current user's name (&lt;code&gt;REAL_USER&lt;/code&gt;), which is used to find their UID (&lt;code&gt;REAL_UID&lt;/code&gt;), which finally allows us to connect to their DBus (&lt;code&gt;DBUS_ADDR&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;If the script is run as sudo, then call it again as the current user. Otherwise, call the clipboard normally.&lt;/p&gt;

&lt;p&gt;Make it executable with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x /usr/bin/kpaste
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, add the below line to &lt;code&gt;~/.vimrc&lt;/code&gt; to remap in normal mode.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nnoremap p :let @0=system("kpaste")&amp;lt;CR&amp;gt;"0gp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So what does it do?&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nnoremap p&lt;/code&gt;: Assign a custom mapping to &lt;code&gt;p&lt;/code&gt; in normal mode.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;:let @0=system("kpaste")&amp;lt;CR&amp;gt;&lt;/code&gt;: Copy the output of &lt;code&gt;kpaste&lt;/code&gt; to Vim's clipboard register &lt;code&gt;"0&lt;/code&gt; (which is the register for the yank operation, though you can also use any other register).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;"0gp&lt;/code&gt;: Paste from the clipboard register after the cursor. If using just &lt;code&gt;"0p&lt;/code&gt;, pasting text that contains line breaks would place the cursor at the beginning of the pasted text, rather than at the end as expected. To avoid this, we use &lt;code&gt;"0gp&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To remap in visual mode,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vnoremap p :&amp;lt;C-U&amp;gt;let @0 = system("kpaste")&amp;lt;CR&amp;gt;gv"_d"0gp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In addition to the above explanation,&lt;/p&gt;

&lt;p&gt;&lt;code&gt;:&amp;lt;C-U&amp;gt;&lt;/code&gt;: Removes the visual range &lt;code&gt;'&amp;lt;,'&amp;gt;&lt;/code&gt; so &lt;code&gt;:let&lt;/code&gt; works.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gv&lt;/code&gt;: Reselect the previous selection.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;"_d&lt;/code&gt;: Delete into the black hole register.&lt;/p&gt;

&lt;p&gt;This also pastes after the cursor. To paste before the cursor, replace &lt;code&gt;p&lt;/code&gt; with &lt;code&gt;P&lt;/code&gt; in the above mappings.&lt;/p&gt;

&lt;p&gt;This restores complete clipboard functionality!&lt;/p&gt;

&lt;h2&gt;
  
  
  Alternative solution
&lt;/h2&gt;

&lt;p&gt;If you're not on Plasma, install &lt;code&gt;wl-clipboard&lt;/code&gt;. This package provides the command &lt;code&gt;wl-paste&lt;/code&gt;, which pastes the last copied item from the clipboard. As mentioned above, create an additional script that echoes the output without a newline, and remap &lt;code&gt;p&lt;/code&gt; correspondingly.&lt;/p&gt;

&lt;p&gt;However, I wouldn't recommend this method, since the output when the clipboard is empty is&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;wl-paste
Nothing is copied
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This causes the text "Nothing is copied" to be pasted into Vim. An additional check would be needed to output nothing in this situation.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>vim</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Understanding Linux distros (and how to pick one)</title>
      <dc:creator>svhl</dc:creator>
      <pubDate>Sat, 22 Nov 2025 03:30:00 +0000</pubDate>
      <link>https://dev.to/svhl/understanding-linux-distros-1ikb</link>
      <guid>https://dev.to/svhl/understanding-linux-distros-1ikb</guid>
      <description>&lt;p&gt;&lt;strong&gt;"Top 10 distros for gaming"&lt;br&gt;
"The BEST Linux distro for developers"&lt;br&gt;
"The best distro of 2025"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These are the type of articles that show up when you're a new user trying to switch to Linux. Most of the time, such articles don't make the distinction between distros &lt;a href="https://youtu.be/0506yDSgU7M?t=94" rel="noopener noreferrer"&gt;clear enough&lt;/a&gt; that users can compare them. This article aims to break down the basic components that make up a Linux distro, and see how popular distros differ in these aspects.&lt;/p&gt;

&lt;h2&gt;
  
  
  What makes a distro
&lt;/h2&gt;

&lt;p&gt;While there are lots of components that shape a distro, I'll be focusing on the main ones that matter to a new user:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;u&gt;&lt;strong&gt;desktop environment&lt;/strong&gt;&lt;/u&gt;&lt;/li&gt;
&lt;li&gt;&lt;u&gt;&lt;strong&gt;package manager&lt;/strong&gt;&lt;/u&gt;&lt;/li&gt;
&lt;li&gt;&lt;u&gt;&lt;strong&gt;package freshness&lt;/strong&gt;&lt;/u&gt;&lt;/li&gt;
&lt;li&gt;&lt;u&gt;&lt;strong&gt;display server&lt;/strong&gt;&lt;/u&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Desktop environment
&lt;/h3&gt;

&lt;p&gt;This is the "frontend" of the distro. It's the GUI components that you interact with, such as the taskbar, the window decorations, the tab switcher, and so on. Most desktop environments can be classified as either &lt;u&gt;&lt;strong&gt;Qt&lt;/strong&gt;&lt;/u&gt; or &lt;u&gt;&lt;strong&gt;GTK-based&lt;/strong&gt;&lt;/u&gt;.&lt;/p&gt;

&lt;p&gt;When picking a distro, go for one that has a &lt;u&gt;live environment&lt;/u&gt;. This means that you can try it out before installing. This lets you experiment with the DE, and if you don't like it, easily switch to a different distro.&lt;/p&gt;

&lt;h4&gt;
  
  
  Qt-based DE
&lt;/h4&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;KDE Plasma&lt;/strong&gt;&lt;/u&gt; is known for being Windows-like out of the box, so Windows users will find it very easy to transition.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd7ixna23qpyy53zupncn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd7ixna23qpyy53zupncn.png" alt="KDE Plasma" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Configuring various settings like animations, the taskbar, themes, and so on may seem overwhelming due to the amount of control provided to the user. Due to this, Plasma is relatively buggier compared to the other distros. This is simply because more options for configuration = more points for failure = more bugs.&lt;/p&gt;

&lt;p&gt;However, it's also the most customizable. In addition to the inbuilt themes, you can download new ones to change the colors, the cursor, and much more. If you aren't afraid to tinker and you've got the time, you can tune Plasma to fit your workflow or aesthetics.&lt;/p&gt;

&lt;h4&gt;
  
  
  GTK-based DE
&lt;/h4&gt;

&lt;p&gt;They are known for being more rigid by providing less settings for the user to modify. GNOME and Cinnamon are two popular examples.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;GNOME&lt;/strong&gt;&lt;/u&gt; looks similar to macOS, while still having its own unique workflow. Its looks depends on the distro, as distro maintainers often customize it, unlike Plasma which usually looks the same everywhere by default. Here's how GNOME looks on Ubuntu...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvwokjqn3qbbbh9q8q2ow.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvwokjqn3qbbbh9q8q2ow.webp" alt="GNOME on Ubuntu" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;...and here's vanilla GNOME on Fedora.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsf3wy3asyx03lr3yzkh3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsf3wy3asyx03lr3yzkh3.jpg" alt="GNOME on Fedora" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice how in the first one, the taskbar is always visible, while in the second one, you have to enter the mission control-like view to see it. Even though you can customize a few things like this using extensions, GNOME still expects you to use it in the "GNOME way".&lt;/p&gt;

&lt;p&gt;Hence, these extensions can sometimes feel like an afterthought. For example, the clipboard in Plasma shows up right below your cursor for easy access, and passwords copied from a password manager don't show up in the clipboard. GNOME doesn't come with a clipboard by default, and third-party ones don't have the above features.&lt;/p&gt;

&lt;p&gt;If you aren't a power user, are comfortable with adapting to something new, and just want a DE that looks good with basic functionality, GNOME is a solid option.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Cinnamon&lt;/strong&gt;&lt;/u&gt; is another option if you'd rather have a Windows-looking DE. While it has less customizability than Plasma, it's more stable. Again, if you're fine with a reasonable level of customization, go for it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff6bux8vvayr8hoegufcr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff6bux8vvayr8hoegufcr.png" alt="Cinnamon" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whatever the DE, preferably stick to apps that use its framework. In the above images, you'll see that the window decorations of apps on KDE all look the same, but that of the file manager and Firefox on Fedora GNOME look similar, but aren't the same. If you try to use a KDE app on GNOME, or vice-versa, the theming and style will be different. Further complicating this, different versions of GTK, like GTK3 and GTK4/Libadwaita, are also styled differently.&lt;/p&gt;

&lt;p&gt;Remember that KDE apps are also more feature-rich, while GNOME apps are simple to use. Unfortunately, the moment you step out of the GTK4 ecosystem on GNOME desktop, the feeling of cohesion breaks. Apps don't look how they were meant to look, unlike on Plasma. Combining this with the issues caused by Wayland mentioned below, this may be a deal-breaker. &lt;/p&gt;

&lt;h3&gt;
  
  
  Package manager
&lt;/h3&gt;

&lt;p&gt;A package manager is how you download and update software. Different families of distros will use different package managers.&lt;/p&gt;

&lt;h4&gt;
  
  
  APT
&lt;/h4&gt;

&lt;p&gt;This is used by Debian-based distros such as &lt;u&gt;&lt;strong&gt;Ubuntu&lt;/strong&gt;&lt;/u&gt;, &lt;u&gt;&lt;strong&gt;Mint&lt;/strong&gt;&lt;/u&gt;, and &lt;u&gt;&lt;strong&gt;Debian&lt;/strong&gt;&lt;/u&gt;. If you're getting started with Linux, I'd recommend this, as most support threads on installing software deal with APT.&lt;/p&gt;

&lt;h4&gt;
  
  
  DNF
&lt;/h4&gt;

&lt;p&gt;Red Hat-based distros like &lt;u&gt;&lt;strong&gt;Fedora&lt;/strong&gt;&lt;/u&gt; use this on the other hand. For an end user, the only real difference is the syntax. Perhaps sometimes, you might find a package with only a .deb version, but if you mostly use GUI apps, I wouldn't worry about it too much because of...&lt;/p&gt;

&lt;h4&gt;
  
  
  Flatpak
&lt;/h4&gt;

&lt;p&gt;It's a universal GUI package manager available on every distro. There's no need to type your root password when installing, updating or deleting, unlike the others mentioned above. Additionally, you can use &lt;u&gt;Flatseal&lt;/u&gt; to manage permissions like file access, network access, and so on per app for better security. This is in contrast to native package managers which give all apps all permissions, regardless of whether they need them or not.&lt;/p&gt;

&lt;p&gt;Oh, also Ubuntu comes with &lt;u&gt;Snap&lt;/u&gt;, which is their implementation of a universal package manager. Unlike Flatpak, it doesn't manage permissions as intuitively, and apps are known to take longer to start up. Preferably, use Flatpaks instead of Snaps.&lt;/p&gt;

&lt;h3&gt;
  
  
  Package freshness
&lt;/h3&gt;

&lt;p&gt;This refers to how new the packages are in the repositories. Newer packages will have more features, but also potentially more bugs, while older packages are the opposite.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Debian&lt;/strong&gt;&lt;/u&gt; only provides feature updates every 2 years, so packages can become very stale. Hence, it's recommended for servers rather than everyday users. However, Debian-based distros like &lt;u&gt;&lt;strong&gt;Ubuntu&lt;/strong&gt;&lt;/u&gt; and &lt;u&gt;&lt;strong&gt;Mint&lt;/strong&gt;&lt;/u&gt; come with newer packages. I'd also suggest going with Ubuntu's non-LTS version with a release cycle every 6 months, rather than the LTS that only upgrades every 2 years.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Fedora&lt;/strong&gt;&lt;/u&gt; moves faster than Ubuntu even though its release cycle is also 6 months. This means that it will be the first to adopt new technologies like switching from Xorg to Wayland, though such changes may affect your workflow. More on this in the section below.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Flatpaks&lt;/strong&gt;&lt;/u&gt; update whenever the developer releases a new version, similar to how updates work on iOS and Android. Even if an update breaks an app, you can easily revert to a previous version without uninstalling and reinstalling. Therefore, use native packages for system apps, and Flatpak for other GUI apps.&lt;/p&gt;

&lt;p&gt;You'll notice that I haven't mentioned Arch-based distros like &lt;u&gt;Manjaro&lt;/u&gt; and &lt;u&gt;Arch&lt;/u&gt;. This is because these are rolling-release distros, meaning they have a higher chance of breaking. Non-system apps breaking is just an annoyance, since you can rollback, but the system breaking or not booting can lead to hours of troubleshooting. That's why I'd suggest going for a more stable distro instead.&lt;/p&gt;

&lt;h3&gt;
  
  
  Display server
&lt;/h3&gt;

&lt;p&gt;A display server is responsible for rendering content on your screen, processing inputs, and so on. Your distro will either be Xorg/X11 or Wayland-based.&lt;/p&gt;

&lt;h4&gt;
  
  
  Wayland
&lt;/h4&gt;

&lt;p&gt;This is the modern replacement for Xorg. It comes with many features such as HDR support and allowing different scaling for multiple monitor setups, which are not provided by Xorg. Hence, try out the Wayland version of a distro first, and switch to Xorg if there are any graphical issues such as glitches or artifacts.&lt;/p&gt;

&lt;p&gt;Wayland, specifically on GNOME, may have issues with fractional scaling causing blurry windows, text being too small, or inconsistent window maximizing behavior. Windows decorations too may follow the incorrect color theme, or just look... wrong, because of how GNOME implements them. Additionally, some apps are built for X11, but they can run on Wayland under &lt;u&gt;Xwayland&lt;/u&gt;. However, you may lose drag-and-drop support for them.&lt;/p&gt;

&lt;h4&gt;
  
  
  Xorg
&lt;/h4&gt;

&lt;p&gt;This is an archaic implementation compared to Wayland, but unless you need the above mentioned features or your hardware doesn't work well with Wayland, it's a fine option. Do note that you may face issues like...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ams4bb0jx55i70m0im2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ams4bb0jx55i70m0im2.png" alt="Screen tearing" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;...this. &lt;u&gt;Screen tearing&lt;/u&gt; occurs when you try to move a window or play a video on Xorg, causing the display to look like it got shredded. A &lt;u&gt;compositor&lt;/u&gt; comes with your DE to prevent this, but if you're gaming, you'll have to disable the compositor to get higher FPS. Screen tearing won't appear in gameplay, but it will show up in pre-rendered cutscenes.&lt;/p&gt;

&lt;p&gt;A heads-up that GNOME will be dropping Wayland support soon, so if you want an Xorg-based DE, go with Plasma or Cinnamon.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are your options?
&lt;/h2&gt;

&lt;p&gt;Here are the distros I'd recommend in no particular order. If you skipped to this section, please read the above, as otherwise this would just be another "the best Linux distro" article.&lt;/p&gt;

&lt;h3&gt;
  
  
  Linux Mint
&lt;/h3&gt;

&lt;p&gt;Mint corrects all the fuck ups of Ubuntu so you don't have to do it yourself. It ships with Cinnamon, which is built by the Mint team, along with two other DEs. Unless your device is really potato, go with Cinnamon. Its Wayland session isn't as mature as the other distros, but in case you do face issues, the Xorg session is always as option. Because it's built upon Ubuntu LTS, it doesn't come with the latest kernels, libraries, and so on. Unless you're a non-casual gamer or have the latest hardware, this is a good beginner's choice.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ubuntu
&lt;/h3&gt;

&lt;p&gt;If you decide to go with Ubuntu instead, go for the non-LTS release. You'll have to deal with disabling Snaps yourself, but you get a balance of not too old and not too new software. It also has a GNOME and a Plasma version (called Kubuntu), along with good support for Wayland.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fedora
&lt;/h3&gt;

&lt;p&gt;Flatpaks provide better package management compared to Ubuntu's Snaps, and you'll get newer software from the native repos. Just note that they'll also be the first to drop support for "older" software, but in that case, you can stick to the previous release until you're ready to transition since Fedora offers over a year of support.&lt;/p&gt;

&lt;p&gt;Other distros such as Zorin and Pop!_OS are just different combinations of the above factors. Just make sure the distro you choose meet your software, hardware, and time-you're-willing-to-spend-on-it requirements before installing!&lt;/p&gt;

</description>
      <category>linux</category>
    </item>
    <item>
      <title>Dolphin switches from .directory to extended attributes</title>
      <dc:creator>svhl</dc:creator>
      <pubDate>Sat, 25 Oct 2025 03:30:00 +0000</pubDate>
      <link>https://dev.to/svhl/dolphin-switches-from-directory-to-extended-attributes-jpj</link>
      <guid>https://dev.to/svhl/dolphin-switches-from-directory-to-extended-attributes-jpj</guid>
      <description>&lt;p&gt;When I upgraded from Debian 12 to 13, KDE also transitioned from Plasma 5 to 6. That's when I noticed that there were no longer .directory files in Dolphin, KDE's file manager.&lt;/p&gt;

&lt;p&gt;Previously, when you set "Remember display style for each folder" in Dolphin and change the display style for a particular folder, a .directory file will be created in that folder. This file stores the view mode (icons, compact or details), and other attributes such as whether to show hidden files.&lt;/p&gt;

&lt;p&gt;Since this is on a per-folder basis, a .directory file will be created for each folder you change the display style for. While this approach works, it's not an ideal solution as it pollutes your file system with unnecessary files. This is similar to how macOS creates .DS_Store files.&lt;/p&gt;

&lt;p&gt;I guess one solution would be to keep track of this information in a database instead. An issue with this is that when a user deletes a folder outside of Dolphin, the corresponding attributes entry in the database should also be removed. Otherwise, these invalid entries will take up unnecessary space over time. This requires too much overhead, so it's not feasible.&lt;/p&gt;

&lt;h2&gt;
  
  
  The solution
&lt;/h2&gt;

&lt;p&gt;A better method would be to embed these attributes within the folder so that it's not visible to the user. Using a tool like &lt;code&gt;getfattr&lt;/code&gt;, we can view these extended file attributes.&lt;/p&gt;

&lt;p&gt;First, install it with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;fattr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, change the display style in a folder and run the below command. You'll notice that KDE has created an extended attribute.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;getfattr ./
&lt;span class="c"&gt;# file: . user.kde.fm.viewproperties#1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To view the value of this attribute, run the below command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;getfattr &lt;span class="nt"&gt;-d&lt;/span&gt; ./
&lt;span class="c"&gt;# file: . user.kde.fm.viewproperties#1="[Dolphin]\012Timestamp=2025,10,24,11,06,34.929\012Version=4\012ViewMode=2\012"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In my case, &lt;code&gt;ViewMode&lt;/code&gt; will be set to &lt;code&gt;2&lt;/code&gt;, since I changed the display style to compact view mode. Details view mode will show &lt;code&gt;1&lt;/code&gt; and icons view mode will show &lt;code&gt;3&lt;/code&gt; instead.&lt;/p&gt;

&lt;p&gt;Now, I'll set to show hidden files and run the command again. Notice how &lt;code&gt;HiddenFilesShown&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;getfattr &lt;span class="nt"&gt;-d&lt;/span&gt; ./
&lt;span class="c"&gt;# file: . user.kde.fm.viewproperties#1="[Dolphin]\012Timestamp=2025,10,24,11,06,45.362\012Version=4\012ViewMode=2\012\012[Settings]\012HiddenFilesShown=true\012"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, custom folder icons are still stored in .directory files, but that might be changed soon. Nevertheless, this is a very welcome change in Plasma 6. I hope other file managers like Nautilus also implement such solutions (if GNOME gets around to implementing per-folder display styles first).&lt;/p&gt;

</description>
      <category>linux</category>
      <category>kde</category>
    </item>
    <item>
      <title>Changing the GRUB boot order in current year</title>
      <dc:creator>svhl</dc:creator>
      <pubDate>Wed, 24 Sep 2025 02:45:00 +0000</pubDate>
      <link>https://dev.to/svhl/changing-the-grub-boot-order-in-current-year-3jbl</link>
      <guid>https://dev.to/svhl/changing-the-grub-boot-order-in-current-year-3jbl</guid>
      <description>&lt;p&gt;There are way too many forum posts talking about reordering entries in the GRUB menu. Some methods are too complicated, some don't work anymore, and some people even advise against doing it. Here's the simplest method I've found so you don't have to go through dozens of Google results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Avoid GRUB Customizer!
&lt;/h2&gt;

&lt;p&gt;Before we begin, I'd suggest steering clear of GRUB Customizer since it can cause issues. Initially, I tried this method, but it created duplicate entries in my GRUB menu. In case your GRUB menu also got messed up, I'll cover how to fix it in the below section as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  The actual solution
&lt;/h2&gt;

&lt;p&gt;In this example, I am going to move Windows above Linux. Go to &lt;code&gt;/etc/grub.d&lt;/code&gt;. You'll see a file called &lt;code&gt;30_os-prober&lt;/code&gt; or something similar in the directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; /etc/grub.d/
00_header
05_debian_theme
10_linux
20_linux_xen
20_memtest86+
30_os-prober
40_custom
41_custom
README
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll also notice two files called &lt;code&gt;00_header&lt;/code&gt; and &lt;code&gt;05_debian_theme&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;00_header&lt;/code&gt; sets environmental variables such system file locations, video settings, and previously saved entries.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;05_debian_theme&lt;/code&gt; sets the GRUB 2 background image, text colors, selection highlighting and themes.&lt;/p&gt;

&lt;p&gt;The boot entry after these will show up first in GRUB. Change the number of the os-prober file to change the order. Rename &lt;code&gt;30_os-prober&lt;/code&gt; to something like &lt;code&gt;09_os-prober&lt;/code&gt;, then update GRUB.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo mv &lt;/span&gt;30_os-prober 09_os-prober
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;update-grub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In case GRUB Customizer created duplicate boot entries, delete those files from this directory. Afterwards, update GRUB like above. That's it! Reboot your system to see the changes.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Test your website on both Firefox and Chromium</title>
      <dc:creator>svhl</dc:creator>
      <pubDate>Fri, 14 Mar 2025 06:30:00 +0000</pubDate>
      <link>https://dev.to/svhl/test-your-website-on-both-firefox-and-chromium-gd0</link>
      <guid>https://dev.to/svhl/test-your-website-on-both-firefox-and-chromium-gd0</guid>
      <description>&lt;p&gt;In my previous article &lt;a href="https://dev.to/svhl/ensure-your-website-is-mobile-optimized-31cj"&gt;Ensure your website is mobile-optimized&lt;/a&gt;, I briefly mentioned about testing out your site on Firefox as well as Chromium-based browsers. Almost all mainstream browsers are based on Firefox or Chromium, so by optimizing for both, you can make sure your site is optimized for (almost) all your users.&lt;/p&gt;

&lt;h2&gt;
  
  
  But why though?
&lt;/h2&gt;

&lt;p&gt;Here is a snippet of code from one of my projects.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;65px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.inputField&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;7px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;-67px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;7px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;-67px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code specifies the gap between the heading, input fields, and button. However, this gap is interpreted differently on Firefox and Chromium-based browsers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn0syw5v6em8iyc9m382a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn0syw5v6em8iyc9m382a.png" alt="Firefox" width="800" height="385"&gt;&lt;/a&gt;Firefox&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7459mtfm0200dzyqtrtw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7459mtfm0200dzyqtrtw.png" alt="Chromium" width="800" height="391"&gt;&lt;/a&gt;Chromium&lt;/p&gt;

&lt;h2&gt;
  
  
  How to fix it
&lt;/h2&gt;

&lt;p&gt;Use different gaps on Firefox and Chromium so they both look identical. Specify the code for Chromium using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@supports&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;-webkit-appearance&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;/*chromium specific css*/&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...and for Firefox using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@-moz-document&lt;/span&gt; &lt;span class="n"&gt;url-prefix&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;/*firefox specific css*/&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So in my case, I should modify my code to be&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@supports&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;-webkit-appearance&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;52px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nc"&gt;.inputField&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;-10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;-62px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;-10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;-62px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@-moz-document&lt;/span&gt; &lt;span class="n"&gt;url-prefix&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;65px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nc"&gt;.inputField&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;7px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;-67px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;7px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;-67px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This results in the gap looking similar on both browsers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpqvll3flimvc6r9n4pkl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpqvll3flimvc6r9n4pkl.png" alt="Firefox" width="800" height="385"&gt;&lt;/a&gt;Firefox&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F96ggh6kfp9m9r6kq0qtn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F96ggh6kfp9m9r6kq0qtn.png" alt="Chromium" width="800" height="391"&gt;&lt;/a&gt;Chromium&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>browser</category>
    </item>
    <item>
      <title>Ensure your website is mobile-optimized</title>
      <dc:creator>svhl</dc:creator>
      <pubDate>Thu, 06 Mar 2025 08:00:00 +0000</pubDate>
      <link>https://dev.to/svhl/ensure-your-website-is-mobile-optimized-31cj</link>
      <guid>https://dev.to/svhl/ensure-your-website-is-mobile-optimized-31cj</guid>
      <description>&lt;p&gt;Making your website responsive is important to ensure that it looks good on a variety of screen sizes, from phones to tablets to desktops. Instead of having to resize your browser window each time to test out different resolutions, here are a few ways to do so with ease.&lt;/p&gt;

&lt;h2&gt;
  
  
  But first...
&lt;/h2&gt;

&lt;p&gt;...how do you make your site responsive? By using &lt;code&gt;@media&lt;/code&gt; in your CSS. For example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nf"&gt;#item&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;900px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;#item&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, if the width of the viewport is greater than 900px, the width of &lt;code&gt;#item&lt;/code&gt; is 50px. But if it is less, the width of &lt;code&gt;#item&lt;/code&gt; is 30px. You can also specify different widths for different viewport sizes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;500px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;#item&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Test it out
&lt;/h2&gt;

&lt;p&gt;On Firefox-based browsers, use the shortcut ctrl+shift+m to enter responsive design mode.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fniueauwgtncjvwtjzq14.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fniueauwgtncjvwtjzq14.png" alt="Responsive design mode on Firefox" width="800" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On Chromium-based browsers, use the shortcut ctrl+shift+i, then ctrl+shift+m to enter device mode.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqanzs68o7pa5f6oa1fc5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqanzs68o7pa5f6oa1fc5.png" alt="Device mode" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the top left dropdown, choose the device you want to emulate. Alternatively, grab the corners or edges of the viewport and resize.&lt;/p&gt;

&lt;p&gt;Note that this may not &lt;em&gt;exactly&lt;/em&gt; show the behavior of your site on mobile. For example, on my website, I've noticed that the effect that's supposed to happen on hover happens on click on mobile. To see how your site actually behaves on mobile, you'll have to localhost your site and view it on your mobile device, ideally on both Firefox and Chromium.&lt;/p&gt;

&lt;p&gt;Open a terminal in your project folder and run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="nt"&gt;-m&lt;/span&gt; http.server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output will contain the port number. In my case, it's 8000. Next, find your local IP address by running&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;hostname&lt;/span&gt; &lt;span class="nt"&gt;-I&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In my case, it's 10.10.10.10. Access the site on your phone connected to the same network by visiting your local IP address:port number. For me, it will be &lt;a href="http://10.10.10.10:8000" rel="noopener noreferrer"&gt;10.10.10.10:8000&lt;/a&gt;. Remember to ensure your desktop firewall allows incoming traffic for the site to be accessible by another device!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
    </item>
    <item>
      <title>Some useful Git commands</title>
      <dc:creator>svhl</dc:creator>
      <pubDate>Thu, 27 Feb 2025 05:00:00 +0000</pubDate>
      <link>https://dev.to/svhl/some-useful-git-commands-20n0</link>
      <guid>https://dev.to/svhl/some-useful-git-commands-20n0</guid>
      <description>&lt;p&gt;Git is an essential tool in every developer's workflow. This article covers a few common (and not so common) Git commands. Some of these are specific to GitHub, so make the necessary changes if you're using a different platform like GitLab.&lt;/p&gt;

&lt;p&gt;I've also provided a wrapper script &lt;a href="https://github.com/svhl/scripts?tab=readme-ov-file#git" rel="noopener noreferrer"&gt;here&lt;/a&gt; that shortens the commands for ease of use. Download the script to &lt;code&gt;~/.local/bin&lt;/code&gt;. A few changes need to be made to the script, which will be mentioned below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Clone repo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Using Git
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/[user]/[repo] --branch [branch]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Using script
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git copy [user]/[repo] [branch]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Clones the specified &lt;code&gt;branch&lt;/code&gt; of the &lt;code&gt;user&lt;/code&gt;'s GitHub &lt;code&gt;repo&lt;/code&gt; to your local machine. If you want to clone the default branch (usually main or master), the &lt;code&gt;branch&lt;/code&gt; argument isn't necessary.&lt;/p&gt;

&lt;h2&gt;
  
  
  Set remote repo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Using Git
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote set-url origin https://[token]@github.com/[user]/[repo]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Using script
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git sync [user]/[repo]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since "support for password authentication was removed" on GitHub, you'll need to use a token in order to commit. From GitHub, go to Settings &amp;gt; Developer settings &amp;gt; Personal access tokens &amp;gt; Tokens (classic) to create a new token. From the dropdown, select Generate new token (classic), set the parameters, and hit Generate token.&lt;/p&gt;

&lt;p&gt;Set the &lt;code&gt;token&lt;/code&gt; to commit to the &lt;code&gt;user&lt;/code&gt;'s &lt;code&gt;repo&lt;/code&gt;. If you're using the script, set the &lt;code&gt;TOKEN&lt;/code&gt; variable within the script.&lt;/p&gt;

&lt;h2&gt;
  
  
  Undo last commit
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Using Git
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reset --hard HEAD~1
git push origin HEAD --force
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Using script
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git undo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Revert to the state before the last commit. Requires you to be authorized to do so.&lt;/p&gt;

&lt;h2&gt;
  
  
  One more thing...
&lt;/h2&gt;

&lt;p&gt;Here's how to properly commit via Git.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global [username]
git config --global [email]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;where &lt;code&gt;[email]&lt;/code&gt; is your noreply email address found on GitHub at Settings &amp;gt; Emails.&lt;/p&gt;

&lt;p&gt;Then, &lt;a href="https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key" rel="noopener noreferrer"&gt;generate a new GPG key&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gpg --full-generate-key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When prompted, use the defaults. Set username and email, and also a password (this will only be stored locally).&lt;/p&gt;

&lt;p&gt;Run the below command and copy the GPG key ID.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ gpg --list-secret-keys --keyid-format=long
/Users/hubot/.gnupg/secring.gpg
------------------------------------
sec   4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10]
uid                          Hubot &amp;lt;hubot@example.com&amp;gt;
ssb   4096R/4BB6D45482678BE3 2016-03-10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case, the &lt;code&gt;[id]&lt;/code&gt; is 3AA5C34371567BD2. Next, run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gpg --armor --export [id]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copy your GPG key, beginning with &lt;code&gt;-----BEGIN PGP PUBLIC KEY BLOCK-----&lt;/code&gt; and ending with &lt;code&gt;-----END PGP PUBLIC KEY BLOCK-----&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To &lt;a href="https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account" rel="noopener noreferrer"&gt;add this key to your GitHub account&lt;/a&gt;, go to Settings &amp;gt; SSH and GPG keys &amp;gt; New GPG key. In the key field, paste the above copied text.&lt;/p&gt;

&lt;p&gt;Finally, to always sign commits, run the below commands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global commit.gpgsign true
git config --global user.signingkey [id]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>git</category>
      <category>github</category>
    </item>
    <item>
      <title>Daily driving Debian 12 in 2025</title>
      <dc:creator>svhl</dc:creator>
      <pubDate>Fri, 21 Feb 2025 06:15:00 +0000</pubDate>
      <link>https://dev.to/svhl/daily-driving-debian-12-in-current-year-11gg</link>
      <guid>https://dev.to/svhl/daily-driving-debian-12-in-current-year-11gg</guid>
      <description>&lt;p&gt;Debian may seem like the least suitable distro for the desktop, but it doesn't have to be that way. Debian receives critical security updates, so the only thing you're missing out is on feature updates (and fixes for a few annoying, but not deal-breaking bugs).&lt;/p&gt;

&lt;p&gt;Still, there are many ways to use newer packages on Debian Bookworm. Below are some of them, ordered from most preferred to least preferred in my opinion.&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional repos
&lt;/h2&gt;

&lt;p&gt;This involves adding custom repos to your APT sources. Programs like Firefox and Wine support this. Some of these have a separate .sources for Debian Stable, so you can be sure you won't get any missing dependency issues.&lt;/p&gt;

&lt;p&gt;Also, programs like Steam and Chrome only require you to install the .deb package they provide, and the sources also get added automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  .deb packages
&lt;/h2&gt;

&lt;p&gt;This method may not handle updates via APT like above. Useful if you want a specific version of the package, most likely when the package provided by Debian is too old but the latest package causes dependency issues. However, some programs like Obsidian handles updates within the app by checking for updates every time the app starts, which breaks the all-in-one package updater aspect of a package manager.&lt;/p&gt;

&lt;h2&gt;
  
  
  Flatpak
&lt;/h2&gt;

&lt;p&gt;This allows you to obtain the latest version (or a &lt;a href="https://github.com/flatpak/flatpak/issues/3097" rel="noopener noreferrer"&gt;specific version&lt;/a&gt;) of a package easily. You may sometimes face theming issues, but usually you can easily fix it by allowing access to the necessary directories using Flatseal. Another advantage of Flatseal is that it's easy to set permissions and environment variables, compared to editing the .desktop file manually.&lt;/p&gt;

&lt;p&gt;Since Flatpak apps are independent of each other, it's difficult to integrate one program with another. For example, you can open the current directory in a terminal from within Dolphin. By default, the terminal emulator is Konsole, but you can change it in the &lt;code&gt;~/.config/kdeglobals&lt;/code&gt; file. However, changing it isn't possible in the Flatpak version of Dolphin.&lt;/p&gt;

&lt;p&gt;Flatpaks also update independently from native packages, so you'll need to set up a service for automatic updates, or remember to update manually.&lt;/p&gt;

&lt;h2&gt;
  
  
  AppImage
&lt;/h2&gt;

&lt;p&gt;Like Flatpaks, but more difficult to theme and could take up more space. Sometimes, this may be the only option for download, or you might want to keep a program around whose development has been discontinued, like Yuzu. You can view a list of popular AppImages &lt;a href="https://portable-linux-apps.github.io/apps" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building from source
&lt;/h2&gt;

&lt;p&gt;This method can be difficult due to old dependency issues. Most GUI programs will be available from one of the sources above, but some utilities like gtk3-nocsd will require building from source.&lt;/p&gt;

&lt;h2&gt;
  
  
  Debian Testing or Unstable
&lt;/h2&gt;

&lt;p&gt;These are other flavors of Debian that come with newer packages. However, I've noticed that they're not as stable (especially Plasma and KDE software). I'd recommend sticking with Stable and using one of the methods above instead.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>debian</category>
    </item>
    <item>
      <title>Some useful Linux command-line launch arguments</title>
      <dc:creator>svhl</dc:creator>
      <pubDate>Sun, 16 Feb 2025 06:30:00 +0000</pubDate>
      <link>https://dev.to/svhl/useful-linux-command-line-launch-arguments-29ec</link>
      <guid>https://dev.to/svhl/useful-linux-command-line-launch-arguments-29ec</guid>
      <description>&lt;p&gt;Command-line arguments can be added before you call a program in Linux. They can be used to pass parameters to the program, set or unset environment variables, or even run "wrapper programs" before launching your program.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use
&lt;/h2&gt;

&lt;p&gt;If you're calling the program from the terminal, you can add an alias like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alias [program]=[args] [program]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're calling from an app launcher, you can modify the .desktop file. The file will probably be present at &lt;code&gt;/usr/share/applications/&lt;/code&gt;. Copy it to &lt;code&gt;~/.local/share/applications/&lt;/code&gt; so you can edit it without root.&lt;/p&gt;

&lt;p&gt;Now, modify the &lt;code&gt;Exec&lt;/code&gt; parameter to be&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Exec=env [args] [program]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Below are a few arguments that I use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prevent internet access
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;firejail &lt;span class="nt"&gt;--noprofile&lt;/span&gt; &lt;span class="nt"&gt;--net&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;none
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Prevents the program from having internet access. Requires Firejail to be installed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use GTK file picker
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;QT_QPA_PLATFORMTHEME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;gtk3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On Qt desktops, use the standard GTK file picker instead of the one that came with the program. Useful if the file picker can't adapt to the color scheme resulting in incorrect symbolic icon colors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scale program fractionally
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;QT_SCREEN_SCALE_FACTORS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make the program scale properly if fractional scaling is used. Otherwise, the fonts and images would look blurry. Additionally, by specifying a decimal value &amp;gt;1 within the quotes, you can scale it up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Better touchpad on Firefox
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;MOZ_USE_XINPUT2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use kinetic scrolling and touchpad gestures in Firefox on Xorg.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pre/Post-launch game scripts
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gamemoderun
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Activates GameMode with your configuration when you run a game (use it as a start/stop script if activing GameMode when starting the game does not work in your game launcher). Useful if you want to disable/enable the compositor when the game launches/closes on Xorg, or something similar.&lt;/p&gt;

&lt;p&gt;I'll update this post (hopefully) if I find more!&lt;/p&gt;

</description>
      <category>linux</category>
    </item>
    <item>
      <title>Make non-Qt apps look native on Qt desktops</title>
      <dc:creator>svhl</dc:creator>
      <pubDate>Sat, 08 Feb 2025 06:04:24 +0000</pubDate>
      <link>https://dev.to/svhl/make-non-qt-apps-look-native-on-qt-desktops-32fn</link>
      <guid>https://dev.to/svhl/make-non-qt-apps-look-native-on-qt-desktops-32fn</guid>
      <description>&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; There's a newer (and better) method to theme not just GTK3 apps, but also GTK4/Libadwaita. Check out &lt;a href="https://codeberg.org/MorsMortium/GTK-NoCSD" rel="noopener noreferrer"&gt;GTK-NoCSD&lt;/a&gt; by MorsMortium, which is actively maintained with consistent improvements.&lt;/p&gt;




&lt;p&gt;Theming non-Qt apps is essential on Qt desktops like KDE Plasma or LXQt if you don't want them to stick out. How easy it is to do depends on the GTK version the app uses.&lt;/p&gt;

&lt;p&gt;This is a guide for Lutris, but it should work for any other GTK3 app.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to do it
&lt;/h2&gt;

&lt;p&gt;First, install gtk3-nocsd from &lt;a href="https://github.com/PCMan/gtk3-nocsd" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The latest release is outdated, so don't use it. Instead, clone the repo, install dependencies and build according to the instructions mentioned on GitHub.&lt;/p&gt;

&lt;p&gt;This is enough to remove the CSD, but there are still a few issues.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv6ybm5fxss0nwgl4vxww.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv6ybm5fxss0nwgl4vxww.png" alt="Main page" width="800" height="687"&gt;&lt;/a&gt;A thin line spanning underneath the titlebar&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy8tx7d60hyv7s3ulbcke.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy8tx7d60hyv7s3ulbcke.png" alt="Settings page" width="800" height="687"&gt;&lt;/a&gt;Some titles and buttons are duplicated&lt;/p&gt;

&lt;p&gt;To solve these, edit your &lt;code&gt;~/.config/gtk-3.0/gtk.css&lt;/code&gt; file and add the lines below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;decoration&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;decoration&lt;/span&gt;&lt;span class="nd"&gt;:backdrop&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.title&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;transparent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.titlebar&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nc"&gt;.titlebar&lt;/span&gt; &lt;span class="nc"&gt;.background&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nt"&gt;decoration&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nt"&gt;window&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nt"&gt;window&lt;/span&gt;&lt;span class="nc"&gt;.background&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also, remove the &lt;code&gt;url&lt;/code&gt; content of the first three lines of &lt;code&gt;~/.config/gtk-3.0/window_decorations.css&lt;/code&gt;. This won't remove the close button, but it will make it invisible.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;headerbar&lt;/span&gt; &lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="nc"&gt;.titlebutton.close&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;.titlebar&lt;/span&gt; &lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="nc"&gt;.titlebutton.close&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url("")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;headerbar&lt;/span&gt; &lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="nc"&gt;.titlebutton.close&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;.titlebar&lt;/span&gt; &lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="nc"&gt;.titlebutton.close&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url("")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;headerbar&lt;/span&gt; &lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="nc"&gt;.titlebutton.close&lt;/span&gt;&lt;span class="nd"&gt;:active&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;.titlebar&lt;/span&gt; &lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="nc"&gt;.titlebutton.close&lt;/span&gt;&lt;span class="nd"&gt;:active&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url("")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The changes in this file will get reverted, so make the file immutable by running&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo chattr +i ~/.config/gtk-3.0/window_decorations.css
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Qtfication is now complete!&lt;/p&gt;

</description>
      <category>linux</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
