Running Obsidian from flatpak comes with its own set of problems. One of them is that Obsidian is ran in sandbox environment - which makes sense when we consider security, but to be frank - it’s annoying when I have to do something non-standard.
I wanted to run this command from obsidian (it updates my git repo):
npx quartz sync --no-pull
but after adding it to there:
I was welcomed with an error that it couldn’t find npx
command, which makes sense - I’m using NVM to manage node.
Tip
To make it work I had to make sure that
npx
was added to Obsidians$PATH
variable and obsidian has permissions to this directory.
I used Flatseal to:
- Give Obsidian permissions to
/home/$USER
directory - that’s wherebin/
of NVM resides - Add NVM to
$PATH
:
I also had to update the script to execute from the git root:
cd "$(git rev-parse --show-toplevel)" && npx quartz sync --no-pull
Now running Ctrl + P
and typing Update page
updates the page directly from obsidian.
Top comments (0)