Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | VSCodium #4276

Merged
merged 16 commits into from
Apr 18, 2021
Merged

DietPi-Software | VSCodium #4276

merged 16 commits into from
Apr 18, 2021

Conversation

ravenclaw900
Copy link
Collaborator

@ravenclaw900 ravenclaw900 commented Apr 15, 2021

Status: Ready

Reference: #4267

Commit list/description:

  • DietPi-Software | Add VSCodium install option
  • DietPi-Software | Make VSCodium require desktop
  • DietPi-Software | Also make VSCodium require git

+ DietPi-Software | Add VSCodium install option
@ravenclaw900 ravenclaw900 added this to the v7.1 milestone Apr 15, 2021
@ravenclaw900 ravenclaw900 self-assigned this Apr 15, 2021
+ DietPi-Software | Make VSCodium require desktop
+ DietPi-Software | Make VSCodium also require git
@ravenclaw900 ravenclaw900 requested a review from MichaIng April 15, 2021 22:49
@ravenclaw900
Copy link
Collaborator Author

Well, that was simple.

dietpi/dietpi-software Outdated Show resolved Hide resolved
dietpi/dietpi-software Outdated Show resolved Hide resolved
@MichaIng
Copy link
Owner

Lol a pretty simple naked install, but that is all fine when the package-contained setup is good. Good to have this as an alternative to VSCode after #4083.

@MichaIng MichaIng linked an issue Apr 16, 2021 that may be closed by this pull request
+ DietPi-Software | Rename vscodium.list to dietpi-vscodium.list
@Joulinar
Copy link
Collaborator

Joulinar commented Apr 16, 2021

and the good thing, version provided via apt package is same as available on GitHub. 👍

From install test
Setting up codium (1.55.2-1618361277) ...

on GitHub same version 1.55.2 is available https://github.com/VSCodium/vscodium/releases

@Joulinar
Copy link
Collaborator

I guess it's an issue of VSCodium but not sure. Could be as well me doing something wrong. At least I get an error while connecting to GitHub using the official GitHub Pull Request extension.

image

@MichaIng
Copy link
Owner

MichaIng commented Apr 16, 2021

Please try to install/enable dbus:

apt install dbus
systemctl enable --now dbus

EDIT: Ah no that cannot be the reason as it's installed and enabled automatically with all desktop installs.

+ README | Add VSCodium to sources list
+ DietPi-Survey_report | Add VSCodium support
+ CHANGELOG | VSCodium: As alternative to MS VSCode without MS branding, telemetry and licensing, the VSCodium code editor, with support for various programming languages, including Java, JavaScript, Go, Node.js, Python and C++, has been added as software install option to DietPi.
@ravenclaw900
Copy link
Collaborator Author

It looks like gnome-keyring is required, as after that I get no error.

@MichaIng
Copy link
Owner

MichaIng commented Apr 16, 2021

When I try to sign into GitHub from VSCodium, in that status bar, it shows "Signing in to github.com..." forever, while it should show a login prompt, as far as I understand. I was thinking that it might be due to missing default browser, but making Firefox the default browser doesn't change anything 🤔.

Btw, we should add the application icon to the desktop?


EDIT: Tried to install gnome-keyring, but doesn't change something here. LXDE btw.

@Joulinar
Copy link
Collaborator

You would need to click on Signing in to github.com... to open the field where you can enter GitHub token

+ DietPi-Software | VSCodium: Create desktop shortcut on install
@MichaIng
Copy link
Owner

MichaIng commented Apr 16, 2021

Ahhh, I didn't recognised that at the top.
EDIT: Worked for me without gnome-keyring as well.

+ DietPi-Software | LXDE: Apply better default icon theme: nuoveXT2 has more individual icons than Adwaita, but lower resolution and overrides the Firefox application icon with an old low res version.
+ DietPi-Software | X server: Add framebuffer driver for x86_64 on Stretch as well, as at least on VirtualBox the DRI was not available OOTB
+ DietPi-Software | LXDE: Fix icon theme
@MichaIng MichaIng requested a review from StephanStS April 16, 2021 19:11
@Joulinar
Copy link
Collaborator

