You are not logged in.

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

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

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
Chris

Offline

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

grubshka
Member
Registered: 2010-11-18
Posts: 6

Re: pcmanfm in deamon-mode without ui

Hello,

Still searching the answer for that. I think it's a bug.
I'll file it on pcmanfm bug tracker... (edit : https://sourceforge.net/tracker/?func=d … 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 autostart.sh

((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...

Cheers

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

Offline

Board footer

Powered by FluxBB