Just sharing a solution to a problem I had for future reference.
Problem
- Core issue: Unable to launch
obsidian(CLI) without having the electron app running - Unable to launch electron app remotely by redirecting output. Redirecting output resulted in “segmentation fault core dump” error
Solution:
Use xvfb (X Virtual FrameBuffer) to create a fake, invisible monitor in RAM so Electron can launch without fighting Wayland. After installing xvfb with apt install xvfb run with:
nohup xvfb-run -a /opt/Obsidian/obsidian > /dev/null 2>&1 &
If you have problems also try adding the flags to disable gpu and sandbox: nohup xvfb-run -a /opt/Obsidian/obsidian --disable-gpu --no-sandbox > /dev/null 2>&1 &
The nohup, and ending in & just means that the process will continue in the background even when you quit. Omit these to test. Also, the dev null redirection (> /dev/null 2>&1) is just cosmetic.
(Developed with Gemini Pro)
Problem
I was getting about the same error as Obsidian crash - "Segmentation fault (core dump)"
Tried the following:
DISPLAY=:0 /opt/Obsidian/obsidian &XAUTHORITY=~/.Xauthority DISPLAY=:0 nohup /opt/Obsidian/obsidian --disable-gpu > /dev/null 2>&1 &- DID NOT TRY: The things listed in the other issue, but I did read it for relevance. I don’t know what the cursor part meant, I think that’s not relevant to me, and I’m not installing some random github repo to maybe solve some small part of something that might not even be my problem.
My setup (the important parts)
I hate this part. I’m sure that it’s insufficient for someone… but here we go for the thousandth time:
- Ubuntu: Normal install, but I also have multiple desktop managers installed and uninstalled that might cause conflict. Specifically I installed Wayland, which installed a million other things.
- Remote ssh access.