Alex313031 / Thorium-Win

Chromium fork for Windows named after radioactive element No. 90; Windows builds of https://github.com/Alex313031/Thorium
https://thorium.rocks/
BSD 3-Clause "New" or "Revised" License
1.29k stars 33 forks source link

Setting Thorium portable as the default browser. #76

Open beepinboop opened 8 months ago

beepinboop commented 8 months ago

The issue with Thorium portable is that there's no way to set it as the default browser, you need to always run the batch file with the proper arguments instead of the executable itself in order to load your local profile since without it it'd just load an empty profile. That's quite a problem when you consider that Windows defaults to the "Default App" whenever it interacts with an URL, making it impossible to open it in Thorium (I mean, at least in your own profile)

A way to fix that is to add the arguments to the registry itself, modifying the key that the shell uses when you try to "Open As" something, allowing you to just pick the .exe since it'll send the arguments by default now. Also, the "Open As" popup and the "Choose an App" (present in the Default Apps page in the settings) are both reading from the same key, which is why this works.

You have to hard link the directory, at least if you have it in a different drive like I do. There's also the minor issue that you can't really "pin" it to the taskbar, you can create a shortcut to the .exe but it'll always create another icon instead of opening on top of the already pinned one, I'm assuming that that happens because you didn't pin the .exe itself but a shortcut to it, I don't really know how to solve that problem though...

I'm sure that there is a more elegant way to solve these problems, might be beneficial to take a look on how PortableApps/Scoop function or something, I'm in no way equipped to solve that issue myself however. If anyone else but the devs are reading, please keep in mind that I have no idea about what I'm doing and that there's probably a better way to solve this issue. Also, I don't think that this is a bug so I'm adding it to the General Feedback, not sure if that's correct. That aside, using this browser has been a joy, so thanks to everyone involved in it.

zooom7z commented 8 months ago

Hi, try it, I did portable app myself and take vbs script by Ramesh Srinivasan to make portable app default browser. https://dropmefiles.com.ua/ua/NcKwZMxDy3 (link updated) There is AVX2 build, you can change to anything even to win7 in \App\Thorium. But don't forget to change thorium.exe to thorium_browser.exe

Your own arguments you can write in "\App\AppInfo\Launcher\thorium.ini", I put there default arguments from bat file. Don't forget to add these arg for completed portable. --disable-encryption --disable-machine-id

This is not a perfect solution, there is a better one, but I can't do it with my knowledge.

zooom7z commented 8 months ago

I have found another solution besides vbs script: https://github.com/SiL3NC3/PortableRegistrator You can try both, good luck

mastercuber55 commented 1 month ago

So... I downloaded this thing just today and wanted to set Thorium as my default browser but I was unable to so Chrome was my default browser so I deleted all the files in the chrome folder and replaced it with Thorium files and renamed thorium executable to chrome.exe and now Thorium is my default browser.