How to make a desktop icon that links to a web page

Moderator: Forum moderators

Post Reply
User avatar
bigpup
Moderator
Posts: 7042
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 925 times
Been thanked: 1537 times

How to make a desktop icon that links to a web page

Post by bigpup »

Create script file with this code:
(Example for seamonkey browser ->Puppy forum)

Code: Select all

#!/bin/sh
exec seamonkey https://forum.puppylinux.com/
Open Rox file manager
Right click on an open area and select new>script
Give it a name to identify it
Right click on this new script file and select open as text
Now in a text editor
Add the bowser name and the web address as shown in example
save change.
Drag and drop file to desktop.
Right click on desktop icon for file.
To change name -> edit item
To change icon -> set icon
( normal icon set is located at /usr/local/lib/X11/pixmaps )
When selecting an icon to use, 48X48 is the size used for desktop icons.
So, pick an icon that has 48 in its name.

Note:
Usually the name of the browser is the exec file to start the browser.
firefox
palemoon
seamonkey
etc....
Last edited by bigpup on Fri Aug 21, 2020 5:25 am, edited 3 times in total.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

williams2
Posts: 1063
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 306 times

Re: Desktop icon for a web page

Post by williams2 »

Rox is smart enough to open a web page address with the default browser. Like this:

Code: Select all

rox -U https://forum.puppylinux.com/
Rox can open any file from a script (or from the shell/command line) as if you had clicked the file, like this:

Code: Select all

rox /root/readme.html
User avatar
bigpup
Moderator
Posts: 7042
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 925 times
Been thanked: 1537 times

Re: Desktop icon for a web page

Post by bigpup »

Good info!
Thanks.

I think you will have to do as I posted, if you have more than one browser installed, and you want a specific browser to run, other than the default browser.

But, good to know, more than one way to do it. :thumbup:

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
MochiMoppel
Posts: 1244
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 22 times
Been thanked: 445 times

Re: Desktop icon for a web page

Post by MochiMoppel »

I still don't understand. If the goal is a desktop icon then why would you want a script? I could name a couple of disadvantages but I see no advantage.
http://www.murga-linux.com/puppy/viewto ... ?p=1001115
User avatar
wiak
Posts: 4091
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 65 times
Been thanked: 1212 times
Contact:

Re: How to make a desktop icon that links to a web page

Post by wiak »

bigpup wrote: Sun Aug 16, 2020 7:51 am Create script file with this code:
(Example for seamonkey browser ->Puppy forum)

Code: Select all

# /bin/sh
seamonkey https://forum.puppylinux.com/
Off the top of my head I think you could save a process and thus some RAM, if using above method, by changing above to:

Code: Select all

#!/bin/sh
exec seamonkey https://forum.puppylinux.com/
Note the !

The exec causes seamonkey to use/take-over the same PID as the original shell script (/bin/sh, which, in practice, is bash when using Puppy Linux).
Admittedly, I'm not sure about using this with ROX pinboard - I'm just referring to the script in general. I don't have ROX on my current system so can't try it however I remember the right-click edit item run action method MochiMoppel refers to for that.

As far as ROX filer is concerned, this is always worth a perusal: http://rox.sourceforge.net/Manual/Manual/Manual.html

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
mikewalsh
Moderator
Posts: 6185
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 803 times
Been thanked: 1994 times

Re: Desktop icon for a web page

Post by mikewalsh »

williams2 wrote: Sun Aug 16, 2020 5:18 pm Rox is smart enough to open a web page address with the default browser. Like this:

Code: Select all

rox -U https://forum.puppylinux.com/
Rox is also smart enough to auto-resize any icon down to 48x48. Note; PNG icons work best, due to the transparency background layer that comprises part of the PNG specifications.

I've got a directory with, currently, over 600 PNG icons, culled from 1000's of web-searches over the years. Size is not an issue.....and I, personally, prefer to use icons of 256x256 or even 512x512, due to the fact that after ROX has performed a re-size, the resulting icon remains sharper & has more detail than a native 48x48.

This just personal preference, you understand. The fact remains, though, that a web-search with Google or DuckDuckGo for

"PNG icons for xxxxxxx (whatever)....."

.....will usually yield a good selection to choose from.

If I can't find what I'm looking for, I then resort to "Plan B", and make one. I have a sub-directory inside "PNG icons", with a selection of differently-shaped/coloured "blank" buttons.....which can then have other PNG images super-imposed on top of them, and the results saved as a new button for whatever you need it for.


Mike. ;)
User avatar
bigpup
Moderator
Posts: 7042
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 925 times
Been thanked: 1537 times

Re: How to make a desktop icon that links to a web page

Post by bigpup »

You can use any icon you want to.

Puppy Linux is suppose to be a small, light, low resource OS.

Big difference in actual size (bytes) of a 48X48 icon compared to a 512X512 icon.

48X48 has been accepted, standard icon size in Puppy, for years.

