jitsi / jitsi-meet-electron

Jitsi Meet desktop application powered by :electron:
Apache License 2.0
1.5k stars 466 forks source link

jitsi-meet-electron 2022.3.1 how to set serverURL in users configuration file? #740

Open tuxcrafter opened 2 years ago

tuxcrafter commented 2 years ago

Hello everybody,

I used to be able to configure the serverURL and name in the /home/$USER/.config/Jitsi Meet/config.json file before starting Jitsi meet for the first time and have it go to our own server. I can not figure out how to do this with jitsi-meet-electron 2022.3.1

Can somebody help me and tell me how to set these options in a configuration file?

I can only find tickets from 2018 where people where grateful for adding the serverURL option...

Thank you in advance.

csett86 commented 2 years ago

Unfortunately we had to migrate away from electron-storage (which was the config backend reading from config.json) to the electron native localStorage in #638 and then remove electron-storage completely in #668. I can assure you that I did not take that decision lightly (and tried a lot to get electron-storage working under newer electron versions, but failed), as it also meant breaking users settings if they did not update within 2.5 months.

Chromiums (and thus Electron) localStorage is backed by a LevelDB, but a quick search did not result in tooling available to interact with it outside of the browser.

So for now I don't see a possibility to feed the serverURL during install, unfortunately.

tuxcrafter commented 2 years ago

Thank you for answering! That is said news!! What was the latest version with electron-storage backend? Would it be possible somehow to ship a LevelDB file with a preset serverURL and maybe a name in the users profile? /etc/skel type of thing as well.

saghul commented 2 years ago

One way to do it might be to detect a config file in the user data dir and if found override the default config with it. This would only work for the first launch, since I think silently changing settings in between launches can lead to dangerous situations otherwise.

If you are up for it a PR would be welcome, we can iron out the details there.

tuxcrafter commented 2 years ago

That would be great, we still have the config.json, if that could be imported and used to configure the LevelDB that would be great.

# cat /home/$USER/.config/Jitsi\ Meet/config.json 
{
    "persist:root": "{\"onboarding\":\"{\\\"onboardingShown\\\":[\\\"onboarding-modal\\\",\\\"conference-url\\\",\\\"settings-drawer-button\\\",\\\"name-setting\\\",\\\"email-setting\\\",\\\"start-muted-toggles\\\",\\\"server-setting\\\",\\\"server-timeout\\\",\\\"always-on-top-window\\\"]}\",\"recentList\":\"{\\\"recentList\\\":[]}\",\"settings\":\"{\\\"alwaysOnTopWindowEnabled\\\":true,\\\"email\\\":\\\"\\\",\\\"name\\\":\\\"John Doe\\\",\\\"serverURL\\\":\\\"https://jitsi.example.com/\\\",\\\"startWithAudioMuted\\\":false,\\\"startWithVideoMuted\\\":false}\",\"_persist\":\"{\\\"version\\\":-1,\\\"rehydrated\\\":true}\"}"
}
saghul commented 2 years ago

That (used to) persist the entire state, including window position and the like. I was thinking about something which would override what is currently on config.js.

tuxcrafter commented 2 years ago

Any updates on this? How to configure the serverURL for our users?

saghul commented 2 years ago

Nobody is working on this. I do not have plans to do so. a PR would be welcome.