TEKBYTE https://tekbyte.net Learn a lot, one byte at a time.Tue, 20 Oct 2020 12:20:25 +0000en-AU hourly 1 https://wordpress.org/?v=5.5.1https://tekbyte.net/wp-content/uploads/2020/08/cropped-favicon-1-32x32.pngTEKBYTE https://tekbyte.net 3232Fixing The Nextcloud Quota Configuration Error https://tekbyte.net/2020/fixing-the-nextcloud-quota-configuration-error/ https://tekbyte.net/2020/fixing-the-nextcloud-quota-configuration-error/#respondTue, 20 Oct 2020 12:19:19 +0000https://tekbyte.net/?p=245So I run an instance of Nextcloud on my VPS and it’s been very reliable until today where I ran into error 500. This tells me there is a configuration error on the server so I went digging. Looking at the logs, there appears to be not enough space on the system according to the “quota”. After further investigation, I found out that Linux actually has the ability to set quotas which is often used by system administrators.

Checking for quota

Because I don’t need this utility, I decided to disable this and the place you want to look is inside your file system table. To view it, simply run:

cat /etc/fstab

If you see quota, usrquota or grpquota, then you have quota enabled. To see if this is indeed the issue, assuming you’re already SSH’d into the server, simply type the command:

quotaoff -v /

You may have to replace “ / “ with the directory your server is installed on. E.g. “quotaoff -v /home”. If this solves your problem and Nextcloud can be accessed again, we can proceed to disable the quota functionality.

Disabling quota

To disable, simply open the /etc/fstab file in your text editor. nano comes preinstalled on most distributions so you can use that if you are unsure. Now you need to remove any mention of “quota” from the partition. This is generally found after the file system type (e.g. ext4, btrfs, zfs)

Hope this helps. As always, be sure to read your logs before you copy-paste commands as your problem can be different to the one in this article.

Integrating Standard Notes into Linux https://tekbyte.net/2020/integrating-standard-notes-into-linux/ https://tekbyte.net/2020/integrating-standard-notes-into-linux/#respondSun, 20 Sep 2020 11:32:53 +0000https://tekbyte.net/?p=205Standard Notes is a simple and private note taking app that is both cross-platform and fully open source. I made the plunge to try out Standard Notes Extended and so far I’m loving it! In this article I will show you how you can integrate the Standard Notes Linux AppImage so that you can launch it in pretty much any desktop environment.

Why Standard Notes?

This isn’t a promotional blog post or anything. You may know that in an earlier post, I made a video showing how you can use Epiphany to create a Notion web app. Notion is another note taking client but after discovering their privacy policy and the access they give to their employees (i.e. direct access to notes), it’s worried me a bit. I’ve known Standard Notes for quite some time now but it was a hard to swallow their subscription plan. That said, they do have a relatively sustainable plan where you can commit from 1 or 5 years and basically get a huge discount.

Standard Notes is designed around encryption and privacy. They have done security audits and reading their blog on how they encrypt, not to mention the entire system being 100% open-source, it’s something I can trust. It gives me the peace of mind and from a productivity standpoint, it’s quite a joy to use.

My Standard Notes note-taking setup!

Running AppImages

Standard Notes comes with an AppImage which is similar to a Flatpak or Snap where the application is basically sandboxed. Sandboxing is where an application has restricted access to system services, libraries and resources. For instance, the Discord Flatpak can’t see my running tasks and can only see my Downloads directory.

When you go to Standard Notes’ website and download the Linux app, you simply download it and launch it. If it doesn’t launch the first time, you may have to right-click on the executable and allow the executing the file as a program.

Nautilus file manager, make sure “Execute: Allow executing file as program” is checked.

Depending on your distribution and desktop environment, it may actually do the integration for you. Manjaro for instance allows AppImages to be installed and you can launch it from your application menu or whatever have you. On Fedora and I’m guessing a lot of other distros (specifically ones that use GNOME), you can’t just double-click and have it automatically installed into your system.

Integrating Standard Notes

Now we come to integrating Standard Notes into our system. You want to create a file inside the ~/.local/share/applications/ directory called standard-notes.desktop. The file name doesn’t matter but to keep it consistent, we’ll use that.

You want to put the downloaded AppImage file somewhere where you won’t move it around. I keep downloaded AppImages in ~/Downloads/software . I would also recommend that you rename the AppImage to something like standard-notes.AppImage

To edit the standard-notes.desktop file, you can either use a terminal text editor or whatever you have. Simply navigate or cd into the “~/.local/share/applications” directory and create that file. Then, paste the following contents:

[Desktop Entry]
Name=Standard Notes
Comment=A Simple And Private Notes App
StartupWMClass=Standard Notes

Of course, you want to replace <PATH-TO-APPIMAGE> with the path to the Standard Notes AppImage. For me, it will look like this:

[Desktop Entry]
Name=Standard Notes
Comment=A Simple And Private Notes App
StartupWMClass=Standard Notes

Once done, save it and you should be able to launch Standard Notes from your start/app menu. If you’re on GNOME, simply press super or start (what do we call it these days? 😀 ) and type the name of the app.

There it is!

That’s it, happy editing. If you have any questions, feel free to drop a comment below. Hope this helps!

How To Install Bitwig Studio on Fedora https://tekbyte.net/2020/how-to-install-bitwig-studio-on-fedora/ https://tekbyte.net/2020/how-to-install-bitwig-studio-on-fedora/#respondSat, 19 Sep 2020 13:05:27 +0000https://tekbyte.net/?p=201Bitwig Studio is a professional digital audio workstation (DAW) that happens to be cross-platform. Although it isn’t free, for those who want to use a Linux-friendly DAW with a predictable workflow (similar to Ableton), look no further. I’m not sponsored by Bitwig, I simply enjoy recording and making music with this wonderful program.
Bitwig Studio running on my Fedora system. Recording guitar and playing with effects.

They support Linux (specifically Ubuntu / Debian based distros that use .deb packages), Windows and MacOS. I found a script on GitHub that did the job for me when installing Bitwig on Fedora however it is no longer maintained so I decided to improve it and add some things.


If you’re on Fedora Workstation, you can simply run the command below and it will download the necessary packages and install Bitwig Studio for you. If you don’t have a license, you can use the demo which gives you access to everything but you can’t export your projects.

The way this script works is it first installs any dependencies that are missing (e.g. JACK, dpkg) and then fetches the latest version of Bitwig Studio from their website. It automatically scrapes the website for the latest version and downloads that. It also create a shortcut on your system so you can launch it.

Run this one-liner:

cd /tmp && wget https://raw.githubusercontent.com/berkiyo/bitwig-fedora/master/install.sh && chmod 777 install.sh && ./install.sh

Project ‘bitwig-fedora’

You can follow my project repository if you want to stay up-to-date on any changes. You can also inspect the script before you run it.

Project Link

Install Notion Web App on Linux! https://tekbyte.net/2020/install-notion-web-app-on-linux/ https://tekbyte.net/2020/install-notion-web-app-on-linux/#commentsSun, 13 Sep 2020 07:31:08 +0000https://tekbyte.net/?p=194I recently got into Notion.so and I must say, it’s a blast to use! Notion for those of you who don’t know is a personal notebook / todo list / journalling thing that is really handy for people who want to take digital notes. It’s cross-platform and has markdown support however they don’t officially support Linux. While there are 3rd party clients out there that make Notion into a web app so you can use it on your computer, I wanted to do it differently and take a cleaner approach.

Epiphany! That’s the name of GNOME’s flagship web browser. It’s a simple browser but it has one killer feature that can turn websites into web apps! The beauty of this is that you can do this for any website, whether you use social platforms like Instagram or Twitter, it’s a perfect way to integrate it with the rest of your system. Also, all web apps you create are sandboxed meaning they aren’t going to snoop or interfere with your browser (a win for privacy!)

Installing Epiphany (or GNOME Web)

Epiphany is the package name but GNOMEies like to refer to it as GNOME Web. This package should be basically on every distribution repository but if you’re anti-GNOME or something, you might want to look else where. You can install it through your software center / desired package manager or depending on your distro, you can try the command line method.

# fedora
sudo dnf install epiphany

# ubuntu / linux mint / debian et. al.
sudo apt install epiphany-browser

# arch linux / manjaro
sudo pacman -S epiphany

# flatpak (uses flathub.org repos)
flatpak install flathub org.gnome.Epiphany

Adding Notion.so to our system

Basically, open the browser and go to notion.so and login. Once done, open the menu (top-right) and click on “Install Site as Web Application”.

We want to install it as a web-app.

You will then get a popup like shown below. Simply click “Create” or give it a different name.

Almost there…

That’s it! Now you can open your menu or if you’re on GNOME, just press Start / Super and type “notion”.

Here we go!

Once you run it, you’ll probably be prompted to log in and you’re good to go! Now you have a standalone Notion web app to use on your Linux machine! One downside is that it isn’t going to work offline but hey, now you can alt-tab into Notion instead of having it incorporated inside your browser.

Happy note taking!

Setup Python and Visual Studio Code on Fedora Linux (Video) https://tekbyte.net/2020/setup-python-and-visual-studio-code-on-fedora-linux-video/ https://tekbyte.net/2020/setup-python-and-visual-studio-code-on-fedora-linux-video/#respondSat, 12 Sep 2020 03:36:52 +0000https://tekbyte.net/?p=191If you’re looking to get started in Python development and are running Linux, I’d highly recommend you use Visual Studio Code. Not only does it give you a good platform to do debugging but you also benefit from endless extensions to tailor it to your workflow.

