Closed josecastillolema closed 5 months ago
markdown.marp.chromePath
does not allow the shell command. You must specify the actual path for the Flatpak Chrome binary.
{
"markdown.marp.chromePath": "/var/lib/flatpak/exports/bin/com.google.Chrome"
}
Hi @yhatt , thanks for your quick response! Unfortunately that won't work, /var/lib/flatpak is not accessible from inside flatpaks (neither is $HOME/.local/share/flatpak/exports/bin):
> ls /var/lib/flatpak/exports/bin/com.google.Chrome
/var/lib/flatpak/exports/bin/com.google.Chrome
> ls .local/share/flatpak/exports/bin/com.google.Chrome
.local/share/flatpak/exports/bin/com.google.Chrome
> flatpak run --command=sh com.visualstudio.code
[📦 com.visualstudio.code ~]$ ls /var/lib/flatpak/exports/bin/com.google.Chrome
ls: cannot access '/var/lib/flatpak/exports/bin/com.google.Chrome': No such file or directory
[📦 com.visualstudio.code ~]$ ls .local/share/flatpak/exports/bin/com.google.Chrome
ls: cannot access '.local/share/flatpak/exports/bin/com.google.Chrome': No such file or directory
The proposed workaround would work if VSCode was not a Flatpak and Chrome was, but wont work when both of them are.
This is by design, see Allow a flatpak to discover/call another flatpak #283
Thank you for more context to recognize the problem. By the design of flatpak as you've described, using flatpak Chrome from flatpak VS Code to export Marp slides would be difficult for now.
It looks like able to spawn Chrome process, by making the wrapper shell script like below and setting its path to markdown.marp.chromePath
. But even if it succeed, the result of export PDF will save to inside of the Chrome flatpak sandbox, so VS Code cannot read that across sandboxes.
If there were the SDK Extension of freedesktop.org for Chrome/Chromium, this problem may be solved because the browser will be available in inside of the VS Code flatpak sandbox. This is already feedbacked to the Flathub community through Obsidian Marp Slides plugin, but there is no progress.
The wrapper works! And the result of the export PDF is not saved inside the Chrome flatpak, but in any directory inside the home folder selected by the user.
Thanks
Is there a way to export slides in the Flatpak version of VSCode?
I am able to run i.e.: Chrome from the Flatpak vscode version:
However unfortunately the following setting does not seem to work: