<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Patrick Blom on Medium]]></title>
        <description><![CDATA[Stories by Patrick Blom on Medium]]></description>
        <link>https://medium.com/@blomsmail?source=rss-681513e28109------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*phbxQ-q4JqQjrhgm</url>
            <title>Stories by Patrick Blom on Medium</title>
            <link>https://medium.com/@blomsmail?source=rss-681513e28109------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 04:16:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@blomsmail/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Fixing the SimpleScreenRecorder black screen error on Debian Buster]]></title>
            <link>https://blomsmail.medium.com/fixing-the-simplescreenrecorder-black-screen-error-on-debian-buster-545637409cc8?source=rss-681513e28109------2</link>
            <guid isPermaLink="false">https://medium.com/p/545637409cc8</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[simplescreenrecorder]]></category>
            <category><![CDATA[debian]]></category>
            <category><![CDATA[fix]]></category>
            <category><![CDATA[wayland]]></category>
            <dc:creator><![CDATA[Patrick Blom]]></dc:creator>
            <pubDate>Fri, 08 Jan 2021 10:53:56 GMT</pubDate>
            <atom:updated>2021-01-08T10:55:16.498Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*kAOM7TBFR1QNHjabbAtYow.png" /><figcaption>SimpleScreenRecorder intro screen</figcaption></figure><h3>Introduction</h3><p>The SimpleScreenReorder (SSR) is one of the famous, flexible and, as the name indicates, simplest ways to record things that happen on your Linux box. I use it regularly for small clips to report bugs or for educational reasons. SSR can be installed through various package managers and also built from scratch. You can check how to install the program on your distribution under <a href="https://www.maartenbaert.be/simplescreenrecorder/#download">https://www.maartenbaert.be/simplescreenrecorder/#download</a> .</p><h3>Problem</h3><p>After my distribution switch from Ubuntu 18.04 to Debian Buster I ran into a problem which makes SSR complete useless. The problem is that if you install SSR on a default Debian installation, the installation works as expected using APT but if you run the program it will just record a black screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*XrrOv9rLydpvVxfcMniCSw.png" /><figcaption>Black screen error</figcaption></figure><p>The reason behind that behavior is quite simple. Debian Buster (with gdm3) by default uses the Wayland Compositor and not Xorg. But SSR was built for Xorg so it’s not able to communicate with the Wayland server to grab your display content. That simply ends up in a black screen. That is a known issue and also documented on GitHub: <a href="https://github.com/MaartenBaert/ssr/issues/431">https://github.com/MaartenBaert/ssr/issues/431</a></p><h3>Solution</h3><p>To solve the problem, you can tell Debian not to use the Wayland Compositor. In that case, Debian will use the Xorg Server. To achieve that you can edit the <em>“deamon.conf”</em> located under <em>“/etc/gdm3”.</em></p><p>In line 7 you will find an entry called “<em>WaylandEnable=false</em>” which is commented out. Just edit the file as root / with sudo and remove the starting “<strong>#</strong>” so that the config look like the screen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*787aO6ESWL89buFmq4CSYQ.png" /><figcaption>gdm3 deamon configuration</figcaption></figure><p>After saving the configuration, reboot your system and check the SSR functionality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*vkCBWsJDn7TdX2VOCcdbxg.png" /><figcaption>SSR after fixing the config</figcaption></figure><blockquote>Voila! SSR is now able to capture your screen.</blockquote><h3>Keep in mind</h3><p>Please think about, what the switch from Wayland to Xorg means for your system. It could happen that you already have Wayland only programs installed which will simply not work with Xorg. So treat this as a “<em>workaround “ </em>because Wayland will replace Xorg in the future. For the most users using Xorg will not have such a big impact because the most programs will still work with Xorg. But if you want to use Wayland, SSR will (at the moment) not work for you. In that case you might have a look on EsayScreenCast or the OBS project.</p><p><a href="https://extensions.gnome.org/extension/690/easyscreencast/">EasyScreenCast - GNOME Shell Extensions</a></p><p><a href="https://obsproject.com/de">https://obsproject.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=545637409cc8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to reuse a Let’s Encrypt certificate on a new server.]]></title>
            <link>https://blomsmail.medium.com/how-to-reuse-a-lets-encrypt-certificate-on-a-new-server-19e7224e4d81?source=rss-681513e28109------2</link>
            <guid isPermaLink="false">https://medium.com/p/19e7224e4d81</guid>
            <category><![CDATA[certbot]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[ssl-certificate]]></category>
            <category><![CDATA[lets-encrypt]]></category>
            <category><![CDATA[new-server]]></category>
            <dc:creator><![CDATA[Patrick Blom]]></dc:creator>
            <pubDate>Sun, 12 Jul 2020 16:58:25 GMT</pubDate>
            <atom:updated>2020-09-18T11:45:14.769Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UE8rRIQk3YEeT0jBwkEhJQ.png" /></figure><p>A couple weeks ago my cloud hosting provider informed me that one of my instances will be no longer maintained and shut down within the next months. Sadly I was not able to migrate the server to a new hardware node, so I created a new instance and moved all my stuff to the new machine. Within this task I also moved my Let’s Encrypt SSL certificates to the new machine. This article is about how to do this and what you have to keep in mind during that process.</p><h4>Step 0: Prepare the new machine</h4><p>To ensure that everything works as expected on the new machine, some things have to be prepared. In my case I already installed certbot and the apache webserver which were also available on the old server. Further I copied the V-Host files to the new machine so that the webserver can locate the used SSL certificates instantly.<br>In general you should prepare the new server according to the old one, otherwise it might happen that the transfer does not work. E.g. If you switch the webserver from apache to nginx this tutorial will definitely not work.</p><h4>Step 1: Locate the necessary files</h4><p>To locate your certificates take a look into your SSL V-Host configuration at the bottom of the file you will find the entries for the certificate.</p><figure><img alt="webserver configuration" src="https://cdn-images-1.medium.com/max/772/1*7h0v2HSbcXhYu-TrivejWA.png" /></figure><p>In my case the certificates where located in:</p><blockquote>$&gt; /etc/letsencrypt/live/patrick-blom.de/</blockquote><p>Further there is also an options file called <em>options-ssl-apache.conf </em>which also have to be kept during the transfer.</p><h4>Step 2: Transfer the files to the new machine</h4><p>After the position of the files is known we can start transferring them to the new Server. As you can see on the screenshot the <em>live</em> certificates are linked to the <em>archive</em> directory at the root of the Let’s Encrypt folder. Further more there is also an entry inside the renewal folder, so we also have to keep it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*0tNmXxURkDWDkJxxhsJOdA.png" /></figure><p>So we have to transfer the following files and folders:</p><ul><li>archive</li><li>live</li><li>renewal</li><li>options-ssl-apache.conf</li></ul><p>The simplest way to transfer all the files and links is to wrap everything into a tarbal and copy it to new machine using scp. Here is an example how you could do that.</p><blockquote>$&gt; sudo tar -czvf backpup.tar.gz archive/ live/ renewal/ options-ssl-apache.conf &amp;&amp; scp backup.tar.gz [your-user]@[your-srever-ip]:/my/new/letsenrcypt/path</blockquote><h4>Step 3: Reuse the transferred files on the new machine</h4><p>If the files were transferred to the new server, we can extrac them from the tarball and move them to the new Let’s Encrypt folder.</p><blockquote>$&gt; sudo tar -xzvf backup.tar.gz <br>$&gt; sudo mv archive/ live/ renewal/ options-ssl-apache.conf / etc/letsencrypt/</blockquote><h4>Step 4: Test the config and the cert renewal</h4><p>If everything is in place you can restart the apache webserver. The certificate should be loaded and functional.</p><blockquote>$&gt; sudo systemctl restart apache2.service</blockquote><p>To test the renewal process, first run the follwoing command to create an account and accept the terms of condition. If you hitting the setup process, just quit certbot using <em>CTRL-C.</em></p><blockquote>$&gt; sudo cerbot</blockquote><p>You’re now ready to test the renewal. Just type in:</p><blockquote>$&gt; sudo certbot renew --dry-run</blockquote><p>and you’re done! You have successfully transferred a Let’s Encrypt SSL certificate to a new server.</p><h4>— Update —</h4><p>You might run in the issue that the automatical renewal will fail after the transfer. This happens beause you created a new account Id in “Step 4”.</p><p>To fix the issue simply update the account id in your renewal files in ‘/etc/letsencrypt/renewal/your-domain.conf’. You can grab the new account id from the foldername located in ‘/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/’</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19e7224e4d81" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Make it btr(fs)]]></title>
            <link>https://blomsmail.medium.com/make-it-btr-fs-e8c133fa040?source=rss-681513e28109------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8c133fa040</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[btrfs]]></category>
            <category><![CDATA[ext4]]></category>
            <category><![CDATA[migration]]></category>
            <category><![CDATA[filesystem]]></category>
            <dc:creator><![CDATA[Patrick Blom]]></dc:creator>
            <pubDate>Tue, 12 May 2020 06:19:01 GMT</pubDate>
            <atom:updated>2020-05-14T17:54:51.027Z</atom:updated>
            <content:encoded><![CDATA[<h3>Make it Btr(fs)</h3><p>How to switch the filesystem of your Linux home partition from ext2 / ext4 to Btrfs without any data loss in Debian Buster.</p><figure><img alt="Image of an old open hdd" src="https://cdn-images-1.medium.com/max/1024/1*vuAhlYqLWE-OAQstOCu7jQ.jpeg" /><figcaption>Old harddisk drive</figcaption></figure><p>A couple weeks ago I reactivated my old laptop and installed the <a href="https://www.debian.org/distrib/netinst">latest Debian</a> on it. I wanted to have a machine for fun which I can use to play with and trying out things that I’m afraid to do with my regular Linux box. One of my first ideas were to play around with the <a href="https://btrfs.wiki.kernel.org/index.php/Main_Page">Btrfs filesystem</a> and his cool features. In this article I want to share the experience I collected during the filesystem switch of my home partition from ext4 to Btrfs.</p><h3><strong>Step 0: Setup</strong></h3><p>It’s not much you need to switch one filesystem to another. In my case I needed an external drive to backup my data, a live distro that supports Btrfs and my /home directory has to be mounted on a separate partition. Luckily the last point was fulfilled during my Debian installation because I already thought earlier, separating my home directory from the rest of the system would be a good idea.</p><h3>Step 1: Check your kernel</h3><p>Btrfs must be supported by your kernel because it’s deeply integrated in it. On the offical Btrfs site they recommend to always use the latest kernel because Btrfs is a “fast-moving-target”, they say. I ignored this recommendation because last time I used the latest kernel on my old box, I messed up the whole system. For this tutorial I used the standard 4.19 kernel which’s shipped with Debian Buster. So if you’re using the same kernel or something above, I’m quite sure, it will also work on your machine.</p><p>If you want to ensure that your kernel supports Btrfs you can run the following command which lists all the filesystems your kernel supports:</p><blockquote>$&gt; cat /proc/filesystems</blockquote><figure><img alt="listing of all available filessystems provided by your kernel" src="https://cdn-images-1.medium.com/max/1024/1*hip2SwRKbKluP6NhCnwqaw.png" /><figcaption>Output of /proc/filesystems on my legacy box</figcaption></figure><h3>Step 2: Backup your home partition</h3><p>The upcoming steps were all done from a live distribution. This happened because I wanted to be 100% sure that no background activity within my home directory interrupts the backup or any other process during the switch. In my case I used a <a href="https://xubuntu.org/download/">Xubuntu 20.04 Focal Fossa</a> because it works quite nice as a live distro and also has build in support for Btrfs.</p><figure><img alt="screenshot of the live distribution" src="https://cdn-images-1.medium.com/max/1024/1*r2WhbfhOiQdaB4wmQLTlfQ.png" /><figcaption>Xubuntu 20.04 Focal Fossa</figcaption></figure><p>From the live distro I mounted my external hard drive to store the content of my home partition. In my case the external drive was labeled with sdb1 and my home partition with sda6. To transfer all my files I chose rsync, because I wanted to keep the ownership and the privileges of the files in my home directory during the transfer. In case of a regular copy, the files would belong to root and can not be used from my host system without further interactions of me.</p><blockquote>$&gt; sudo mkdir /mnt/backup-disk<br>$&gt; sudo mkdir /mnt/debian-home</blockquote><blockquote>$&gt; sudo mount /dev/sdb1 /mnt/backup-disk<br>$&gt; sudo mount /dev/sda6 /mnt/debian-home</blockquote><blockquote>$&gt; sudo rsync -av /mnt/debian-home/ /mnt/backup-disk</blockquote><figure><img alt="Image of commands to create a backup of the home partition" src="https://cdn-images-1.medium.com/max/1024/1*xKqGhvofUzNEbsu1s4hytw.png" /><figcaption>Creating the backup for the home partition</figcaption></figure><h3>Step 3: Create the new filesystem and subvolumes</h3><p>After the backup was created and I verified that all data were transferred to the backup disk I wiped my old ext4 filesystem and created the new Btrfs filesystem.</p><blockquote>$&gt; sudo umount /mnt/debian-home<br>$&gt; sudo mkfs.btrfs -f -L home /dev/sda6</blockquote><figure><img alt="Command to create the new filesystem" src="https://cdn-images-1.medium.com/max/1024/1*C5uTfaTrmAHCmh1e7O1Q6A.png" /><figcaption>Creating the new filesystem on /dev/sda6</figcaption></figure><p>Once the basic filesystem was created I remounted the partition and created two subvolumes. <a href="https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-subvolume">Subvolumes</a> are one of the power features in Btrfs. A subvolume is a part of filesystem with its own independent file/directory hierarchy. Subvolumes can be mounted separate in the system and interact as a kind of “virtual” volume without knowledge about the surrounding subvolumes. From a subvolume you can also simply create <a href="https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Snapshots">snapshots</a> which can be used to restore data instantly, another power feature of Btrfs. My intent was to create a subvolume for my home directory and one for my snapshots. If I wanted to do some risky stuff with the data inside my home directory I can create a snapshot in advance and restore it, if it becomes necessary.</p><blockquote>$&gt; sudo mkdir /mnt/btrfs-home<br>$&gt; sudo mount /dev/sda6 /mnt/btrfs-home</blockquote><blockquote>$&gt; sudo btrfs subvolume create /mnt/btrfs-home/@home<br>$&gt; sudo btrfs subvolume create /mnt/btrfs-home/@.snapshots</blockquote><p>From now, you can list the subvolumes of your filesystem using the following command. Keep track of the ‘@home’ subvolume id (256) , it will be used in further steps:</p><blockquote>$&gt; sudo btrfs subvolume list /mnt/btrfs-home</blockquote><figure><img alt="Command to create the subvolumes" src="https://cdn-images-1.medium.com/max/1024/1*0LHBxmyAarsBQBn6BzsHug.png" /><figcaption>Creating subvolumes and list the created volumes</figcaption></figure><h3>Step 4: Restore the data</h3><p>To restore my data I had to mount the subvolume of the fresh created partition. To mount the subvolume I had to use the id of the subvolume and pass it to the mount command. You can also use the name of the subvolume but I prefer the id. I also added the compression option to ensure that all data will be written compressed to the disk.</p><blockquote>$&gt; sudo mkdir /mnt/subvolume_home<br>$&gt; sudo mount -o subvolid=256,compression=lzo /dev/sda6 /mnt/subvolume_home</blockquote><p>After the new partition was mounted I restored my data from the external hard disk back to the new Btrfs subvolume.</p><blockquote>$&gt; sudo rsync -av /mnt/backup-disk /mnt/subvolume_home</blockquote><figure><img alt="Commad to mount the new partition and restore the data" src="https://cdn-images-1.medium.com/max/1024/1*BtHhQsl0e1lNK8Xoj4aY-A.png" /><figcaption>Mount the subvolume with compression and restore the data</figcaption></figure><h3>Step 5: Edit the filesystem table (fstab)</h3><p>To make the new partition persistent in my debian system I had to edit the fstab file and provide all information for mounting the partition during the boot process. But before I had to find the new uuid of the created Btrfs partition because with changing the filesystem of the /dev/sda6 partition the uuid of the device also had changed. If you’re not using the correct uuid the system will not boot because the home partition can not be found. The new uuid can be found using the Btrfs filesystem show command.</p><blockquote>$&gt; sudo btrfs filesystem show /mnt/btrfs-home</blockquote><blockquote>$&gt; sudo mkdir /mnt/debian-root<br>$&gt; sudo mount /dev/sda1 /mnt/debian-root</blockquote><figure><img alt="Command for finding the new uuid and mounting the debian root filesystem" src="https://cdn-images-1.medium.com/max/1024/1*IM_F44o3K8hcjWeBq_rI4A.png" /><figcaption>Find the new uuid and mount the debian root filesystem</figcaption></figure><blockquote>$&gt; sudo nano /mnt/debian-root/etc/fstab</blockquote><p><strong>File content excerpt</strong>:</p><blockquote>UUID=6f019b4f-8b3e-4337–9f4c-4a56ccc81206 /home btrfs defaults,subvolid=256,compress=lzo 0 2</blockquote><figure><img alt="Example of the new filesystem table" src="https://cdn-images-1.medium.com/max/1024/1*vybvnIiDjl9N1yVYSrI9zQ.png" /><figcaption>Editing the fstab file for the new partition</figcaption></figure><h3>Step 6: Restart the hostsystem</h3><p>That’s it! After shutting down the live distro I started my Debian system and <em>Voilà</em>, Debian runs Btrfs for my home partition.</p><h3>Step 7: Install btrfs tools (Debian specific)</h3><p>To create snapshots and use all the other cool Btrfs features I needed the “btrfs tools” which are not pre installed on Debian. To fix that I simply installed them using apt.</p><figure><img alt="Command to install the btrfs tools" src="https://cdn-images-1.medium.com/max/1024/1*w-IePz67wFVe43DX_Ifjjg.png" /><figcaption>Installation of the “btrfs tools” and listing of the home partition</figcaption></figure><h3>Final thoughts:</h3><p>This was a funny first project with my new old legacy machine. I learned a lot about the Btrfs filesystem and also discovered that the “btrfs tools” provide a <a href="https://btrfs.wiki.kernel.org/index.php/Btrfs-convert">migration tool</a> which can be used to migrate ext2 / ext3 / ext4 partitions to Btrfs. In my case that would simplify the steps 2–4 because the tool would handle these. But to understand what’s going on during that migration process I would also have chosen the way I walked through it even if I have known that tool before.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8c133fa040" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Von vorne lockt er, von hinten schockt er!]]></title>
            <link>https://blomsmail.medium.com/von-vorne-lockt-er-von-hinten-schockt-er-d9412a7948a2?source=rss-681513e28109------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9412a7948a2</guid>
            <category><![CDATA[experience]]></category>
            <category><![CDATA[shopmacher]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[health-check]]></category>
            <category><![CDATA[ecommerce]]></category>
            <dc:creator><![CDATA[Patrick Blom]]></dc:creator>
            <pubDate>Tue, 03 Mar 2020 10:27:41 GMT</pubDate>
            <atom:updated>2020-03-03T10:27:41.302Z</atom:updated>
            <content:encoded><![CDATA[<h3>Von vorne lockt er, von hinten schockt er! Viele Online Shopbetreiber wissen garnicht, wie ihr System unter der Haube aussieht</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*T5iezr69trMH3LpZy4Ahhw.png" /><figcaption>Quelle: <a href="https://www.facebook.com/ITAcademySerbia/photos/front-end-vs-back-end-programiranje/1659835590728870/">ITAcadamySerbia</a></figcaption></figure><p>Seit knapp einem Jahr bietet die Firma <a href="https://www.shopmacher.de/">SHOPMACHER</a>, für die ich arbeite, sogenannte „Health Checks“ an. Damit kann man Online-Shops auf ihre technische „Gesundheit“ prüfen. Dabei prüfen meine Kollegen und ich in insgesamt sieben Kategorien — Systemarchitektur, Software, Hosting, Performance, Deployment, UX/Design und Content — das Shopsystem auf Herz und Nieren.</p><p>In 2019 haben wir so knapp 20 Online-Shops mithilfe unseres standardisierten Health Check Verfahrens analysiert. Dabei kamen uns die unterschiedlichsten Shops auf Basis verschiedenster Softwarelösungen vor die Flinte. Von der für unsere Branche üblichen Installationsgröße bis hin zu ausgeprägten Hochlast-Mircoservice-Systemen war alles dabei.</p><p>Dabei wurde uns schnell klar: Jedes laufende Setup hat mit individuellen Stärken und Schwächen zu kämpfen welche meistens historisch, oder wie ich gerne sage hysterisch, entstanden sind und welche man nur mit gezielten Code- oder Prozessänderungen bewältigen kann. Und dennoch hat sich im Verlauf der ganzen Health Checks ein Muster herausgebildet:</p><p>Gute Ergebnisse fanden wir oft in den Bereichen UX, Markenkonformität und Content. Klingt logisch; was der Kunde sieht und ihn zum Kauf animiert wird auch gepflegt und gewartet. Hier kümmern sich viele Shopbetreiber mit Herzblut und leidenschaftlicher Sorgfalt um die kleinsten Details.</p><p>Öffnet man aber mal die Motorhaube des auf hochglanz polierten Shop-Systems, sieht es meistens nicht mehr so rosig aus: Der anfangs gut geplanten Architektur des Gesamtsystems merkte man oft an, dass im laufenden Betrieb offenbar nicht immer die Zeit blieb, um neue Features sauber zu durchdenken. Weiterhin wird statt den Ursprung eines Problems (z.B. ein vom Kunden gemeldeter Fehler) zu beheben meistens nur das Symptom behoben. Kurz gesagt, Workarounds und Provisorien werden oft vorne und hinten an das System geflanscht, ohne sich Gedanken um die langfristigen Auswirkungen zu machen. Das löst vielleicht vorerst auftretende Probleme, geht aber gleichzeitig auch zulasten der Stabilität und der Updatefähigkeit des gesammten Systems.</p><p>Besonderes bei der Anbindung von Drittsystemen findet man oft „die dicksten Dinger“, wie mein Kollege Carsten gerne sagt. „Da wird fröhlich drauf los entwickelt und schwupps, hat man die Magie von zwei Jahren Customizing in einem einzigen Monster-Plugin — versuch’ dann mal ein Update zu machen. Das ist alles andere als entspanntes Arbeiten, wenn dir bei jeder Anpassung irgendwo was “um die Ohren fliegt”.</p><blockquote>Die meisten Probleme tauchen in den Bereichen Performance, Sicherheit, Architektur und Deployment auf.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VBjJe4UsfjUaoMzIM32_4Q.jpeg" /></figure><p>Was wir ebenfalls immer als typisches Problemfeld bei fast allen geprüften Systemen fanden, waren Schwächen in der Performance. Eigentlich verwunderlich, weil das ja unmittelbaren Impact auf die Conversionrate hat und damit super wichtig für die Shopbetreiber sein sollte. Nun ja, eigentlich ist es ihnen auch wichtig, denn die meisten Anfragen für einen Health Check kamen bei uns auf, eben weil das Shop-System so schnell lief wie ein Sack Nüsse.</p><p>Meistens zeigt sich dann aber, dass nicht die Shopsoftware an sich Schuld an den schlechten Ladezeiten ist, es sind vielmehr die zahlreichen schlecht ausgeführten Anpassungen, die das System langsam machen. Oft werden Prozesse in den Shop verlagert, die dort überhaupt nichts zu suchen haben. Zum Beispiel werden gerne mal Artikeldaten aufwendig im Shop, welcher wohlgemerkt nur als Verkaufskanal dienen sollte, angelegt und mit zahlreichen Informationen veredelt, um dann über einen CSV-Export in die eigentliche Warenwirtschaft importiert zu werden. Gezielte Regelungen für den Datenfluss und Lösungen wie eine Middleware oder ein PIM-System sind dann meistens völliges #Neuland und würden ja den etablierten Prozess gefährden. 🤦‍♂️</p><p>Bitter wird es aber besonders dann, wenn diese verbauten Systeme mit den gängigen Google-Tools bewertet werden. Die daraus resultierenden Ergebnisse sind selbst meinen versiertesten Google-Kollegen manchmal ein Rätsel. Je nachdem, welchen Richtwert man setzt, kann man komplett unterschiedliche Ergebnisse bekommen, was dazu führt, dass der Shopbetreiber nach der Prüfung mit diesen Tools auch nicht schlauer ist als zuvor. Oft heißt es dann: “Eigentlich ist der Shop schnell und performt gut, aber Analytics und die sinkende Conversionrste sehen das irgendwie anders, verstehen wir auch nicht…”</p><p>Mein persönlicher Lieblingsbereich des Health Checks ist und bleibt aber der Deployment-Prozess, welcher dafür Sorge trägt, dass die schnell angeflanschten Features letztendlich ausgerollt werden. Obwohl bisher auch einige Perlen, welche man in ein Lehrbuch hätten drucken können, dabei waren, sind die meisten “Deployments” weit unter dem, was wir heute als “ordentlich” oder “sauber” bezeichnen würden. Da werden Features teilweise noch mittels eines FTP-Programms auf die verschiedenen App-Server verteilt oder die Deploymentscripte sind samt Private-SSH-Key für jedermann von außen erreichbar. Ein wunder, dass so manch von mir geprüfter Shop zuvor nicht in Grund und Boden gehackt wurde.</p><p>Leider ist das aber oft so, dass den Bereichen, die scheinbar keinen direkten Einfluss auf das Kaufverhalten des Kunden haben, nicht so viel Aufmerksamkeit geschenkt wird. Fakt ist aber, schießt man sich mit einem Deployment den Shop weg oder wird sogar der Server gehackt, bringen mir meine ganzen Marketingmaßnahmen und fancy Transitions herzlich wenig. Ich vergleiche sowas immer gerne mit einem Haus: Ist die Basis nicht solide, stürtzt es früher oder später ein. Das ist bei einem Shop-System nicht sonderlich anders.</p><p>Letztendlich bleibt zu sagen, dass der Wert des Look &amp; Feel eines Shops schon lange im Kopf der Shopbetreibern angekommen ist. In Punkto technische Basis und vor allem die Wartung des Systems gibt es allerdings noch viel zu lernen. Das ist mir heute mehr denn je bewusst</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9412a7948a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Take the BUS! How to control Spotify with the terminal]]></title>
            <link>https://blomsmail.medium.com/take-the-bus-how-to-control-spotify-with-the-terminal-43f7bd44aed1?source=rss-681513e28109------2</link>
            <guid isPermaLink="false">https://medium.com/p/43f7bd44aed1</guid>
            <category><![CDATA[dbus]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[spotify]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Patrick Blom]]></dc:creator>
            <pubDate>Sat, 11 Jan 2020 13:53:51 GMT</pubDate>
            <atom:updated>2020-01-11T13:53:51.444Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JRv1sFjGhiblAbVZlHONTw.png" /><figcaption>Spotify Player on Ubuntu 18.04</figcaption></figure><p>As a guy who loves to use the terminal I always look for stuff that makes my life easier. My .zshrc is filled with a bunch of aliases to make my daily doing more convenient.</p><p>Everything in my terminal window is under control but to start <a href="https://www.spotify.com/">Spotify</a>, play &amp; pause songs or jump to the next song I always had to switch the window focus or use the mouse. That was something I want to get rid of, so I started to investigate how linux desktop programs &amp; processes communicate with each other.</p><p>So if you want to know how desktop applications do that or you also want to control Spotify or other desktop applications with the terminal, lean back and continue reading.</p><h3>The D-BUS</h3><p>The <a href="https://en.wikipedia.org/wiki/D-Bus">D-BUS</a> or desktop-BUS is a library which desktop programs in linux use for internal process communication. It was created by the open source <a href="https://www.freedesktop.org/">freedesktop</a> organization to unify the way how desktop programs share information. So, if a process of a program want’s to share information with an other process, it sends a message to the D-BUS. Today the D-BUS is part of almost all modern distributions out there.</p><p>The D-BUS consists of three parts. The D-BUS <em>daemon</em> which is basically responsible for handling all the messages. The library <em>libdbus </em>which is an API and has to be use by the process to send or receive messages. And the D-BUS <em>protocol</em> which defines how a message look like.</p><p>So let’s have a look at an ordinary scenario. Lets imagine <strong>Proccess A</strong> is the <a href="https://en.wikipedia.org/wiki/Hardware_abstraction">HAL-daemon</a> which recognize that you plugged in a USB-stick. It will send a message to the D-BUS to tell anyone who’s interested in a hardware change. Now lets say, <strong>Proccess B</strong> is our file manager, which is interested in hardware changes. It will take the information from the D-BUS and knows now that there is a new device, so it shows us the USB-icon in the file manager.</p><figure><img alt="D-BUS communication" src="https://cdn-images-1.medium.com/max/640/1*ypoIY7oRnUxeWi7I7IAakA.png" /></figure><p>The D-BUS is separated in two channels, the <em>Session BUS</em> and the <em>System BUS. </em>The<em> Session Bus </em>is used when ever a process want’s to talk to an other process within the same desktop session. The <em>System BUS</em> is used for the communication to the kernel or other parts of the system. So the USB example from above used the <em>System BUS</em> because a system daemon sent the message to the D-BUS.</p><h3>The Idea of control</h3><p>After I recognized that the communication between desktop programs is handled by the D-BUS I started to search for interfaces that programs likes Spotify provides. My idea was to send a message from my terminal window to the Spotify D-BUS interface to pause the current song or jump to the next one.</p><h3>Finding the Spotify D-BUS interface</h3><p>One way to figure out what interfaces are available on the current Session Bus is to actually send a message to the D-BUS. Because the developers of the D-BUS already integrated such an interface. But also for me as a terminal lover, this is really unhandy. But for everyone who want’s to give it a try check out this command:</p><blockquote>$&gt; dbus-send — session \ <br> — dest=org.freedesktop.DBus \<br> — type=method_call \<br> — print-reply \<br> /org/freedesktop/DBus \<br> org.freedesktop.DBus.ListNames</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*2EAm32KuVOGs5nzSioH7eA.png" /><figcaption>dbus-send command</figcaption></figure><p>I prefer to use a tool for that task and the first one I found (<a href="https://wiki.gnome.org/Apps/DFeet">D-Feet</a>) worked out of the box. With D-Feet you can simply search for program name you want to investigate. Alternatively you can scroll to all the interfaces the system or session provides.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lFNOKqwSTvfN0Rt3BVlKBQ.png" /><figcaption>D-Feet searching for Spotify</figcaption></figure><h3>Take control</h3><p>After I found the interface I was looking for I started to play arround with the actual methods and send messages to the D-BUS. As same as listing command this can be done by the <em>dbus-send</em> command but I prefer <a href="http://manpages.ubuntu.com/manpages/bionic/man1/qdbus.1.html"><em>qdbus</em></a><em>. Qdbus is </em>a small program which makes sending messages really easy.</p><p>So lets send a message to the running Spotify software and take a deeper look at all arguments of the command.</p><blockquote>qdbus org.mpris.MediaPlayer2.spotify\<br> /org/mpris/MediaPlayer2 \<br>org.mpris.MediaPlayer2.Player.PlayPause</blockquote><ul><li>qdbus (The program which sends the message)</li><li>org.mpris.MediaPlayer2.spotify (The program we want to talk to, Spotify)</li><li>/org/mpris/MediaPlayer2 (The object path)</li><li>org.mpris.MediaPlayer2.Player.PlayPause (The interface name including the method we want to call, which is PlayPause)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*StzU8eYcA8ox-TgZxnyXgA.png" /><figcaption>send play pause message to the D-BUS</figcaption></figure><p>As you can see, all information are provided by D-Feet and easy to use in the terminal. To have a bit more convenience I wrapped the command into an alias and paste it into my <em>.zshrc</em></p><blockquote>alias spp=’qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause’</blockquote><p>But that’s not the end of the road. Spotify provides a lot more Methods on the interface which can be used. E.g. skipping a song or jumping backwards.</p><p>One of my favorite ones is selecting a playlist. With the following command I start Spotify from the terminal, wait three seconds to enshure the program is up’n running and then send the message to open my weekly playlist.</p><blockquote>(spotify 1&gt;/dev/null 2&gt;&amp;1 &amp;) &amp;&amp; \<br>sleep 3 &amp;&amp; \<br>qdbus org.mpris.MediaPlayer2.spotify \<br>/org/mpris/MediaPlayer2 \<br>org.mpris.MediaPlayer2.Player.OpenUri \<br>spotify:playlist:37i9dQZEVXcVAMA5dHC059</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*T2mJXGrDlFmnNKDrr1S_ew.png" /><figcaption>open Spotify and send a message to play my weekly play list</figcaption></figure><h3>Sum up</h3><p>Sending messages to the D-BUS to control a desktop application is not only a hacky trick to increase the terminal convenience. Further it increased my knowledge about my operating system and how things are glued together.</p><p>But the most important thing is, that it was a lot fun to figure out how all the stuff works and what is also possible.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43f7bd44aed1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux: What does ‘1>/dev/null 2>&1’ actually mean]]></title>
            <link>https://blomsmail.medium.com/linux-what-does-1-dev-null-2-1-actually-mean-14ebcc07bcdc?source=rss-681513e28109------2</link>
            <guid isPermaLink="false">https://medium.com/p/14ebcc07bcdc</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[linux-tutorial]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[shell]]></category>
            <dc:creator><![CDATA[Patrick Blom]]></dc:creator>
            <pubDate>Thu, 09 Jan 2020 10:45:41 GMT</pubDate>
            <atom:updated>2020-01-09T10:51:48.757Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*jsD6GSVOUMj159q7PW4alw.png" /></figure><p>If you’re quite new to the world of Linux many things will be new and become confusing, because Linux offers you so many variations of control which can be combined in several ways.</p><p>One thing of these is the control of the output from a command which runs in the terminal. It quite often happens that you want to prevent any output of a command e.g. in a cronjob or if run a command in background. This makes a lot of sense because if you’re running a command in background you simply don’t want that it throws all information and error to the terminal your’re actually working with.</p><p>At this point <a href="https://en.wikipedia.org/wiki/File_descriptor">file descriptors</a> come into place. Every Unix process has to support at least the three common descriptors defined by the <a href="https://en.wikipedia.org/wiki/POSIX">POSIX</a> application programming interface.</p><ul><li><strong>0</strong> <em>Standard Input</em></li><li><strong>1</strong><em> Standard Output</em></li><li><strong>2</strong> <em>Standard Error</em></li></ul><p>In combination with the possibility to forward output with the “&gt;” we can simply explain what “1&gt;/dev/null 2&gt;&amp;1” actually means. If we start a command from the terminal e.g. G-edit this could look like this:</p><blockquote>patrick@Linux: /usr/bin/gedit 1&gt;/dev/null 2&gt;&amp;1</blockquote><p>Lets explain every part of the command.</p><ul><li><strong>/usr/bin/gedit </strong>is the program we want to start</li><li><strong>1</strong> is the file descriptor for <em>Standard Output</em></li><li><strong>&gt;</strong> is for forwarding</li><li><strong>/dev/null</strong> is a path to a black hole where any data sent, will be discarded (This could also be the path to a file)</li><li><strong>2</strong> is the file descriptor for<em> Standard Error</em></li><li><strong>&gt;</strong> is for forwarding</li><li><strong>&amp; </strong>is the symbol for file descriptor (without it, the following 1 would be considered as a filename)</li><li><strong>1</strong> is the file descriptor for <em>Standard Output</em></li></ul><p>So in a sentence “1&gt;/dev/null 2&gt;&amp;1” after a command means, that every <em>Standard Error</em> will be forwarded to the <em>Standard Output </em>and this will be also forwarded to a black hole where all information is lost.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14ebcc07bcdc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create an icon launcher for your application in Ubuntu 18.04+]]></title>
            <link>https://blomsmail.medium.com/how-to-create-an-icon-launcher-for-ubuntu-616a197cb06a?source=rss-681513e28109------2</link>
            <guid isPermaLink="false">https://medium.com/p/616a197cb06a</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[icons]]></category>
            <category><![CDATA[gnome]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Patrick Blom]]></dc:creator>
            <pubDate>Tue, 26 Nov 2019 13:17:32 GMT</pubDate>
            <atom:updated>2019-11-26T13:50:29.924Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IxWf1wKn57UbGQrBTGNaSw.png" /><figcaption>Ubuntu 18.04</figcaption></figure><p>If you create an application in Java or C++you might want to have a custom icon launcher for your application. With such a launcher you can simply start you application through the Ubuntu desktop environment (GNOME) instead of running it from the command line.</p><p>This is not only useful for the applications you build on your own. It also happens often that cross-platform applications, like e.g. <a href="https://www.getpostman.com/downloads/">Postman</a>, does not provide such a launcher.</p><p>In this case you can simply create your own launcher by the following steps.</p><p><strong>Step 1:</strong> <br>Find an icon for your application which has a size of 404px by 404px. This ensures a nice look in the dock.</p><p><strong>Step 2:<br></strong> Place your application and the icon in a separate folder and place it to your needs e.g. “/opt/[MyJavaApplication]”</p><p><strong>Step 3:<br></strong> Find the <em>StartupWMClass</em> of your application by running the command “xprop WM_CLASS” in your terminal and clicking on the main window of your running application. GNOME uses this to associate windows with the owning application.</p><p>For example, if you’re doing this on a running Chrome Browser, the result should look likes this:</p><figure><img alt="Returnvalue for the WM_CLASS of Google Chrome" src="https://cdn-images-1.medium.com/max/975/1*M9sve88f-RuKjwOmaXwKvw.png" /><figcaption>Finding the WM_CLASS property</figcaption></figure><p><strong>Step 4:</strong> <br>Go to go to /home/[your username]/.local/share/applications, create a “[MyJavaApplication].desktop“-file and paste the following content to it:</p><figure><img alt="The content of the MyJavaApplication.desktop-File" src="https://cdn-images-1.medium.com/max/675/1*KGtbrQIO8EhT8PO2HOJmMg.png" /><figcaption>Creating the my_java_application.desktop file</figcaption></figure><p><strong>Step 5:</strong> <br>After saving the file you can instantly search for your app in GNOME app search and launch it from there. Further you’re able to set your app as favorite direct to your dock.</p><p><strong>Final thoughts:<br></strong>Creating an icon launcher is not that complicated as it seems and it make your system more convenient to you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=616a197cb06a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bye-Bye Mac ! Die Geschichte eines Betriebssystemwechsels]]></title>
            <link>https://blomsmail.medium.com/bye-bye-mac-die-geschichte-eines-betriebssystemwechsels-6b1b9a94bb72?source=rss-681513e28109------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b1b9a94bb72</guid>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[journey]]></category>
            <dc:creator><![CDATA[Patrick Blom]]></dc:creator>
            <pubDate>Thu, 03 Oct 2019 19:00:42 GMT</pubDate>
            <atom:updated>2019-10-03T19:00:42.470Z</atom:updated>
            <content:encoded><![CDATA[<h3>Bye-Bye Mac ! Die Geschichte eines Betriebssystemwechsels</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*11Q-P1rYFAAd02ZvbXg5Xg.jpeg" /></figure><p><a href="https://blog.nevercodealone.de/bye-bye-mac-wie-alles-begann/">Bye-Bye Mac ! - Die Geschichte eines Betriebssystemwechsels</a></p><p>Vor einiger Zeit habe ich mich bewusst für einen Wechsel von Apples MacOS zu Linux entschieden. Diese Entscheidung sein Betriebssystem und die damit verbunden Hardware zu wechseln war nicht leicht.</p><p>Die Erfahrungen die ich bei diesem Projekt gesammelt habe und die Herausforderungen die ich dabei meistern musste, habe ich in einem dreiteiligen Blog Post festgehalten.</p><p>Den ersten Teil meiner Reise gibt’s nun auf <a href="https://blog.nevercodealone.de/">nervercodealone.de</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b1b9a94bb72" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>