graysky2 / profile-sync-daemon

Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers.
https://wiki.archlinux.org/index.php/Profile-sync-daemon
Other
910 stars 88 forks source link

psd false detects running browser #85

Closed seletskiy closed 10 years ago

seletskiy commented 10 years ago

I have daemon called chrome-editor, that allows me to edit textarea contents directly in vim (that's the way I'm typing this message).

But when I'm trying to launch psd, it fails with message that google-chrome already launched, so it can't start. But browser by itself is not launched, psd get confused and muffed chrome-editor with browser.

graysky2 commented 10 years ago

Yes, this is a side effect of how psd tests for a running browser... see line 363. Basically, any process that contains 'chrome' is flagged. I'm not sure how to make the check more specific... on my system, chromium runs /usr/lib/chromium/chrome-sandbox but I do not know if that is universal across distros.

seletskiy commented 10 years ago

Nope, it's not universal at all...

Just for now I've resolved my specific issue by changing execution order, so my custom program started after psd.

The only choice I see is to provide special configuration parameter to allow user specify pattern by himself.

On Sat, Jul 26, 2014 at 2:52 AM, graysky notifications@github.com wrote:

Yes, this is a side effect of how psd tests for a running browser... see line 363. Basically, any process that contains 'chrome' is flagged. I'm not sure how to make the check more specific... on my system, chromium runs /usr/lib/chromium/chrome-sandbox but I do not know if that is universal across distros.

— Reply to this email directly or view it on GitHub https://github.com/graysky2/profile-sync-daemon/issues/85#issuecomment-50196458 .

Stanislav Seletskiy

graysky2 commented 10 years ago

You've done this in your_program.service I assume?

seletskiy commented 10 years ago

Kind of that. I've relied upon that psd is wanted by multi-user.target, and my program wanted by basic.target.

graysky2 commented 10 years ago

OK. I will close this and add to the known bugs since I don't know of a general way to detect the browser running. Thanks for reporting it.

https://github.com/graysky2/profile-sync-daemon/commit/07b6e2c90995b1212b4e6880d070193b86393351

seletskiy commented 10 years ago

Good, thanks!