Partitioning across systems: Separating user data

(This was first posted on the discontinued blog at mjjzf.eu)

Most people who only use one operating system will never have to think about this.
Everyone else will need to think about this.

We need to access our files. If we install one system on a computer, the files will be in their folders as intended, and everything is sweet and simple.

Early days

I have used Linux and the BSDs for a long time. Sometimes in conjunction with Windows – I currently have that on one machine equipped with a Windows gaming partition – but mostly with several distributions at once.
For a long time, my main system was Slackware. I would have a system partition for that and a swap partition. I would also install an experimental partition for something like Arch, Fedora, Debian or whatever.
In those days, the fashion became creating a separate /home partition and mounting that as a shared partition. Then you would have your data and settings available always. But as other distributions became increasingly current in their software and an increasing number of settings turned up in the home folder, it became problematic when versions of settings started interfering with each other.
The same can be an issue if you install new versions with the non-rolling releases.

Concluding

Eventually, I started separating out the files based on my need.
I introduced a separate data partition – not /home, but data. In my case, I have created it as a BTRFS partition. So I will use:
/dev/sda1 - Main system
/dev/sda2 - Auxiliary system
/dev/sda3 - swap
/dev/sda4 - Storage

So now, there is a partition for music, video, photo and such. When I install a fresh system, I mount it to /mnt/storage – not creating a new filesystem and wiping the partition, mind you.
On the storage partition I create folders Documents, Photos, Video, Music.

When I have installed a new system, I will delete the regular folders in /home – ~/Documents et cetera. This seems intimidating, but they will be replaced, because – I then create a symlink to the folders on the storage partition with a simple
ln -s /mnt/storage/Documents

After this, I have the folders I need, but without recycling a home partition. If your installation is suddenly broken for some reason, you will still have all your user files intact on a separate partition ready for a reinstall as necessary.
When mounting the folders like this, you will have all the default folders set up. The music player will now look in ~/Music which is in fact /mnt/storage/Music, the office applications will look in Documents – all according to the FreeDesktop standards.
I will usually have to define the owner of the folder in the system, but that is straightforward rights management.

Delta Chat – a refreshing take on messaging

(This was first posted on the discontinued blog at mjjzf.eu)

Looking at the screenshots, Delta Chat is a messaging app. Yet another messaging app, one might be tempted to say. Whatsapp, Messenger, Skype, Telegram, Signal, Discord and so on.
That would be true, and the regular functions are there: Chat, exchanging photos, audio messages, contacts. But the protocol is different. Delta Chat is in fact a mail client, you see.
It is an elegant… I hesitate to call it solution, but it is definitely an interesting suggestion.
Taking turns attacking centralised structure, the untrustworthy gatekeepers, the complexity of federated setups, data mining operations, encryption standards criticised by a disparate guerilla army of technologists with arguments impossible to assess by 99,999% – the messaging wars leave you tired and puzzled.
So the novel suggestion:

  • Use an established protocol
  • The app does not have to reinvent the wheel. Transferring files? They are just attachments. Attachments work.
  • Trust the people you already entrust with your email with your chats, or someone else; it is, after all, not like you can not track down an email provider
  • Send a message to someone not using the app, they simply receive an email. If you have turned on the encryption options, there are email apps supporting the same Autocrypt protocol. It will fall back to regular email Transport Encryption (TLS).

Screenshot of Delta Chat on Android
So here is the thing in action:

  1. Posted a link – that became clickable
  2. Inserted an image file from media picker – that inserted an image; there is also an option to grab from camera.
  3. Audio files uploaded render as a small player – unfortunately not the file name.
    This file was recorded with the recorder button at the bottom, so essentially a voicemail.
  4. This was an upload of the Moonshine Sonata stored on the phone. Took some time to transfer.
  5. Last but least, a non-standard experiment: An epub file I had on the phone from Gutenberg.org. It is just email; this is just an attachment.

Of course you then get the restrictions imposed by email. There may be a maximum attachment size; some mail services may flag this kind of email or the message frequency; and it still works as a mail drop, so no live video chat: You record it and send it.

It is well executed. The application is modern and efficient, works well in Android, which is available from the Play Store and F-Droid. There is a beta-stage desktop client being developed for Linux and MacOS as well as a mobile app for IOS. I got it working with the provided Flatpak under Fedora 30:
Desktop client screenshot

Zettlr – Getting closer to Markdown

(This was first posted on the discontinued blog at mjjzf.eu)

So, I have been talking about Markdown.
Actually, it is starting to feel like I only hit this blog to whine about markup languages.
Anyway: I have been playing with Zettlr, and it is… really getting there.

