Xfce Forum

Sub domains
 

You are not logged in.

#1 2013-11-08 06:55:57

reset042
Member
Registered: 2012-04-26
Posts: 23

[Solved] Copy path and filename in Thunar?

I'm used to right-clicking on a filename to copy its full path so that I can paste it into text documents, and I tried to get this working in Thunar. I followed these instructions:

Xfce.org Thunar Custom Actions Docs

The command appears in my right-click context menu, but when I click it nothing happens and it does not copy anything to the clipboard. xclip is installed on my system. I'd be grateful for any help to get this working.

Offline

#2 2013-11-08 11:27:05

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 1,096

Re: [Solved] Copy path and filename in Thunar?

By default, xclip uses the X clipboard (XA_PRIMARY), and to paste the contents you need to paste in the traditional way (middle button click, or if you don't have a middle button, click both buttons at the same time). If you want to be able to paste via Ctrl+v (XA_CLIPBOARD), use this command instead:

echo -n %f | xclip -selection clipboard

More information is available in the xclip man page.

Offline

#3 2013-11-08 12:09:59

reset042
Member
Registered: 2012-04-26
Posts: 23

Re: [Solved] Copy path and filename in Thunar?

Brilliant! Thanks ToZ!

This now works perfectly. I wonder if the document I linked to in my first post should mention this?

(BTW, your avatar is excellent)

Offline

Board footer

Powered by FluxBB