bookmark_borderWeb Search Keywords

Did you know about a small but very useful feature from KDE?

Open krunner via Alt+Space and type qw:KDE to search Qwant for KDE:

Pressing Enter will open up your browser with the specified KDE search on Qwant!

There are a lot of other Web Search Keywords like:

Wikipedia:

Invent:

Translate from English to German on dict.cc

You can find all of them by opening Web Search Keywords on krunner:

Extra: Create your own!

I use often a Fedora tool called COPR, so let’s use it as an example to create our own web search keyword.

Do your search in the webpage:

And now the important part you need:

Now back to the Web Search Keyword settings:

Fill in the data needed taking care of the placeholder for our input!:

Now we have our own Web Search Keyword:

NOTE: for some reason I had to click on Apply and OK until all the different setting windows were closed before the new custom Web Search Keyword worked

And the result:

I hope it’s useful to somebody!

bookmark_borderFedora KDE Enabling Third Party Repositories

As you may know, Fedora KDE 41 was released a couple of weeks ago.

I wanted to talk about a special feature that our colleague @farchord (with support from upstream developer @Nate Graham) has brought to our Fedora KDE distribution:

Enabling Third Party Repositories With A Single Click!

Thanks to the flexibility of plasma-welcome we can offer this feature πŸ™‚

Right after installing Fedora and on first login you will be presented with the Plasma Welcome window:

Before you click on Skip , you can go through the different slides to read about KDE and Fedora and also to decide whether you want to contribute with anonymous metrics or not (note: I personally do not):

Here is where the interesting part comes in, on the next slide:

With a simple click of a button you will enable the most commonly requested by our users Third Party Repositories like rpmfusion! (note: you will be asked for your administrator password)

Once the request is processed, the message will change to:

That’s it! You have successfully enabled Third Party Repositories without needing to modify any file or running any command whatsoever πŸ™‚

Before you do anything with your system and your new configuration, I will strongly recommend to update your system via Plasma Discover :

Proceed with all the update and reboot to get the latest and shiniest from our repositories.

Finally, to verify that the Third Party software is available, you can check:

And that is it!

Enjoy!

This is all thanks to farchord, siosm , aleasto and ngraham‘s work!

bookmark_borderKDE Gear 22.12.2 available on Fedora 37

After the announcement upstream, Fedora’s @kde-sig follows up by making KDE Gear 22.12.2 available on Fedora 37.

As per Fedora’s policy, the software will first land on updates-testing and after receiving feedback and karma it will land on the updates repository.

If you want to help, make sure to follow the instructions on the update. You only need to run:

sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-17c31eabf7

Feel free to join us at our Matrix room!.

bookmark_borderTridactyl: a Vim-like interface for Firefox

Today I would like to talk about one of my favorite extensions for Firefox: Tridactyl.

The official website is here and the source code can be found on Github here.

Extracted from their Github repository:

Replace Firefox's default control mechanism with one modelled on the one true editor, Vim.

The main point being: it allows you to browse the internet with vim keybindings and workflows. For instance: j/k will move you through a web page or H/L will move you back and forward through the history.

We can also browse through our opened tabs as if they were buffers by pressing b:

The hint mode is the feature! Press f and you will see:

This will label all the hyperlinks (and other elements) and you will be able to follow the hyperlinks by typing the label.

I have a few custom settings for the extension though.

For instance, the default key-bindings to move through the tabs is a bit counter-intuitive (at least to me) so I have those re-mapped:

:bind J tabnext
:bind K tabprev

I like the way Vimperator used to do the hint mode so I have that enabled as well:

:set hintchars 543167890
:set hintfiltermode vimperator-reflow

With the above settings you will be able to type the text that you see in the hyperlinks and the extension will reduce the number of options that you have to follow links. For instance, on https://github.com/tridactyl/tridactyl, enter into hint mode via f and then type update:

See? Now you only have two hyperlinks to follow (the ones that contain what you typed)

I also like using a different theme so I have

:colors shydactyl

Tridactyl is very powerful, make sure to go through the readme and :help to find all the options that it offers

bookmark_borderSelf-hosted Firefox Sync Server

