Shaarli – Manage your bookmarks

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

Shaarli is a selfhosted PHP-based bookmark manager.
Shaarli let’s you set link title, tag and annotate links and create media previews. It has browser bookmarklets and mobile apps to access and create new bookmarks.
Links can be set to public or private requiring login.
Links can be shared by tag, so you can share all files tagged with a project.
Links are stored in a file, no database required.
Shaarli is available from https://github.com/shaarli/Shaarli and documentation from https://shaarli.readthedocs.io . There is an Android app available to send URLS to the database.

Duolingo – sproglig infotainment

Jeg er på det seneste begyndt at dyrke Duolingo, en sprog-lærings-app. Mere specifikt dens Android-app, som fungerer rigtigt godt.

Det er et produkt, der kan noget. Den rammer en fantastisk god balance i det, man skal, og i omfanget. Hver øvelse giver et antal XP, og man sætter selv hvor mange points der skal være det daglige mål. Så minder app’en én om, hvis man ikke er i mål. Desuden opererer de med “streaks” – hvor mange dage i træk man når sit mål.

 

Som man kan se er der et vist niveau af gamification i det. Og det plejer at irritere mig – men det er faktisk velfungerende. Man skal have lavet meget lidt for at blive rykket ned – men når man har været i gang i et stykke tid skal man alligevel en del øvelser igennem for at rykke op.

Prisen er hverken lav eller høj. 75 kroner kroner om måneden er ret meget for en app. Hvis jeg blev spurgt hvad jeg sagde til at købe en app for 900 kroner, så ville jeg nok sige tak, men nej tak – men det er jo faktisk hvad man ender med at lægge om året. og det er jeg villig til. Man kan jo også lukke abonnementet med det samme, hvis man ikke ønsker det.

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.

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.

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!

Shaarli – hold fast i dine links

Som det før har været diskuteret på disse sider, så kan jeg godt lide at holde mine services på den server, jeg har plads på. Det er Gigahost, som er min leverandør, men det er blot fordi jeg bliver ved med at være tilfreds.

I dag vil jeg skrive et par ord om Shaarli. Det er en tjeneste til at gemme links.

Hvis man sidder med én fast computer, så er det måske ikke for alvor en prioritering. Man køber en computer, den tjener én trofast indtil den dør, og man er bruger nr. 1 uden behov for bruger nr. 2.

I det her hus er der flere computere end mennesker. Jeg skriver på min Thinkpad x200, en fin brugt maskine jeg købte for et par måneder siden. Min søn fik min Lenovo Ideapad, fordi den har en kraftigere processor og mere RAM – men den har ikke så kraftig en Wifi-antenne, og det kan jeg ikke bruge til noget. En gang imellem bruger jeg den. Jeg har også min arbejds-laptop med Windows 10. Min søn har også den gamle HP, som overopheder, og min kones Lenovo-netbook-like laptop (stor skærm, lille disk, ret lille processor og meget lille RAM) er kommet over til min datter som Youtube-fjernsyn. Dette siger jeg for at understrege, at man ikke altid kan vente at sidde på den maskine, som man ellers bruger. Den del er ændret.

Shaarli er en tjeneste til at installere på sin server.
Den gemmer på de links, du sender til den.
For at tage nøgleordene:

  • Lidet ressourcekrævende tjeneste, der kan køre på en webserver
  • Kræver ikke administratoradgang, men lader sig installere i den mappe, du peger på
  • Kræver ikke en database
  • Alt kan eksporteres til forskellige filformater
  • Skelner mellem private og offentlige links – er der noget, som ikke egner sig for alles øjne, kan du gemme det som private links; men derudover kan din linksamling stå offentligt tilgængelig
  • Alle gemte links kan tagges, så hvis du har et projekt om podcasts, hvor der samles links, så er det muligt at linke til de gemte links, der er tagget Podcasts – og dele et link, som samler de taggede links med andre. I mit tilfælde links.ufora.dk/?searchtags=Podcast.
  • Der er plads til en lang kommentar på alle links. Så hvis man arbejder på et projekt, men skal bruge forskellige kilder, så kan man påføre sine forskellige forbehold og bemærkninger i den.
  • Mulighed for at oprette en note: Hvis man går ind i Shaarli, opretter en ny post og ikke lægger en URL ind, så opretter den en ny note i det felt, der ellers giver plads til at kommentere på et link.
  • Permalinks: Hvis du opretter et link, så får du et permalink i Shaarli. Du kan altså også et stykke ad vejen bruge den som link-forkorter. Da jeg gemte linket til Moderniseringsstyrelsens personalehåndbog http://pav.perst.dk/Publikation/Forvaltningsret%20persondataloven%20mv/Forvaltningsloven.aspx blev den i min Shaarli-installation til links.ufora.dk/?oW2ZWQ – og det er altså lidt nemmere.
  • Bookmarklets: Der er to små kodestumper, som du kan tilføje til din bogmærkelinie.
    Den ene giver mulighed for at sende et link til din Shaarli-installation, det andet giver mulighed for at oprette en ny note.
  • Plugins: Der er et Firefox- og et Chrome-plugin, så man kan sende hjemmesider direkte til din Shaarli-installation – og et Android- og et IOS-plugin med samme formål.
    Jeg bruger Android-plugin’et – man installerer det, fortæller det hvor éns Shaarli-installation er; og derefter kan man dele links direkte med Shaarli, så bliver de links gemt. Det er nemt, og det er praktisk, når man støder på ting, når man er on the go.
  • Det er meget nemt at eksportere og importere sin database, så den er dels nem at lave backup af, og dels nem at installere på en ny server, hvis du skifter leverandør.

Shaarli kan downloades fra Github. De har en vejledning på Read The Docs.

Bookmarklets kan findes i opsætningssektionen på din installation af Shaarli.

Android plugin’et kan findes i Play Store.