Xfce Forum

Sub domains
 

You are not logged in.

#1 2012-05-27 17:02:24

tcat
Member
Registered: 2012-04-13
Posts: 4

Sending dbus message to Thunar

Dear All,

Is it possible to send a dbus message  to Thunar?
I mean if a user can send a message such as copy, delete, move file from a shell script.

E.g.

$ dbus-send dbus-send \
    --dest=org.xfce.Thunar \
     /my/file/name \
     org.xfce.FileManager.delete
....

If so, where do I find the docs on the supported interface?

Many thanks

Offline

#2 2012-05-29 10:04:14

demosthenese
Member
From: Liverpool, UK
Registered: 2009-05-04
Posts: 62

Re: Sending dbus message to Thunar

But why would you want to use thunar for this and not cp, rm and mv?

Offline

#3 2012-06-08 17:20:14

tcat
Member
Registered: 2012-04-13
Posts: 4

Re: Sending dbus message to Thunar

I know it seems silly.

On GNOME installation I use udisk and gvfs.
On my XFCE instalation I tried a little experiment to go without these with a static desktop of mine

E.g I created my own desktop files
$ ls Desktop/*.desktop
CD-ROM.desktop  Computer.desktop  Floppy.desktop  Trash.desktop  USB.desktop

For my trash I implemented a simplified function, perhaps even a buggy one,
#!/bin/sh
if [ -n "$1" ]; then
        for f in "$@"; do
        echo $f
        if [ "$(stat -c%m "$f")" = "$(stat -c%m ~/)" ]; then
          echo same file system, moving to trash
          mv "$f" ~/.trash/
          [ -e ~/Desktop/.tmp ] || \
            sed s/Icon=xfce-trash_empty/Icon=xfce-trash_full/ \
            ~/Desktop/Trash.desktop > ~/Desktop/.tmp
        else
          echo different file system, removing in place
          rm -r "$f"
        fi
        done
        [ -e ~/Desktop/.tmp ] && mv ~/Desktop/.tmp ~/Desktop/Trash.desktop
else thunar ~/.trash
fi

Instead of using mv and rm in the above shell script, I thought it would be nice to call back thunar possibly using dbus messages.

Offline

#4 2012-06-17 15:33:57

bitches_brew
Member
Registered: 2012-06-17
Posts: 2

Re: Sending dbus message to Thunar

hello

I am also intrested in this topic.
I use mc (midnight commander) as my main file manager. It have one disadvantage: copying files is in the same thread/window. When I copy/move bigger files, my file manager is frozen...

I would love to have a script that calls thunar via dbus to copy/move/delete files...

Offline

#5 2012-07-03 21:56:27

bitches_brew
Member
Registered: 2012-06-17
Posts: 2

Re: Sending dbus message to Thunar

PLEASE PLEASE HELP

Offline

Board footer

Powered by FluxBB