June 18, 2020

Learned three cool things this week regarding Linux.

First Thing:

This is Linux file permissions in a nutshell from what I learned:

And that’s basically it.

This helps a ton when you’re trying to figure out what in the heck ‘777’ means in terms of file permissions or ‘755’.

You have to break down each part of the number provided.

Ex: ‘777’ in file permissions means the following: You’ve got read (‘r’), write (‘w’), and execute (‘x’) access in ALL three groups. This means that YOU, YOUR GROUP, AND EVERYONE ELSE can do those three actions on the file.

This isn’t the best option because you don’t want someone to somehow hack into your system and just give them permission to files without even being granted access as the root user.

Second Thing:

This is how you can utilize the ‘Newsboat’ RSS program across several devices (aka your Android phone running Termux, your website via SSH, your Linux laptop, your Linux desktop, etc).

You can utilize Newsboat’s ‘-e’ parameter to export your current news feed into an .opml file.

You can also utilize Newsboat’s ‘E’ parameter to export a copy of the list of articles you read.

You can then go to a totally separate machine, and utilize Newsboat’s ‘-i’ parameter to import your newsfeed.

Then you can use Newsboat’s ‘-I’ parameter to import the list of articles you already read on your previous devices.

In this kind of scenario, it’s better to use your personal website as a midway station so that if you have access to the internet, then you can technically just sync all these devices by using ‘wget’ to pull down these two files from your ‘public_html’ folder.

You can even do the same thing with a separate device off the internet with a Raspberry Pi or even an Android device with Termux that has a mobile connection or is connected to WiFi.

Here’s my latest Bash alias from my .bashrc config that incorporates these ideas, which I will probably modify to run on my website instead later on but is given as a cool example to possibly copy: alias ne=“newsboat && newsboat -e >> ~/transformationStation/newsboat/currentNewsboatFeed.opml && newsboat -E ~/transformationStation/newsboat/articlesRead.txt”

Third Thing:

Here’s a cool Bash function I made to change your wallpaper and color scheme with ‘feh’ and ‘pywal’.

Afterwards, it copies the same image that was used by ‘pywal’ into Awesome Window Manager’s theme configuration directory:

ranchw() { wal -i ~/Pictures/wallpapers/ && feh –bg-fill “\((< “\){HOME}/.cache/wal/wal”)” && cp $(< ~/.cache/wal/wal) ~/.config/awesome/themes/multicolor/wall.png && xrdb ~/.Xresources;

background=\((ex -sc ‘/\*background:/s/^\S\+\s\+//p|q!’ ~/.cache/wal/colors.Xresources); foreground=\)(ex -sc ‘\*foreground:/s/^ยง\+\s\+//p|q!’ ~.cache/wal/colors.Xresources);

ex -c ‘theme.bg_normal/s"[^"]\+""’$background’"/|wq’ ~.config/awesome/themes/multicolor/theme.lua;

ex -c ‘theme.fg_normal/s"[^"]\+""’$foreground’"/|wq’ ~.config/awesome/themes/multicolor/theme.lua;

}