How to view login failures on your Linux server (Sysadmin Tips) https://tekbyte.net/2020/how-to-view-login-failures-on-your-linux-server-sysadmin-tips/ https://tekbyte.net/2020/how-to-view-login-failures-on-your-linux-server-sysadmin-tips/#commentsMon, 07 Sep 2020 02:48:13 +0000https://tekbyte.net/?p=182So you’re SSHing to your remote server and you noticed there were thousands of failed attempts to get into your server since your last login. What can you do about it? Well, you can use a SSH key and disable password login. You can also use a different port to make it a bit more difficult for hackers and script-kiddies to find the SSH port.

If you run this command, you can see all the failed attempts on your server including their IP addresses, the username they used, port number and when they tried it.

For CentOS / RHEL servers

grep "Failed password" /var/log/secure

For Ubuntu servers

grep "Failed password" /var/log/auth.log
There you have it.

Thanks to tecmint for sharing this.

How to use SSH keys to secure your servers https://tekbyte.net/2020/how-to-use-ssh-keys-to-secure-your-servers/ https://tekbyte.net/2020/how-to-use-ssh-keys-to-secure-your-servers/#commentsSun, 06 Sep 2020 13:02:12 +0000https://tekbyte.net/?p=178Using SSH keys to login to servers and computers is a great way to add a layer of security as well as remove the hassle of typing your password. In this article I will show you how you can create your unique and password-proteced SSH key so you can login to your server without ever needing to enter passwords. Also, this means you can disable password login on your server and that will stop hackers from trying to brute-force their way into your server.

Let’s get cracking…

Boo! Okay, no more puns.

Alright, if you don’t have a .ssh directory created, make it and make sure you give access to only yourself.

mkdir -p ~/.ssh
chmod 700 ~/.ssh
cd ~/.ssh

Next thing is to create a RSA key. To do this, use the ssh-keygen command.

ssh-keygen -t rsa
  • It will ask you to enter a file to save the key into, just press enter.
  • For the next part, you can create a passphrase as an added layer of protection. I’d highly recommend you do this as if someone grabs your key, they’ll need a password to use it as well. Depending on the OS you’re using (Linux, Windows, macOS) and the SSH client, the behaviour will be different.

Once done, you want to use the ssh-copy-id command to copy the public part of your SSH key to the remote server you want to connect to. Here’s an example

ssh-copy-id -i ~/.ssh/id_rsa.pub user@server.com
  • Replace user with the username you use to connect to the server.
  • Replace server.com with your server address
  • If you use a specific port number, make sure to append -p <port_num> to the end.
  • You’ll be prompted to enter your remote server password, enter it.

That’s it! You can now connect to your server without entering passwords, all you need is a username, hostname and maybe port number. If you want to simplify things further, you can create a SSH profile and all you have to type is ssh myserver to connect.

Some things to consider

  • Once you have a successful connection estabilished, you should backup your private and public keys. You don’t want to lose them when distro hopping 😉
  • Try using a different port number than 22 on your remote servers. Especially if you have a website, pick a random 4-5 digit port number.
  • If you can be bothered, disable root-login and only login with another user which has superuser access. This is the desired behaviour and adds another layer of protection as the root account cannot be used for loggin into the server.
Run Alpine Linux on your iPad – iSH https://tekbyte.net/2020/run-alpine-linux-on-your-ipad-ish/ https://tekbyte.net/2020/run-alpine-linux-on-your-ipad-ish/#respondFri, 28 Aug 2020 10:30:13 +0000https://tekbyte.net/?p=170Recently I got my hands on a iPad Air 2 and I wanted to do see how the development is on this little machine. Although the device is aging with it’s iPhone 6s tier CPU, it still runs like a champ and can handle almost every task with ease, while running the latest iPadOS! I came across a project called ish.app and it certainly delivers. Basically you can run an emulated version of Alpine (probably virtualised) on your iPad and use all those Linux tools. I played around with git, neofetch and weechat and I must say, they work just as they would. My Air 2 is on the slower side being 6 years old, but it still works as you’d expect. You can edit all your files in vim and have a joyous time.
Simple neofetch output. To install applications, you run “app add <name of app>”

As you can see, it’s just a shell but the fact that you run a fully-fledged Linux VM on your iPad without the need for a remote host just shows that there is potential for an iPad being a decent portable dev machine. Of course, this isn’t going to be for everyone, I do Android app development and there is no way an iPad would replace a fully-fledged x86 machine for me. But there is potential for dabbling in python, using UNIX applications, doing quick git changes and more.

Here’s me running weechat, a browser and a video, all at the same time. Just showing the power this little Air 2 has.