A couple of months ago I started setting up several services on my own servers to get rid of many third party dependencies like Google. Even though Mozilla is nothing like a big Mega-Corp I still like the idea of not depending on third parties ( or even if you do, that you can migrate easily to another provider).

In this post I will explain how I have set-up my own Firefox Sync Server. Most of my information has been extracted from here and here.

I, obviously, did some research online before I started doing something like this from scratch. I found several posts like this one or this one but all of them look like people just want to make things work without digging too much into how things really function. Indicators for this were the usage of FF_SYNCSERVER_FORCE_WSGI_ENVIRON or SYNCSERVER_FORCE_WSGI_ENVIRON were I could see that they were not really understanding what was happening under the hood.

Here you can find my docker-compose:

version: '3.5'

networks:
  world:
    external: true

services:

  syncserver:
    image: mozilla/syncserver:latest
    container_name: syncserver
    restart: on-failure
    networks:
      - world
    volumes:
      - /srv/syncserver:/data
    expose:
      - "5000"
    environment:
      - "SYNCSERVER_ALLOW_NEW_USERS=false"
      - "SYNCSERVER_PUBLIC_URL=https://your.fqdn.here"
      - "SYNCSERVER_SECRET=$SYNCSERVER_SECRET"
      - "SYNCSERVER_SQLURI=sqlite:////data/syncserver.db"
      - "SYNCSERVER_FORWARDED_ALLOW_IPS=127.0.0.1,172.18.0.2,172.18.0.1"
      - "SYNCSERVER_BATCH_UPLOAD_ENABLED=true"
      - "SYNCSERVER_FORCE_WSGI_ENVIRON=false"
      - "PORT=5000"
    labels:
      - "traefik.frontend.rule=Host:your.fqdn.here"
      - "traefik.docker.network=world"
      - "traefik.enable=true"
      - "traefik.frontend.passHostHeader=true"
      - "traefik.frontend.headers.STSPreload=true"
      - "traefik.frontend.headers.STSSeconds=31536000"
      - "traefik.frontend.headers.ForceSTSHeader=true"
      - "traefik.frontend.headers.STSIncludeSubdomains=true"
      - "traefik.frontend.headers.contentTypeNosniff=true"
      - "traefik.frontend.headers.frameDeny=true"
      - "traefik.frontend.headers.customFrameOptionsValue=SAMEORIGIN"
      - "traefik.frontend.headers.browserXSSFilter=true"
      - "traefik.frontend.headers.referrerPolicy=no-referrer"
      - "traefik.frontend.headers.contentSecurityPolicy=default-src 'self'; script-src 'self'"

In this setup I run syncserver behind traefik configured automatically via labels. Notice SYNCSERVER_FORCE_WSGI_ENVIRON=false. We do not need to set this to true due to the usage of SYNCSERVER_FORWARDED_ALLOW_IPS=127.0.0.1,172.18.0.2,172.18.0.1 and the header X-Forwarded-For that we receive via trafik (configured to do so via the label traefik.frontend.passHostHeader=true).

The SYNCSERVER_SECRET environment variable has been generated with the command:

head -c 20 /dev/urandom | sha1sum
And inserted in a .env file containing:

# This file is used to define environment variables to be used
# for variable substitution in your docker compose file.
# https://docs.docker.com/compose/env-file/
SYNCSERVER_SECRET=YOUR_SECRET_GOES_HERE

Now, in order for Firefox to attack our Sync Server, we need to set it up as follows (I blatantly copy from this blog post):

  1. Go to about:config and search for identity.sync.tokenserver.uri.
  2. Now change replace https://token.services.mozilla.com/1.0/sync/1.5 with https://yourawesomeurl.tld/token/1.0/sync/1.5. Don’t forget the token, because the self hosted Firefox sync server is exposing the token server in a subdicrectory.
  3. Just to make sure everything is set up correctly, log out of Firefox (if you logged in before) and restart the browser.
  4. Now go to the settings, login with your Firefox account and the synchronization can start.

As you might know already, we still need the Firefox Account service from Mozilla for all these to work. I am pretty sure I will be trying to set it up myself in a not too distant future… πŸ™‚