@MichaIng

EDIT: Worked for me without gnome-keyring as well.

You don't have the error message at the bottom?

@MichaIng
Copy link
Owner

Nope.

@Joulinar
Copy link
Collaborator

Hmm I need to do another test. Which extension you used?

@MichaIng
Copy link
Owner

The official GitHub PR and Issues extension. I'll retry to be sure.

@MichaIng
Copy link
Owner

Okay, it was still required on a fresh setup. I think that daemon is needed to create a new keyring with credentials, while accessing an existing one does not require it, or so.

I'm not sure whether there is an alternative to that package, other issues indicate it, but I couldn't find one when searching packages with -keyring ending at least.

Shall we add it by default or add a note to the docs instead? The package is small, but it's an additional daemon/process running.

@Joulinar
Copy link
Collaborator

depends on what people will use it for. I guess this is dedicated to GitHub? Or does it might be related to other plugins as well?

Empty  commit to test VSCodium
+ DietPi-Software | Uninstall cleanly
+ DietPi-Software | Fix removal
@ravenclaw900
Copy link
Collaborator Author

I think that it would probably be best to add it, as you will probably need it for signing in to Microsoft accounts as well. However, we could probably configure the keychain automatically with the global software password.

@MichaIng
Copy link
Owner

I guess so. Cannot imagine that this extension uses its very own credentials/authentication method but that it's an API of codium that is use by other extensions as well.

+ DietPi-Software | VSCodium: Install gnome-keyring as dependency, as at least extensions use it to store credentials. It's a backend daemon for the "Secrets API" and there is not really an alternative available, currently: https://freedesktop.org/wiki/Specifications/secret-storage-spec/
@MichaIng
Copy link
Owner

MichaIng commented Apr 17, 2021

Little research, gnome-keyring provides a backend daemon for the "Secrets API", described here: https://freedesktop.org/wiki/Specifications/secret-storage-spec/
Aside of the KDE wallet with GUI, there do not seem to be any relevant alternatives currently. Found https://github.com/grawity/secretsd, but it does not encrypt passwords, is hence more an experiment, I'd say.

Good to know about this in general, as other desktop applications might use that API as well to store or receive passwords, and also good to know that this is a central storage, hence you do not only trust the application like VSCodium here (which stores the master password) to safely store your GitHub token or other credentials but the Gnome keyring and API developers as well. Usually not relevant, but quite an important details for security enthusiasts 😉.

@ravenclaw900
Copy link
Collaborator Author

ravenclaw900 commented Apr 17, 2021

Hm, bash doesn't seem to be expanding the second home/* glob when uninstalling, and treating it literally.

@MichaIng
Copy link
Owner

Hmm , generally works fine here:

# bash -c 'rm -v /{root,home/*}/test'
rm: cannot remove '/root/test': No such file or directory
removed '/home/test/test'

I'll try it with VSCodium uninstall as well.

@ravenclaw900
Copy link
Collaborator Author

ravenclaw900 commented Apr 18, 2021

As a comparison:

# bash -c 'rm -v /{root,home/*}/test'
rm: cannot remove '/root/test': No such file or directory
rm: cannot remove '/home/*/test': No such file or directory

I'll try with a fresh VM.
Edit: It seems the glob only expands when the file/directory it's looking for exists, otherwise it prints it out literally.

+ DietPi-Software | VSCodium: Do not print an error when on uninstall files do not exist that are about to be removed
@MichaIng
Copy link
Owner

It seems the glob only expands when the file/directory it's looking for exists, otherwise it prints it out literally.

Ah yes of course. Taking the glob literal is basically part of the expansion. * matches the literal * as well. What we want is to hide "file not found" errors: 02c8bb8

Copy link
Collaborator

@Joulinar Joulinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

going to approve the PR from inside vscodium

@MichaIng MichaIng merged commit c9b2757 into dev Apr 18, 2021
@MichaIng MichaIng deleted the vscodium branch April 18, 2021 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DietPi-Software | VSCodium
3 participants