Linux for Writers: A Distraction-Free Setup
Set up a distraction-free Linux writing environment with Ghostwriter, Logseq for Zettelkasten notes, and automated Git and restic backups.
Before you start
- ▸A working desktop Linux installation with GNOME, KDE, or another Wayland/X11 desktop
- ▸Flatpak installed and Flathub configured (for Logseq and Apostrophe)
- ▸git installed (sudo apt/dnf/pacman -S git)
- ▸A folder to store your writing, e.g. ~/writing
Linux is an underrated platform for writing. No forced updates mid-draft, no subscription word processors, and a rich ecosystem of tools built around plain text and Markdown. This guide walks through setting up a focused, distraction-free writing environment: a solid Markdown editor, a Zettelkasten knowledge base, and automated backups so your work is never at risk.
Choosing Your Markdown Editor
Typora is polished but proprietary and costs money on Linux. The open-source alternatives are genuinely excellent. Ghostwriter is the strongest all-around pick: it is native Qt, actively maintained, ships in most distro repositories, and has a proper focus mode. Apostrophe (formerly UberWriter) is the GNOME-native option with a clean GTK4 interface. Marktext is Electron-based but feature-rich if you want something closer to Typora's inline-preview feel.
Install Ghostwriter
Ghostwriter is in the main repositories for all major distros.
# Debian / Ubuntu
sudo apt install ghostwriter
# Fedora
sudo dnf install ghostwriter
# Arch
sudo pacman -S ghostwriter
Install Apostrophe (GNOME users)
flatpak install flathub org.gnome.gitlab.somas.Apostrophe
Install Marktext
Marktext is not in most distro repos; grab the AppImage from the project's GitHub releases page (github.com/marktext/marktext/releases).
chmod +x marktext-x86_64.AppImage
./marktext-x86_64.AppImage
Configuring a Distraction-Free Environment in Ghostwriter
Ghostwriter's focus mode dims everything outside the current paragraph or sentence, keeping your eyes on the work. Combined with a full-screen session and a neutral theme, it genuinely reduces context-switching.
- Open View → Full Screen (or press
F11) to remove the desktop entirely. - Open View → Focus Mode and choose Sentence, Paragraph, or Typewriter Scrolling depending on how narrowly you want to focus.
- Under Settings → Preferences → Editor, set a comfortable line width (70–80 characters is standard for prose), increase font size to 16–18 pt, and pick a low-contrast theme like Plainstraction or Solarized Light.
- Disable the live word-count HUD if it creates performance anxiety: View → Hide Status Bar.
Ghostwriter autosaves, but it writes to a hidden .ghostwriter backup alongside your file, not to the file itself mid-session. Save explicitly with Ctrl+S when you finish a working block.
System-Level Focus: Reducing Desktop Noise
The editor alone is not enough. Notifications, a cluttered panel, and background apps break flow.
Silence notifications temporarily
# GNOME: toggle Do Not Disturb from the command line
gsettings set org.gnome.desktop.notifications show-banners false
# KDE Plasma: use the Do Not Disturb D-Bus call
qdbus org.kde.plasmashell /org/kde/osdService \
org.kde.osdService.setNotificationsEnabled false
Create a short shell script that toggles DND on and off, then bind it to a keyboard shortcut in your desktop's settings so you can flip it without leaving the editor.
Use a dedicated systemd user service to block distracting sites (optional)
If you find yourself reaching for a browser, cold-turkey-style blocking via /etc/hosts is the most reliable method. Edit /etc/hosts as root and add lines like:
sudo tee -a /etc/hosts <<'EOF'
127.0.0.1 twitter.com www.twitter.com
127.0.0.1 reddit.com www.reddit.com
EOF
Remove them when your session is done. No daemon, no subscription, no bypass button.
Zettelkasten Knowledge Base with Logseq
A Zettelkasten is a networked note system where each atomic idea lives in its own note, linked to related notes. Logseq implements this with plain Markdown files stored locally — your notes are never locked in a proprietary database.
Install Logseq
Logseq ships as an AppImage and as a Flatpak.
flatpak install flathub com.logseq.Logseq
Or download the AppImage from github.com/logseq/logseq/releases and make it executable as shown above for Marktext.
Set up your graph (vault)
- On first launch, click Add a Graph and point Logseq at a folder in your home directory, e.g.
~/notes/zettelkasten. - Logseq creates a
pages/andjournals/directory. Daily journal entries are great for fleeting notes; promote ideas to named pages inpages/when they deserve permanence. - Link notes with double brackets:
[[Character Development]]creates a backlink automatically. - Tag notes with properties at the top of the file:
tags:: research, chapter-3.
Because everything is plain Markdown on disk, you can open any note in Ghostwriter or any text editor. Logseq is a viewer and editor layer, not a data silo.
Automated Backups
Two layers of backup protect against different failure modes: local versioning handles accidental deletion; off-site backup handles hardware failure.
Local versioning with Git
Git is the simplest version control for text. Initialize it inside your writing folder:
cd ~/writing
git init
git add .
git commit -m "Initial commit"
Automate a daily commit with a systemd user timer (preferred over cron on modern systems).
mkdir -p ~/.config/systemd/user
cat > ~/.config/systemd/user/writing-backup.service <<'EOF'
[Unit]
Description=Commit writing changes to git
[Service]
Type=oneshot
WorkingDirectory=%h/writing
ExecStart=/usr/bin/git add -A
ExecStart=/usr/bin/git commit -m "Auto-commit %T" --allow-empty-message
EOF
cat > ~/.config/systemd/user/writing-backup.timer <<'EOF'
[Unit]
Description=Run writing-backup daily
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target
EOF
systemctl --user daemon-reload
systemctl --user enable --now writing-backup.timer
Off-site backup with restic
restic is a modern, encrypted backup tool that works with local paths, SFTP servers, Backblaze B2, S3-compatible storage, and more.
# Debian / Ubuntu
sudo apt install restic
# Fedora
sudo dnf install restic
# Arch
sudo pacman -S restic
# Initialise a local repository (substitute a remote path or B2 bucket as needed)
restic init --repo ~/backups/writing-repo
# Back up your writing folder
restic -r ~/backups/writing-repo backup ~/writing ~/notes
Add a second systemd user service and timer following the same pattern above, calling restic backup with your repository path and password in an environment file (~/.config/restic/env, mode 600). Never hardcode passwords in unit files.
Verification
After setup, check each component is working:
- Editor: Open a test file in Ghostwriter, toggle focus mode, confirm autosave creates a
.ghostwriterfile alongside your document. - Git timer: Run
systemctl --user status writing-backup.timerand confirm it shows active (waiting) with a next trigger time. - restic: Run
restic -r ~/backups/writing-repo snapshotsto list existing snapshots and confirm your latest backup appears.
Troubleshooting
Ghostwriter won't launch on Wayland
Ghostwriter is a Qt app and runs on Wayland natively on most distros as of version 2.1+. If you see rendering issues, launch it with the XWayland backend as a workaround:
QT_QPA_PLATFORM=xcb ghostwriter
Logseq Flatpak can't see my home folder
Flatpak sandboxes filesystem access. Grant access explicitly:
flatpak override --user --filesystem=home com.logseq.Logseq
systemd user timer doesn't run
User timers require a user session to be active. If you log in via SSH or a headless session, enable lingering so user services start at boot:
loginctl enable-linger $USER
Git commit fails because author is not configured
git config --global user.name "Your Name"
git config --global user.email "[email protected]"Frequently asked questions
- Is Ghostwriter good enough to replace Typora on Linux?
- For most writers, yes. Ghostwriter has a full-screen focus mode, live Markdown preview, multiple themes, and a session statistics panel. It lacks Typora's seamless inline-editing feel, but it is free, open-source, and actively maintained.
- Will Logseq work if I'm offline?
- Yes. The Flatpak and AppImage versions are fully local. Your notes are plain Markdown files on disk; no account or internet connection is required.
- Can I sync my notes across machines without using Logseq's paid sync service?
- Absolutely. Because the graph is a plain folder of Markdown files, you can sync it with any tool you trust: Syncthing (peer-to-peer, no cloud), a private Git remote, or rclone to an S3-compatible bucket.
- How do I recover a deleted paragraph I lost two days ago?
- If you have the Git timer running, use git log to find the commit from that day, then git show <commit>:<filename> to view the old version, or git checkout <commit> -- <filename> to restore it.
- My writing folder is large because of images. Will restic slow down?
- restic deduplicates data at the chunk level, so after the first full backup, subsequent runs only transfer changed blocks. Backups will be fast after the initial run even with many image files.
Related guides
Linux Clipboards Explained (+ Clipboard Managers)
Learn the difference between Linux's PRIMARY and CLIPBOARD selections, use xclip, xsel, and wl-clipboard from the terminal, and manage history with GPaste or Klipper.
Configure LibreOffice for Daily Use
Configure LibreOffice for daily use: set default save formats for MS Office interop, tune autosave, install fonts, and add productivity extensions.
Configure the Touchpad and Multitouch Gestures
Configure Linux touchpad behavior and multitouch gestures using libinput, libinput-gestures, and native GNOME and KDE Plasma settings on both Wayland and X11.
Wayland vs X11: How to Choose and Configure Each
Know when to run Wayland or X11, how to check your current session, switch at login with GDM/SDDM/LightDM, and handle NVIDIA and XWayland edge cases.