flathub / com.vscodium.codium

https://flathub.org/apps/details/com.vscodium.codium
95 stars 20 forks source link

Storing git (and other) credentials still broken ? #282

Closed ghost closed 6 months ago

ghost commented 8 months ago

https://github.com/flathub/com.vscodium.codium/issues/239 https://github.com/flathub/com.visualstudio.code/issues/426 https://github.com/flathub/com.visualstudio.code/issues/417

It has been almost 3-4 months and syncing is still broken on GNOME, atleast enabling access to the kwallet session bus has made it work on KDE again, are there any workaround/fixes currently available ? How are other users dealing with the issue on GNOME ?

noonsleeper commented 8 months ago

@larina3315 As user of gnome, I can say that I never rely on a DE (or a browser) to store anything sensible like passwords/credentials, are they already audit by a third party?

ghost commented 8 months ago

@larina3315 As user of gnome, I can say that I never rely on a DE (or a browser) to store anything sensible like passwords/credentials, are they already audit by a third party?

If I understand it correctly, it isn't an issue with GNOME itself, but with libsecret being broken with the VSCodium (and other electron ?) app(s) packaged as flatpak. On KDE people can use Kwallet to have syncing work, but it has been broken on GNOME (and other DEs etc) utilizing libsecret for a very long time.

This has rendered VSCode/VSCodium practically unusable for people who rely on the inbuilt Github integration that VSCode/VSCodium provides, and sync being broken for so long has made the whole ordeal incredibly frustrating, thus the original intention of this issue was to discuss workarounds for the sync issue amongst affected users.

On top of that, there are currently 3 issues, linked in the original post, that are tracking the same issue under different naming that might sound confusing, So I linked all of them at the start to track current discussions.

ghost commented 8 months ago

I have tried to edit the manifest to workaround the sync issue (and have wayland enabled) by appending the following line alongside the other sed lines in the .yaml flatpak manifest

- sed -i '/Exec=codium/s/$/ --password-store=basic --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WaylandWindowDecorations/' usr/share/applications/codium.desktop

So that

Exec=codium --unity-launch %F

became

Exec=codium --unity-launch %F --password-store=basic --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WaylandWindowDecorations

however, when i manually build/install the flatpak and try to run it via flatpak run com.vscodium.codium-l3115 (I changed the appid temporarily) it doesn't work, but when i spawn a shell inside the app's container (?) using But, if I did flatpak run --command=sh --devel com.vscodium.codium-l3115

and then execute

codium --unity-launch %F --password-store=basic --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WaylandWindowDecorations

It works correctly. This has been extremely confusing for me, as the same args seem to work and NOT work, depending on whether they're appended to the Exec= line or manually launched from inside the flatpak container (?) from a shell

ghost commented 8 months ago

It appears that flatpak basically ignores the Exec= line of the .desktop file, and seems to have it's own .desktop file ?

noonsleeper commented 8 months ago

Hi @larina3315, to add arguments to the CLI directly in the yaml manifest will be better to add them to https://github.com/flathub/com.vscodium.codium/blob/master/com.vscodium.codium.yaml#L133

But maybe edit the .desktop file after install will be more useful also you will keep the updates https://github.com/flathub/com.vscodium.codium/issues/162#issuecomment-1416500150

noonsleeper commented 8 months ago

It appears that flatpak basically ignores the Exec= line of the .desktop file, and seems to have it's own .desktop file ?

The DE launches the app using the exec line from desktop file maybe the problem is that the modifications on your .desktop is not calling flatpak but instead calls to codium?

Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=codium --file-forwarding com.vscodium.codium --unity-launch --password-store=basic --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland @@ %F @@

You need to add only one --enable-features argument and separate the values with , and remember @ on @@ %F @@

ghost commented 8 months ago

Hi @larina3315, to add arguments to the CLI directly in the yaml manifest will be better to add them to https://github.com/flathub/com.vscodium.codium/blob/master/com.vscodium.codium.yaml#L133

But maybe edit the .desktop file after install will be more useful also you will keep the updates #162 (comment)

thank you for pointing that out, I have submitted a PR with a workaround for the sync issue : https://github.com/flathub/com.vscodium.codium/pull/294

ghost commented 6 months ago

Closing as fixed by https://github.com/flathub/com.vscodium.codium/pull/319