Text-to-clipboard "hyperlink" in root? How?

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

User avatar
greengeek
Posts: 1383
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 534 times
Been thanked: 192 times

Text-to-clipboard "hyperlink" in root? How?

Post by greengeek »

Sorry for the poor title - it is hard to describe in a few words what I am looking for.

I would like to create some sort of file sitting in /root that I can click and have a url automatically copied to my clipboard.
But I do not want it to be an actual url that automatically opens my defaultbrowser or similar. (ie: I don't want a script opening the url)

I will try to explain:
I do not use a savefile and I use multiple different browsers without saving cache or bookmarks. But I would like to be able to quickly pick up a specific url into my clipboard so that I can paste it into the address bar of whichever browser I am working with at the time.

Yes, I could have a text file with my favourite urls written in it - and then highlight and copy the one url I want - but that is too slow. I would prefer to just click the file itself (I guess it would be a script or link) and then manually open my browser and paste the url into it from the clipboard (or "primary buffer" or whatever). This means I would have one file for each favourite url.

(ps: or maybe one file that contains a whole list of favourites - and when I click the file a panel of favourites opens up and I just click on the url I want - without having to lasso text. Sort of a rox panel within a file)

For example - I want one separate file for each of the following:
1) Puppylinux forum
2) Rockedges puppy search
3) My banking website
4) Youtube
5) eBay
6) Trademe
etc etc

Does anyone already do this?

ps: there are probably many ways to skin this cat - what I am looking for is a way to avoid having bookmarks or similar grafted into the base puppy. I want each user to be able to have a single text file (or script) that gives them a quick way to get to the webpages they like.

EDIT: I can achieve something useful by pre-populating parcellite (or similar) but it has the disadvantage of still being slow if there are many entries in it (slow because I have to inspect each entry - some of which are lengthy pieces of text copied between documents), so not the solution I need.

EDIT:
Solution 1: viewtopic.php?p=38481#p38481

Solution 2: viewtopic.php?p=38487#p38487

Last edited by greengeek on Tue Oct 05, 2021 8:07 am, edited 4 times in total.
ndujoe2
Posts: 78
Joined: Sat Mar 27, 2021 4:52 pm
Has thanked: 3 times
Been thanked: 9 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by ndujoe2 »

here is my suggestion:

Open up the Puppy Package Manager and install Xpad. it will be an application Utility Menu. You can copy the url to the Xpad and then copy it from Xpad when you wish to go there at your command.

Joe

User avatar
greengeek
Posts: 1383
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 534 times
Been thanked: 192 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by greengeek »

ndujoe2 wrote: Mon Oct 04, 2021 11:26 pm

here is my suggestion:

Open up the Puppy Package Manager and install Xpad. it will be an application Utility Menu. You can copy the url to the Xpad and then copy it from Xpad when you wish to go there at your command.

Joe

Thanks Joe - just PPM'ed xpad and gave it a try but it looks as if that still requires me to manually copy the url into xpad first, then manually copy it to the clipboard. And it looks as if the purpose of xpad is just to have sticky notes on the desktop so much the same as like having a text file that I must copy/paste from.
Or is there some way to have an xpad note always on the desktop with some kind of scripted copy-to-clipboard instruction embedded. Did I misunderstand?

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by williams2 »

BionicPup and FossaPup seem to have Clipit automatically running when Puppy boots.

if you select text or right click and copy a url it will be in a list in clipit.
Just press ctrl+alt+P to see the list
then click on the item you want or select it with the arrow keys then press enter.

Press ctrl+alt+F to use an editing window.

i paste urls in a text file then run a script to make the urls clickable.
Or you can cat the text file and the urls in urxvt will be clickable.
(I disable that feature in urxvt)

i start my browsers with the same clickable bookmarks file.

EDIT: PS you can use xclip, For example, I have a script that runs if I press ctrl+alt+B which copies from the primary buffer to the clipboard buffer. The links browser uses the primary buffer, but it can be easier to use the clipboard buffer in Geany.
xclip -selection primary -o | xclip -selection clipboard

