<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.5">Jekyll</generator><link href="/va1entin.gitlab.io/feed.xml" rel="self" type="application/atom+xml" /><link href="/va1entin.gitlab.io/" rel="alternate" type="text/html" /><updated>2020-04-15T13:03:12+00:00</updated><id>/va1entin.gitlab.io/feed.xml</id><title type="html">Valentin Heidelberger</title><subtitle>valh.io</subtitle><entry><title type="html">Get Ledger Live working on NixOS</title><link href="/va1entin.gitlab.io/blog/Ledger-NixOS.html" rel="alternate" type="text/html" title="Get Ledger Live working on NixOS" /><published>2019-11-14T18:21:22+00:00</published><updated>2019-11-14T18:21:22+00:00</updated><id>/va1entin.gitlab.io/blog/Ledger-NixOS</id><content type="html" xml:base="/va1entin.gitlab.io/blog/Ledger-NixOS.html">&lt;p&gt;The &lt;a href=&quot;https://ledger.com&quot;&gt;Ledger Nano series&lt;/a&gt; are hardware wallets for crypto currencies. They’re managed through an application called &lt;a href=&quot;https://shop.ledger.com/pages/ledger-live&quot;&gt;Ledger Live&lt;/a&gt;. Ledger Live runs on Linux but might - depending on your distro - require some adjustments in order to correctly identify the device via USB.
I couldn’t test whether this config works with all Ledger devices so far. Feel free to drop me a &lt;a href=&quot;https://twitter.com/valhei&quot;&gt;tweet&lt;/a&gt; if you have anything to add to this post and I’ll gladly update it.&lt;/p&gt;

&lt;p&gt;On NixOS I needed the following additional config snippets to use my Ledger fully:&lt;/p&gt;

&lt;h1 id=&quot;define-a-group-called-plugdev&quot;&gt;Define a group called “plugdev”&lt;/h1&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;groups.plugdev = {};
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h1 id=&quot;add-users-to-plugdev&quot;&gt;Add user(s) to “plugdev”&lt;/h1&gt;
&lt;p&gt;Note that you your user will most likely already be in various other groups such as &lt;em&gt;networkmanager&lt;/em&gt; or &lt;em&gt;wheel&lt;/em&gt;. Just append plugdev to the &lt;em&gt;extraGroups&lt;/em&gt; list.
Replace &lt;em&gt;myUser&lt;/em&gt; with your user name.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;users.users = {
...
myUser = {
extraGroups = [ &quot;plugdev&quot; ];
...
};
};
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h1 id=&quot;add-extra-rules-for-udev&quot;&gt;Add extra rules for udev&lt;/h1&gt;
&lt;p&gt;Ledger provides udev rules which need to be added kind of hidden (Linux -&amp;gt; Troubleshooting -&amp;gt; Option 3) &lt;a href=&quot;https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues&quot;&gt;on their website&lt;/a&gt;. You can check out my NixOS config containing these rules &lt;a href=&quot;https://github.com/va1entin/nixos-config/blob/master/ledger.nix&quot;&gt;on GitHub&lt;/a&gt;. I’ve decided to not statically post them here and instead refer to the GitHub mirror of my NixOS config, because they might change with Ledger firmware updates. You must change “val” to your username.&lt;/p&gt;

&lt;p&gt;I’m not entirely sure whether it’s really necessary but I reload the rules after I’ve changed them and rebuilt NixOS just to make sure they are being applied:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;udevadm trigger
udevadm control --reload-rules
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Valentin Heidelberger</name></author><category term="Technology" /><category term="Linux" /><summary type="html">The Ledger Nano series are hardware wallets for crypto currencies. They’re managed through an application called Ledger Live. Ledger Live runs on Linux but might - depending on your distro - require some adjustments in order to correctly identify the device via USB. I couldn’t test whether this config works with all Ledger devices so far. Feel free to drop me a tweet if you have anything to add to this post and I’ll gladly update it.</summary></entry><entry><title type="html">Dynamically update Cloudflare DNS records using the web API</title><link href="/va1entin.gitlab.io/blog/Cloudflare-DynDNS.html" rel="alternate" type="text/html" title="Dynamically update Cloudflare DNS records using the web API" /><published>2019-11-12T17:30:46+00:00</published><updated>2019-11-12T17:30:46+00:00</updated><id>/va1entin.gitlab.io/blog/Cloudflare-DynDNS</id><content type="html" xml:base="/va1entin.gitlab.io/blog/Cloudflare-DynDNS.html">&lt;h1 id=&quot;why&quot;&gt;Why&lt;/h1&gt;
&lt;p&gt;I’m using Cloudflare as a CDN and DNS provider. For a system with an external IPv4 address that changes daily, I needed a dynamically updated DNS record.
There are numerous ways to do DynDNS but I wanted to get into Cloudflare’s API anyway and it turns out that this is, at least in my opinion, much easier to set up than some generic DynDNS package.&lt;/p&gt;

&lt;h1 id=&quot;how&quot;&gt;How&lt;/h1&gt;