It’s still beta-software so you need to install it through Apple’s “TestFlight” app. But if you want to play around with some Linux on your iPad or even iPhone, give this a shot.

Project page : Ish.app

Updating My ThinkPad E480’s BIOS On Linux https://tekbyte.net/2020/updating-my-thinkpad-e480s-bios-on-linux/ https://tekbyte.net/2020/updating-my-thinkpad-e480s-bios-on-linux/#respondMon, 24 Aug 2020 02:35:00 +0000https://tekbyte.net/?p=166It has been almost a year since I last updated my BIOS on my ThinkPad. I recently found out that there were a few improvements to performance and efficiency. I always thought BIOS updates were only possible through Windows but today I found a helpful tutorial on updating the BIOS without booting into Windows. In this short article, I will show how you can update the BIOS on a ThinkPad E480. This guide will also work on other ThinkPads however some are officially supported via LVFS (fwupd.org) so this isn’t necessary. Since the E480 isn’t part of the LVFS program, it has to be manually done.


I am not responsible for bricked ThinkPads. Updating the BIOS is dangerous and if performed incorrectly, it can lead to a damaged device. When performing these steps, take extra caution!


For this tutorial, I’ll be using genisoimage and geteltorito. The distribution I’m using is Fedora however if you have the relevant packages, it should be the same for any other distribution.

### Fedora
$ sudo dnf install genisoimage geteltorito

### Ubuntu / Debian
$ sudo apt install genisoimage

Downloading the ISO

Download the ISO file for your device. For mine, I’ll be downloading the latest one for my ThinkPad E480. Make sure you download the correct one for your device, flashing the wrong BIOS file can lead to catastrophic failure.

Alternatively, you can download it through the terminal using wget

### For my device
$ cd ~
$ wget https://download.lenovo.com/pccbbs/mobiles/r0puj23wd.iso

Preparing the USB

To boot into the BIOS updater, we will need a USB. Any USB of any size should fine. The BIOS image is approximately 17MB but it may differ from update to update. Ideally, you want to do a quick format but it will be overwritten later on with dd .

Open up a terminal and navigate to the directory where the ISO is.

### Extract the image from the ISO file

$ geteltorito -o 
$ geteltorito -o e480.img r0puj23wd.iso

### Type "lsblk" and identify the path of the USB (eg: /dev/sdb - If it is mounted, un-mount it.

$ sudo dd if=e480.img of=/dev/sdb bs=64K

Reboot and Flash

Once done, simply reboot and load into the boot manager. On my machine, I hit enter when the Lenovo logo pops up and then press F12 to go into the boot manager. From here, I will pick the media I want to boot into.

If all goes well, you should be in the BIOS updater. As a final tip, ensure that you’re not connected to any external devices such as drives and as a precaution, unplug any displays or external keyboards. Simply have the USB and power plugged in only. Updating the BIOS may take some time but once done it should reboot and you’re good to go.

Evolution Mail – the Linux Outlook alternative https://tekbyte.net/2020/evolution-mail-the-linux-outlook-alternative/ https://tekbyte.net/2020/evolution-mail-the-linux-outlook-alternative/#respondSun, 23 Aug 2020 05:24:15 +0000https://tekbyte.net/?p=159These days, most people simply use web mail that is supplied by their email provider. That said, there are some of us who like to have more control in how they compose their mails, have multiple accounts, filters, create events and have it all in a single mail client. The most notable one is Microsoft Outlook which comes with Office365 however on this website we like to use free and open source alternatives 😉

One excellent alternative is Thunderbird which is cross-platform, is lightweight and actually works really well. It’s got all the features one could possibly need and has always been a solid free alternative to Outlook. That said, I use Linux 95% of the time and I’d like to explore my options.

Geary is another option however I find it to be very basic and offer no real functionality and is only aesthetically pleasing. It’s made for GTK / GNOME-esque desktop environments which use a header bar. Another alternative is Kmail which I actually used a bit and found it to be very powerful. I’d rank Kmail a close second to Evolution, tied with Thunderbird.

Why use Evolution?

It’s simple really, it has that nice Outlook three-column vertical view and integrates really well with the GNOME desktop environment. It has a built-in calendar which handles WebDAV really well and you can use it for taking notes, memos and managing tasks. I personally use it for email and calendar but having all of this in there is a nice bonus.

A screenshot showing what Evolution looks like.

I find Evolution to be also very robust and transporting a profile to another computer is a breeze. Filters are something I use all the time and without them, I think my Inbox would be a mess. Basically anything that comes to my mail server, I will have Evolution filter it to categories based on who is sending it. This means I can focus on what matters most.

Try it out!

Evolution comes on basically available on every Linux distribution’s repository and can be installed through the command line package manager or a GUI software center.

Everyone has their own taste for what they want out of a mail client so evaluate your options and pick the one that suits you.