Read the latest posts from Fedi.dev.

from Gytis Repečka

Even if you don't multiboot several operating systems it might be useful to show GRUB menu and give a little timeout to pick the right item.

Process is straightforward on Ubuntu – just edit following file:

sudo nano /etc/default/grub

Find following default values:


And change them to following:


Don't forget to propagate GRUB configuration:

sudo update-grub

I have recently ran that on Linux Mint and it showed following:

Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/60_mint-theme.cfg'
Generating grub configuration file ...
Found theme: /boot/grub/themes/linuxmint/theme.txt
Found linux image: /boot/vmlinuz-5.3.0-45-generic
Found initrd image: /boot/initrd.img-5.3.0-45-generic
Found linux image: /boot/vmlinuz-5.3.0-42-generic
Found initrd image: /boot/initrd.img-5.3.0-42-generic
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Adding boot menu entry for EFI firmware configuration

Note that it mentions theme /boot/grub/themes/linuxmint/theme.txt – this might be a good chance to give your bootloader some personal touch :)

Liked this article? Open this post in #fediverse client (like Tusky) and reply – #writefreely has introduced ActivityPub mentions so you should be able to reply mentioning @gytis@mastodon.lt automatically. How cool is that!

Testing WriteFreely ActivityPub mentions

  • @gytis@blog.gyt.is
  • @gytis@auto.coffee
  • @data@mastodon.lt

#linux #ubuntu #linuxmint #boot #multiboot


from webimg

Initial version of webimg – library written in Go lang to manipulate images. Currently it is able to watermark JPG image with PNG logo at defined opacity.

To use this library in your Go application initialize sources:

go get -d -u code.gyt.is/webimg

Include it in your application:

