Skip to main content

the avatar of Sebastian Kügler

Gravad lax en ribeye

Canapé’s van maple-cured gravad lax op mierikswortel crème
Van de kamado grill: Rib eye steak (sous-vide reverse-seared)  met miso boter, spitskool met chimichurri op dragon-yoghurtsaus
the avatar of Nathan Wolf

the avatar of Robert Riemann

Mastodon: How to configure custom signup questions

The Mastodon instance eupolicy.social is geared towards people who identify themselves as part of the EU Bubble. Purposfully, there is no definition provided and indeed the instance is a bit flexible on what EU Bubble would mean.

To help the instance keep this focus (and avoid spam), the admins have opted for approval-based registration of signups. New users can during their signup process provide some text about themselves. To make this more relevant, eupolicy.social decided to customise the text that instructs the users to describe their relation with the instance.

Screenshot demonstrating the custom signup message

Previously, the instance admins changed all language files in a source code copy of the locales folder. This was tidysome and can easily break with an update, especially when using a docker/podman-based setup that contains already all language files.

How to overwrite individual language/translation strings

The underlying Ruby on Rails loads all string (by alphabetic order) from yml files in a folder that is by default /config/locales. Files loaded later can overwrite strings from files loaded earlier. To overwrite a string, you have to find the identifier first, e.g. in the English language file.

# file: "/config/locales/en.yml"
en:
  []
  auth:
    []
    sign_in:
      preamble_html: Login with your <strong>%{domain}</strong> credentials. If your account is hosted on a different server, you will not be able to log in here.
      title: Login to %{domain}
    sign_up:
      manual_review: Sign-ups on %{domain} go through manual review by our moderators. To help us process your registration, write a bit about yourself and why you want an account on %{domain}.
    []

To change the string auth.sign_up.manual_review in all languages, I have created a new language file called zz-custom-signup-message.yml here below. The prefix zz puts the file at the very end given the alphabetic ordering.

If Mastodon admins use a local git clone of the Mastodon source code, this file can stay in the folder and won’t cause conflicts when language files receive updates via git. If Mastodon admins use the Container image with Docker or Podman, they can mount this file into the setup with podman run -v ./zz-custom-signup-message.yml:/config/locales/zz-custom-signup-message.yml:z,ro […]. With Container compose file, this would look like:

# file: "docker-compose.yml"
services:
  web:
    container_name: "mastodon-web"
    image: ghcr.io/mastodon/mastodon:$MASTODON_VERSION
    restart: always
    []
    volumes:
      - ./container-volumes/mastodon/public/system:/mastodon/public/system
      - ./zz-custom-signup-message.yml:/opt/mastodon/config/locales/zz-custom-signup-message.yml:z,ro
  []
# file: "/config/locales/zz-custom-signup-message.yml"
---
en:
  auth:
    sign_up:
      manual_review: |
        Please describe how you are part of the EU policy bubble. If you are not sure what to write here, maybe another Mastodon server might suit you better.

de:
  auth:
    sign_up:
      manual_review: |
        Auf welche Weise sind Sie mit der EU-Politik-Bubble verbunden? Wenn Sie nicht sicher sind, was in dieses Feld soll, möchten Sie sich vielleicht einen anderen Mastodon-Server aussuchen.

fr:
  auth:
    sign_up:
      manual_review: |
        Comment faites-vous parti de la bulle politique européenne? Si vous n'êtes pas sûr quoi répondre, peut-être un autre serveur Mastodon sera plus approprié pour vous.

es:
  auth:
    sign_up:
      manual_review: |
        Por favor, describa cómo forma parte de la burbuja política de la UE. Si no está seguro de qué escribir aquí, quizá otro servidor de Mastodon le venga mejor.

bg:
  auth:
    sign_up:
      manual_review: |
        Моля, опишете по какъв начин сте част от политическия балон на ЕС. Ако не сте сигурни какво да напишете тук, може би друг сървър на Мастодон ще ви подхожда повече.

cz:
  auth:
    sign_up:
      manual_review: |
        Popište, jak jste součástí politické bubliny EU. Pokud si nejste jisti, co sem napsat, možná by vám lépe vyhovoval jiný server Mastodon.

dk:
  auth:
    sign_up:
      manual_review: |
        Beskriv venligst, hvordan du er en del af EU's politiske boble. Hvis du ikke er sikker på, hvad du skal skrive her, passer en anden Mastodon-server måske bedre til dig.

nl:
  auth:
    sign_up:
      manual_review: |
        Beschrijf alsjeblieft hoe je deel uitmaakt van de EU-beleidsbel. Als je niet zeker weet wat je hier moet schrijven, misschien past een andere Mastodon server beter bij je.

et:
  auth:
    sign_up:
      manual_review: |
        Palun kirjeldage, kuidas te olete osa ELi poliitikamullist. Kui te ei ole kindel, mida siia kirjutada, siis võib-olla sobib teile paremini mõni teine Mastodoni server.

fi:
  auth:
    sign_up:
      manual_review: |
        Kuvailkaa, miten olette osa EU:n poliittista kuplaa. Jos et ole varma, mitä kirjoittaa tänne, ehkä toinen Mastodon-palvelin voisi sopia sinulle paremmin.

gr:
  auth:
    sign_up:
      manual_review: |
        Περιγράψτε τον τρόπο με τον οποίο συμμετέχετε στην πολιτική φούσκα της ΕΕ. Αν δεν είστε σίγουροι για το τι να γράψετε εδώ, ίσως ένας άλλος διακομιστής Mastodon να σας ταιριάζει καλύτερα.

hu:
  auth:
    sign_up:
      manual_review: |
        Kérjük, írd le, hogy milyen szerepet töltesz be az uniós szakpolitikákban. Ha nem tudod, mit írj ide, talán egy másik Mastodon-szerver jobban megfelelne neked.

it:
  auth:
    sign_up:
      manual_review: |
        Descrivi come fai parte della bolla politica dell'UE. Se non sei sicuro di cosa scrivere qui, forse un altro server Mastodon potrebbe essere più adatto a te.

pl:
  auth:
    sign_up:
      manual_review: |
        Wyjaśnij, na czym polega twój związek ze środowiskiem politycznym Unii Europejskiej. Jeśli nie wiesz, co tu napisać, być może inna instancja Mastodona będzie dla Ciebie bardziej odpowiednia.

lv:
  auth:
    sign_up:
      manual_review: |
        Lūdzu, aprakstiet, kā jūs esat daļa no ES politikas burbuļa. Ja neesat pārliecināts, ko šeit rakstīt, varbūt cits Mastodon serveris varētu būt jums piemērotāks.

lt:
  auth:
    sign_up:
      manual_review: |
        Apibūdinkite, kaip dalyvaujate ES politikos burbule. Jei nežinote, ką čia rašyti, galbūt jums labiau tiktų kitas Mastodono serveris.

pt:
  auth:
    sign_up:
      manual_review: |
        Descreva de que forma faz parte da bolha política da UE. Se não tem a certeza do que escrever aqui, talvez outro servidor Mastodon seja mais adequado para si.

ro:
  auth:
    sign_up:
      manual_review: |
        Vă rugăm să descrieți modul în care faceți parte din comunitatea politicilor europene. Dacă nu sunteți sigur ce să scrieți aici, poate că un alt server Mastodon vi s-ar potrivi mai bine.

sk:
  auth:
    sign_up:
      manual_review: |
        Opíšte, ako ste súčasťou politickej bubliny EÚ. Ak si nie ste istí, čo sem napísať, možno by vám viac vyhovoval iný server Mastodon.

sl:
  auth:
    sign_up:
      manual_review: |
        Opišite, kako ste del političnega mehurčka EU. Če niste prepričani, kaj bi napisali tukaj, vam bo morda bolj ustrezal drug Mastodonov strežnik.

