twibiral / obsidian-execute-code

Obsidian Plugin to execute code in a note.
MIT License
1.07k stars 67 forks source link

App Images are not Isolated #228

Open Vaisakhkm2625 opened 1 year ago

Vaisakhkm2625 commented 1 year ago

https://github.com/twibiral/obsidian-execute-code#known-problems- written that Snap/flatpak/appimage are isolated hence it is not possible to run binaries installed in the system, so this plugin not work with most languages (except for python i guess)

116 merge request added that to readme because of multiple users raising issues

But I think AppImages for the Obsidian is not isolated, and i don't think normally AppImages are isolated, even though it can be.

In my testing it worked fine

image

left side is the AppImage and right side is the Flatpak (Ignore the error for c code, though help to fix it is appreciated),

If i am not wrong, kindly update the readme to add this info, so linux users who uses distros other than Debian derivatives can use this plugin with AppImages... :)

If you want i can give a pull request.....

Thanks for maintaining this wonderful project

chlohal commented 1 year ago

Sure, a pull request would be welcome!

I think that we should keep a mention of AppImage though -- maybe "We've seen some issues w/ AppImage, but it might work on some machines". sorry! I think that cautioning about a possiblity that doesn't come to pass is better than giving false hope. Then again, I'm not really familiar with AppImage or the rest of the self-contained image formats; later on, we should probably specify, but imo vagueness is ok for now. What do you think?

Vaisakhkm2625 commented 1 year ago

Hi @chlohal

Sorry for the delay in response as i was focusing on my collage exams.. today morning only i saw notification of your reply

I just installed a Ubundu VM and tested all 3 formats Screenshot from 2023-03-26 20-25-36

For appimages, it worked just fine like in fedora

For snap, we have to download snap it from official Obsidian website and follow this https://forum.obsidian.md/t/how-to-install-obsidian-snap-on-ubuntu/2515

sudo snap install --dangerous obsidian_0.7.3_amd64.snap

but it need to add --classic to get it installed, which broke the sandbox, hence plugin started working

For Flatpak only it shown error. i tried to do max file permission to check if it work there, but didn't worked, so i am not sure about it, someone who knows flatpak can try it.

image

i will also try the same in arch(arco), nixos, vanilla debian and update

Vaisakhkm2625 commented 1 year ago

"We've seen some issues w/ AppImage, but it might work on some machines".

yes better to write like that