import (

And then call function:

// Input image, watermark image, result image, bottom-right offset X, bottom-right offset Y, watermark alpha
doWatermark := webimg.Watermark("smplayer_preferences.jpg", "watermark_inretio-logo.png", "result_img.jpg", 30, 30, 70)
if doWatermark != nil {
  fmt.Println("There was an error watermarking image...")

Currently the library is able to watermark JPEG image with PNG watermark (which should have transparent background). You can set offset in pixels from bottom-right corner (in example 30, 30) and transparency of watermark image (in example 70, scale is 0-255 where 0 is solid and 255 is transparent).

Sources are published on my privately hosted instance of Gitea: source.gyt.is/gytisrepecka/webimg/.

Follow this blog for news and changelog from fediverse: @webimg@fedi.dev.

If you have any feedback or ideas, drop me an email at gytis@repecka.com or on Mastodon at @gytis@mastodon.lt.


from Gytis Repečka

As I run a fork of WriteFreely, I constantly need to sync it to original (so called upstream) repository.

GitHub has detailed documentation how to sync forked repository but I came up with a problem – new tags were not appearing on my repository on GitHub even though they could be seen locally:

gytis@desktop:~/writefreely$ git tag

Thing is that just git push origin master didn't push tags – to do that need to run following:

gytis@desktop:~/writefreely$ git push -f --tags origin master
Counting objects: 2, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 1.54 KiB | 790.00 KiB/s, done.
Total 2 (delta 0), reused 2 (delta 0)
To github.com:gytisrepecka/writefreely.git
 * [new tag]         v0.11.0 -> v0.11.0
 * [new tag]         v0.11.1 -> v0.11.1

And then all went fine – go get command from update WriteFreely from source tutorial pulled correct version and build the right version.

Make sure to also read my full walkthrough how to build WriteFreely from source.


from Gytis Repečka

On July 2nd WriteFreely v.0.10 was released with two little commits by me: Lithuanian translation and lessc installation fix for CentOS – so proud to be listed among contributors 😊 To celebrate it I'm posting quick guide how to update WriteFreely instance when building binary from source.

This guide is tested with following version of WriteFreely: 0.11.2 (2019-12-26).

1. Backup

As always, use mysqldump to backup your database and preferably entire home directory of user running WriteFreely.

2. Stop system service

systemctl stop writefreely

At this point Nginx will start returning Bad gateway error to visitors.

3. Pull sources

Because I use my forked repository, I retrieve sources by using this command:

go get -d -u -v code.gyt.is/writefreely

Updated sources will be available in your user's home GOPATH, run below command to know:

echo $GOPATH

In my case it is ~/go/src.

After sources are retrieved change directory to ~/go/src/src/code.gyt.is/writefreely.

4. Build

Don't forget to ensure Go modules are enabled otherwise build will fail on sitemap.go as described in issue #93. So before building run:

export GO111MODULE=on

And initiate build process:

make build   # Compile the application

5. Run database migration

Might not be always necessary (check release notes) but better run database migration:

./cmd/writefreely/writefreely  --migrate

6. Initiate installation

make install

At this point interactive wizard will come up to update configuration. Don't worry – you won't need to re-enter MySQL credentials – they will be pre-filled. Just make sure to select WriteFreely modes correctly – “Production behind proxy”, “Multiuser” and so on. It might be good way to improve this wizard to read those values as well from config file.

7. Build interface

To build templates and CSS, run:

make ui # Generates CSS (run this whenever you update your styles)

Note – lessc runs fine with CentOS starting v.0.10 (my pull request there 😊).

8. Run binary

Run binary with”

make run

This will copy writefreely binary to to your GOBIN path.

When upgrading to v0.11.1 on CentOS I've got this error:

[user@server writefreely]$ make run
go-bindata -pkg writefreely -ignore=\\.gitignore -debug -tags="!wflib" schema.sql sqlite.sql
go install -ldflags="-X 'github.com/writeas/writefreely.softwareVer=`git describe | cut -c 2-`'" -tags='sqlite' ./...
writefreely --debug
make: writefreely: Command not found
make: *** [run] Error 127

Will need to take a look at make script. Anyway to check executable I ran below:

./cmd/writefreely/writefreely  --debug

9. Start system service

systemctl start writefreely

At this point you should have #writefreely running fine and #nginx reverse-proxying to it successfully.

Note – it's always a good idea to ensure your WriteFreely service runs on dedicated system user.

Read more #server tips on my blog and don't forget to toot me @gytis@mastodon.lt!

Happy lightweight federated blogging 😎


from Gytis Repečka

WordPress content management system can successfully federate – there is a nice ActivityPub plugin. However, when running WordPress on Nginx server (as HTTP server, not only reverse proxy) there might be an issue – after setting up ActivityPub on auto.coffee I couldn't find @gytis@auto.coffee from my Mastodon instance.

After doing some digging I found out ActivityPub standard requires webfinger end-point under .well-known folder which by proposed default WordPress configuration for Nginx is forbidden.

First I tried to allow access to .well-known but even though JSON API started working, trying to access specific user end-point it kept throwing following error:

  "code": "rest_missing_callback_param",
  "message": "Missing parameter(s): resource",
  "data": {
    "status": 400,
    "params": [

While following example of successfully federating WordPress instance it was expected to return something like this:

  "subject": "acct:gytis@blog.gyt.is",
  "aliases": [
  "links": [
      "rel": "self",
      "type": "application/activity+json",
      "href": "https://blog.gyt.is/author/gytis/"
      "rel": "http://webfinger.net/rel/profile-page",
      "type": "text/html",
      "href": "https://blog.gyt.is/author/gytis/"

Actually problem was that URL was not passed to WordPress' index.php – workaround was provided in issue #8 of ActivityPub plugin. Solution is easy as adding extra location directive in Nginx configuration:

location ~* /.well-known {
    try_files $uri $uri/ /index.php?$args;

And there it goes – Auto.Coffee is ready to federate :)

Read more #server and #nginx #configuration tips.


from Inretio, MB

“Inretio”, MB registered in Lithuania, see below details:

Data Value
Company code 305174082
Established 2019-05-28
Official name “Inretio”, MB
Legal form Small Partnership

Information about company is stored at State Enterprise Centre of Registers, Lithuania.