None of my posts on that particular topic mentioned using a script.
1. Copy the firefox.desktop file from wherever it currently is to ~/.local/share/applications and rename it to online-timer.desktop, or something similar.
e.g.
Bash:
cp /path/to/firefox.desktop ~/.local/share/applications/online-timer.desktop
It doesn't matter if the file is owned by root, copy it as a normal user and you should still be able to copy the file to somewhere in your home directory and the copy will be owned by you. You may or may not need to make it executable, IDK offhand.
2. Edit the
Exec=/path/to/firefox
field in the copied and renamed .desktop file, to add the URL to the website.
e.g.
Bash:
Exec=/path/to/firefox https://www.dateandtime.com/timer
And then, optionally - create a symbolic link on your desktop, that points to the .desktop file.
Bash:
ln -s -T ~/.local/share/applications/online-timer.desktop ~/Desktop/online-timer
And that is literally it.
Oh, one thing I forgot to mention is to change display name of the program in the desktop too.
So, for that - open up the copied .desktop file and edit the Name and Comment fields in the file too.
Because the name in that field will still be "Firefox" and the description will be "Browse the web".
So perhaps change the name to "online-timer" and the comment to "Open online timer website in Firefox".
Otherwise, you'll just end up with two shortcuts in your menu that say Firefox! :/
For the sake of completeness - I've ran through the steps myself. So I've just installed LXDE, so I have an actual desktop with a GUI Menu system. I don't plan to use the timer application, but I come here a lot.
So I'll set up a shortcut to Linux.org instead of the timer website that
@CrazedNerd originally referenced.
On my Debian installation, my firefox.desktop is actually located at
/usr/share/applications/firefox-esr.desktop
.
So I've copied that fie to
~/.local/share/applications
and renamed it to
linuxorg.desktop
.
I've edited the
Name=
and
Comment=
fields to read:
Name="linux.org"
Comment=Open linux.org in FF-ESR
I've opened up the system menu in LXDE and I can immediately see my
linux.org
.desktop launcher in the menu. Clicking on it opens Firefox to Linux.org.
Great success!
For proof, here's a screenshot:
View attachment 15360
So that works perfectly.
The next step is to set up a symbolic-link in the desktop directory.
Bash:
ln -s -T ~/.local/share/applications/linuxorg.desktop ~/Desktop/Linux.org
LXDE doesn't seem to show the Desktop icons on the actual desktop, but opening PCManFM, I can see that the link is there.
Proof:
View attachment 15361
And clicking on it does work, but you get a prompt about it being an executable script and gives you options to execute it, execute in terminal, open it (which opens it in your text editor), or cancel.
Selecting execute opens the browser to linux.org. So the shortcut to the desktop file works.
Screenshot below:
View attachment 15362
There's no need to mess with any file-permissions.
It works pretty much exactly as described.
I'm going to log out and log back into dwm now. Using LXDE is annoying me now. The workflow just feels jarring and horrible compared to dwm! Ugh, I feel dirty now! Ha ha!