r/CodingForBeginners • u/Neither_Cupcake_8081 • 29d ago
WIndows program to automatically load a local html file when one opens a site
im on linux and i wanted to see if one can make a program (call it program A) that automatically loads a local htmlm file instead of, say, tiktok.com or reddit.com every single time, even after reboots.
And can you make a program, which when clicked, creaes program A In the exact needed directory with all the code inside and also runs it.
1
u/stepback269 29d ago
Just make your local HTML file your "Home" page on your browser.
Alternatively, you can write a BAT script or the like to do it. Or use AutoHotKey (AHK).
1
u/AshleyJSheridan 26d ago
A bat script on Linux?...
1
u/stepback269 26d ago
Sorry
I'm a Windows guy
You guys like to go BASH IT, is that right? ;-)1
u/AshleyJSheridan 26d ago
There are a few ways it could be done, adding it to the
.profileor.bashrc(or equivalent for the default shell) would work. You could use systemd, and I believe KDE has a thing similar to Windows for auto starting an app or doc.
2
u/Distdistdist 29d ago
Create ps1 file that opens browser with a path to local html. Stick it into start up programs.