Attachments
bookmarks.jpg
bookmarks.jpg (55.45 KiB) Viewed 692 times
User avatar
greengeek
Posts: 1383
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 534 times
Been thanked: 192 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by greengeek »

williams2 wrote: Tue Oct 05, 2021 12:01 am

xclip -selection primary -o | xclip -selection clipboard

Thanks for the ideas. I shall have a tinker.
Do you think there is some way to use xclip using a similar syntax to what you have shown here to "cat" a text file (containing a single url) and then copying the file content to clipboard? I will have a play and see if I can hit the sweet spot.

User avatar
greengeek
Posts: 1383
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 534 times
Been thanked: 192 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by greengeek »

I have not found a way using xclip yet but it seems that xsel can load the clipboard.

As a test I have made a couple of executable scripts in /root as follows:

/root/URLforum contains:

Code: Select all

#! /bin/bash
#URL for puppy forum
printf "https://forum.puppylinux.com/index.php" | xsel -i --clipboard

and /root/URLsearch contains:

Code: Select all

#! /bin/bash
#URL for Rockedge puppy search page (new and old fora)
printf "https://rockedge.org/psearch/" | xsel -i --clipboard

So if I click one of these scripts it loads the appropriate URL to the clipboard and I can just CTRL+V to paste it into whichever browser or browsers I am testing at the time. (My jwm tray has a launch icon for the home/root directory so this way it only takes 2 clicks to load the clipboard. No more lassooing or hunting through parcellite.

User avatar
greengeek
Posts: 1383
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 534 times
Been thanked: 192 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by greengeek »

williams2 wrote: Tue Oct 05, 2021 12:01 am

Or you can cat the text file and the urls in urxvt will be clickable.

Do you have any idea how to write a script which - when clicked - will open a urxvt window showing the bookmarks read from a text file? I tried your idea of opening urxvt then using cat to read the bookmarks file (and urxvt does show the bookmarks as active links) - but I don't know how to do so direct from a script.

I tried:

Code: Select all

#! /bin/bash
cat /root/bookmarks.txt | urxvt

...but that's no go. Just opens a blank urxvt window.

EDIT: Just found this syntax which works:

Code: Select all

#!/bin/sh
xterm -hold -e "cat /root/bookmarks.txt" &

which brings up the bookmarks file in terminal as clickable links but now i think about it that doesn't help much unless I want the links opening the default browser.

User avatar
MochiMoppel
Posts: 1231
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 436 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by MochiMoppel »

greengeek wrote: Tue Oct 05, 2021 6:46 am

I have not found a way using xclip yet but it seems that xsel can load the clipboard.

Are you sure that xclip is installed? If you can run xsel then chances are high that xclip is not installed. IIRC you even once used a distro with neither xclip nor xsel installed.

This should work if any of the 2 is present:

Code: Select all

#!/bin/ash
URL='https://forum.puppylinux.com'

if   [[ $(type -p xclip) ]] ; then
	printf "$URL" | xclip -i -sel c
elif [[ $(type -p xsel) ]] ; then
	printf "$URL" | xsel -ib
else
	Xdialog -msg "Please install xclip ot xsel" x
fi

If you are running parcellite then - in theory and according to man page - this command should also work

Code: Select all

printf 'https://forum.puppylinux.com' | parcellite

It never worked for me.

User avatar
stemsee
Posts: 779
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 185 times
Been thanked: 131 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by stemsee »

You could create a text file with a unique extension, 'mywebs.uri', then set run action in rox right click menu to open with

Code: Select all

cat "$@" | yad --text-info -show-uri

this will display the url list as highlighted links which when clicked will use xdg-open to open with default browser. Or you could use

Code: Select all

cat "$@" | yad --list --row-sep="\n" --column="Websites" --select-action="bash -c \"firefox "%s" \""

choose your own browser command string of course.

Or use

Code: Select all

cat "$@" | yad --list --row-sep="\n" --column="Websites" --select-action="bash -c \"xclip -o -p "%s" \""

to copy url then open your browser and paste it in.

User avatar
greengeek
Posts: 1383
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 534 times
Been thanked: 192 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by greengeek »

MochiMoppel wrote: Tue Oct 05, 2021 7:54 am

Are you sure that xclip is installed?

Originally it wasn't installed but I loaded it from PPM - but then had to move it from /usr/X11R7 to /usr bin to make it visible. I have now found a syntax to use xclip in a script:

This loads the search URL to the clipboard:

Code: Select all

#!/bin/bash
echo 'https://rockedge.org/psearch/' | xclip -in -selection clipboard

and this loads the forum URL to the clipboard:

Code: Select all

#!/bin/bash
echo 'https://forum.puppylinux.com/index.php' | xclip -in -selection clipboard

Thanks for the script to allow use whichever of xsel or xclip is installed - that is very useful.

User avatar
greengeek
Posts: 1383
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 534 times
Been thanked: 192 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by greengeek »

stemsee wrote: Tue Oct 05, 2021 7:58 am

Or use

Code: Select all

cat "$@" | yad --list --row-sep="\n" --column="Websites" --select-action="bash -c \"xclip -o -p "%s" \""

to copy url then open your browser and paste it in.

Could you clarify this for me please? Is this a bash line to be put in a script that reads a pre-written bookmarks text file?
Thanks!

User avatar
stemsee
Posts: 779
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 185 times
Been thanked: 131 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by stemsee »

It is a rox filer 'set run action' command!

rox.png
rox.png (37.76 KiB) Viewed 723 times
rox.png
rox.png (37.76 KiB) Viewed 723 times
User avatar
greengeek
Posts: 1383
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 534 times
Been thanked: 192 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by greengeek »

stemsee wrote: Tue Oct 05, 2021 9:03 am

It is a rox filer 'set run action' command!

So is "Websites" a text file in /root?

User avatar
stemsee
Posts: 779
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 185 times
Been thanked: 131 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by stemsee »

anywhere you want it!

williwaw
Posts: 1937
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 170 times
Been thanked: 368 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by williwaw »

greengeek wrote: Mon Oct 04, 2021 11:12 pm

Does anyone already do this?

ps: there are probably many ways to skin this cat - what I am looking for is a way to avoid having bookmarks or similar grafted into the base puppy. I want each user to be able to have a single text file (or script) that gives them a quick way to get to the webpages they like.

my browser homepage is a html file very similar to williams2. A clickable browser launch script could point to a different profile for each user (I am guessing users will want to tweak more than the bookmarks)

User avatar
greengeek
Posts: 1383
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 534 times
Been thanked: 192 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by greengeek »

stemsee wrote: Tue Oct 05, 2021 3:02 pm

anywhere you want it!

I'm think I am doing this incorrectly. Can you checkout my method please?

1) First I create a file called search.go in /root. The content of that file is:

Code: Select all

https://rockedge.org/psearch/

2) Then I right click that file and select "Set Run Action"

3) In the "Enter shell command" field I put:

Code: Select all

cat "$@" | yad --list --row-sep="\n" --column="Websites" --select-action="bash -c \"xclip -o -p "%s" \""

Then I click the search.go script but it does not copy the search url to clipboard

I also tried modifying the "Websites" part:

Code: Select all

cat "$@" | yad --list --row-sep="\n" --column="search.go" --select-action="bash -c \"xclip -o -p "%s" \""

and:

Code: Select all

cat "$@" | yad --list --row-sep="\n" --column="/root/search.go" --select-action="bash -c \"xclip -o -p "%s" \""

But I am clearly misunderstanding something.

help.png
help.png (1.63 KiB) Viewed 693 times

.
.

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by williams2 »

Going back to the original post:

I want one separate file for each of the following:
1) Puppylinux forum
2) Rockedges puppy search
3) My banking website
4) Youtube
5) eBay
6) Trademe
etc

Scripts to copy a url to both the primary and clipboard buffers, using xclip (xclip comes with BionicPup64.):

Putting scripts in a dir:

Code: Select all

# ls -1
1-Puppylinux-forum
2-Rockedges-puppy-search
4-Youtube
5-Ebay
6-Trademe
#

Code: Select all

#!/bin/sh
printf 'https://forum.puppylinux.com/' | xclip
xclip -o | xclip -selection clipboard

Code: Select all