But, I guess no one is really still trying to keep Puppy, small in size. :roll:

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
mikewalsh
Moderator
Posts: 6185
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 803 times
Been thanked: 1994 times

Re: How to make a desktop icon that links to a web page

Post by mikewalsh »

bigpup wrote: Mon Aug 17, 2020 11:54 am You can use any icon you want to.

Puppy Linux is suppose to be a small, light, low resource OS.

Big difference in actual size (bytes) of a 48X48 icon compared to a 512X512 icon.

48X48 has been accepted, standard icon size in Puppy, for years.

But, I guess no one is really still trying to keep Puppy, small in size. :roll:
That is very true, bigpup. However, you must be just as aware as I am that the hardware for which Puppy was originally envisaged is almost extinct now. The majority of Puppy users are steadily running more powerful & capable hardware as time goes by. Dual-core, 64-bit CPUs/4 GB of RAM/250-320GB storage is commonplace even for the most basic of netbooks these days.....and for desktops, 8-16 GB RAM is becoming more & more common.

Size/storage constraints simply aren't there like they used to be.

It's sad, in a way; I still enjoy playing around with elderly Pups on ye anciente Dell lappie, but it's getting less & less practical as a "daily driver". Mainly due to website/browser complexity, and that P4 being stuck with only SSE2s.....and you can't help but increasingly notice how slow it is.

But I'm having an absolute ball running the newest Pups on this new, powerful, modern HP desktop! :thumbup:


Mike. ;)
User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: Desktop icon for a web page

Post by taersh »

MochiMoppel wrote: Mon Aug 17, 2020 12:51 am I still don't understand. If the goal is a desktop icon then why would you want a script? I could name a couple of disadvantages but I see no advantage.
http://www.murga-linux.com/puppy/viewto ... ?p=1001115
Agreed.

If one wants to start a browser to open a preferred website, just use a .desktop file. Create a new one if necessary. Usually it has an icon already, so no need to define an icon for a script file placed at the desktop etc.pp.

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

User avatar
bigpup
Moderator
Posts: 7042
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 925 times
Been thanked: 1537 times

Re: How to make a desktop icon that links to a web page

Post by bigpup »

just use a .desktop file. Create a new one if necessary.
So, give us all the details on how to do this?
Do this.
Than this.
Than this.
Etc........

A how to is for someone that does not know how to do any of it.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
bigpup
Moderator
Posts: 7042
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 925 times
Been thanked: 1537 times

Re: How to make a desktop icon that links to a web page

Post by bigpup »

Thanks wiak!
I added the ! to the script example.

I tried to make a new script in Bionicpup64 8.0 and the

Code: Select all

#!/bin/sh
was already in it.

I added the exec also.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
MochiMoppel
Posts: 1244
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 22 times
Been thanked: 445 times

Re: How to make a desktop icon that links to a web page

Post by MochiMoppel »

taersh wrote: Thu Aug 20, 2020 10:43 pmAgreed.

If one wants to start a browser to open a preferred website, just use a .desktop file.
Agreed to what? I didn't propose to use a .desktop file because a .desktop file will not work - unless you mean to put the website's URL directly into the .desktop file, but then this would be a very inflexible solution.

To see what I mean take a look at the link I provided and particularly the screenshot in my post close to the end of the thread.
User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: How to make a desktop icon that links to a web page

Post by taersh »

MochiMoppel wrote: Fri Aug 21, 2020 5:31 am
taersh wrote: Thu Aug 20, 2020 10:43 pmAgreed.

If one wants to start a browser to open a preferred website, just use a .desktop file.
Agreed to what? I didn't propose to use a .desktop file because a .desktop file will not work - unless you mean to put the website's URL directly into the .desktop file, but then this would be a very inflexible solution.

To see what I mean take a look at the link I provided and particularly the screenshot in my post close to the end of the thread.
Agreed to "why do you want a script.

Since the purpose to have a desktop icon the .desktop file would be better solution than to have a script. Also it doesn't make a difference if the URL is put into the .desktop files Exec= entry or into a script. Both are equal in "flexibility", both needed to be edited in a text editor when one wants to change the URL.

Please, don't tell me you've getting that dumb over the years to not to know/understand this...

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

dogFellow
Posts: 43
Joined: Tue Aug 25, 2020 9:04 am
Been thanked: 4 times

Re: How to make a desktop icon that links to a web page

Post by dogFellow »

there are two scripts in here.
one opens txt you have highlighted into the clipboard into googlemaps in your choice of browser. need clipit installed and xdotool
the other opens the highlighted text into browser at iplookup
i use slimjet so you will have to edit the code to use your browser. any problems ask

first is good for when you are reading the news and some place is mentioned that you want to know where it is. second is good for when you see ip in chat and want to know where the persons ip is located
good luck with the editing of the code. bits that need editing are not difficult really :ugeek:
mapslim.tar.gz
(10.83 KiB) Downloaded 26 times
i use mapslim from bottom tray link, and iplocated from desktop link
Post Reply

Return to “Tips & Tweaks”