Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-10-14 11:44:18

ahmeteid
Member
Registered: 2022-08-15
Posts: 65

do anyone know the commandline of copy_action and paste_action(thunar)

i need to know the command line that use for the default action copy , paste and delete in thunar, does any one know that?

Offline

#2 2022-10-14 12:11:09

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: do anyone know the commandline of copy_action and paste_action(thunar)

Thunar uses GIO (Gvfs) for its file operations. The gio command exposes some of these operations:

man gio

Why would you want to use these instead of your shell commands?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2022-10-15 16:10:25

ahmeteid
Member
Registered: 2022-08-15
Posts: 65

Re: do anyone know the commandline of copy_action and paste_action(thunar)

ToZ wrote:

Thunar uses GIO (Gvfs) for its file operations. The gio command exposes some of these operations:

man gio

Why would you want to use these instead of your shell commands?

thanks, i want to make cutom action copy, paste as admin, and remove as admin.
but not worked with copy,paste, i can't paste as admin, i must open folder as root

Last edited by ahmeteid (2022-10-15 17:52:21)

Offline

#4 2022-10-15 18:12:09

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: do anyone know the commandline of copy_action and paste_action(thunar)

ahmeteid wrote:

i must open folder as root

Try this:

  1. right-click and copy the file(s) you want to copy.

  2. in the thunar url bar, enter "admin:///" (enter password if asked) and then navigate to the destination folder

  3. right-click > paste

To delete, enter "admin:///", navigate to the folder and delete the file.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2022-10-16 08:11:27

Misko_2083
Member
Registered: 2015-10-13
Posts: 211
Website

Re: do anyone know the commandline of copy_action and paste_action(thunar)

It's possible with D-Bus using the /org/xfce/FileManager interface.
Example is here :> https://gitlab.xfce.org/xfce/thunar/-/issues/834
For target file use admin:/// prefix
I tried this command:

gdbus call --session  --dest org.xfce.Thunar --object-path /org/xfce/FileManager --method org.xfce.FileManager.CopyTo "/home/misko/Преузимања/" "['yt-get-master.zip']" "['admin:////home/misko/Преузимања/yt-get-masterz.zip']" ":0.0" ""

The new file is then owned by root.

-rw-r--r-- 1 root root 10289 Sep 17  2021 /home/misko/Преузимања/yt-get-masterz.zip

@ToZ why doesn't Thunar drop root priviledges after that? Once the password is entered it does not require it to be typed again.


Do you want to exit the Circus?
https://www.youtube.com/watch?v=ZJwQicZHp_c

Offline

#6 2022-10-16 10:01:13

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: do anyone know the commandline of copy_action and paste_action(thunar)

Misko_2083 wrote:

@ToZ why doesn't Thunar drop root priviledges after that? Once the password is entered it does not require it to be typed again.

Its cached (kept) for a timeout period of 5 minutes when "auth_admin_keep" is specified in the policy action.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2022-10-16 12:53:00

ahmeteid
Member
Registered: 2022-08-15
Posts: 65

Re: do anyone know the commandline of copy_action and paste_action(thunar)

the problem is that all commands are listed in gio commands, but no command for paste,
what is the command of paste in thunar

Offline

#8 2022-10-16 14:29:53

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: do anyone know the commandline of copy_action and paste_action(thunar)

I don't think there is a specific gio command to replicate what thunar does when it comes to copy/paste of files. Won't the process in post #4 work for you?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2022-10-16 23:06:13

ahmeteid
Member
Registered: 2022-08-15
Posts: 65

Re: do anyone know the commandline of copy_action and paste_action(thunar)

ToZ wrote:

I don't think there is a specific gio command to replicate what thunar does when it comes to copy/paste of files. Won't the process in post #4 work for you?

the process in post 4, it worked with me , it's good , i don't know what is the deference bw it and open as root, but i notice with it , i'm still in my directory not the root directory, it's good.
if i can make custom action of it like open as root , it will be better, i mean instead of typing in url, i'm asking if i can make admin:/// as custom action what i can type the command for that?

Offline

#10 2022-10-16 23:53:11

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: do anyone know the commandline of copy_action and paste_action(thunar)

I'm not sure what you're asking - creating a custom action for admin:/// doesn't make sense. If you want a quicker way to access admin:///, you can create a bookmark for it and it will show in the sidebar. To do so, just add/append "admin:///" to ~/.config/gtk-3.0/bookmarks.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#11 2022-10-17 00:16:47

ahmeteid
Member
Registered: 2022-08-15
Posts: 65

Re: do anyone know the commandline of copy_action and paste_action(thunar)

ToZ wrote:

I'm not sure what you're asking - creating a custom action for admin:/// doesn't make sense. If you want a quicker way to access admin:///, you can create a bookmark for it and it will show in the sidebar. To do so, just add/append "admin:///" to ~/.config/gtk-3.0/bookmarks.

thank u very much, i added it to bookmark, it's very good now. i think that is suitable solution.
i found i can make custom action for that and name it open as admin in the current path:

thunar admin://%f

Last edited by ahmeteid (2022-10-17 13:44:40)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 566.18 KiB (Peak: 583.46 KiB) ]