Hacker News new | ask | show | jobs
by Grisu_FTP 78 days ago
Wouldnt it be possible to extract the files you need and sort of "repackage" it for linux?

I have no idea how electron apps look "internally" but it doesnt sound too bad.

Sort of like you can unzip .deb files and use them somewhere else, if what i heard was correct (never tried it myself)

2 comments

If the Electron app is pure JS with no native extensions it can be doable. However, many Electron apps contain platform-specific js code, since features for stuff like Dock on Mac and Taskbar icons on Windows differ. Electron apps like Notion also contain native extensions - compiled C/C++/Objective-C code that are platform specific. For example in Notion, we use sqlite via better-sqlite3 (potentially replaceable since it’s open source, but will need more work than “just” repackaging js), but we also write our own native support libraries to use OS-specific APIs for microphone recording in meeting notes feature.
Thank you for the thorough reply :)

I really like the comments on HN, they are very often really interesting and you actually often learn something new that actually matters.

I have seen many people porting such apps, like there is aur package for notion, figma
It's cool that arch users give porting Notion a valiant effort. But as I predicted, custom native extensions will be [a problem](https://aur.archlinux.org/packages/notion-app-electron#comme...):

> Could it be possible to make the relatively new AI meeting notes feature to work?

> Right now I get the following error when I click the "start transcribing" button:

    Error occurred in handler for 'notion:get-media-access-status': TypeError: s.systemPreferences.getMediaAccessStatus is not a function
        at /usr/lib/notion-app/app.asar/.webpack/main/index.js:2:631015
        at WebContents.<anonymous> (node:electron/js2c/browser_init:2:87444)
        at WebContents.emit (node:events:524:28)
Not my area of expertise so I could be wrong but Electron apps just use Chromium underneath (which already works on linux), so in theory it should be easier to get them running on linux than a native Windows app