Skip to content

Allow app-name configuration to change the name of the PWA #6093

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

Merged
merged 1 commit into from
Mar 22, 2023
Merged

Allow app-name configuration to change the name of the PWA #6093

merged 1 commit into from
Mar 22, 2023

Conversation

Lan-Hekary
Copy link
Contributor

Fixes #
if I have multiple instances for code-server running for every user and I want to install the PWA the name currently defaults to "code-server" which overrides the desktop shortcut.
This fix allows multiple instances to be installed with customizable names.

@Lan-Hekary Lan-Hekary requested a review from a team as a code owner March 21, 2023 17:16
Copy link
Member

@code-asher code-asher left a comment

Choose a reason for hiding this comment

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

Thank you!

@code-asher code-asher enabled auto-merge (squash) March 21, 2023 21:19
@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Merging #6093 (c0b58ba) into main (d477972) will decrease coverage by 0.12%.
The diff coverage is 50.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6093      +/-   ##
==========================================
- Coverage   73.12%   73.00%   -0.12%     
==========================================
  Files          30       30              
  Lines        1704     1708       +4     
  Branches      374      377       +3     
==========================================
+ Hits         1246     1247       +1     
- Misses        383      385       +2     
- Partials       75       76       +1     
Impacted Files Coverage Δ
src/node/routes/vscode.ts 36.70% <0.00%> (-0.48%) ⬇️
src/node/proxy.ts 83.33% <60.00%> (-16.67%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 78282a1...c0b58ba. Read the comment docs.

@code-asher code-asher merged commit bca733d into coder:main Mar 22, 2023
@Lan-Hekary Lan-Hekary deleted the pwa-name branch March 22, 2023 09:38
@luc-vocab
Copy link

@Lan-Hekary how does one customize the PWA app name using this code change ? is it a command line argument ?

@Lan-Hekary
Copy link
Contributor Author

Yes, there are two ways to achieve it.
The easiest way is to add it to config.yaml, like this ==> app-name : "Your name"
and then restart code-server.

The other is, like you said, to pass it as command line line argument --app-name "Yourname"
but in order to make this change permanently if you have it running as a service is a little complex.

For example, for a user named ubuntu:
you have to modify the service to add the argument by executing this :
sudo systemctl edit [email protected]
And type :

[Service]
ExecStart=
ExecStart=/usr/bin/code-server --app-name "Yourname"

you have to clear ExecStart before setting it to a new value.

you may want to add environment variables too, like Password or hashed password under [Service]
Environment=HASHED_PASSWORD=blablabla

See this for reference on how to generate it.
https://github.com/coder/code-server/blob/main/docs/FAQ.md#can-i-store-my-password-hashed

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.

3 participants