Zettlr is developed by the initiative of Henrik Erz, a researcher who wanted a reliable tool for project notes and journal writing. It seems there is quite an ecosystem around it (enough to make me wonder why I have not heard of it before, at least) – and it looks like there is quite a lot of effort going into translation, too.
One can see the academic style of it – on the one hand, it seems somewhat Spartan, on the other hand room has been made for a footnote function… so, priorities.
Good to see that the app has quite a few export options! It is impressive, this should cover the needs of almost everyone:

It uses LaTeX (xelatex) to render the PDF files. When you see that it will export to Org-Mode, you know that it is intended for people who are serious about their notetaking habits.
I am a long way from getting into the advanced features, but this is a tool you can use from day 1 and then expand on your methods. I really like the design, and I really like the approach. Note, for instance that when I have written a Markdown link like [ linkname ] (link), Zettlr automatically pulls it together to show a hyperlink; if I click on it, it opens up the markup. Perfect. The same happens if you insert an image.
Interestingly, the author recommends using a cloud synchronising folder to write with, and that is definitely a good idea – and a good reason to use folders with plaintext and attachments stored in the same folder.
One should perhaps expect it, but the Zettlr documentation is well-structured, excellent and gets around a bit.
It gives you tips to using Zettlr for larger projects, recommended settings for using it for notetaking or writing as well as for using the Zettelkasten method. You will also find an interesting citation management tool for hooking up with, say, a Zotero reference database. Finally, the application has an in-built Pomodoro timer for staying productive and on track.

Now, I am a public-sector bureaucrat – so I am not the obvious use case; but if I ever go back to university or will be doing course work, this is definitely a recommendation.

At bokse med en fetish

Kender du dem, der beslutter sig for at løbe, men ikke kommer på gaderne før de har brugt 8.000 kroner på sko, tøj, løbeur og de der små flasker, man kan sætte på ryggen?

Sådan har jeg det med værktøj til at skrive med. Da jeg var yngre var kuglepenne, fyldepenne og papir – Cross? Parker? KaWeCo? Rent papir, linieret papir, store eller små notesbøger? Nu er det programmer og systemer.

Jeg har tidligere nævnt Gitbook, som er smart til udgivelse. Men måske ikke til skriveproces? Jeg elsker Focuswriter til skrivning. Men den gemmer på computeren. Er en online-løsning alligevel bedre? Nextcloud har jeg i forvejen installeret på en server. Nextcloud har et program til at skrive i Markdown, så der er basal formattering – men man kan også bruge meget energi på at få Markdown til at spille. Og i virkeligheden er det hele jo tekst! Så jeg kunne også vælge bare at knalde det hele ind i WordPress ligesom denne tekst. Så kunne det hele lægges ind lidt efter lidt uden at publicere teksten, og så kunne man komme ud med det hele til sidst.

I forlængelse af det: Man kan jo godt have en svaghed for en mobil løsning. Det kan jeg for eksempel med WordPress på Android. Så kan man tage det på computeren, når man har den ved hånden, og på telefonen, når man er hjemmefra. Nextcloud har også en note-app, som har en ledsagende Android Notes-app. Endelig er der et nyere værktøj, som ikke er uinteressant: Joplin. Et note-program, som kan gemme noterne i Dropbox, Onedrive og lignende – også Joplin har en Android-app.

Alt det her… er komplet ligegyldigt. Jeg kunne skrive på en papirspose fra Lagkagehuset, hvis det var det. De redskaber, jeg har nævnt, er glimrende. Men hvis man lader dem afgøre, hvornår man tager hul på opgaven, så er det bare undskyldninger.

Grublerier fra scriptoriet

Jeg har skrevet historier, siden jeg var barn. Min far har et billede, hvor jeg skriver på hans skrivemaskine, hvor jeg er – måske 12 år? Jeg skrev korte eventyr- og fantasihistorier. Det husker jeg som ret fantastisk.

Kender du den type, som var dygtige til at tegne i skolen, og når de så bliver voksne og bliver telefonsælgere, kirkeministre, kostvejledere eller hvor det nu ender, så går de alligevel rundt med en følelse af, at de kunne være blevet kunstnere, hvis de bare havde fokuseret lidt mere, blevet opdaget af én, der kunne hjælpe talentet på vej, havde satset lidt mindre på fodbold eller hvad det nu end var, der manglede. På den måde kan man gå rundt med en mere eller mindre abstrakt idé om talent.

Da jeg skrev historier som barn var de historier små. Sådan nogle, som man kan have i hovedet, mere eller mindre hele fortællingen fra start til slut. Nu undrer jeg mig til gengæld over, hvad det er, forfattere kan. Det virker åbenlyst, men jeg har faktisk svært ved at knække koden.

Jeg har mødt flere, der har skrevet bøger, og som man ikke ville vente det af. Folk som hverken virker specielt intelligente eller strukturerede, men som det alligevel er lykkedes at strikke flere hundrede sider sammen i et mere eller mindre sammenhængende slutprodukt.

Men når jeg tænker over idéer, der kunne blive historier, så kan jeg mærke, hvor hurtigt jeg kommer til kort. Dette her kunne blive en fantastisk fortælling! Men så skulle jeg skrive dialog, som virker ægte. Og indtil videre har jeg aldrig skrevet dialog, der virker mere overbevisende end en synkroniseret tysk slikreklame. Så er der også folk, der bruger mange ressourcer på at beskrive personerne og deres reaktioner som forberedelse. Det har jeg lidt svært ved at forholde mig til…

Men jeg har tænkt meget i den seneste tid på at skrive noget mere. Og måske er det ligeså meget spørgsmålet om at slå et lidt større brød op! Men en roman er meget omfattende. Jeg kan ikke rigtigt se mig selv skrive noveller.

Nå ja, det er indledende tanker – og der er et behov for at komme ind i rutinen.

Eksperimenter med Delta Chat

Jeg har på det sidste haft fat i Delta Chat.

Kender I det med, at man bruger en platform, som man synes er genial, men som man er den eneste, der bruger? Yep.

Programmet er overraskende nok en chat-app. Men den har et særligt twist. Vi har jo på det sidste hørt en del til den måde store virksomheder forholder sig til éns personlige oplysninger. Men kender vi en måde, man kan kommunikere på, hvor man ikke har givet det hele væk? Delta finder svaret – et uventet sted. Det der med at folk er begyndt at bruge chat, fordi email virker tungt? Den tager vi lige og vender på hovedet.

For Delta sender emails. Wow, Morten har opdaget emailklienten. Weil… It is and it ain’t.

For den ligner mest af alt Telegram eller WhatsApp. Det er bare email, der er kommunikationsprotokollen! Lad os kigge på den:

Så altså, rimeligt genkendeligt.

Lad os kigge på indstillingerne:

Herunder de enkelte sektioner:

Men man får nogle ting foræret ved at det kører gennem email. For der er ikke en masse bøvl med filformater, for det er en protokol beregnet til at man kan klistre enhver fil fast til den. Når Delta genkender et billede, så vises det. Genkender den ikke en vedhæftning, linkes der bare til den.

Som det ses i denne video, så indsætter jeg en EPUB, nogle billeder og en PDF. Det fungerer glat:

Sidst, men ikke mindst: Hvis man ikke har Delta, er man ikke helt låst ude – for den afleverer jo bare en email:

Som jeg læser deres hjemmeside, så er Delta endnu ikke til rådighed på Google Play Store, men den kan findes på F-droid, som er en alternativ app store, den kan installeres på iOS – og der er desktop-klienter under udvikling.

Tilføjelse 22. april 2022: Man kan nu finde Delta Chat på Play Store.

Plain text, pain text

(This was first posted on the discontinued blog at mjjzf.eu)

It is fair to say there is a good number of things in this world that I am ambivalent about.
But there is one thing has a special place in my heart gut: Working in plaintext.

I played with LaTeX, much like everyone else – on Slackware, my old companion for a long time, it is even included as part of the standard installation. I have also experimented with AsciiDoc, and I am writing this using Markdown.
I obviously love the essential principle: Working from some basic templates, I write with a bit ot markup and press the make it so-button to have the system generate something pretty. Excellent. Also, because you can turn it into whatever. I was quite fascinated with Publican, a tool to create documentation used by the Red Hat tribe, which I was introduced to by Klaatu on Hacker Public Radio episode 0866. You write your document and tell the system “I want this in docbook, PDF and ePub, please” – and just wait. Awesome. David Collins-Rivera (Lostnbronx) tells about using txt2tags to generate various document types.
And of course, there is the great Org Mode, which some people use to keep their lives together in organised text format; and you will find a lot of people who found salvation in Todo.txt (see examples at a recent HowToGeek article on todo.txt).
In more recent times, I have been going through a lot of these tools and thoughts again, inspired by Scott Nesbitt’s Plain Text Project.

It is, however, usually a pain in the assets. So shoot me.
To be fairly, this is partly because I am Danish and Unicode is still a challenge. Most of the GUI apps can handle that, but when you get into plaintext territory, a lot of software basically expects you to be in the US. Which also becomes clear when you look at the keyboard shortcuts in some apps. But when you are writing, it usually means you need to escape characters or be quite specific about what kind of character set I just might be talking about.
But the idea that this is all plain text files… well, let us look at that. I mentioned the Todo.txt article before. Let’s just see:

Plain text, right? Well.
When I was starting to use LaTeX, it was obviously for the 1337 geek factor of it, because you do, I was 800 years younger and difficult was not an obstacle. But I am becoming increasingly less fascinated with the thought of doing this stuff by hand – writing a letter should take less than a day, I have come to feel – and more attracted to seeing these formats as exchange formats. For instance, I like using LyX to write documents. It has the advantages of writing LaTeX while still presenting something I can work with. It still has heavy forced templating. I also like to use JabRef for bibliography files, and it exports BibTeX. And as for just banging out text, I love using Focuswriter, which at least puts out OpenDocument, even if it would be the most obvious tool for making Markdown!
I like to use Nextcloud Notes for shorter notes, but the Markdown tool is actually quite good – and the Nextcloud Notes Android app is better, because it illustrates my point: It lets me write in Markdown, but toggle between showing the Markdown and the actual text with rendered markup. That is all we wanted in the first place, right?

Obviously, literally minutes afterafter I wrote this, I looked around for some other articles and found my opinions better expressed in Adam Hyde: What’s wrong with Markdown.

Gnome 3 pre-flight check

(This was first posted on the discontinued blog at mjjzf.eu)

I love Gnome 3. It is one of those cases where I do because I do. It has something. The animations are fluid, the overview is great, and pulling up a new app is just – nice, that is all I can say.
It was not always like that. I was using Xfce and Gnome 2 when Gnome 3 came out, and back then… well, it was a fairly painful experience. Crashes and weird stuff.
In recent years, I have developed a great fondness for Fedora – of course you can stick any desktop on there, but Gnome 3 suddenly started growing on me, and now it is my go-to desktop choice. My x220i runs it flawlessly, even if one might expect it to be underpowered.
But there is one thing. I have a hard time with the default theme. I do not mind that there is a permanent top bar or that it only shows the currently focused app, because the overview is so easily accessible. I rather enjoy the focus. But the grey window decorations and the icon theme – well, they are not for me.
So I have also grown a fondness for the Arc theme – specifically, the Arc-Darker version. Not exactly the only person in the world to discover it – it seems to be quite popular – but it seems to me to be a perfect fit for a slick dark desktop on a slick dark machine.
So the process is this:

  1. Install the Arc theme. Until recently, it needed to be installed separately, but it is now available on the Fedora repos. The Arc Github page features instructions on how to install it on other distributions as well.
  2. That gives me nice colors. But the icon theme does not really match. Now, in my opinion, the best icon theme comes from the beautiful Elementary distribution. Fortunately, the Elementary icon theme has been made available in other distributions. So I pull in the icons.
  3. To administrate it easily, I also pull in Gnome Tweak and use it to set up the icon and Gnome themes.
  4. Of course, I grab a photo from my own collection for a desktop wallpaper.
  5. Some things still look off. I am a big Firefox user, and after the tweaks mentioned above, it has a certain good-not-great look. But the developer also made an Arc Firefox theme, which he has made available as a Firefox theme extension. I install it, and Firefox is almost great. Still, there is one more little thing. There is still a double top bar – Gnome at the very top and the Firefox top bar below it. it makes for a pretty thick bar on the top. It turns out – which I just discovered and which made me write this down – that it is actually since version 60 possible to remove the bar. It is simply to press Menu > Customize and remove the checkmark for Titlebar in the bottom left. Now, the top title bar is gone, and I get maximal use of the screen.
  6. Finally: I have a weakness for Claws Mail. This program will handle my just over 40,000 emails without any problems. It is, however, also another program which is not particularly visually appealing until you do some tweaks. I should probably write more about that later, but it should suffice for now to say that I change the message lists and body fonts to Sans Condensed and the icon theme – which Claws does not inherit from the Desktop Environment – to be Elementary as well. It is available for download from the Claws web site.Eventually, what I end up with is this view:
    Screenshot: Gnome 3 on Fedora 29

On the go – en verden i en lomme

Der er en tanke, der stadig oftere melder sig for øjeblikket.

Bekymring er oppe i tiden. Jeg har netop brugt en del tid på at få styr på, hvad GDPR kommer til at betyde for det arbejde, jeg har, og det har fået os til at tale en masse om overvågning og lemfældig omgang med folks personlige oplysninger i forhold til svindlere, virsomheder, der gerne vil profilere mere end hvad rart er – og så videre.
Ingen tør at tage en professionel risiko i det nuværende klima, fordi alle er angst for at miste deres job, selv om selv ministeren er presset til at indrømme, at det muligvis går okay.
Terror, klima og så videre. De skyder i gaderne.

Det er med andre ord suspekt og kritisabelt at være optimist. Bare sådan, i det hele taget. Jeg lover at afgrænse det, så det ikke tager overhånd.

For jeg er faktisk teknologisk optimist. Altså, jeg har jo altid været glad for, hvad man kan. Og det virker måske enormt gammelmandsagtigt med denne her form for optimisme.
Men jeg er fascineret af, at jeg kan tage min computer op af lommen og gøre vilde ting.
Det er selvfølgelig min telefon, jeg taler om, men den bærer ikke megen lighed med denne her stik-i-væg-tingest, vi havde i mit barndomshjem.

For et stykke tid siden var jeg i Frederiksberg Have. Jeg tog en masse billeder med telefonen. Det er jo nu et kamera. Vor familie har et godt kamera, men der kom bare et tidspunkt, hvor telefonerne var så god kvalitet og nemt ved hånden, at det virkede fjollet at tage det store kamera med – som jeg altid var øm om og måtte beskytte mod stød fra det ene og det andet.
Men jeg tog altså en masse billeder, som jeg ville dele.
Så jeg loggede ind på min konto hos Gigahost, oprettede et subdomæne under ufora.dk, uploadede Bizou, en fiks lille galleri-software, som genererer et billedgalleri, når man lægger fotos i billedmappen.
Så havde jeg på et øjeblik en hjemmeside med et billedgalleri, som kunne deles. Det hele foregik med Solid Explorer på min OnePlus 3T. Jeg har siden samlet ældre, ret spredte billeder og lagt i det galleri. Det er en nem måde at arbejde på.

På samme måde hjalp jeg en bekendt med at oprette en WordPress-blog. De, der har gjort det, vil medgive, at det ikke er voldsomt indviklet, men at man lige kan gøre det fra telefonen, når man sidder i det fri – det er alligevel fascinerende.

For et stykke tid siden sad jeg og spiste frokost på en lokal café. Jeg var i gang med at læse en bog på min Kindle app, da jeg checkede min Mastodon-konto og så, at Klaatu fra Gnu World Order anbefalede Dokuwiki til når man hurtigt skal knalde noget dokumentation sammen på et projekt.
Det er snart nogle år siden, jeg har haft fat i Dokuwiki (og hadede designet), så igen: Jeg oprettede et subdomæne og uploadede Dokuwiki og har siden leget lidt med det (efter at have skiftet temaet, som stadig er… uinspirerende).

At de her ting kan lade sig gøre – det er bare fedt. Og fascinerende. Og det giver altså nogle muligheder. Jeg vil ikke underkende forskellen mellem at arbejde professionelt med ting og så på hobbyplan, men der er altså nogle muligheder. Denne her side kører WordPress. Det gør det Hvide Hus, The Walt Disney Company og Time Magazine også. Det gør ting mulige. Jeg har filer på Nextcloud. Her har jeg forskellige filer til deling og kunne også bruge det til kalender og opgavestyring, hvis jeg ikke allerede havde opsat en løsning.

Du vil måske indvende, at man kunne lave hjemmesider og gøre en masse andre ting med Google-tjenester, gratis blogs og så videre.
Men det hele bor hos mig! Okay: Jeg ejer ikke et professionelt datacenter (selv om det kunne være fedt), men har det liggende hos min danske hosting-udbyder – førnævnte Gigahost. Et datacenter underlagt dansk lov, og som har været pålideligt gennem årene, jeg har haft det. Et sted, hvor de er interesserede i mig som kunde, ikke som reklamemodtager eller dataleverandør. Jeg har en række forskellige tjenester liggende på subdomæner under ufora.dk. Jeg har tidligere skrevet om noget af det her.
Skulle man starte en forening, kunne man have den digitale infrastruktur oppe at køre på et par timer – ikke nødvendigvis designet, men samarbejdsværktøjerne ville i hvert fald være der.

Så det handler ikke længere på samme måde om at bygge infrastruktur. Man kan sætte tingene op og køre. Det, som det handler om, er indholdet!