#!/bin/sh
printf 'https://rockedge.org/psearch/' | xclip
xclip -o | xclip -selection clipboard

Code: Select all

#!/bin/sh
printf 'https://www.youtube.com/' | xclip
xclip -o | xclip -selection clipboard

Code: Select all

#!/bin/sh
printf 'https://www.ebay.com/' | xclip
xclip -o | xclip -selection clipboard

Code: Select all

#!/bin/sh
printf 'http://trademe.com/' | xclip
xclip -o | xclip -selection clipboard

That's not what I do.

User avatar
MochiMoppel
Posts: 1231
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 436 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by MochiMoppel »

@greengeek
As far as I understand you often test different distros, facing all sorts of browsers, file managers etc. No savefile,
In this case making extensive changes like setting up MIME types or adding stuff to the right-click menu (ROX-Filer only!) would make little sense.

The easiest way to get your URLs into the clipboard, requiring no script, you've already dismissed. Why?

Yes, I could have a text file with my favourite urls written in it - and then highlight and copy the one url I want - but that is too slow.

Why is that too slow? Assuming that each URL is on a separate line, then all it takes is to
1) triple-click the URL (to select it and thereby send it to PRIMARY buffer), followed by
2) Ctrl+C (to send it to clipboard
Doesn't take a second

Another no-script solution: Create a very simple HTML page with your URLs as links, Then load into the browser of your choice. That's what I do.

If it has to be a script, here another idea but clearly not what you asked for. The following script requires a path of a text file as argument. It will then copy the contents of that file to the clipboard. If the file contains an URL, then the URL will be copied, but it can be any text. You could create a desktop icon for the script and then drag/drop a text file onto it. Don't know how this would be useful, but here it is:

Code: Select all

#!/bin/sh
## Copy contents of passed text file (=$1) to clipboard
[[ $(file -b --mime-type "$1")  != *text* ]] && exit
xclip -i -sel c "$1" || xsel -ib < "$1"

Note that the script does not require printf or piping into xclip or xsel because xclip can directly read from file and xsel, using redirection, can that too. This is also more accurate because the file contents will be copied "as is", including any trailing linefeeds while printf or echo would remove trailing whitespace.

User avatar
greengeek
Posts: 1383
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 534 times
Been thanked: 192 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by greengeek »

MochiMoppel wrote: Wed Oct 06, 2021 5:55 am

As far as I understand you often test different distros, facing all sorts of browsers, file managers etc. No savefile,
In this case making extensive changes like setting up MIME types or adding stuff to the right-click menu (ROX-Filer only!) would make little sense.

Yes I agree. A quick and simple solution is what I need. Especially since in many cases I am testing a new puppy (no personalisation yet) and just want a quick way to get a url into the clipboard.
I won't benefit from any method that opens a url in the default browser because in most cases the very first thing I do with any testing session is to trial 5 - 10 browsers to see which ones the pup supports and how they behave online.

My need is to get a known url into the clipboard with as few clicks and little work as possible - ready for the Ctrl+V into the address bar of whichever browser I have opened.

The easiest way to get your URLs into the clipboard, requiring no script, you've already dismissed. Why?
Assuming that each URL is on a separate line, then all it takes is to
1) triple-click the URL (to select it and thereby send it to PRIMARY buffer), followed by
2) Ctrl+C (to send it to clipboard
Doesn't take a second

It sounds quick but that involves the following:
1) Click to open /root (to access the file)
2) Click to open document
3) Triple click to highlight the line I want
4) Ctrl+C
(That makes 5 clicks and a Ctrl+C before i can paste into the address bar)

By contrast the xclip and xsel methods mentioned earlier ( here and here) only require the following:
1) Click to open /root
2) Click on the script that contains the url (which for example may be labelled pForum)
(That makes only 2 clicks before I can paste into the address bar)

It is definitely quicker.
And although it may sound like a lot of work to create a few individual scripts (one for each url) in /root I will be loading them as a pet or sfs (or inbuilding them in my pup derivatives). What I am looking for is a convenience and speed gain during the hours on computer.