&lt;h2 id=&quot;getting-the-script&quot;&gt;Getting the script&lt;/h2&gt;
&lt;p&gt;I’ve forked a script by &lt;a href=&quot;https://gist.github.com/benkulbertis/fff10759c2391b6618dd&quot;&gt;benkulbertis&lt;/a&gt;.
The fork does &lt;em&gt;not&lt;/em&gt; require a general API token. So you can set up API tokens specifically authorized for what the script needs to do. You can get the script &lt;a href=&quot;https://raw.githubusercontent.com/va1entin/HomeServerPi/master/openvpn/cloudflare-update-record.sh&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;setting-up-api-tokens&quot;&gt;Setting up API tokens&lt;/h2&gt;
&lt;p&gt;Next, you need to set up the required tokens. The script needs two tokens: one to read DNS records and settings and one to actually edit a DNS zone. To set the tokens up, log in to your Cloudflare account, go to &lt;a href=&quot;https://dash.cloudflare.com/profile/api-tokens&quot;&gt;this page&lt;/a&gt; and click &lt;strong&gt;Create Token&lt;/strong&gt;.
&lt;strong&gt;Note&lt;/strong&gt;, that you can also limit the tokens to a specific domain! This is of course important to know if you have multiple domains in your Cloudflare account and the script shall only read/edit the settings of one of these.
You can give your token a custom name and then have to select the permissions it’s supposed to have. These are as follows:&lt;/p&gt;

&lt;h3 id=&quot;read-token&quot;&gt;Read token&lt;/h3&gt;

&lt;table class=&quot;table&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Type&lt;/th&gt;
      &lt;th&gt;Resource&lt;/th&gt;
      &lt;th&gt;Permission&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Account&lt;/td&gt;
      &lt;td&gt;Access: Organizations, Identity Providers, Groups&lt;/td&gt;
      &lt;td&gt;Read&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Zone&lt;/td&gt;
      &lt;td&gt;Zone Settings&lt;/td&gt;
      &lt;td&gt;Read&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Zone&lt;/td&gt;
      &lt;td&gt;DNS&lt;/td&gt;
      &lt;td&gt;Read&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h3 id=&quot;edit-token&quot;&gt;Edit token&lt;/h3&gt;

&lt;table class=&quot;table&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Type&lt;/th&gt;
      &lt;th&gt;Resource&lt;/th&gt;
      &lt;th&gt;Permission&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Zone&lt;/td&gt;
      &lt;td&gt;DNS&lt;/td&gt;
      &lt;td&gt;Edit&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;configuring-the-script&quot;&gt;Configuring the script&lt;/h2&gt;
&lt;p&gt;Now, that you’ve successfully created the API tokens, configure the script by modifying the first four variables accordingly.&lt;/p&gt;

&lt;table class=&quot;table&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Variable&lt;/th&gt;
      &lt;th&gt;Value&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;read_token&lt;/td&gt;
      &lt;td&gt;The read token you’ve just created&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;edit_token&lt;/td&gt;
      &lt;td&gt;The edit token you’ve just created&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;zone_name&lt;/td&gt;
      &lt;td&gt;The DNS zone your record lies in (e.g. example.com)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;record_name&lt;/td&gt;
      &lt;td&gt;The DNS record (e.g. mysubdomain.example.com)&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;moving-on&quot;&gt;Moving on&lt;/h2&gt;
&lt;p&gt;I’ll probably rewrite the script in Python and add an argument parser soon. If you have any other ideas, feel free to drop them &lt;a href=&quot;https://github.com/va1entin/HomeServerPi/&quot;&gt;here&lt;/a&gt; as an issue or pull request.&lt;/p&gt;</content><author><name>Valentin Heidelberger</name></author><category term="RaspberryPi" /><category term="Technology" /><category term="Linux" /><summary type="html">Why I’m using Cloudflare as a CDN and DNS provider. For a system with an external IPv4 address that changes daily, I needed a dynamically updated DNS record. There are numerous ways to do DynDNS but I wanted to get into Cloudflare’s API anyway and it turns out that this is, at least in my opinion, much easier to set up than some generic DynDNS package.</summary></entry><entry><title type="html">Providing access to thousands of external storages using Nextcloud</title><link href="/va1entin.gitlab.io/blog/Nextcloud-conference-2019.html" rel="alternate" type="text/html" title="Providing access to thousands of external storages using Nextcloud" /><published>2019-10-28T18:41:14+00:00</published><updated>2019-10-28T18:41:14+00:00</updated><id>/va1entin.gitlab.io/blog/Nextcloud-conference-2019</id><content type="html" xml:base="/va1entin.gitlab.io/blog/Nextcloud-conference-2019.html">&lt;p&gt;A few weeks ago I’ve held a talk involving a solution I’ve built @&lt;a href=&quot;https://univention.com&quot;&gt;univention&lt;/a&gt; for a customer using Univention Corporate Server and Nextcloud at this year’s Nextcloud conference.&lt;/p&gt;

&lt;p&gt;The talk is available &lt;a href=&quot;https://www.youtube.com/watch?v=ZjLiSL_XYvs&amp;amp;t=1766&quot;&gt;on YouTube&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The documentation for the cool solution I’m referring to in the talk can be found in the &lt;a href=&quot;https://help.univention.com/t/cool-solution-mount-samba-shares-in-nextcloud/&quot;&gt;Univention Knowledge Base&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks a lot to the folks at Nextcloud and especially &lt;a href=&quot;https://twitter.com/nlapalice&quot;&gt;Nina&lt;/a&gt; and &lt;a href=&quot;https://twitter.com/jospoortvliet&quot;&gt;Jos&lt;/a&gt; for the invitation and great discussions!&lt;/p&gt;</content><author><name>Valentin Heidelberger</name></author><category term="Technology" /><category term="Linux" /><summary type="html">A few weeks ago I’ve held a talk involving a solution I’ve built @univention for a customer using Univention Corporate Server and Nextcloud at this year’s Nextcloud conference.</summary></entry><entry><title type="html">Nextcloud for UCS now comes with SSO out of the box</title><link href="/va1entin.gitlab.io/blog/UCS-Nextcloud-app-with-SSO.html" rel="alternate" type="text/html" title="Nextcloud for UCS now comes with SSO out of the box" /><published>2019-09-29T13:42:20+00:00</published><updated>2019-09-29T13:42:20+00:00</updated><id>/va1entin.gitlab.io/blog/UCS-Nextcloud-app-with-SSO</id><content type="html" xml:base="/va1entin.gitlab.io/blog/UCS-Nextcloud-app-with-SSO.html">&lt;p&gt;A few weeks ago I’ve held a talk involving a solution I built @&lt;a href=&quot;https://univention.com&quot;&gt;univention&lt;/a&gt; for a real customer using Univention Corporate Server and Nextcloud at this year’s Nextcloud conference. The video of that will probably be available in the next few weeks and I’ll share it here once it’s available.&lt;/p&gt;

