-
Notifications
You must be signed in to change notification settings - Fork 43
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
Don't install VS Code by default, and definitely not under Raspberry Pi OS Lite #7
Comments
This script is targeted for newbies so it is designed to set up everything and make them work just out of box. However, it should NOT install all the stuff without user's confirmation. It should ask the user to make a choice first. |
I think giving the newbie user lots of questions to confirm/deny would take away a lot of the ease-of-use that pico_setup was written to provide. If you want to submit a PR that adds an "advanced mode" which is off by default (e.g. you need to explicitly enable it with (and of course you can refer to https://datasheets.raspberrypi.org/pico/getting-started-with-pico.pdf if you want to do things "manually" and not rely on the automated nature of pico_setup) I agree that it probably makes sense to not install VSCode on Raspberry Pi OS Lite though. |
You can check /etc/rpi-issue whether it's a 'stage 2' (lite) image or for the presence of x11 libraries, but you can't assume that if a user started with the lite image that they haven't or aren't going to install a desktop environment or that they won't use X forwarding over SSH. |
Would checking the return-code of |
Please see the Getting Started guide which gives full instructions on how to set up the toolchain under Linux, macOS, or Windows. I'm not sure what you mean by cross-compile instructions though? |
libx11-6 would probably be the safer option. I don't know what the goals of the scripts are, but if it doesn't have to be non-interactive, then it should probably just ask. |
Thanks @XECDesign , I'll give that a go next week 👍 |
I don't think this will work as intended. Raspberry Pi OS Lite does not have xserver-xorg installed, but does have libx11-6.
|
You're right, something seems to drag it in as a recommended package, which I should get rid of for the next set of images and save some space. And it probably doesn't make a ton of sense to use VS Code through X11 forwarding anyway, so I think my original comment was a bit too pedantic. |
Oh, are you the image builder? Cool, nice to meet you. |
@XECDesign It seems to be |
In the case of pi-gen it happens because ssh has xauth as a recommended package, which then depends on the x11 libs. Git drags in the ssh client as a recommended package, so you end up with the same situation. |
Ahhh, I hadn't noticed that |
Makes sense, you want to be able to display forward your XWindows stuff I guess, so SSH just pulls in the X11 libs so you can do that? |
When installing, one of the dependencies is VS Code. I can understand why one might want to include and set up VS Code for some users, but I think the overlap between that group of users, with people who want to use C++ over MicroPython, is very small. I think this definitely should not be the default behaviour.
This is particularly infuriating under Raspberry Pi OS Lite because it installs the entire desktop environment which I categorically did not ask for. Ideally I would be able to develop entirely on my proper desktop, but I can't find any cross-compile instructions so it seemed a lot easier to set up using this script on a Pi (which I am already using for something else and definitely don't want a desktop environment on).
It certainly ought to be explained more clearly on the Getting Started page that this script sets up an entire development system, not just a "toolchain". Currently that just plonks you on a GitHub repo with no README or even instructions on how to download and run it. I had to read the script to learn about
SKIP_VSCODE=1
(by which point it was too late), something which some might not be able to (or want to) do.I think the best solution would be to present an interactive menu at the start of the script where the user can decide that they don't want to have VS Code set up for them.
The text was updated successfully, but these errors were encountered: