<?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:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Diogo Ferreira]]></title><description><![CDATA[Diogo Ferreira]]></description><link>https://diogoferreira.pt/</link><image><url>https://diogoferreira.pt/favicon.png</url><title>Diogo Ferreira</title><link>https://diogoferreira.pt/</link></image><generator>Ghost 5.79</generator><lastBuildDate>Wed, 21 Feb 2024 08:53:24 GMT</lastBuildDate><atom:link href="https://diogoferreira.pt/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Samsung Galaxy Wearable app crashing on Android]]></title><description><![CDATA[A quick and easy fix for the Samsung Galaxy Wearable app crashing on Android.]]></description><link>https://diogoferreira.pt/samsung-galaxy-wearable-app-crashing-on-android/</link><guid isPermaLink="false">659e573cacf64c0001641656</guid><category><![CDATA[android]]></category><category><![CDATA[quick-tips]]></category><category><![CDATA[bugs]]></category><dc:creator><![CDATA[Diogo Ferreira]]></dc:creator><pubDate>Wed, 10 Jan 2024 08:48:00 GMT</pubDate><content:encoded><![CDATA[<p>If you&apos;re like me and use a Samsung Galaxy Watch and its companion app on Android, it&apos;s likely that you&apos;ve encountered this issue. A few days ago I noticed that every time I opened the app it would launch then immediately close.</p><p>I&apos;ve tried clearing the cache, the data, reinstalling, etc. Same behavior every time.</p><p>If this also happens to you, your watch and phone probably won&apos;t connect to each other as well. Which is quite annoying.</p><p>The reason, apparently, it&apos;s because we&apos;re now on <strong>2024! &#x1F389;</strong> The app seems to have a bug, unfixed until today, related to the year.</p><p><strong>The solution</strong>: Change the date on your phone to 2023 (for example, 31/12/2023), and try to re-open the app. It <em>should</em> work!</p><p>Now connect your watch, go to the hamburger menu on the left and check if you have an update for the app or for the Galaxy Watch Plugin. Do the update.</p><p>Now you can restore the date on your phone to the correct one and the app should stop crashing!</p><p>&#x1F926;&#x200D;&#x2642;&#xFE0F;</p>]]></content:encoded></item><item><title><![CDATA[Logitech mouse scroll suddenly too slow on KDE]]></title><description><![CDATA[How to fix the issue where scrolling gets too slow suddenly, in KDE.]]></description><link>https://diogoferreira.pt/logitech-mouse-scroll-suddenly-too-slow-on-kde/</link><guid isPermaLink="false">64e8702b545bea00018d00bd</guid><category><![CDATA[quick-tips]]></category><category><![CDATA[linux]]></category><category><![CDATA[mouse]]></category><category><![CDATA[kde]]></category><dc:creator><![CDATA[Diogo Ferreira]]></dc:creator><pubDate>Fri, 25 Aug 2023 09:27:51 GMT</pubDate><content:encoded><![CDATA[<p>This is a good one as well.</p><p>I&apos;m currently using <a href="https://kubuntu.org/?ref=diogoferreira.pt">Kubuntu</a> 23.04 on my desktop, with <a href="https://kde.org/?ref=diogoferreira.pt">KDE</a> <a href="https://kde.org/plasma-desktop/?ref=diogoferreira.pt">Plasma</a> 5.27.4, and Kernel version 6.2.0-27. I also use a <a href="https://amzn.to/47Qhl5Q?ref=diogoferreira.pt">Logitech G502 Lightspeed</a>, wirelessly.</p><p>Sometimes, without an apparent reason and without any obvious pattern, the scrolling gets painfully slow, everywhere! I haven&apos;t been able to figure out why, nor how to fix it without a system reboot.</p><p>Not anymore! The &quot;fix&quot; is much easier! You just need to turn off the mouse, and turn it on again. &#x1F612; The red arrow marks the spot:</p><figure class="kg-card kg-image-card"><img src="https://diogoferreira.pt/content/images/2023/08/49424094148_07ca01fb87-2.jpg" class="kg-image" alt loading="lazy" width="2000" height="1500" srcset="https://diogoferreira.pt/content/images/size/w600/2023/08/49424094148_07ca01fb87-2.jpg 600w, https://diogoferreira.pt/content/images/size/w1000/2023/08/49424094148_07ca01fb87-2.jpg 1000w, https://diogoferreira.pt/content/images/size/w1600/2023/08/49424094148_07ca01fb87-2.jpg 1600w, https://diogoferreira.pt/content/images/size/w2400/2023/08/49424094148_07ca01fb87-2.jpg 2400w" sizes="(min-width: 720px) 720px"></figure><p>OK, I know that&apos;s not a fix, but it&apos;s much easier and faster than a reboot.</p><p>Hope this helps someone having the same issue. &#x1F44B;</p>]]></content:encoded></item><item><title><![CDATA[Remove Ubuntu Pro messages when using APT]]></title><description><![CDATA[How to remove Ubuntu Pro messages in APT.]]></description><link>https://diogoferreira.pt/remove-ubuntu-pro-messages-when-using-apt/</link><guid isPermaLink="false">64e4901eb7c2250001004bb1</guid><category><![CDATA[quick-tips]]></category><category><![CDATA[ubuntu]]></category><category><![CDATA[linux]]></category><category><![CDATA[apt]]></category><dc:creator><![CDATA[Diogo Ferreira]]></dc:creator><pubDate>Tue, 22 Aug 2023 11:19:42 GMT</pubDate><content:encoded><![CDATA[<p>This is something that has been bothering me for a while, but it was only today that I decided to take a look at this. On Ubuntu 23.04 (and possibly in previous versions as well), when you use APT to update or install some packages, you often get an annoying message like this:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">#
# You can verify the status of security fixes using the `pro fix` command.
# E.g., a recent Ruby vulnerability can be checked with: `pro fix USN-6219-1`
# For more detail see: https://ubuntu.com/security/notices/USN-6219-1
#
</code></pre>
<!--kg-card-end: markdown--><p>I don&apos;t want or need useless information on my terminal, and removing it is quite simple. Just run the following command:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">sudo pro config set apt_news=false
</code></pre>
<!--kg-card-end: markdown--><p>Now you&apos;re back to the regular APT behaviour.</p>]]></content:encoded></item><item><title><![CDATA[Bluetooth missing from Windows 11]]></title><description><![CDATA[How to get Bluetooth working on Windows 11 after it's gone without explanation.]]></description><link>https://diogoferreira.pt/bluetooth-missing-from-windows-11/</link><guid isPermaLink="false">64b4436c0c463200011c94e6</guid><category><![CDATA[windows]]></category><category><![CDATA[hardware]]></category><category><![CDATA[bluetooth]]></category><category><![CDATA[quick-tips]]></category><dc:creator><![CDATA[Diogo Ferreira]]></dc:creator><pubDate>Sat, 05 Aug 2023 16:53:31 GMT</pubDate><content:encoded><![CDATA[<p>One of these days I restarted my dual boot desktop to get to my Windows session and game a little, and my Xbox Controller wasn&apos;t connecting to it. Upon a small debugging session, I noticed that Bluetooth seemed to be gone from Windows, which is weird since it&apos;s built in the motherboard (<a href="https://www.asus.com/pt/motherboards-components/motherboards/tuf-gaming/tuf-gaming-b550-plus-wi-fi/?ref=diogoferreira.pt">TUF Gaming B550-Plus WI-FI</a>) and has always worked until this day.</p><p>Device manager was showing the following <strong>Hardware ID&apos;s</strong>:</p><pre><code>vid_0000&amp;pid_0002</code></pre><p>I didn&apos;t want to waste a lot of time with this and went straight to a reboot. Which, as you can guess, didn&apos;t solve the issue. The second step was a full shutdown, followed by another boot. Still no Bluetooth.</p><p>Well, long story short, if you have encountered this type of issue, try this:</p><ul><li>Turn off your computer, turn off the button on your power supply (or take off the power cable), and press the power button on your desktop for around 10 seconds, to drain the remaining power of the components. After those 10 seconds just reconnect everything, turn on the computer and it <em>should</em> be working again!</li></ul><p>&#x1F3AE;</p>]]></content:encoded></item><item><title><![CDATA[How to restore a single file or folder in Thunar using Déjà Dup]]></title><description><![CDATA[A simple guide on how to restore files or folders in Thunar, the default file manager on XFCE, using Déjà Dup.]]></description><link>https://diogoferreira.pt/how-to-restore-a-single-file-or-folder-in-thunar-using-deja-dup/</link><guid isPermaLink="false">624720443c8a8b000174a905</guid><category><![CDATA[linux]]></category><category><![CDATA[xfce]]></category><category><![CDATA[xubuntu]]></category><category><![CDATA[thunar]]></category><category><![CDATA[quick-tips]]></category><category><![CDATA[tips]]></category><dc:creator><![CDATA[Diogo Ferreira]]></dc:creator><pubDate>Fri, 01 Apr 2022 16:09:00 GMT</pubDate><content:encoded><![CDATA[<p>If you are wondering if it&apos;s possible to restore a single file or folder using <a href="https://launchpad.net/deja-dup?ref=diogoferreira.pt">D&#xE9;j&#xE0; Dup</a>, it is!</p><p>And without using the command line, if that&apos;s not your jam. With a fast, one-time configuration, you can have a shortcut in Thunar (the default File Manager for XFCE) that allows you to right-click any file and restore it to a previous version.</p><p>I&apos;m assuming that you have a working D&#xE9;j&#xE0; Dup backup. I use it with my <a href="https://nextcloud.com/?ref=diogoferreira.pt">Nextcloud</a> instance, take a look <a href="https://www.ubuntubuzz.com/2020/12/ubuntu-dejadup-backup-and-nextcloud.html?ref=diogoferreira.pt">here</a> for a quick tutorial.</p><p>First open a Thunar window.</p><ul><li>Go to <strong>Edit </strong>and <strong>Configure custom actions...</strong></li><li>Click the <strong>+</strong> sign on the right side.</li><li>Fill up the <strong>Name</strong>, <strong>Description</strong> and <strong>Command</strong> fields. The command should be:</li></ul><!--kg-card-begin: markdown--><p><code>deja-dup --restore %F</code></p>
<!--kg-card-end: markdown--><ul><li>Select an <strong>Icon</strong> if you like. It will show up on your context menu.</li><li>Click on the <strong>Appearance Conditions</strong> tab and select all 6 boxes.</li><li>Click on <strong>Ok</strong>.</li></ul><p>It looks like this:</p><figure class="kg-card kg-image-card"><img src="https://diogoferreira.pt/content/images/2022/04/Screenshot_2022-04-01_17-06-32-1.png" class="kg-image" alt loading="lazy" width="397" height="479"></figure><p>And that it! Now when you right click on a file or folder you should have a an option with the name <strong>Restore previous version</strong> (or any name you choose), and you just have to click it, select the backup, the date and it will be restored!</p>]]></content:encoded></item><item><title><![CDATA[How to install Revelation on Ubuntu 20.04]]></title><description><![CDATA[A quick and easy way to install revelation on Ubuntu 20.04 without building it from source or using Flatpak.]]></description><link>https://diogoferreira.pt/how-to-install-revelation-on-ubuntu-20-04/</link><guid isPermaLink="false">621cb43750d77c00012eb897</guid><category><![CDATA[linux]]></category><category><![CDATA[ubuntu]]></category><category><![CDATA[xubuntu]]></category><category><![CDATA[quick-tips]]></category><dc:creator><![CDATA[Diogo Ferreira]]></dc:creator><pubDate>Mon, 28 Feb 2022 13:24:00 GMT</pubDate><content:encoded><![CDATA[<p><a href="https://revelation.olasagasti.info/?ref=diogoferreira.pt">Revelation</a> is a password manager for the GNOME desktop, released under the <a href="https://www.gnu.org/licenses/gpl-3.0.en.html?ref=diogoferreira.pt">GNU GPL license</a>. I was trying to install it on my workstation but apparently the package, which is available on Ubuntu 18.04 and Ubuntu 21.04 onward, it&apos;s not available on 20.04.</p><p>I&apos;ve tried to use the <a href="https://flatpak.org/?ref=diogoferreira.pt">Flatpak</a> version of it, as described <a href="https://revelation.olasagasti.info/download.php?ref=diogoferreira.pt">here</a>, but I had some issues opening a local revelation file (something related to the way that Flatpak works), so that wouldn&apos;t cut it.</p><p>The alternative is getting the Ubuntu 21.04 version working on 20.04.</p><p>First install the required dependencies.</p><pre><code class="language-bash">$ sudo apt install python3-pycryptodome python3-pwquality python3-cracklib</code></pre><p>Then get the <code>.deb</code> file from the Ubuntu repositories.</p><pre><code class="language-bash">$ cd /tmp &amp;&amp; wget http://archive.ubuntu.com/ubuntu/pool/universe/r/revelation/revelation_0.5.4-3_amd64.deb</code></pre><p>And install it.</p><pre><code class="language-bash">$ sudo dpkg -i revelation_0.5.4-3_amd64.deb</code></pre><p>And you&apos;re done!</p><p>P.S. You can also build it from source. The instructions are <a href="https://github.com/mikelolasagasti/revelation?ref=diogoferreira.pt">here</a>.</p>]]></content:encoded></item><item><title><![CDATA[Como alterar o PIN do cartão Curve em Portugal 🇵🇹]]></title><description><![CDATA[After trying to change the PIN on my Curve Card on two or three ATM's without success, I found out how you can do it easily while in Portugal.]]></description><link>https://diogoferreira.pt/como-alterar-o-pin-do-cartao-curve-em-portugal/</link><guid isPermaLink="false">60f7095b3af18200012d82a3</guid><category><![CDATA[finances]]></category><category><![CDATA[quick-tips]]></category><dc:creator><![CDATA[Diogo Ferreira]]></dc:creator><pubDate>Tue, 20 Jul 2021 18:20:18 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Depois de perder algum tempo a tentar alterar o PIN do meu <a href="http://www.curve.app/join?ref=diogoferreira.pt#NQ8OPYWD">cart&#xE3;o Curve</a> em duas ou tr&#xEA;s m&#xE1;quinas multibanco, resolvi procurar um bocadinho na internet e ver se era poss&#xED;vel / como o fazer. Perdi mais tempo do que o desejado, mas l&#xE1; encontrei.</p>
<p>Resumindo, em Portugal &#x1F1F5;&#x1F1F9; &#xE9; poss&#xED;vel mudar o PIN do cart&#xE3;o Curve nas m&#xE1;quinas da <a href="https://www.euronetatms.com/?ref=diogoferreira.pt">Euronet</a>.</p>
<p>H&#xE1; algumas em Lisboa, pelo menos. Basta procurarem &quot;euronet&quot; no <a href="https://maps.google.com/?ref=diogoferreira.pt">Google Maps</a> e devem obter as caixas mais pr&#xF3;ximas da vossa localiza&#xE7;&#xE3;o.</p>
<p>A partir da&#xED; &#xE9; f&#xE1;cil, basta seguir as indica&#xE7;&#xF5;es no ecr&#xE3;.</p>
<p><em>Nota:</em> Estas instru&#xE7;&#xF5;es tamb&#xE9;m s&#xE3;o v&#xE1;lidas para o cart&#xE3;o da <a href="https://accounts.binance.com/en/register?ref=V7BV329J">Binance</a>.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[How to embed GitHub Gists on a Ghost blog]]></title><description><![CDATA[You can use an easy little trick to embed GitHub Gists on a Ghost blog. Go to your post editor and click the...]]></description><link>https://diogoferreira.pt/how-to-embed-github-gists-on-a-ghost-blog/</link><guid isPermaLink="false">60df731534eca8000182dd68</guid><category><![CDATA[github]]></category><category><![CDATA[ghost]]></category><category><![CDATA[gists]]></category><dc:creator><![CDATA[Diogo Ferreira]]></dc:creator><pubDate>Fri, 02 Jul 2021 20:47:22 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>You can embed GitHub gists on your Ghost blog and make it look good by doing the following:</p>
<ul>
<li>On your post editor click the &quot;+&quot; and select &quot;HTML&quot;:</li>
</ul>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card"><img src="https://diogoferreira.pt/content/images/2021/07/new-html-post-1.png" class="kg-image" alt loading="lazy" width="460" height="396"></figure><!--kg-card-begin: markdown--><ul>
<li>Then paste then following:</li>
</ul>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><pre><code>&lt;script src=&quot;https://gist.github.com/&lt;YOUR_GITHUB_USERNAME&gt;/&lt;YOUR_GIST_ID&gt;.js&quot;&gt;&lt;/script&gt;
</code></pre>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><p>And you&apos;ll get something like this:</p>
<!--kg-card-end: markdown--><!--kg-card-begin: html--><script src="https://gist.github.com/uzantonomon/5489a4d9fe4caf813f45bf4bde3a1ffe.js"></script><!--kg-card-end: html--><!--kg-card-begin: markdown--><p>Beautiful. Don&apos;t forget the <strong>.js</strong> at the end.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Remove a host from BackupPC]]></title><description><![CDATA[Small tutorial on how to remove a host from BackupPC.]]></description><link>https://diogoferreira.pt/remove-a-host-from-backuppc/</link><guid isPermaLink="false">60d09a2fbcbb3c00014b0110</guid><category><![CDATA[linux]]></category><category><![CDATA[backuppc]]></category><dc:creator><![CDATA[Diogo Ferreira]]></dc:creator><pubDate>Mon, 21 Jun 2021 14:26:23 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>If you want to remove a host from your <a href="https://backuppc.github.io/backuppc/?ref=diogoferreira.pt">BackupPC</a> server you&apos;ll need to take the following steps.</p>
<ol>
<li>First delete the host from the GUI. Go to <strong>Edit Hosts</strong> and delete the host you want. Click <strong>Save</strong>.</li>
</ol>
<p><img src="https://diogoferreira.pt/content/images/2021/06/2021-06-21_15-04.png" alt="2021-06-21_15-04" loading="lazy"></p>
<p>After that you&apos;ll need to login to your server and remove the folder where the backups are kept. By default <a href="https://backuppc.github.io/backuppc/?ref=diogoferreira.pt">BackupPC</a> is installed on <code>/var/lib/BackupPC/</code>, and your machines should be on <code>/var/lib/BackupPC/pc/</code>.</p>
<ol start="2">
<li>Stop the <a href="https://backuppc.github.io/backuppc/?ref=diogoferreira.pt">BackupPC</a> service:</li>
</ol>
<pre><code>$ sudo systemctl stop backuppc
</code></pre>
<ol start="3">
<li>Remove the folder of the host you want to delete:</li>
</ol>
<pre><code>$ sudo rm -rf /var/lib/BackupPC/pc/&lt;my-host&gt;
</code></pre>
<ol start="4">
<li>Run the nightly script (probably you&apos;ll need to run it as the <em>backuppc</em> user):</li>
</ol>
<pre><code class="language-bash">$ su - backuppc
$ /usr/share/BackupPC/bin/BackupPC_nightly 0 255
</code></pre>
<ol start="5">
<li>Start the <a href="https://backuppc.github.io/backuppc/?ref=diogoferreira.pt">BackupPC</a> service again:</li>
</ol>
<pre><code class="language-bash">$ exit
$ sudo systemctl start backuppc
</code></pre>
<p>And now the host is removed.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Open XFCE menu with the Windows key on Xubuntu 20.10]]></title><description><![CDATA[How to open the XFCE menu (Whisker) with the Windows key, on Xubuntu 20.10.]]></description><link>https://diogoferreira.pt/open-xfce-menu-with-the-windows-key-on-xubuntu-20-10/</link><guid isPermaLink="false">6092d610f092a80001dafc16</guid><category><![CDATA[linux]]></category><category><![CDATA[xfce]]></category><category><![CDATA[ubuntu]]></category><category><![CDATA[xubuntu]]></category><category><![CDATA[tips]]></category><dc:creator><![CDATA[Diogo Ferreira]]></dc:creator><pubDate>Wed, 05 May 2021 17:45:03 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>When using Windows or Gnome I&apos;m used to open the Applications menu with my Windows (Super) key and start typing away to open my programs.</p>
<p>Well, Xubuntu by default doesn&apos;t do that. So here are the steps to make it happen.</p>
<ol>
<li>Open the <strong>Settings Manager</strong>:</li>
</ol>
<pre><code class="language-bash">$ xfce4-settings-manager
</code></pre>
<ol start="2">
<li>
<p>Look for <strong>Keyboard</strong> (or use the search on the top).</p>
</li>
<li>
<p>Choose <strong>Applications Shortcuts</strong>:</p>
</li>
<li>
<p>Click on <strong>Add</strong>.</p>
</li>
<li>
<p>On the <strong>Command</strong> write <code>xfce4-popup-whiskermenu</code>. Click <strong>Ok</strong>.</p>
</li>
<li>
<p>When it asks to press a key use your Windows key.</p>
</li>
<li>
<p>There is no step 7. It&apos;s done!</p>
</li>
</ol>
<p>Now my muscle memory won&apos;t fail me when DE hopping.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[BackupPC - No ping response]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>If you&apos;re using <a href="https://backuppc.github.io/backuppc/?ref=diogoferreira.pt">BackupPC</a>, and you&apos;re trying to backup a server that is behind a firewall and does not reply to ping, BackupPC will not start the backup, even if you have the SSH port open.</p>
<p><code>No ping (no ping response from) ...</code></p>
<p>You can override this</p>]]></description><link>https://diogoferreira.pt/backuppc-no-ping-response/</link><guid isPermaLink="false">5fdb66080a3171000128180a</guid><category><![CDATA[backuppc]]></category><category><![CDATA[linux]]></category><category><![CDATA[self-hosting]]></category><category><![CDATA[quick-tips]]></category><dc:creator><![CDATA[Diogo Ferreira]]></dc:creator><pubDate>Thu, 17 Dec 2020 14:16:40 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>If you&apos;re using <a href="https://backuppc.github.io/backuppc/?ref=diogoferreira.pt">BackupPC</a>, and you&apos;re trying to backup a server that is behind a firewall and does not reply to ping, BackupPC will not start the backup, even if you have the SSH port open.</p>
<p><code>No ping (no ping response from) ...</code></p>
<p>You can override this behavior and force the backup by selecting the host on the web interface, then going to <strong>&quot;Edit Config&quot;</strong> and replace the default <strong>&quot;PingCmd&quot;</strong> command with:</p>
<p><code>/bin/echo</code></p>
<p>Check the override box and save. Now the next scheduled backup will run without an issue.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Prevent Ubuntu 20.04 from changing audio device to USB headset on boot]]></title><description><![CDATA[<p>This was bothering me.</p><p>I&apos;m using an wireless headset (<a href="https://www.hyperxgaming.com/us/headsets/cloud-flight-wireless-gaming-headset?ref=diogoferreira.pt">HyperX Cloud Flight Wireless Gaming Headset</a>) that has an USB receptor and some old Logitech speakers on my desktop, currently running <a href="https://ubuntu.com/download/desktop?ref=diogoferreira.pt">Ubuntu</a> 20.04 (dual booting with Windows 10).</p><p>Every time I reboot or turn on my computer and</p>]]></description><link>https://diogoferreira.pt/prevent-ubuntu-20-04-from-changing-audio-device-to-usb-headset-on-boot/</link><guid isPermaLink="false">5ed2ad99b0ea0d0001368667</guid><category><![CDATA[ubuntu]]></category><category><![CDATA[linux]]></category><category><![CDATA[audio]]></category><category><![CDATA[pulseaudio]]></category><dc:creator><![CDATA[Diogo Ferreira]]></dc:creator><pubDate>Sat, 30 May 2020 19:27:50 GMT</pubDate><content:encoded><![CDATA[<p>This was bothering me.</p><p>I&apos;m using an wireless headset (<a href="https://www.hyperxgaming.com/us/headsets/cloud-flight-wireless-gaming-headset?ref=diogoferreira.pt">HyperX Cloud Flight Wireless Gaming Headset</a>) that has an USB receptor and some old Logitech speakers on my desktop, currently running <a href="https://ubuntu.com/download/desktop?ref=diogoferreira.pt">Ubuntu</a> 20.04 (dual booting with Windows 10).</p><p>Every time I reboot or turn on my computer and boot <a href="https://ubuntu.com/download/desktop?ref=diogoferreira.pt">Ubuntu</a> the default output audio device is set to my headset, which most of the time is off (I only use it when gaming).</p><p>Going to Settings - Sound and choosing the correct output device (<strong>Line Out</strong>) only changes it for the current session.</p><p>You can solve this by doing the following:</p><p>Edit the file <em>default.pa:</em></p><pre><code>$ sudo vim /etc/pulse/default.pa</code></pre><p>And comment the following lines:</p><pre><code>#.ifexists module-switch-on-connect.so
#load-module module-switch-on-connect
#.endif</code></pre><p><strong>Reboot</strong>. Now your computer should leave the output device you select in settings alone. My guess is that every time you turn on the computer it finds the USB receptor and change to it.</p>]]></content:encoded></item><item><title><![CDATA[How to install Grocy with Apache on Debian 10]]></title><description><![CDATA[<p>This took me longer than I&apos;d like to admit, but, to be honest, their documentation is <em>not</em> on point.</p><p><a href="https://grocy.info/?ref=diogoferreira.pt">Grocy</a> is a web-based self-hosted groceries &amp; household management solution for your home.</p><p>I already have a few services running on my home server, sitting behind my faithful Apache,</p>]]></description><link>https://diogoferreira.pt/how-to-install-grocy-with-apache-on-debian-10/</link><guid isPermaLink="false">5ec379f7b1eca00001af33f0</guid><category><![CDATA[linux]]></category><category><![CDATA[apache]]></category><category><![CDATA[self-hosting]]></category><dc:creator><![CDATA[Diogo Ferreira]]></dc:creator><pubDate>Tue, 19 May 2020 06:52:04 GMT</pubDate><content:encoded><![CDATA[<p>This took me longer than I&apos;d like to admit, but, to be honest, their documentation is <em>not</em> on point.</p><p><a href="https://grocy.info/?ref=diogoferreira.pt">Grocy</a> is a web-based self-hosted groceries &amp; household management solution for your home.</p><p>I already have a few services running on my home server, sitting behind my faithful Apache, accessible from a custom domain.</p><p>I <em>don&apos;t</em> want it running as a subdomain. Every explanation I found assumes that.</p><p>TL:DR: If you want Grocy running behind an Apache proxy, on your own subdomain, set it up like this:</p><ul><li>Get Grocy:</li></ul><pre><code class="language-bash">$ cd /tmp
$ wget https://releases.grocy.info/latest
$ sudo unzip latest -d /var/www/html/grocy/</code></pre><ul><li>Copy the Grocy configuration file and change it to your liking:</li></ul><pre><code>$ sudo cp /var/www/html/grocy/config-dist.php /var/www/html/grocy/data/config.php</code></pre><ul><li>The important settings here are:</li></ul><pre><code>Setting(&apos;BASE_PATH&apos;, &apos;&apos;);
Setting(&apos;BASE_URL&apos;, &apos;/&apos;);
Setting(&apos;DISABLE_URL_REWRITING&apos;, false);</code></pre><p>And they should be setup just like that for what we are looking to accomplish.</p><ul><li>Create a configuration file in Apache for Grocy:</li></ul><pre><code class="language-bash">$ sudo vim /etc/apache2/sites-available/grocy.home.your-domain.pt.conf</code></pre><ul><li>Adapt the following to your configuration. The relevant part here is the <strong>DocumentRoot</strong>, and the <strong>Directory</strong>. Don&apos;t forget to set the full path to the Grocy public folder:</li></ul><pre><code class="language-bash">&lt;VirtualHost *:80&gt;
    ServerName grocy.home.your-domain.pt
    ServerAdmin your-name@your-domain.pt
    DocumentRoot /var/www/html/grocy/public
    ErrorLog /var/log/apache2/grocy-error.log
    CustomLog /var/log/apache2/grocy-access.log combined

&lt;Directory /var/www/html/grocy/public&gt;
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Require all granted
&lt;/Directory&gt;
&lt;/VirtualHost&gt;</code></pre><ul><li>Enable the site:</li></ul><pre><code>$ sudo a2ensite grocy.home.your-domain.pt</code></pre><ul><li>Reload Apache:</li></ul><pre><code>$ sudo systemctl reload apache2</code></pre><p>And your instance if running on <em>http://grocy.home.your-domain.pt</em>!</p><p>I&apos;ve made a few assumptions here (you have your own local domain, have Apache already setup with PHP, etc), but I hope is helpful to someone.</p><p>Maybe later I&apos;ll update this post with a more detailed explanation.</p>]]></content:encoded></item><item><title><![CDATA[Unblock LDAP or Active Directory user in GitLab]]></title><description><![CDATA[<p>If you&apos;re running a self-hosted <a href="https://about.gitlab.com/?ref=diogoferreira.pt">GitLab</a> instance and use <a href="https://ldap.com/?ref=diogoferreira.pt">LDAP</a> or <a href="https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/get-started/virtual-dc/active-directory-domain-services-overview?ref=diogoferreira.pt">Active Directory</a> authentication you may notice that sometimes users get &quot;Blocked&quot; and you can&apos;t unblock them using the web interface.</p><p>When this situation occurs, you can unblock them using the <em>gitlab-rails</em> console directly</p>]]></description><link>https://diogoferreira.pt/unblock-active-directory-user-in-gitlab/</link><guid isPermaLink="false">5e74d97fb4d0930001a3eaa3</guid><category><![CDATA[gitlab]]></category><category><![CDATA[active directory]]></category><category><![CDATA[linux]]></category><dc:creator><![CDATA[Diogo Ferreira]]></dc:creator><pubDate>Fri, 20 Mar 2020 15:09:39 GMT</pubDate><content:encoded><![CDATA[<p>If you&apos;re running a self-hosted <a href="https://about.gitlab.com/?ref=diogoferreira.pt">GitLab</a> instance and use <a href="https://ldap.com/?ref=diogoferreira.pt">LDAP</a> or <a href="https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/get-started/virtual-dc/active-directory-domain-services-overview?ref=diogoferreira.pt">Active Directory</a> authentication you may notice that sometimes users get &quot;Blocked&quot; and you can&apos;t unblock them using the web interface.</p><p>When this situation occurs, you can unblock them using the <em>gitlab-rails</em> console directly in the server.</p><p>Run the following:</p><pre><code class="language-bash">$ gitlab-rails console production</code></pre><p>And then inside the console you can find the user by email and set it to &quot;Active&quot; like this:</p><pre><code class="language-ruby on rails">&gt; user = User.find_by_email(&quot;[USER-EMAIL]&quot;)
&gt; user.state = &quot;active&quot;
&gt; user.save
&gt; exit</code></pre><p>Replace <strong>[USER-EMAIL]</strong> with the actual email you&apos;re looking for. The user should now be active and ready to login.</p>]]></content:encoded></item><item><title><![CDATA[How to install Pi-hole with Apache on CentOS 7]]></title><description><![CDATA[<!--kg-card-begin: html-->
<p>Installing <a rel="noreferrer noopener" aria-label="Pi-hole (opens in a new tab)" href="https://pi-hole.net/?ref=diogoferreira.pt" target="_blank">Pi-hole</a> on a <a rel="noreferrer noopener" aria-label="CentOS (opens in a new tab)" href="https://centos.org/?ref=diogoferreira.pt" target="_blank">CentOS</a> 7 server (instead of a dedicated machine like a <a rel="noreferrer noopener" aria-label="Raspberry Pi (opens in a new tab)" href="https://www.raspberrypi.org/?ref=diogoferreira.pt" target="_blank">Raspberry Pi</a>) is an option that the fine gentlemen who developed it gave us. Since I already had a server ready with <a href="http://apache.org/?ref=diogoferreira.pt" target="_blank" rel="noreferrer noopener" aria-label="Apache (opens in a new tab)">Apache</a>, I took that route.</p>



<p>I have a small Optiplex 3040 that I use</p>]]></description><link>https://diogoferreira.pt/how-to-install-pi-hole-with-apache-on-centos-7/</link><guid isPermaLink="false">5dd7c97f20a8040001e63881</guid><dc:creator><![CDATA[Diogo Ferreira]]></dc:creator><pubDate>Wed, 02 Oct 2019 15:07:27 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: html-->
<p>Installing <a rel="noreferrer noopener" aria-label="Pi-hole (opens in a new tab)" href="https://pi-hole.net/?ref=diogoferreira.pt" target="_blank">Pi-hole</a> on a <a rel="noreferrer noopener" aria-label="CentOS (opens in a new tab)" href="https://centos.org/?ref=diogoferreira.pt" target="_blank">CentOS</a> 7 server (instead of a dedicated machine like a <a rel="noreferrer noopener" aria-label="Raspberry Pi (opens in a new tab)" href="https://www.raspberrypi.org/?ref=diogoferreira.pt" target="_blank">Raspberry Pi</a>) is an option that the fine gentlemen who developed it gave us. Since I already had a server ready with <a href="http://apache.org/?ref=diogoferreira.pt" target="_blank" rel="noreferrer noopener" aria-label="Apache (opens in a new tab)">Apache</a>, I took that route.</p>