&lt;p&gt;Another interesting thing regarding Nextcloud and UCS happened in the meantime though: The &lt;a href=&quot;https://www.univention.com/products/univention-app-center/app-catalog/nextcloud/&quot;&gt;Nextcloud app for UCS&lt;/a&gt; now comes with pre-configured Single Sign-On (SSO) using SAML. This is very cool because lots of our customers want to make use of SSO but the configuration is not always trivial. Using a &lt;a href=&quot;https://www.univention.com/blog-en/2019/02/how-to-single-sign-on-for-nextcloud/&quot;&gt;blog post&lt;/a&gt; I wrote for the Univention blog in February, Nextcloud, namely Arthur Schiwon aka @&lt;a href=&quot;https://github.com/blizzz&quot;&gt;blizzz&lt;/a&gt;, were able to &lt;a href=&quot;https://github.com/nextcloud/univention-app/issues/91&quot;&gt;bake the configuration&lt;/a&gt; into the app and thus make it really easy for people to get started with UCS, Nextcloud and SSO! If you’d like to find out more about SSO with SAML, feel free to check out my &lt;a href=&quot;https://www.univention.com/blog-en/2019/06/brief-introduction-saml-a-secure-comfortable-web-access/&quot;&gt;blog post&lt;/a&gt; about it.&lt;/p&gt;</content><author><name>Valentin Heidelberger</name></author><category term="Technology" /><category term="Linux" /><summary type="html">A few weeks ago I’ve held a talk involving a solution I built @univention for a real customer using Univention Corporate Server and Nextcloud at this year’s Nextcloud conference. The video of that will probably be available in the next few weeks and I’ll share it here once it’s available.</summary></entry><entry><title type="html">Raspberry Pi: Configure WLAN/WiFi + SSH before first boot</title><link href="/va1entin.gitlab.io/blog/Raspberry-Pi-wpa-supplicant.html" rel="alternate" type="text/html" title="Raspberry Pi: Configure WLAN/WiFi + SSH before first boot" /><published>2018-09-10T19:31:23+00:00</published><updated>2018-09-10T19:31:23+00:00</updated><id>/va1entin.gitlab.io/blog/Raspberry-Pi-wpa-supplicant</id><content type="html" xml:base="/va1entin.gitlab.io/blog/Raspberry-Pi-wpa-supplicant.html">&lt;h1 id=&quot;why&quot;&gt;Why&lt;/h1&gt;
&lt;p&gt;Lots of Raspberry Pis are used for purposes requiring a wireless network connection. Configuring WLAN for the Pi requires a config file including the network’s name and access keys. To save time otherwise spent on connecting the Pi to a screen and keyboard or wired network to configure this, you can just create the config file before even booting the Pi for the first time. Here’s how that works.&lt;/p&gt;

&lt;h1 id=&quot;how&quot;&gt;How&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;Having flashed the Raspbian image onto your Pi&lt;/strong&gt;, use your file explorer or terminal to move to a newly created partition called &lt;strong&gt;“boot”&lt;/strong&gt; on the micro SD card. Create a file called &lt;strong&gt;wpa_supplicant.conf&lt;/strong&gt; in the root of that partition and paste the following contents in there. Change the &lt;em&gt;country&lt;/em&gt; parameter as well as the &lt;em&gt;ssid&lt;/em&gt; and &lt;em&gt;psk&lt;/em&gt; accordingly and save the file:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US

