mirror of
https://github.com/asciinema/asciinema.git
synced 2026-04-25 16:05:52 +03:00
[GH-ISSUE #362] [Feature Request] Make the USER env var configurable #232
Labels
No labels
bug
compatibility
feature request
fit for beginners
help wanted
hosting
idea
improvement
packaging
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asciinema#232
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Gerifield on GitHub (Jul 13, 2019).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/362
Hi,
I use asciinema from different machines with different USER env vars.
I didn't want to permanently change the variable on my other machine and it would be great if this variable could come from the config file too.
This is the related line I guess: https://github.com/asciinema/asciinema/blob/develop/asciinema/commands/command.py#L10
@ku1ik commented on GitHub (Sep 8, 2019):
You can always make a shell alias like this:
alias asciinema='env USER=foo asciinema'Would that work?
@Gerifield commented on GitHub (Sep 9, 2019):
Yes, but all the other (important) params could be set in the config file.
The other thing, this would also set the USER env var "inside" the asciinema command and if you'd like to have the original value in you env you should set it back to original inside, during the recording.
@ku1ik commented on GitHub (Apr 19, 2020):
The
USERenv var is only meaningful when your install ID hasn't been registered on the server (asciinema.org or your own), and it's used for populating temporary username in the database, which we display for asciicasts recorded by non verified users. If you register all your machines withasciinema auththen this username should not matter at all, and would be ignored - the username you've setup on web for your account is then used for display.The fact we always send
USERas username path in basic auth header is to support the "unknown install ID" case. See here: https://github.com/asciinema/asciinema-server/blob/develop/lib/asciinema_web/controllers/api/asciicast_controller.ex#L71 and here https://github.com/asciinema/asciinema-server/blob/develop/lib/asciinema/accounts/accounts.ex#L141-L150In other words, we might as well not send
USERat all, and put""(blank) as basic auth username, in which case asciicasts for unverified users would display "user:123456" (where 123456 is user ID) as username on the website. Long time ago I thought it would be ok to use it, so we have something to display there, until user fully sets up the account.