Linux

Pi-hole: get rid of spam/ads/tracking on DNS level

Tuesday, October 24th, 2017 | Gadgets, Insights, Linux, Tech-savvy | No Comments

Today I’d like to share a nice project that I stumbled upon: Pi-hole®: A black hole for Internet advertisements.

Basically it is a small DNS proxy that filters DNS queries based on lists of ad and tracker sites.

It’s pretty kewl, as you just set it up once and all your devices on your LAN will benefit from it.

I have been using Pi-hole (default settings/lists on Raspbian Strech) for a couple of days now without problems and a noticeable better internet browsing experience.

Give it a try and put your old Raspberry to some use!

Tags: , , , ,

Podcasts in iTunes packen – Fick dich Apple! Und Google, du dich auch.

Tuesday, August 29th, 2017 | Insights, Linux, Misc, Tech-savvy | No Comments

Ausgangslage: Ich mache Podcasts. Ich arbeite mit Linux. Ich möchte gerne in das iTunes Podcast Verzeichnis. (Eigentlich will ich ja nix außer meinen RSS Feed in ein Verzeichnis pushen…)

Kollege: “Um bei iTunes deinen Podcast ins Verzeichnis zu bringen brauchst du kein iTunes auf deinem Rechner, nur ‘ne Apple-ID.” (Source)

Na gut, prima, ich lege also eine Apple ID an (im Web) und versuche es.
https://podcastsconnect.apple.com/

Ich werde mit einer Fehlermeldung abgewatscht:
“Podcasts Connect erfordert einen iTunes Store-Account.”
Darunter ein Link: Zum iTunes Store

Ich klicke auf den Link, der schlicht auf itunes.apple.com verweist und kann mich – oh Wunder – mit meiner Apple ID dort anmelden. WTF? Also habe ich doch einen iTunes Store-Account?! Apple, ich bin verwirrt.

Ich google also die Fehlermeldung. Dort lese ich, dass man sich in iTunes und nich auf der iTunes Seite anmelden muss. Geil, wie dass die Fehlermeldung “Podcasts Connect erfordert einen iTunes Store-Account.” offenbart.

In iTunes soll man sich anmelden und dann dort ein zwei Informationen zu seinem Account hinterlegen. Nun gut.

Meine Nerven liegen also bereits leicht blank als ich zu einem Kollegen mit Mac gehe und mich in iTunes anmelde. Super. Der Wizard zur Anmeldung will dann direkt eine Zahlungsmethode von mir. Es gibt keine direkte Möglichkeit das zu umgehen. WTF again?! Ich fühle mich ins Jahr 2009 zurück versetzt, als ich schlicht einen iPod Touch in Betrieb nehmen wollte, was, ohne Kreditkarte, nicht möglich war. Dürfen Menschen ohne Kreditkarte keine iPod nutzen?

Fick dich Apple! Mir geht deine Philosophie in vielen Bereichen so gegen den Strich, dass ich im Strahl kotzen könnte. Ich mag keinen Zwang, vor allem nicht, wenn jemand meine Kreditkarteninformationen haben will. Dann spiele ich halt wieder mit den Open Source Schmuddelkindern. Da fühl ich mich sowieso wohler. Und sag nicht ich würde es nicht alle Jubeljahre mit dir versuchen, aber wir zwei passen anscheinend einfach nicht zusammen.

Wer jetzt meint, dass ich selber schuld bin und dass das bei Apple halt so ist: ich habe vor einiger Zeit einen YouTube Kanal aufgemacht (icanplaystayshun), einfach mal so zum Spaß. Mit einem Google Konto. Schnell, kostenlos, unkompliziert.

Hat Google ein Podcast Verzeichnis? Scheiße! Wieso bin ich da nicht vorher drauf gekommen!? Das guck ich mir mal an!

Edit 1: 30.08.2017

https://support.google.com/googleplay/podcasts/answer/6260341

“Podcasts are not available in your country
Podcasts are coming soon to Google Play Music, but unfortunately, they’re not yet available in your country.”

Und Google Play Music kann man auch in der kostenlosen Variante nicht ohne Zahlungsinformaitonen nutzen.
“Our music deals require that you have a form of payment on file to confirm your country of residence as music rights vary by country”

Also auch nicht besser. Schade. Wenigstens geben die einen “guten Grund” an. Auch wenn mein freier Podcast mal nix mit “music rights in my country” zu tun hat. Hallo? Podcast! Selbst produziert! Ich will doch nur ins Verzeichnis! 🙂

Edit 2: 30.08.2017

Werde mir jetzt noch Stitcher ansehen. Dann habe ich aber die Schnauze voll 😀

So, das scheint geklappt zu haben. Die wollten auch recht viele Infos (Adresse) und die Terms und Conditions haben es auch in sich. Garagen Sprech ist nun dort in der Approval Phase und Dennis tötet mich beim nächsten Cast weil ich wieder in Anglizismen versinke.

Was ein Kack, nur um mal so ‘nen RSS Feed publik zu machen…

Edit 3: 31.08.2017

Wir sind online! 😀 Stitcher hat den RSS Feed nun in sein Directory aufgenommen.

Findbar über:
✔ copy/paste des RSS Feeds in deine App 😉
Stitcher (natürlich)
Podcast Addict (Android)
– Podcast.app (iOS)
– Overcast (iOS)
– iTunes
– Spotify

Tags: , , , , , , , ,

Fedora 26 / Gnome 3 Hi DPI Settings and Quirks

Thursday, August 24th, 2017 | Insights, Linux, Quirks, Tech-savvy | No Comments

I was about to release another “post-installation tasks” post when I thought it might be a good idea to focus on a specific topic first: Hi DPI (aka 4k resolution monitors) and how Fedora, my weapon of choice, is performing. Fedora ships with Gnome 3 on Wayland. So this will be my starting point.

Set-up Gnome to use Hi DPI mode

This sounds to easy. But rest assured, this is only the first general steps as a lot of apps, even Gnome (3.24.2) itself, does not respect / support this setting consistently. (here are two native Gnome examples of mixed Hi Res and Low Res components Example 1 Example 2)

Still, for me the overall experience is finally worth setting up a Hi DPI desktop environment.

Install Gnome Tweak Tool

$ sudo dnf install gnome-tweak-tool

Fire it up, go to “Window” and set the Hi DPI mode to 2x. (In the near future Gnome wants to support arbitrary scaling factors, on a per device i.e. monitor basis. Looking forward to that!) You may need to log in and out of your session for the setting to take effect.

Update 25.08.17 There is another Gnome setting, and after that Gnome itself renders just fine! Bliss! Thanks Michael Reinartz for pointing this out!

$ gsettings set org.gnome.desktop.interface scaling-factor 2

Apps that work well out of the box (on my machine)

Firefox 55.0.1
Thunderbird 52.2.1
Opera 47

and after the “Update 25.08.17” hint:
Audacious 3.8.2 (Winamp Interface)
Nautilus 3.24.2.1
Terminal 3.24.2

Apps that scale well after some handiwork

Chromium 60 (maybe Chrome – I don’t use it right now)
Chromium needs a special parameter: --force-device-scale-factor=2, just add it to a copy of the .desktop file in your personal user space.

cp /usr/share/applications/chromium-browser.desktop ~/.local/share/applications/

Put that parameter just behind the executable:

...
Exec=/usr/bin/chromium-browser %U --force-device-scale-factor=2
...

eclipse 4.7 Oxygen

I use a launch script for eclipse, just add export SWT_GTK3=0 to it. The export UBUNTU_MENUPROXY=0 fixed a problem with disappearing menus in eclipse. I can omit the entry without problems, I just leave it here in case you might need it.

#!/bin/bash
 
export SWT_GTK3=0
export UBUNTU_MENUPROXY=0
./eclipse/eclipse -showlocation

Apps that do not scale at all (yet)

Audacity 2.1.3
They say you need to recompile it with wxWidgets --with-gtk=3
@see http://wiki.audacityteam.org/wiki/Linux_Issues#Hi-DPI

Gimp 2.8
There are themes available with hi res icons but I will just wait for 2.9 as it should support Hi DPI natively.

Spotify 1.0.59.395
At least the full screen mode looks nice 😉

Conclusion

As you can see Hi DPI is still work in progress. Still, I figure Hi DPI usable by now and will not go back. Looking at a “printed screen” is just too amazing.

Hope I gave you some insights and if you have something to add just leave a comment. Thanks!

Tags: , , ,

Røde NT-USB microphone – great value for money

Saturday, July 1st, 2017 | Gadgets, Language, Linux, Tech-savvy | No Comments

Today I spend some MusicStore gift vouchers (thanks Rob & Tobi) buying a decent microphone. A Røde NT-USB.

Maybe for podcasting, maybe streaming, maybe recording of music.

First thing that came to my mind was reading a small story for my daughter. So I plugged in the mic – which was the first “challenge”. Sometimes “pro” audio devices only work with Mac and Windoze machines, but the Røde NT-USB just worked out of the box (Linux, Fedora 25). After that I launched Audacity, saw the rec level was a bit weak, maxed out the input using the audio settings and hit record. From my POV the result was awesome. So I just kept on reading the story, only using the Audacity compressor plug-in (default settings) afterwards. Then I added a small intro/outro acoustic guitar jingle. That’s it. No-frills recording with very nice results.

Thanks Røde, you made my day 🙂

Here is the result (a 96k cbr mono mp3 mixdown). Sorry, German only 🙂 Remember, this is a one take and I have no experience doing lectures – so don’t expect too much.

Eine Meerjungfrau im Schwimmbad (Maren von Klitzing)

Der Kater mit den goldenen Pfoten (Käthe Recheis)

Source: Märchen und Kindergeschichten

Tags: , , , , , ,

Deleting symlinks aka “Don’t drink and sudo”.

Tuesday, September 13th, 2016 | Insights, Linux, Tech-savvy | No Comments

failcatWell, I did neither, yet still fucked up my installation the other day. Here is how I managed it – and yes, there is some knowledge sharing / advice in here, so read on.

I guess everybody who ever came across a *nix prompt knows the infamous “rm -rf” command and only uses it when it’s really save. Well, pretty much save and then whoopsy … files gone. So here goes my latest foobar.

I wanted to create a symlink from my small home partition to a big data portion for my gnome-boxes, as disk images tend to get big. So I created and “cd”ed into the destination folder:

cd /bfd/gnome-boxes/

and checked whether the dir is empty thus suitable. It was.

So now I symlinked the current directory to ~/.local/share/gnome-boxes

ln -s . /home/nick/.local/share-gnome-boxes/

So far so good. I “cd”ed into the original folder to check whether the link was created okay, but it only showed something like

gnome-boxes -> .

instead of

gnome-boxes -> /bfd/gnome-boxes/

WTF? The . is a reference to the current directory which was /bfd/gnome-boxes at the time I used it. Hmm, the ln took that dot pretty literally (which is obviously my fault).

So, I wanted to get rid of that wrong symlink. First, as the “directory” gnome-boxes was a symlink, i.e. a file, I tried to simply delete it with rm. That was when the real fun began.

You can test this behavior, create a test directory, that holds a file (touch file) and a directory (mkdir dir). Then go create that bogus symlink (ln -s . ./test)

drwxrwxr-x. 2 nick nick 4096 13. Sep 12:50 dir
-rw-rw-r--. 1 nick nick    0 13. Sep 12:53 file
lrwxrwxrwx. 1 nick nick    1 13. Sep 12:53 test -> .
[nick@localhost 1]$ rm test/
rm: das Entfernen von 'test/' ist nicht möglich: Is a directory
[nick@localhost 1]$ rmdir test/
rmdir: konnte 'test/' nicht entfernen: Not a directory
[nick@localhost 1]$ rm -rf test/
[nick@localhost 1]$ ll
insgesamt 0

All gone 🙂

Not only the dir was gone but basically my whole ~/.local/share/ directory was empty. I symlinked gnome-boxes to ., so the current dir, thus rm -rf gnome-boxes deleted the current dir. Eff.

How to prevent this.

* Use unlink. It’s saver as it only calls the unlink function and cannot delete regular files.
* Don’t “tab” complete your commands. A simple “rm gnome-boxes” without the trailing slash would have done the job and saved me the re-installation. Luckily this is done in less than half an our with modern distros, still, I felt like an idiot. Lesson learned.

This was done with a super smart ASF member behind me, whom I showed the funny “Is a directory / Not a directory” error messages. We had a good laugh after deleting my share folder. Facepalm deluxe!

Tags: ,

Cannot umount busy file system – who’s to blame?

Tuesday, February 4th, 2014 | Insights, Linux, Tech-savvy | No Comments

Use fuser and ps to identify what process/es is/are occupying the file system.

ps -lf -p $(fuser -c /mount/point 2>/dev/null)

This is an example that is in no way related to anything that has ever happened in the real world:

[user@host somefolder]$ sudo umount /media/somefolder
umount: /media/somefolder: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)
[user@host somefolder]$ ps -lf -p $(fuser -c /media/somefolder/ 2>/dev/null)
F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY        TIME CMD
0 S user      5058  5054  0  80   0 - 29109 wait   09:22 pts/0      0:00 bash
[user@host somefolder]$ cd ..

lol 🙂 pebcak!

Tags: , , , , , ,

Fedora 20 / Ubuntu GNOME 13.10 Post Installation Tasks

Friday, January 24th, 2014 | Linux, Tech-savvy | Comments Off on Fedora 20 / Ubuntu GNOME 13.10 Post Installation Tasks

Again, some post installation tasks. I figure Fedora is a little bit too trigger happy on kernel updates, so I went back to go for the “default” Linux, but GNOME flavoured. Unity is not my cup of tea. It did not work as well as expected, so in the end I went back to Fedora. /etc/init.d/vboxdrv setup anybody?

› Continue reading

Tags: , , ,

Automatically create genre playlists of your music collection

Sunday, March 3rd, 2013 | Linux, Tech-savvy | No Comments

This script will create playlists based on the tags of your mp3 and flac files. Prerequisites: id3v2/metaflac command line tool (sudo apt-get install id3v2 metaflac) and tagged mp3/flac files.

Note: The id3v2 command only works up to version 2.3 of the id3v2 spec (which is pretty much the default), so this script will not work on v2.4 files. It seems a lot of people still use 2.3 as 2.4 does not give a lot of advantages and 2.3 is way more compliant with mp3 playback devices. I just came across this issue because I use EasyTag for tagging and this tool writes v2.4 by default. After setting EasyTag’s prefs to v2.3 I was good to go 🙂

#!/bin/bash
 
# set extraction command chain for each file type
EXTMP3="id3v2 -l \"_FILE\" | sed -n \"s/TCON (Content type): \(.*\) (.*)/\1/p\""
EXTFLAC="metaflac --show-tag=GENRE \"_FILE\" | sed -n \"s/GENRE=\(.*\)/\1/p\""
 
# delete old playlists
rm *.m3u
 
function createPlaylist {
  while IFS= read -r -d '' FILE; do
    echo Processing \"$FILE\"
    GENRE=`eval ${2/_FILE/$FILE}`
    if [ "$GENRE" ]
      then
        echo "$FILE" >> "$GENRE.m3u"
    fi
    echo "$FILE" >> "All.m3u"
  done < <(find . -name "*.$1" -print0 | sort -z)
}
 
createPlaylist mp3 "$EXTMP3"
createPlaylist flac "$EXTFLAC"

Basically we loop over all files and extract the genre’s nice name using a file type specific chain of commands. If a genre is found the file name is appended to the playlist that is named like the genre itself. Additionally an “All” playlist is created that holds every file found, even the ones that have no genre set.

Tags: , , , , , , , ,

“fast” JIRA and Confluence setup on a small VPS

Sunday, January 6th, 2013 | Linux, Tech-savvy | 5 Comments

I recently stumbled upon my old “fast firewalling for developers with iptables” blog and also read the comment (yeah, one!) asking how to go on from here, maybe set up JIRA and Confluence from Atlassian really fast. So here we go. We will install JIRA and Confluence using MySQL as the database, allowing only HTTPS connections. Bear in mind that this is not an enterprise setup, it’s again targeted at individuals who want to run these tools in a non-critical private small VPS environment maybe to evaluate the tools or collaborate with a friend. This is going to be easy and straightforward, no fancy admin stuff, no over the top security, simply getting the stuff up and running.
› Continue reading

Tags: , , , , , , , , ,

Bash history at your fingertips as seen @coderwall.

Thursday, December 13th, 2012 | Linux, Tech-savvy | No Comments

The single most useful thing in bash #protip https://coderwall.com/p/oqtj8w via @coderwall

Create ~/.inputrc and fill it with this:

"\e[A": history-search-backward
"\e[B": history-search-forward
set show-all-if-ambiguous on
set completion-ignore-case on

This allows you to search through your history using the up and down arrows … i.e. type “cd /” and press the up arrow and you’ll search through everything in your history that starts with “cd /”.

Props go to Jude. Thank you very much for this. Upvote done.

Tags: , , ,

Search

Categories