You are not logged in.

#1 2010-09-26 10:21:32

From: /Germany/Aachen
Registered: 2010-09-02
Posts: 21

pcmanfm in deamon-mode without ui

Hey folks!

I run pcmanfm on my openbox as filemanager. And there is the possibility to run pcmanfm as a deamon to automount usb-sticks etc. But there is some small problem: when I run

pcmanfm -d

the filemanager pops up. Since I want to autostart this deamon I do not want to start the gui of pcmanfm on every login. I just want it to run in background.

Does anybody know a solution for this behaviour?

Cheers and thanks


#2 2010-11-19 00:19:28

Registered: 2010-11-18
Posts: 6

Re: pcmanfm in deamon-mode without ui


Still searching the answer for that. I think it's a bug.
I'll file it on pcmanfm bug tracker... (edit : … id=801864)

A working dirty hack, close the window roll
(you need to "pacman -S wmctrl")

pcmanfm -d&
sleep 0.5
pcmanpid=`ps -eo pid,cmd | grep "pcmanfm -d" | grep -v "grep" | awk '{print $1}'\`
pcmanwindow=`wmctrl -lp | grep -e ".* .* $pcmanpid" | awk '{print $1}'`
wmctrl -i -c $pcmanwindow

One-line version I put in openbox

((pcmanfm -d&) && sleep 0.5 && wmctrl -i -c $[`wmctrl -lp | grep -e ".* .* $[\`ps -eo pid,cmd | grep "pcmanfm -d" | grep -v "grep" | awk '{print $1}'\`]" | awk '{print $1}'`])&

It's possible to decrease the sleep if you see the window, but the launching time may vary. If it's too short it will simply not work and keep pcmanfm window.
Instead of sleep, it would be better to wait for the window, but for now, I need to sleep...


Last edited by grubshka (2010-11-19 08:51:46)


Board footer

Powered by FluxBB