network={
     ssid=&quot;Your network name/SSID&quot;
     psk=&quot;Your WPA/WPA2 security key&quot;
     key_mgmt=WPA-PSK
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Having created the config for WLAN, create another (empty) file simply called &lt;strong&gt;ssh&lt;/strong&gt; in the &lt;strong&gt;“boot”&lt;/strong&gt; partition. If you’re on Windows, make sure that both &lt;strong&gt;ssh&lt;/strong&gt; and &lt;strong&gt;wpa_supplicant.conf&lt;/strong&gt; don’t have any other extension such as &lt;em&gt;.txt&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Once the files are saved, eject the SD card safely, put it in your Pi and boot it up. You should be able to connect via SSH using the default user &lt;em&gt;pi&lt;/em&gt; and password &lt;em&gt;raspberry&lt;/em&gt; shortly after.&lt;/p&gt;</content><author><name>Valentin Heidelberger</name></author><category term="Technology" /><category term="Linux" /><category term="RaspberryPi" /><summary type="html">Why Lots of Raspberry Pis are used for purposes requiring a wireless network connection. Configuring WLAN for the Pi requires a config file including the network’s name and access keys. To save time otherwise spent on connecting the Pi to a screen and keyboard or wired network to configure this, you can just create the config file before even booting the Pi for the first time. Here’s how that works.</summary></entry><entry><title type="html">Simple file encryption module for Python projects</title><link href="/va1entin.gitlab.io/blog/plasm-introduction.html" rel="alternate" type="text/html" title="Simple file encryption module for Python projects" /><published>2018-09-08T11:40:23+00:00</published><updated>2018-09-08T11:40:23+00:00</updated><id>/va1entin.gitlab.io/blog/plasm-introduction</id><content type="html" xml:base="/va1entin.gitlab.io/blog/plasm-introduction.html">&lt;h1 id=&quot;tldr&quot;&gt;tl;dr&lt;/h1&gt;
&lt;p&gt;Plasm focuses on a very specific use case: encrypting and decrypting files using public key encryption. If plasm doesn’t fit the scope of what you want to do, feel free to have a look at &lt;a href=&quot;https://pynacl.readthedocs.io&quot;&gt;pynacl’s documentation&lt;/a&gt; and use it directly.&lt;/p&gt;

&lt;h1 id=&quot;why&quot;&gt;Why&lt;/h1&gt;
&lt;p&gt;I have experimented a lot with camera software for the Raspberry Pi. One project that particularly stuck with me is &lt;a href=&quot;https://github.com/ccrisan/motioneye&quot;&gt;motionEye&lt;/a&gt;, a web frontend for the motion daemon, which allows you to easily set up an open source motion triggered camera for about 50€. MotionEye also offers a cloud upload functionality, which I like a lot. Unfortunately it doesn’t allow the user to encrypt their media files before uploading them. Since I wanted to use Google Drive as my data grave but at the same time not upload unencrypted media files into the cloud, I decided to build a simple python module to easily hack file encryption into motionEye.&lt;/p&gt;

&lt;h1 id=&quot;what-it-is&quot;&gt;What it is&lt;/h1&gt;
&lt;p&gt;The result of this is &lt;a href=&quot;https://github.com/va1entin/plasm&quot;&gt;plasm&lt;/a&gt;, which is an acronym for “PynacL AbStraction Module”. Plasm is based on &lt;a href=&quot;https://github.com/pyca/pynacl&quot;&gt;pynacl&lt;/a&gt;, which in turn binds to &lt;a href=&quot;https://libsodium.org&quot;&gt;libsodium&lt;/a&gt;.
Plasm uses public key encryption and is supposed to make the &lt;strong&gt;creation of public key pairs&lt;/strong&gt; as well as &lt;strong&gt;encryption and decryption of files&lt;/strong&gt; very simple.
One key requirement for me was that plasm had to be able to encrypt using only a public key. The private key, which is required to decrypt, shouldn’t be required so that I could store it in a safe place on another device. To accomplish this, I chose to use the sealedBox construct, because it only requires a public key. The main difference of the sealedBox compared to another construct simply called “Box” is that it doesn’t offer cryptographic proof of the sender’s authorship, which is out of scope for plasm anyway.
Additionally, I wanted to protect the private key by encrypting it as well using secret key encryption. That’s why plasm requires a password for creating a key pair and decrypting files. The password is used to encrypt and decrypt the key so that an attacker needs both the private key file &lt;strong&gt;and&lt;/strong&gt; the password to be able to decrypt files.&lt;/p&gt;

&lt;h1 id=&quot;installation-and-how-it-works&quot;&gt;Installation and how it works&lt;/h1&gt;
&lt;p&gt;Please have a look at the &lt;a href=&quot;https://github.com/va1entin/plasm/blob/master/README.md&quot;&gt;README&lt;/a&gt; to find out how to use plasm.&lt;/p&gt;

&lt;p&gt;Plasm is currently not available via PyPi, but you can install it directly from Github as follows:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;wget https://github.com/va1entin/plasm/-/archive/master/plasm-master.zip
unzip plasm-master.zip
cd plasm-master
pip install .
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h1 id=&quot;integration-into-motioneye&quot;&gt;Integration into motionEye&lt;/h1&gt;
&lt;p&gt;The integration into motionEye currently requires a little patch to be applied to it’s &lt;em&gt;uploadservices.py&lt;/em&gt;, which is located at &lt;em&gt;/usr/local/lib/python2.7/dist-packages/motioneye/uploadservices.py&lt;/em&gt; on Raspbian. You can download it directly &lt;a href=&quot;https://github.com/va1entin/plasm/raw/master/integrations/motioneye-uploadservices.patch&quot;&gt;here&lt;/a&gt; (right click -&amp;gt; save as).
Make sure to change the path to your public key accordingly and add &lt;em&gt;removeInputFile=True&lt;/em&gt; as shown in the &lt;a href=&quot;https://github.com/va1entin/plasm/blob/master/README.md&quot;&gt;README&lt;/a&gt;, if you want plasm to remove the unencrypted input file once encryption is finished.
Plasm also logs what it’s doing using the logging module by default. Most logging happens at debug log level currently. Have a look at the &lt;a href=&quot;https://github.com/ccrisan/motioneye/wiki/Configuration-File&quot;&gt;motionEye wiki&lt;/a&gt; to find out how to enable debug logging.&lt;/p&gt;

&lt;h1 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;Plasm is licensed under the Apache 2.0 License. Feel free to report issues or create merge requests at &lt;a href=&quot;https://github.com/va1entin/plasm&quot;&gt;Github&lt;/a&gt;. Please note that I don’t plan to extend plasm’s scope on other use cases at the moment to keep it as simple as possible. If plasm doesn’t fit the scope of what you want to do, feel free to have a look at &lt;a href=&quot;https://pynacl.readthedocs.io&quot;&gt;pynacl’s documentation&lt;/a&gt; and use it directly.&lt;/p&gt;</content><author><name>Valentin Heidelberger</name></author><category term="Technology" /><summary type="html">tl;dr Plasm focuses on a very specific use case: encrypting and decrypting files using public key encryption. If plasm doesn’t fit the scope of what you want to do, feel free to have a look at pynacl’s documentation and use it directly.</summary></entry><entry><title type="html">Setting up unattended upgrades on Debian</title><link href="/va1entin.gitlab.io/blog/Setting-up-unattended-upgrades-on-Debian.html" rel="alternate" type="text/html" title="Setting up unattended upgrades on Debian" /><published>2018-08-25T12:30:21+00:00</published><updated>2018-08-25T12:30:21+00:00</updated><id>/va1entin.gitlab.io/blog/Setting-up-unattended-upgrades-on-Debian</id><content type="html" xml:base="/va1entin.gitlab.io/blog/Setting-up-unattended-upgrades-on-Debian.html">&lt;h1 id=&quot;why&quot;&gt;Why&lt;/h1&gt;
&lt;p&gt;I have a Raspberry Pi running on Raspbian in my home network. It mainly provides a DNS server based on &lt;a href=&quot;https://pi-hole.net/&quot;&gt;Pi Hole&lt;/a&gt; and runs some cronjobs for me.
Of course you don’t want to login to such a system regularly and install package upgrades. That’s where unattended upgrades come into play.
I’ll tell you how to set unattended upgrades up on Debian and walk you through some config parameters that I find very useful.&lt;/p&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#why&quot; id=&quot;markdown-toc-why&quot;&gt;Why&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#how&quot; id=&quot;markdown-toc-how&quot;&gt;How&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#the-config-file&quot; id=&quot;markdown-toc-the-config-file&quot;&gt;The config file&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#defining-package-origins&quot; id=&quot;markdown-toc-defining-package-origins&quot;&gt;Defining package origins&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#defining-package-blacklist&quot; id=&quot;markdown-toc-defining-package-blacklist&quot;&gt;Defining package blacklist&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#automatically-remove-unused-dependencies-autoremove&quot; id=&quot;markdown-toc-automatically-remove-unused-dependencies-autoremove&quot;&gt;Automatically remove unused dependencies (autoremove)&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#automatically-reboot&quot; id=&quot;markdown-toc-automatically-reboot&quot;&gt;Automatically reboot&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#debugging&quot; id=&quot;markdown-toc-debugging&quot;&gt;Debugging&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;how&quot;&gt;How&lt;/h1&gt;
&lt;p&gt;Firstly, you need to install the unattended-upgrades pkg:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;apt install unattended-upgrades
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;unattended-upgrades is run automatically by the cronjob &lt;em&gt;/etc/cron.daily/apt-compat&lt;/em&gt;.&lt;/p&gt;

&lt;h2 id=&quot;the-config-file&quot;&gt;The config file&lt;/h2&gt;
&lt;p&gt;Now let’s have a look at the config file:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;vim /etc/apt/apt.conf.d/50unattended-upgrades
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The config file might look a bit messy at first due to a LOT of comments and the (in my opinion) unaesthetic apt config syntax.
The most interesting part to begin with is the “Origins-Pattern”:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Unattended-Upgrade::Origins-Pattern {
      &quot;o=Debian,a=stable&quot;;
      &quot;o=Debian,a=stable-updates&quot;;
      &quot;o=Debian,a=proposed-updates&quot;;
      &quot;origin=Debian,codename=${distro_codename},label=Debian-Security&quot;;
};
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;defining-package-origins&quot;&gt;Defining package origins&lt;/h2&gt;
&lt;p&gt;The Origins-Pattern defines from where unattended-upgrades will install upgrades. If an origin is missing here, package upgrades from there will be ignored. Which origins to configure here is totally up to you of course. Maybe you have installed some exotic PPA, which you always want to upgrade manually?
To find out how to configure the origins you want, you can have a look at apt’s lists:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;val@pi:~ $ ls /var/lib/apt/lists/ | grep InRelease
archive.raspberrypi.org_debian_dists_stretch_InRelease
raspbian.raspberrypi.org_raspbian_dists_stretch_InRelease
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;These InRelease files provide the information you need. To find out their origin and suite (o= and a=), use the grep command:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;val@pi:~ $ grep -E '(Origin|Suite)' /var/lib/apt/lists/archive.raspberrypi.org_debian_dists_stretch_InRelease
Origin: Raspberry Pi Foundation
Suite: stable
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So the origin of this particular apt list is “Raspberry Pi Foundation” and it’s suite is “stable”. To configure this for unattended-upgrades, you’d adapt the config to look as follows:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Unattended-Upgrade::Origins-Pattern {
      &quot;o=Raspberry Pi Foundation,a=stable&quot;;
      &quot;o=Raspbian,a=stable&quot;;
      &quot;o=Debian,a=stable&quot;;
      &quot;o=Debian,a=stable-updates&quot;;
      &quot;o=Debian,a=proposed-updates&quot;;
      &quot;origin=Debian,codename=${distro_codename},label=Debian-Security&quot;;
};
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;defining-package-blacklist&quot;&gt;Defining package blacklist&lt;/h2&gt;
&lt;p&gt;If you don’t want to upgrade certain packages from a defined origin automatically, you can put them in the blacklist, that should already be in the config file:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Unattended-Upgrade::Package-Blacklist {
//      &quot;vim&quot;;
//      &quot;libc6&quot;;
//      &quot;libc6-dev&quot;;
//      &quot;libc6-i686&quot;;
};
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;automatically-remove-unused-dependencies-autoremove&quot;&gt;Automatically remove unused dependencies (autoremove)&lt;/h2&gt;
&lt;p&gt;To automatically remove unused dependencies, set the following config parameter to true:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Unattended-Upgrade::Remove-Unused-Dependencies &quot;false&quot;;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;automatically-reboot&quot;&gt;Automatically reboot&lt;/h2&gt;
&lt;p&gt;Some packages require a reboot. You probably want to control when that happens. In my case the pi reboots at 2 AM, when everyone’s usually asleep, if needed.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Unattended-Upgrade::Automatic-Reboot-Time &quot;02:00&quot;;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h1 id=&quot;debugging&quot;&gt;Debugging&lt;/h1&gt;
&lt;p&gt;unattended-upgrades offers a debug parameter, that makes debugging very easy. With &lt;em&gt;–apt-debug&lt;/em&gt; and &lt;em&gt;–verbose&lt;/em&gt; you can get even more debug output.
To debug previous runs of unattended-upgrades, check the log files: &lt;em&gt;/var/log/unattended-upgrades/unattended-upgrades.log&lt;/em&gt; and &lt;em&gt;/var/log/unattended-upgrades/unattended-upgrades-dpkg.log&lt;/em&gt;.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;val@pi:~ $ sudo unattended-upgrades --dry-run --debug
sudo: unable to resolve host pi
Initial blacklisted packages:
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: ['o=Raspberry Pi Foundation,a=stable', 'o=Raspbian,a=stable', 'o=Debian,a=stable', 'o=Debian,a=stable-updates', 'o=Debian,a=proposed-updates', 'origin=Debian,codename=stretch,label=Debian-Security']
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Valentin Heidelberger</name></author><category term="Technology" /><category term="Linux" /><summary type="html">Why I have a Raspberry Pi running on Raspbian in my home network. It mainly provides a DNS server based on Pi Hole and runs some cronjobs for me. Of course you don’t want to login to such a system regularly and install package upgrades. That’s where unattended upgrades come into play. I’ll tell you how to set unattended upgrades up on Debian and walk you through some config parameters that I find very useful.</summary></entry><entry><title type="html">Userscript to hide YouTube comments</title><link href="/va1entin.gitlab.io/blog/Userscript-to-hide-YouTube-comments.html" rel="alternate" type="text/html" title="Userscript to hide YouTube comments" /><published>2018-03-17T20:01:00+00:00</published><updated>2018-03-17T20:01:00+00:00</updated><id>/va1entin.gitlab.io/blog/Userscript-to-hide-YouTube-comments</id><content type="html" xml:base="/va1entin.gitlab.io/blog/Userscript-to-hide-YouTube-comments.html">&lt;h1 id=&quot;why&quot;&gt;Why&lt;/h1&gt;
&lt;p&gt;Most comments below YouTube videos are, well, irrelevant, to say the least.
Since they’re pretty much in the middle of the page, they still regularly caught my eyes and distracted me when I was checking the recommended videos and scrolled down the site.
That’s why I built a little userscript to hide the comments by default and make them visible with the click of a button.&lt;/p&gt;

&lt;h1 id=&quot;installing-the-script&quot;&gt;Installing the script&lt;/h1&gt;

&lt;h2 id=&quot;chrome&quot;&gt;Chrome&lt;/h2&gt;
&lt;p&gt;Just &lt;a href=&quot;https://gitlab.com/va1entin/configs/raw/master/userscripts/hide-yt-comments.user.js&quot;&gt;download the script&lt;/a&gt; by right-clicking and selecting &lt;em&gt;Save link as&lt;/em&gt;. Open &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chrome://extensions&lt;/code&gt; and drag-and-drop the file into Chrome. Chrome should ask, if you want to install it. You can also disable or remove it here.&lt;/p&gt;

&lt;p&gt;Alternatively, you can also use a dedicated userscript manager from the Chrome web store. Read the paragraph on Firefox, to learn how to install the script in such a manager.&lt;/p&gt;

&lt;h2 id=&quot;firefox-and-others&quot;&gt;Firefox and others&lt;/h2&gt;
&lt;p&gt;Firefox requires you to install a userscript manager add-on. One of the most famous ones is Greasemonkey.
I’m using a relatively new add-on called &lt;a href=&quot;https://addons.mozilla.org/de/firefox/addon/tampermonkey/&quot;&gt;Tampermonkey&lt;/a&gt;, though, because it is available across different browsers and also offers a nice configuration interface with a built-in editor.
Feel free to use whatever you want. I’ll describe how to install the script in Tampermonkey here.&lt;/p&gt;

&lt;p&gt;After Tampermonkey is installed, click on the following link. Tampermonkey should ask, if you want to install the script: &lt;a href=&quot;https://gitlab.com/va1entin/configs/raw/master/userscripts/hide-yt-comments.user.js&quot;&gt;Click to install&lt;/a&gt;&lt;/p&gt;

&lt;h1 id=&quot;using-the-script&quot;&gt;Using the script&lt;/h1&gt;
&lt;p&gt;With the script enabled, comments will be hidden by default.&lt;/p&gt;

&lt;p&gt;You can make them visible by &lt;strong&gt;clicking the button&lt;/strong&gt; &lt;em&gt;Show comments&lt;/em&gt; and &lt;strong&gt;scrolling a little&lt;/strong&gt;.
&lt;img src=&quot;/img/posts/yt-comments-userscript.png&quot; alt=&quot;Userscript to hide YouTube comments&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You can also easily modify the texts on the buttons. Just open the script and change the two values of the two variables at the very top as you wish.&lt;/p&gt;

&lt;h1 id=&quot;source-code&quot;&gt;Source code&lt;/h1&gt;
&lt;p&gt;The source is &lt;a href=&quot;https://gitlab.com/va1entin/configs/blob/master/userscripts/hide-yt-comments.user.js&quot;&gt;available on GitHub.&lt;/a&gt;&lt;/p&gt;</content><author><name>Valentin Heidelberger</name></author><category term="Technology" /><summary type="html">Why Most comments below YouTube videos are, well, irrelevant, to say the least. Since they’re pretty much in the middle of the page, they still regularly caught my eyes and distracted me when I was checking the recommended videos and scrolled down the site. That’s why I built a little userscript to hide the comments by default and make them visible with the click of a button.</summary></entry><entry><title type="html">Run Dropbox client in a Docker container</title><link href="/va1entin.gitlab.io/blog/Dockerize-Dropbox-on-Linux.html" rel="alternate" type="text/html" title="Run Dropbox client in a Docker container" /><published>2018-03-07T20:01:00+00:00</published><updated>2018-03-07T20:01:00+00:00</updated><id>/va1entin.gitlab.io/blog/Dockerize-Dropbox-on-Linux</id><content type="html" xml:base="/va1entin.gitlab.io/blog/Dockerize-Dropbox-on-Linux.html">&lt;h1 id=&quot;why&quot;&gt;Why&lt;/h1&gt;
&lt;p&gt;The official Dropbox client seems to be quite a mess on some Linux distributions. There are official packages for Ubuntu/Debian and Fedora/RedHat, which seem to be pretty stable, but at least in my distribution (which builds it from source) it is unusable. Considering the plethora of distros, that are out there, it is a good idea to not waste much time trying to get it to work on &lt;em&gt;your&lt;/em&gt; particular distro, but to simply use a Docker container.&lt;/p&gt;

&lt;h1 id=&quot;how&quot;&gt;How&lt;/h1&gt;
&lt;p&gt;Implementing this is actually incredibly simple. Just add the following two shell aliases to your .bashrc, .zshrc or whatever:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;   alias dropbox=&quot;docker exec -it dropbox dropbox&quot;
   alias dropbox-start=&quot;docker run -d --restart=always --name=dropbox -v /home/val/Dropbox:/dbox/Dropbox -v /home/val/.dropbox:/dbox/.dropbox -e DBOX_UID=1000 -e DBOX_GID=100 janeczku/dropbox&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The alias &lt;em&gt;dropbox-start&lt;/em&gt; pulls the docker image &lt;a href=&quot;https://hub.docker.com/r/janeczku/dropbox/&quot;&gt;janeczku/dropbox&lt;/a&gt; from Dockerhub and runs it with &lt;strong&gt;restart&lt;/strong&gt; set to &lt;em&gt;always&lt;/em&gt;. This makes sure, that the container is immediately restarted, if it crashes and also starts it on system boot.
Also the command mounts the folders &lt;em&gt;/home/val/Dropbox&lt;/em&gt; and &lt;em&gt;/home/val/.dropbox&lt;/em&gt; at the mountpoints &lt;em&gt;/dbox/Dropbox&lt;/em&gt; and &lt;em&gt;/dbox/.dropbox&lt;/em&gt; inside the container and gives the container two variables containing the UID and GID to use for read/write operations.&lt;/p&gt;

&lt;p&gt;Don’t forget to replace the folder paths with your desired paths and the variables DBOX_UID and DBOX_GID with your uid/gid; otherwise Dropbox might have a permission problem. Don’t give it the UID “0”, because that is root and you just don’t wan’t something to run with root privileges, if it doesn’t need to.&lt;/p&gt;

&lt;p&gt;Make sure, that the folders /home/user/Dropbox and /home/user/.dropbox do &lt;strong&gt;not&lt;/strong&gt; exist before you execute dropbox-start the first time. Dropbox insists on creating these folders itself and will simply crash over and over again if it can’t. I spent quite some time debugging until I found that out actually…&lt;/p&gt;

&lt;p&gt;dropbox-start should print a container ID to your screen, if it was successful. You can also use “docker ps” to check, if and how long the container’s running:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
91eee27158bb        janeczku/dropbox    &quot;/root/run&quot;         3 days ago          Up 4 hours          17500/tcp           dropbox
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Once the container is up and running, you need to check it’s logs to link the client to your Dropbox account. Dropbox keeps printing a link to the logs until you connect it to a account:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ docker logs --follow 91eee27158bb
Checking for latest Dropbox version...
Latest   : 44.4.58
Installed: 11.4.21
Downloading Dropbox v44.4.58...
######################################################################## 100.0%
Installing new version...
Dropbox updated to v44.4.58
Starting dropboxd (44.4.58)...
dropbox: locating interpreter
!! dropbox: failed to create log file (Permission denied)!
dropbox: initializing
dropbox: initializing python 2.7.11
dropbox: setting program path '/opt/dropbox/dropbox-lnx.x86_64-44.4.58/dropbox'
dropbox: setting home path '/opt/dropbox/dropbox-lnx.x86_64-44.4.58'
dropbox: setting python path '/opt/dropbox/dropbox-lnx.x86_64-44.4.58:/opt/dropbox/dropbox-lnx.x86_64-44.4.58/python-packages-27.zip'
dropbox: python initialized
dropbox: running dropbox
dropbox: setting args
dropbox: applying overrides
dropbox: running main script
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-44.4.58/cryptography.hazmat.bindings._constant_time.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-44.4.58/cryptography.hazmat.bindings._openssl.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-44.4.58/cryptography.hazmat.bindings._padding.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-44.4.58/psutil._psutil_linux.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-44.4.58/psutil._psutil_posix.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-44.4.58/linuxffi.pthread._linuxffi_pthread.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-44.4.58/tornado.speedups.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-44.4.58/cpuid.compiled._cpuid.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-44.4.58/linuxffi.resolv.compiled._linuxffi_resolv.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-44.4.58/posixffi.libc._posixffi_libc.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-44.4.58/linuxffi.sys.compiled._linuxffi_sys.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-44.4.58/librsyncffi.compiled._librsyncffi.so'
This computer isn't linked to any Dropbox account...
Please visit https://www.dropbox.com/cli_link_nonce?nonce=22a3a1f3d92077590f37fcd5ae1aa687 to link this device.
This computer isn't linked to any Dropbox account...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Of course the nonce will be different in your logs. Open the link in your web browser to authenticate and connect. Once the client has been successfully linked to your account a message will appear in the logs and the client will start syncing:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;...
Please visit https://www.dropbox.com/cli_link_nonce?nonce=22a3a1f3d92077590f37fcd5ae1aa687 to link this device.
This computer is now linked to Dropbox. Welcome Valentin
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The alias &lt;em&gt;dropbox&lt;/em&gt; simply executes the “dropbox” command inside the container. With the various subcommands of “dropbox” you can check lots of things. E.g. if it’s currently synchronizing something:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ dropbox status
Up to date
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Calling the “dropbox” alias without a subcommand will output a list of available subcommands:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ dropbox
Dropbox command-line interface

commands:

Note: use dropbox help &amp;lt;command&amp;gt; to view usage for a specific command.

 status       get current status of the dropboxd
 throttle     set bandwidth limits for Dropbox
 help         provide help
 puburl       get public url of a file in your dropbox's public folder
 stop         stop dropboxd
 running      return whether dropbox is running
 start        start dropboxd
 filestatus   get current sync status of one or more files
 ls           list directory contents with current sync status
 autostart    automatically start dropbox at login
 exclude      ignores/excludes a directory from syncing
 lansync      enables or disables LAN sync
 sharelink    get a shared link for a file in your dropbox
 proxy        set proxy settings for Dropbox
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h1 id=&quot;summary&quot;&gt;Summary&lt;/h1&gt;
&lt;p&gt;Containerizing apps is a very nice thing in general, because it makes the stuff inside the container basically independent from what’s going on outside (system updates, new/old versions of libraries, etc.).
However, you should always check what’s going on in the Docker images, before giving it’s container access to your private data. Especially, if you don’t know the author(s). The source for the docker image used above is &lt;a href=&quot;https://github.com/janeczku/docker-dropbox&quot;&gt;available on GitHub&lt;/a&gt; and &lt;a href=&quot;https://hub.docker.com/r/janeczku/dropbox/&quot;&gt;built automatically&lt;/a&gt; from there, so you can actually check what’s going on.
I know it’s a bit ironic to talk about privacy in an article about Dropbox but remember: everyone can upload their stuff to Dockerhub and theoretically hide something inside.&lt;/p&gt;

&lt;p&gt;So, embrace simplicity, but keep your eyes peeled.&lt;/p&gt;</content><author><name>Valentin Heidelberger</name></author><category term="Docker" /><category term="Technology" /><category term="Linux" /><summary type="html">Why The official Dropbox client seems to be quite a mess on some Linux distributions. There are official packages for Ubuntu/Debian and Fedora/RedHat, which seem to be pretty stable, but at least in my distribution (which builds it from source) it is unusable. Considering the plethora of distros, that are out there, it is a good idea to not waste much time trying to get it to work on your particular distro, but to simply use a Docker container.</summary></entry><entry><title type="html">How to play YouTube in background on mobile</title><link href="/va1entin.gitlab.io/blog/Play-YouTube-in-background-on-mobile.html" rel="alternate" type="text/html" title="How to play YouTube in background on mobile" /><published>2018-03-05T21:14:00+00:00</published><updated>2018-03-05T21:14:00+00:00</updated><id>/va1entin.gitlab.io/blog/Play-YouTube-in-background-on-mobile</id><content type="html" xml:base="/va1entin.gitlab.io/blog/Play-YouTube-in-background-on-mobile.html">&lt;p&gt;One of the most requested features for mobile devices in, well, forever, is playing YouTube videos without having the app in foreground. YouTube introduced this feature with YouTube Red for paying customers. So if you’re lucky enough to live in one of the countries, where you can actually subscribe to YouTube Red, you can pay a few bucks per month to get this.&lt;/p&gt;

&lt;p&gt;If you’re not so lucky (like me) or just don’t want to pay, you could still use a mobile browser. Until recently at least, when YouTube blocked playing videos without having the according tab open on mobile devices. This is accomplished by utilizing the so called page visibility and fullscreen API. This allows a webpage to check, if you’re &lt;em&gt;actually&lt;/em&gt; viewing the page.&lt;/p&gt;

&lt;p&gt;Luckily, &lt;a href=&quot;https://timdream.org/&quot;&gt;Timothy Chien&lt;/a&gt; built an add-on for Firefox that blocks these APIs and allows you to listen to YouTube videos with another tab open or Firefox in background entirely on mobile.&lt;/p&gt;

&lt;p&gt;Just download Firefox from your favourite app store, if you haven’t already, and visit &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/video-background-play-fix&quot;&gt;this page&lt;/a&gt; to install the add-on.&lt;/p&gt;

&lt;p&gt;This way you don’t need to access YouTube in desktop mode, change your user-agent or do anything else.&lt;/p&gt;

&lt;p&gt;Also, the code for the add-on is &lt;a href=&quot;https://github.com/mozilla/video-bg-play&quot;&gt;available on GitHub&lt;/a&gt;. So feel free to contribute!&lt;/p&gt;</content><author><name>Valentin Heidelberger</name></author><category term="Technology" /><summary type="html">One of the most requested features for mobile devices in, well, forever, is playing YouTube videos without having the app in foreground. YouTube introduced this feature with YouTube Red for paying customers. So if you’re lucky enough to live in one of the countries, where you can actually subscribe to YouTube Red, you can pay a few bucks per month to get this.</summary></entry></feed>