Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 09 Dec 2019, 00:48
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
xsel - utility for pasting files to clipboard
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
jpeps

Joined: 31 May 2008
Posts: 3217

PostPosted: Sat 28 Jun 2008, 05:16    Post subject:  xsel - utility for pasting files to clipboard  

Paste files to clipboard:

xsel < file (paste with middle button of mouse)

or:

xsel -b <file (paste with cont-v)

check xsel -h for other options

download:

http://jpeters.net/apps/xsel-0.9.6-i486.pet

http://jpeters.net/apps/xsel-0.9.6-i486.pet.md5.txt
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 9087
Location: Perth, Western Australia

PostPosted: Sat 28 Jun 2008, 22:05    Post subject:  

Note also that Puppy 4.00 has 'xclip' -- type 'man xclip' in a terminal for help.
_________________
https://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
jpeps

Joined: 31 May 2008
Posts: 3217

PostPosted: Sun 29 Jun 2008, 00:07    Post subject:  

BarryK wrote:
Note also that Puppy 4.00 has 'xclip' -- type 'man xclip' in a terminal for help.


Thanks Barry; I didn't know about xclip. From what I can see, both do about the same things...perhaps xsel takes a little less typing:

xsel -b == xclip -o -sel clip
xsel == xclip -o

I just realized that you can pipe to them...which is nice for sending output from scripts right to the clipboard:

passfile selection | xsel (or xclip)
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14528
Location: Gatineau (Qc), Canada

PostPosted: Wed 19 Dec 2018, 09:20    Post subject:  

Hello all.

Please wait a full minute for the dust on this 10-year old thread to
dissipate -- so you can read the rest of this post!!! Laughing

~~~~~~~~

Here is a handy trick you can use if your old opera-12.16 browser (or any
old browser that you like) will not show a page (it jams on it or takes
forever to show it).

Edit your defaultbrowser script at /usr/local/bin like so:
Code:
#!/bin/sh
# defaultbrowser
####
BlocNote="`xsel -o`"
if [ "${BlocNote:0:4}" = "http" ];then
     exec palemoon $BlocNote 2>/dev/null
else
     exec palemoon "$@" 2>/dev/null
fi
If you are using "defaultbrowser" directly, it does not change a thing.

But if there is an URL in the clipboard, your defaut browser will load it
automatically.

Coming back to our scenario, your browser is being fussy? The solution
is frustration-free: copy the contents of its address bar (Ctrl-A then
Ctrl-C), and run your default browser.

You can adapt this trick to other browsers (e.g. SeaMonkey or Vivaldi).
Something like:
Code:
#!/bin/sh
# seamonkey.sh
####
cd /mnt/home/seamonkey-2.49.2
BlocNote="`xsel -o`"
if [ "${BlocNote:0:4}" = "http" ];then
     exec /mnt/home/seamonkey-2.49.2/seamonkey $BlocNote
else
     exec /mnt/home/seamonkey-2.49.2/seamonkey "$@"
fi


(The problem is that you cannot run a browser from another browser
anymore, and this mini-script basically solves it.)

Enjoy.

BFN.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0381s ][ Queries: 12 (0.0119s) ][ GZIP on ]