se:
  auth:
    sign_up:
      manual_review: |
        Beskriv hur du är en del av EU-bubblan. Om du inte är säker på vad du ska skriva här, kanske en annan Mastodon-server passar dig bättre.

uk:
  auth:
    sign_up:
      manual_review: |
        Будь ласка, опишіть, яким чином ви є частиною мильної бульбашки політики ЄС. Якщо ви не знаєте, що тут писати, можливо, вам більше підійде інший сервер Mastodon.

no:
  auth:
    sign_up:
      manual_review: |
        Beskriv hvordan du er en del av EUs politiske boble. Hvis du ikke er sikker på hva du skal skrive her, passer kanskje en annen Mastodon-server bedre.

References:

the avatar of Nathan Wolf

Adjusting Mouse Edge Stickiness in KDE Plasma

The author discusses issues with mouse "stickiness" at screen edges on a multi-screen desktop using Plasma 6.3.4. They appreciate this feature but found the default edge barrier of 100 pixels too aggressive. By adjusting the setting to 20 pixels, they achieved smoother transitions, highlighting the customization benefits of Plasma on openSUSE Tumbleweed.

the avatar of Sebastian Kügler
the avatar of Sebastian Kügler
the avatar of Sebastian Kügler
the avatar of Sebastian Kügler

the avatar of openSUSE News

No Hidden Software, No Surprises

The Upgrade to Freedom campaign has joined the End of 10 initiative to promote Free and Open Source Software as a sustainable alternative to Windows 10. Learn more at endof10.org.

The openSUSE News article Freedom Means Knowing What’s Installed highlights a critical benefit of using openSUSE and other Linux distributions; complete system transparency!

This principle isn’t just a philosophical pillar of open-source software, it’s a practical advantage.

Linux is transparent by design and this is true for really all aspects, including the installed software that people get from their distribution. All software is bundled in packages, and these packages can be inspected.

If you ever wondered what that file /usr/bin/dispcal is that you found on your system, you can query the RPM database what package it belongs to. You can use the following in the command line:

sh@meteor:~> rpm -qf /usr/bin/dispcal
argyllcms-3.3.0-1.3.x86_64

So it belongs to the argyllcms package, a color management system. But if you don’t like using the command line, you can also use QDirStat, which is a graphical disk usage utility that’s short for Qt Directory Statistics.

After a After a sudo zypper install qdirstat, we can run the following: qdirstat /usr showing the disk usage in the /usr subtree

QDirStat Disk Usage Screenshot

Look at the details of the panel on the right side: For files in system directories, it automatically queries the RPM database and shows what package the file belongs to. You can browse through the directory tree and do that for each file that you are interested in.

But it also has a mode to show only unpackaged files, i.e. files that do not belong to any installed software package:

Next command, let’s go with qdirstat unpkg:/usr/bin. This shows all unpackaged files in /usr/bin

QDirStat Disk Usage Screenshot

There is /usr/bin/qdirstat - okay, I built that from source myself and installed it manually to /usr/bin; that’s alright. But what on earth is /usr/bin/trustmebro? Last modification date from yesterday, too? This is suspicious and is someting to investigate further. It might be a good idea to remove the execute permissions from it and quarantine it, i.e. to move it away to another directory because it might be something malicious.

What packages do I even have installed, and how much disk space does each of them use? QDirStat can show that, too:

Let’s take the next step and run qdirstat pkg:/, which shows the disk usage per package for all our installed packages.

QDirStat Disk Usage Screenshot

These are just some examples of what the Linux introspection mechanisms can show you about the system. Linux is not hiding anything from you; if you want to know, all information is readily available.

You can dive deeper into the tool and its features by visiting the QDirStat GitHub repo. For more technical details, see the Package View Documentation and the Unpackaged Files View Documentation.

This is part of a series on Upgrade to Freedom where we offer reasons to transition from Windows to Linux.