Dynamic username in file URL
-
I made my own startpage in HTML and that file is store on my Onedrive. The path to onedrive is file:///C:/Users/<my username>/OneDrive/path_to_index.html . This start page URL is also synchronized by Vivaldi. The problem is, the username folder is not the same in different accounts on windows. So when Vivaldi syncs the URL with a specific username, that URL does not work on another account in windows because the path is not correct.
My question, is there a way to make the username dynamic like below where Vivaldi automatically replaces %username% with the username of the active account on windows.
file:///C:/Users/%username%/OneDrive/path_to_index.html
Thank you in advance
-
Only thing I can think of is to place the file somewhere accessible for all users. Like:
- Different partition, e.g. d:\vivaldi
- c:\ProgramData
- c:\whatever
- c:\Users\Public
Obviously there'd be the issue of read/write access but that can be solved with file permissions.
-
@Vincent500
As @Gwen-Dragon says, this may not be possible. However, Perhaps you could:- make a link/shortcut to the file within the base C: directory in both machines
- and then set your homepage to be that shortcut
Then vivaldi can auto-redirect to the right file.
-
@Gwen-Dragon The %username% was an example to illustrate the problem. The question was more, is there any kind of variable in Vivaldi to access the username in a dynamic way.
@Pathduck and @LonM That seems to be the best workable solution. I placed a shortcut in the public documents and set homepage to that shortcut and it works as expected. The only downside is that it only works on one computer. To make it work with multiple computers, some kind of variable that Vivaldi replaces with the active username is still the best.
-
@Gwen-Dragon Thank you for the answer.
-
@Gwen-Dragon Nice to hear. Adding that will give Vivaldi quite a jump ahead in being the most customizable browser and will probably solve my issue too. For now, the solution by Pathduck and LonM will do it on my main computer.
-
@Vincent500 said in Dynamic username in file URL:
The only downside is that it only works on one computer.
If the path is the same on all computers and the file exists on the same path, it should work. Problem is of course how to sync the file, but you'd need to do that anyway. And you couldn't mix Windows and Linux paths but that would still be the issue in your first way.
Are you using roaming profiles in a corporate network?
-
@Pathduck No, I am not using a corporate network. These are my personal laptops I use for school. I have two laptops and on one laptop I have two user profiles (one admin and one non-admin). So in total, I have three different user profiles on windows and they all have a different name because windows wouldn't let me pick the custom name I wanted. Onedrive is installed on the same location though. The only different thing is each path to onedrive is the username.
-
@Vincent500 The shortcut method should still work though.
- On PC A, make a shortcut C:/File -> UserProfileA/OneDrive/File.html
- On PC B, make a shortcut C:/File -> UserProfileB/OneDrive/File.html
- etc.
- In vivaldi, set the homepage to file:///C:/File.lnk
As long as the location of the initial shortcut is the same in each PC, OneDrive will sync the file fine, and the shortcut will handle the redirection fine.
-
@LonM Yes, Just tested it and it works, even though the folder names on one computer are in Dutch and on the other in English.
-
Ppafflick moved this topic from Vivaldi for Windows on