Installing Obsidian on Arch Linux

What I’m trying to do

I am trying to install Obsidian on my new Arch Linux distribution. Whether I do this using pacman (sudo pacman -S obsidian) or with the official app-image, I get the same result when trying to run obsidian.

2024-05-05 23:42:17 Loading main app package /tmp/.mount_ObsidiLjfSMf/resources/obsidian.asar
[46184:0506/] Missing X server or $DISPLAY
[46184:0506/] The platform failed to initialize.  Exiting.
[1]    46184 segmentation fault (core dumped)  ./Obsidian-1.5.12.AppImage

Things I have tried

I am using Wayland, and ChatGPT said that I should then add export DISPLAY=wayland-0 to my~/.bashrc file (which I added to my ~/.zshrc file as well). I did that, and nothing changed, but it very well may be wrong. Prior to doing this, the variable was unset.

[46184:0506/] Missing X server or $DISPLAY

From this line I presume that Obsidian is trying to use x11 protocol instead of wayland. Which becomes an issue since you probably don’t have xwayland, which is X server that runs under Wayland and provides compatibility for native X11 applications that are yet to provide Wayland support.

Note that Obsidian does not enable Wayland support by default since there are still some issues that are not yet fixed.

From here you have few options:

  1. Install Xwayland:
sudo pacman -S xorg-xwayland

I wouldn’t recommend this as a fix for this issue but it may solve the same problem for other X11 apps on your system.

  1. Run Obsidian with wayland flags:
OBSIDIAN_USE_WAYLAND=1 obsidian -enable-features=UseOzonePlatform -ozone-platform=wayland 

You can also edit the obsidian.desktop file and add the flags so it runs even when opening the Obsidian through start menu or clicking the icon.

  1. Use flatpak version

I recommend this version since it resolved some blurry graph issues when using hardware acceleration on my machine which is still present to this day on aur version.

You can use Flatseal to enable Wayland support.

Also please note that wayland version still has these 2 issues:

  1. ibus does not work with Obsidian on Flatpak · Issue #317 · flathub/md.obsidian.Obsidian · GitHub

  2. Cannot move/rearrange panes when running under Wayland