<p>I have a small Optiplex 3040 that I use as my home server (you can read more about what I use <a rel="noreferrer noopener" aria-label="here (opens in a new tab)" href="https://diogoferreira.pt/things-i-use/" target="_blank">here</a>) and decided that I&#x2019;ve had enough with ads showing up on my devices. On my desktop and laptop I use <a href="https://github.com/gorhill/uBlock?ref=diogoferreira.pt" target="_blank" rel="noreferrer noopener" aria-label="uBlock Origin (opens in a new tab)">uBlock Origin</a> but my other devices don&#x2019;t have that luck. Enter <a rel="noreferrer noopener" aria-label="Pi-hole (opens in a new tab)" href="https://pi-hole.net/?ref=diogoferreira.pt" target="_blank">Pi-hole</a>!</p>



<p>It&#x2019;s actually quite easy to install it using <a rel="noreferrer noopener" aria-label="Apache (opens in a new tab)" href="http://apache.org/?ref=diogoferreira.pt" target="_blank">Apache</a> (the default setup is even easier, and well documented). It goes like this:</p>



<ul><li>Setup your server with a static IP. That is out of the scope of this post but you can find out instructions for <a rel="noreferrer noopener" aria-label="CentOS (opens in a new tab)" href="https://centos.org/?ref=diogoferreira.pt" target="_blank">CentOS</a> 7 <a rel="noreferrer noopener" aria-label="here (opens in a new tab)" href="https://www.cyberciti.biz/faq/howto-setting-rhel7-centos-7-static-ip-configuration/?ref=diogoferreira.pt" target="_blank">here</a>.</li><li>Run the install script as root: <code>curl -sSL </code><a href="https://install.pi-hole.net/?ref=diogoferreira.pt"><code>https://install.pi-hole.net</code></a><code> | bash</code>.</li><li>If you got the chills from the previous command, I understand perfectly. You shouldn&#x2019;t run scripts directly from the internet. Check the script before you do it. You can find it <a rel="noreferrer noopener" aria-label="here (opens in a new tab)" href="https://raw.githubusercontent.com/pi-hole/pi-hole/master/automated%20install/basic-install.sh?ref=diogoferreira.pt" target="_blank">here</a>.</li><li>The relevant question of the script is if you want to install the <a rel="noreferrer noopener" aria-label="lighttpd (opens in a new tab)" href="https://www.lighttpd.net/?ref=diogoferreira.pt" target="_blank">lighttpd</a> web server. You should answer *<strong>no</strong>* at this step.</li><li>Now that the setup is over, proceed to install <a rel="noreferrer noopener" aria-label="Apache (opens in a new tab)" href="http://apache.org/?ref=diogoferreira.pt" target="_blank">Apache</a> and some necessary software for <a rel="noreferrer noopener" aria-label="Pi-hole (opens in a new tab)" href="https://pi-hole.net/?ref=diogoferreira.pt" target="_blank">Pi-hole</a>: <code>yum install httpd php php-pdo</code>.</li><li>Edit the file <em>/etc/sudoers.d/pihole</em> and replace <em>lighttpd</em> with <em>apache</em>.</li><li>Set <a rel="noreferrer noopener" aria-label="SELinux (opens in a new tab)" href="https://github.com/SELinuxProject?ref=diogoferreira.pt" target="_blank">SELinux</a> to permissive (unfortunately it seems that <a rel="noreferrer noopener" aria-label="Pi-hole (opens in a new tab)" href="https://pi-hole.net/?ref=diogoferreira.pt" target="_blank">Pi-hole</a> doesn&#x2019;t work too well with it). You shouldn&#x2019;t do this if you don&#x2019;t trust the security of your server or your network. Edit the file <em>/etc/sysconfig/selinux</em> and replace <em>enforcing</em> with <em>permissiv</em>e.</li><li>That should do it! Reboot your server just to ensure everything is fine and go to http://YOUR_STATIC_IP/admin to check your new <a rel="noreferrer noopener" aria-label="Pi-hole (opens in a new tab)" href="https://pi-hole.net/?ref=diogoferreira.pt" target="_blank">Pi-hole</a> installation.</li></ul>



<p>There are a few more things you can do, like setting up a <a href="https://httpd.apache.org/docs/2.4/vhosts/name-based.html?ref=diogoferreira.pt" target="_blank" rel="noreferrer noopener" aria-label="Name-based Virtual Host (opens in a new tab)">Name-based Virtual Host</a>:</p>



<ul><li>Create a new configuration file on <em>/etc/httpd/conf.d/router.home.example.com.conf</em></li></ul>



<p>Insert the following example (adapt it to your use):</p>



<pre class="wp-block-code"><code>&lt;VirtualHost *:80&gt;
ServerName router.home.example.com
DocumentRoot /var/www/html/admin
&lt;/VirtualHost&gt;</code></pre>



<p>Restart the <a href="http://apache.org/?ref=diogoferreira.pt" target="_blank" rel="noreferrer noopener" aria-label="Apache (opens in a new tab)">Apache</a> daemon:</p>



<pre class="wp-block-code"><code>systemctl restart httpd</code></pre>



<p>You should now be able to access your <a rel="noreferrer noopener" aria-label="Pi-hole (opens in a new tab)" href="https://pi-hole.net/?ref=diogoferreira.pt" target="_blank">Pi-hole</a> dashboard using the name <em>router.home.example.com</em>. This assumes you have your own DNS Server at home. I&#x2019;ll make a post about setting up one, but for now, you can look <a rel="noreferrer noopener" aria-label="here (opens in a new tab)" href="https://www.digitalocean.com/community/tutorials/how-to-configure-bind-as-a-private-network-dns-server-on-centos-7?ref=diogoferreira.pt" target="_blank">here</a> for instructions.</p>
<!--kg-card-end: html-->]]></content:encoded></item></channel></rss>