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

Install VSCodium and make host .application file #86

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

justinmichaud
Copy link
Contributor

  • Work around lldb python issues
  • Install VSCodium by default
  • Add helpful clangd default settings
  • Make VSCode .application file by default

"editorWhitespace.background": "#FF0000"
},
"terminal.integrated.allowChords": false,
}
Copy link
Member

Choose a reason for hiding this comment

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

Some of these are pretty arbitrary. I like the clangd.arguments but maybe lets move this to a different PR to discuss.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The clangd and fg/bg colours are important for our style guidelines, but I removed the rest.

Copy link
Member

Choose a reason for hiding this comment

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

Oh you just mean to more easily visualize whitespace.

I've never needed that and don't think I'd want it by default. I'll check how it looks.

Copy link
Member

Choose a reason for hiding this comment

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

I'm going to vote no on this, I think it would annoy most people.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh shoot, it doesn't look like that for me. It is only supposed to display trailing whitespace

Copy link
Contributor Author

Choose a reason for hiding this comment

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

2025-01-27T13:27:24,752795531-07:00

Copy link
Member

@TingPing TingPing Jan 29, 2025

Choose a reason for hiding this comment

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

Some other setting is involved. It would be best to keep these PRs small, I'd remove this change here and it can be discussed on its own.

@justinmichaud
Copy link
Contributor Author

Thank you for the review, everything has been updated!

- Add helpful clangd default settings
- Make VSCode .application file by default
install_extension() {

sudo chown "${USER}" "${HOME}/.config"
Copy link
Member

Choose a reason for hiding this comment

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

How would .config be owned by a different user?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe this was an idiosyncrasy of my setup, let's remove it and see if it comes up again

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is needed if you run this script from your firstrun script. It seems it runs as root. I guess I can change my firstrun script to run as the container user

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What I said makes no sense, since we use $USER here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like systemd makes the config path? At the very least, some files in ~/.config/systemd appear to be owned by root.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this is confusing to me, although .config is definitely owned by root. In particular, so is .config/systemd, which seems to come from nowhere. Do you have any ideas how I can start debugging this?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not certain, but I cannot reproduce this:

> wkdev-create --home=$HOME/wkdev-testing --create-home
> ls -lah ~/wkdev-testing/
total 16K
drwxr-x---. 1 tingping tingping  110 Feb  5 11:52 ./
drwx------. 1 tingping tingping 2.5K Feb  5 11:52 ../
-rw-r--r--. 1 tingping tingping   18 Feb  5 11:52 .bash_logout
-rw-r--r--. 1 tingping tingping  144 Feb  5 11:52 .bash_profile
-rw-r--r--. 1 tingping tingping  522 Feb  5 11:52 .bashrc
drwxr-xr-x. 1 tingping tingping    8 Feb  5 11:52 .config/
-rw-r--r--. 1 tingping tingping  168 Feb  5 11:52 .gdbinit
drwxr-xr-x. 1 tingping tingping   34 Feb  5 11:52 .mozilla/
> ls -lah ~/wkdev-testing/.config/
total 0
drwxr-xr-x. 1 tingping tingping   8 Feb  5 11:52 ./
drwxr-x---. 1 tingping tingping 110 Feb  5 11:52 ../
drwxr-xr-x. 1 tingping tingping  22 Feb  5 11:52 fish/

The fact .mozilla exists is interesting. There must be some template being copied for a new users home.

Copy link
Member

@TingPing TingPing Feb 5, 2025

Choose a reason for hiding this comment

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

Ah, from here:

            # Copy shell configuration skeleton files from host.
            cp --recursive --verbose /etc/skel "${container_user_home}"

            # Set ownership / permissions
            chown ${container_user_id}:${container_group_id} "${container_user_home}"
            chmod 750 "${container_user_home}"

            default_config_directory="$(get_container_home_defaults_directory_name)"
            shell_type=$(basename "${SHELL}")
            mkdir --parents "${container_user_home}"/.config

Copy link
Member

Choose a reason for hiding this comment

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

Could you test: #98

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure!

Name=VSCode WKDev
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec="${WKDEV_SDK_HOST}/scripts/host-only/wkdev-enter" --exec --no-interactive -- $CODE_EXEC %F
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This doesn't quite work, we need to set WKDEV_SDK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants