[Portable Mode] Reference files (i.e. images) near settings.json #19896

Closed
opened 2026-01-31 06:56:41 +00:00 by claunia · 1 comment
Owner

Originally created by @carlos-zamora on GitHub (May 17, 2023).

Prior to portable mode, a common heuristic to reference images would be to use ms-appdata:///Local. However, portable mode promises a terminal that is essentially fully encapsulated in a separate folder (i.e. a flash drive). There should be a way to reliably reference images and files in that flash drive.

The issue at hand is that the flash drive may not be reliably set as the D: drive.

For example, I have the following json in a profile:

                "backgroundImage": "ms-appdata:///Local/ubuntu_bg.png",

If the terminal is in portable mode, (I suspect) this won't work.

Ideally, I could store ubuntu_bg.png in the settings folder (next to the settings.json file).

Originally created by @carlos-zamora on GitHub (May 17, 2023). Prior to portable mode, a common heuristic to reference images would be to use `ms-appdata:///Local`. However, portable mode promises a terminal that is essentially fully encapsulated in a separate folder (i.e. a flash drive). There should be a way to reliably reference images and files in that flash drive. The issue at hand is that the flash drive may not be reliably set as the `D:` drive. For example, I have the following json in a profile: ```js "backgroundImage": "ms-appdata:///Local/ubuntu_bg.png", ``` If the terminal is in portable mode, (I suspect) this won't work. Ideally, I could store `ubuntu_bg.png` in the `settings` folder (next to the settings.json file).
claunia added the Issue-FeatureArea-SettingsNeeds-Tag-FixProduct-Terminal labels 2026-01-31 06:56:42 +00:00
Author
Owner

@carlos-zamora commented on GitHub (May 17, 2023):

ms-appx:/// resolves to where the wt.exe is stored. So ms-appx:///settings/foo.png should work!

@carlos-zamora commented on GitHub (May 17, 2023): `ms-appx:///` resolves to where the wt.exe is stored. So `ms-appx:///settings/foo.png` should work!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19896