Possibly the process could be even quicker by having some sort of "mouse-over" panel that pops out from the side of the screen as this could potentially reduce clipboard loading time to a single click (now that I know the xclip and xsel scripts work...)

Another no-script solution: Create a very simple HTML page with your URLs as links, Then load into the browser of your choice. That's what I do.

Yes, this is an option - in fact probably a better option for sessions where I am working with a large number of links. (current xclip / xsel method works well for 5 or so links which is usually all I need). Williams2 suggested a similar concept using urxvt:

williams2 wrote: Tue Oct 05, 2021 12:01 am

Or you can cat the text file and the urls in urxvt will be clickable.

but I have not found a way yet to get a clicakble script to open a urxvt window. It appears I have to use "xterm" rather than urxvt(still investigating).Perhaps this method will be quicker or more lightweight than relying on the clickable links to be displayed in a browser.

If it has to be a script, here another idea but clearly not what you asked for. The following script requires a path of a text file as argument. It will then copy the contents of that file to the clipboard. If the file contains an URL, then the URL will be copied, but it can be any text. You could create a desktop icon for the script and then drag/drop a text file onto it. Don't know how this would be useful, but here it is:

Code: Select all

#!/bin/sh
## Copy contents of passed text file (=$1) to clipboard
[[ $(file -b --mime-type "$1")  != *text* ]] && exit
xclip -i -sel c "$1" || xsel -ib < "$1"

Note that the script does not require printf or piping into xclip or xsel because xclip can directly read from file and xsel, using redirection, can that too. This is also more accurate because the file contents will be copied "as is", including any trailing linefeeds while printf or echo would remove trailing whitespace.

I will give this a try. I like the idea of having a proper icon representing the function (url) I want. It would certainly be a more visually appealing solution than having ugly script icons sitting around in /root. (although I am trying to find an easy way to overlay the /root scripts with an icon without hardcoding into the Puppypin etc)

User avatar
amethyst
Posts: 2414
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 504 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by amethyst »

This is what I would consider: make a html containing all your bookmark hyperlinks > make an sfs file loaded as an additional drive automatically or as extra sfs during a session containing scripts (or one script to choose your browser from) for opening your different browsers via the open with menu > so to use: right-click the html file and open with the browser of your choice > this wil open the html file with the hyperlinks in your chosen browser > select the url you want to open

User avatar
greengeek
Posts: 1383
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 534 times
Been thanked: 192 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by greengeek »

amethyst wrote: Wed Oct 06, 2021 10:28 am

so to use: right-click the html file and open with the browser of your choice > this wil open the html file with the hyperlinks in your chosen browser

This will work fine if "Send To" is configured with all of the browsers I wish to trial. But when I am testing a new pup - or one of my remasters/derivatives I commonly trial multiple different versions of QTweb, Palemoon, Opera, Slimjet, Firefox, etc etc and they may be already installed, newly installed from pet, run by clicking an appimage, or run from sfs, or by clicking on a "portable" version etc etc.

Under these circumstances anything that requires preconfiguration of the default browser or "SendTo" is too cumbersome.

Although it now comes to mind that I could have an xclip shortcut to the html file you are referring to.

something like:
file:///root/bookmarks.htm

and then paste that into whichever browser I have started.
Hmmm, food for thought. Possibly I have been misunderstanding what everyone is suggesting about bookmark files.

User avatar
amethyst
Posts: 2414
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 504 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by amethyst »

This will work fine if "Send To" is configured with all of the browsers I wish to trial. But when I am testing a new pup - or one of my remasters/derivatives I commonly trial multiple different versions of QTweb, Palemoon, Opera, Slimjet, Firefox, etc etc and they may be already installed, newly installed from pet, run by clicking an appimage, or run from sfs, or by clicking on a "portable" version etc etc.

In that case I would just open the prior created html file with the browser from the browser's "Open file" menu (which all of your browsers shouldn't have a problem doing). That would be too much effort for you?

User avatar
greengeek
Posts: 1383
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 534 times
Been thanked: 192 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by greengeek »

amethyst wrote: Thu Oct 07, 2021 12:28 am

This will work fine if "Send To" is configured with all of the browsers I wish to trial. But when I am testing a new pup - or one of my remasters/derivatives I commonly trial multiple different versions of QTweb, Palemoon, Opera, Slimjet, Firefox, etc etc and they may be already installed, newly installed from pet, run by clicking an appimage, or run from sfs, or by clicking on a "portable" version etc etc.

In that case I would just open the prior created html file with the browser from the browser's "Open file" menu (which all of your browsers shouldn't have a problem doing). That would be too much effort for you?

I have not been able to find the "open" menu in a significant number of browsers - which is why I have had to resort to the annoying use of file/// in may cases.
I am sure the open file menu must be there somewhere but I often cant find it...

EDIT: here is the example of slimjet. Where's the file open menu?? I'm stumped.

Slimjet.jpg
Slimjet.jpg (40.49 KiB) Viewed 610 times
Last edited by greengeek on Thu Oct 07, 2021 1:28 am, edited 1 time in total.
User avatar
greengeek
Posts: 1383
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 534 times
Been thanked: 192 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by greengeek »

While trying to work out the best way of overlaying my clipboard scripts with an icon (without manually updating puppypin etc) I realised RoxApps will do what I want.

Ok, it's an inefficient waste of kB but it works!

If anyone wants to try it here is an sfs which loads a few RoxApps into /root. (Easily removed by unloading the sfs of course so no harm trying)

Each roxapp loads the clipboard with a URL. Nothing more.
(Of course I can eventually put them wherever I want them it's just that I have a jwm tray quick launch into /root so that's handy for me)

I just click the icon i want and it loads the appropriate URL to clipboard, then I can paste the URL into whichever browser.

Root_URL_shortcuts.png
Root_URL_shortcuts.png (30.05 KiB) Viewed 611 times

.
*** Uses xclip *** (which is already in many pups. I haven't finished updating the scripts yet to choose between xclip and xsel)

LINKS_APPS_gg-0.0.sfs
(20 KiB) Downloaded 22 times
Last edited by greengeek on Thu Oct 07, 2021 1:49 am, edited 1 time in total.
williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by williams2 »

What I do is start each browser with the same html file, with the most used urls, including urls of my other bookmark html files (which can have many urls in each file.)

A browser will show you the webpages at the url just by clicking the url. For example, see the screenshot.

Attachments
bookmarks.jpg
bookmarks.jpg (53.24 KiB) Viewed 609 times
williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by williams2 »

EDIT: here is the example of slimjet. Where's the file open menu?? I'm stumped

I think you can type / in the address bar, and see the file system.

At least, you should be able to type or paste the name of an html file, for example,
/mnt/home/my-bookmarks.html
or
file:///mnt/home/my-bookmarks.html

What I do is always start a browser like this:
firefox /mnt/home/my-bookmarks.html
opera /mnt/home/my-bookmarks.html
links /mnt/home/my-bookmarks.html

User avatar
greengeek
Posts: 1383
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 534 times
Been thanked: 192 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by greengeek »

williams2 wrote: Thu Oct 07, 2021 1:46 am

What I do is always start a browser like this:
firefox /mnt/home/my-bookmarks.html
opera /mnt/home/my-bookmarks.html
links /mnt/home/my-bookmarks.html

Could you post a sample file please? And how did you create it? Thanks

User avatar
greengeek
Posts: 1383
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 534 times
Been thanked: 192 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by greengeek »

williams2 wrote: Thu Oct 07, 2021 1:46 am

I think you can type / in the address bar, and see the file system.

Handy tip, thanks.

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by williams2 »

You could type in an html file line by line.

I wrote a script to make an html file from a text file.

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: Text-to-clipboard "hyperlink" in root? How?

Post by williams2 »

Could you post a sample file please? And how did you create it?

i wrote a text file: bookmarks.txt

I ran a script that I wrote: mkbookmarks

The script reads bookmarks.txt and creates the html file bookmarks.html

The script is very simple. The names and paths of the input and output files are hardcoded in the script.
The script expects each url to be on it's own line, no other text on that line.

Attachments
bookmark-files.tar.gz
(521 Bytes) Downloaded 20 times
Post Reply

Return to “Users”