Skip to content
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

[issue]: Plugson webui server automatically launches Firefox even though my default browser is Brave #2779

Open
1 task done
YouveGotMeowxy opened this issue Mar 19, 2024 · 0 comments

Comments

@YouveGotMeowxy
Copy link

Official FAQ

  • I have checked the official FAQ.

Ventoy Version

1.0.97

What about latest release

Yes. I have tried the latest release, but the bug still exist.

Try alternative boot mode

Yes. I have tried them, but the bug still exist.

BIOS Mode

Both

Partition Style

GPT

Disk Capacity

128

Disk Manufacturer

No response

Image file checksum (if applicable)

None

Image file download link (if applicable)

No response

What happened?

Please make the launcher use the Default web browser on the computer, rather than force it to use any specific browser. it's really frustrating to never use Firefox, already have my Brave browser open with many tabs, and then suddenly have Firefox starting up just to load this one page that runs just fine in Brave.

I can see in the code here:

static void OpenURL(void)

That in the sub, it adds a bunch of hard coded patsh to ff and chrome, and if they exist, it launches it first; and if none exist, it launches the default browser; it seems that just commenting out or removing that part and just leaving the Default launch would be best.

Something like:

static void OpenURL(void)
{
    //int i;
	char url[128];
   /*
    const static char * Browsers[] = 
    {
        "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
        "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
        "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe",
        "C:\\Program Files\\Mozilla Firefox\\firefox.exe",
        NULL
    };
  */
	sprintf_s(url, sizeof(url), "http://%s:%s/index.html", g_sysinfo.ip, g_sysinfo.port);

	//if (g_ChromeFirst)
	//{
	//	for (i = 0; Browsers[i] != NULL; i++)
	//	{
	//		if (ventoy_is_file_exist("%s", Browsers[i]))
	//		{
	//			ShellExecuteA(NULL, "open", Browsers[i], url, NULL, SW_SHOW);
	//			return;
	//		}
	//	}
	//}

    ShellExecuteA(NULL, "open", url, NULL, NULL, SW_SHOW);
}

I don't have any C++ coding IDE though so I can't try it myself.

ALSO. would LOVE a button to relaunch the WebUI. When we make manual edits to the .json while the WebUI is open, even pressing the Refrsh button doesn't show the file updates in the WebUI. That means we have to shut down Plugson, restart the .exe, and then go through the same auto-launch of a browser we don't want opening. =/

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

No branches or pull requests

1 participant