Page 1 of 1

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

Posted: Sun Aug 16, 2020 7:51 am
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....

Re: Desktop icon for a web page

Posted: Sun Aug 16, 2020 5:18 pm
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

Re: Desktop icon for a web page

Posted: Sun Aug 16, 2020 5:29 pm
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:

Re: Desktop icon for a web page

Posted: Mon Aug 17, 2020 12:51 am
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

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

Posted: Mon Aug 17, 2020 10:11 am
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

Re: Desktop icon for a web page

Posted: Mon Aug 17, 2020 10:45 am
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. ;)

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

Posted: Mon Aug 17, 2020 11:54 am
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:

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

Posted: Mon Aug 17, 2020 12:35 pm
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. ;)

Re: Desktop icon for a web page

Posted: Thu Aug 20, 2020 10:43 pm
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.

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

Posted: Fri Aug 21, 2020 4:39 am
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.

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

Posted: Fri Aug 21, 2020 5:21 am
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.

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

Posted: Fri Aug 21, 2020 5:31 am
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.

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

Posted: Fri Aug 21, 2020 6:45 am
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...

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

Posted: Fri Sep 04, 2020 8:18 pm
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