Results 1 to 10 of 10

Thread: Is it Possible to Integrate pcmanfm (and other apps) into Xfce Session?

  1. #1
    Join Date
    Dec 2011
    Beans
    Hidden!

    Is it Possible to Integrate pcmanfm (and other apps) into Xfce Session?

    meaning:

    in settings manager -> session and startup -> session

    i find a list of applications and what to do when they accidentally terminate or crash (restart style).
    with thunar it had the effect that if thunar crashes, it gets restarted immediately.
    i want this behavior for pcmanfm, but there's no way of manually adding it to that list.
    if i save the session and restart it still doesn't show up on the list.

    so the question is:

    how can i add applications to this list? i can remove them by pressing first quit and then save session.
    i can add those native to xfce4, but how about others?


  2. #2
    Join Date
    Mar 2012
    Beans
    308

    Re: Is it Possible to Integrate pcmanfm (and other apps) into Xfce Session?

    PCManFM won't show up on the session list, because it does not implement the session protocol. Here is the "official" thread:

    http://forum.xfce.org/viewtopic.php?id=7011

    I replaced Thunar with PCManFM long time ago. It does not crash on my system (like never), so there was no need for me to try integrating it into the XFCE session or to write a separate background script which handles the restart behavior.
    GNU/Linux

  3. #3
    Join Date
    Aug 2005
    Beans
    6,024

    Re: Is it Possible to Integrate pcmanfm (and other apps) into Xfce Session?

    Quote Originally Posted by brainwash View Post
    I replaced Thunar with PCManFM long time ago. It does not crash on my system (like never), so there was no need for me to try integrating it into the XFCE session or to write a separate background script which handles the restart behavior.
    You should give SpaceFM a spin, really cool!
    http://ubuntuforums.org/showpost.php...4&postcount=25

  4. #4
    Join Date
    Mar 2012
    Beans
    308

    Re: Is it Possible to Integrate pcmanfm (and other apps) into Xfce Session?

    Yeah, SpaceFM is a great file manager, but switching to it won't solve the actual problem (session integration).
    GNU/Linux

  5. #5
    Join Date
    Aug 2005
    Beans
    6,024

    Re: Is it Possible to Integrate pcmanfm (and other apps) into Xfce Session?

    Quote Originally Posted by brainwash View Post
    Yeah, SpaceFM is a great file manager, but switching to it won't solve the actual problem (session integration).
    Not what I was implying if it sounded that way, just mentioning spacefm

  6. #6
    Join Date
    Dec 2011
    Beans
    Hidden!

    Re: Is it Possible to Integrate pcmanfm (and other apps) into Xfce Session?

    Quote Originally Posted by brainwash View Post
    PCManFM won't show up on the session list, because it does not implement the session protocol. Here is the "official" thread:

    http://forum.xfce.org/viewtopic.php?id=7011

    I replaced Thunar with PCManFM long time ago. It does not crash on my system (like never), so there was no need for me to try integrating it into the XFCE session or to write a separate background script which handles the restart behavior.
    yeah i've seen that thread and was wondering about session management - probably i'm not going to start rewriting pcmanfm.

    ...maybe i'll give that script a try, you have any idea how i would start writing that?
    and thanks.

    edit: forgot to mention that pcmanfm is also managing the desktop on my machine.
    Last edited by ohnonot; May 7th, 2012 at 05:53 AM.

  7. #7
    Join Date
    Mar 2012
    Beans
    308

    Re: Is it Possible to Integrate pcmanfm (and other apps) into Xfce Session?

    Not sure yet, how to implement such a restart managment for both desktop and normal window instance.

    Restarting the desktop shouldn't be a problem. Something like this could do the job:
    Code:
    #!/bin/bash
    
    while true; do
      pidof pcmanfm && sleep 5 || pcmanfm --desktop
    done
    Run this script on startup (autostart or xinitrc) to spawn a persistent pcmanfm process. The infinite loop will restore the desktop, if it somehow dies.
    GNU/Linux

  8. #8
    Join Date
    Dec 2011
    Beans
    Hidden!

    Re: Is it Possible to Integrate pcmanfm (and other apps) into Xfce Session?

    Quote Originally Posted by brainwash View Post
    Restarting the desktop shouldn't be a problem. Something like this could do the job:
    Code:
    #!/bin/bash
    
    while true; do
      pidof pcmanfm && sleep 5 || pcmanfm --desktop
    done
    Run this script on startup (autostart or xinitrc) to spawn a persistent pcmanfm process. The infinite loop will restore the desktop, if it somehow dies.
    thanks.
    that means it would get restarted every 5 secs if not running?

    anyhow the problem is really rather with pcmanfm itself - it seems prone to crashing when used as file manager + desktop manager at the same time. the same with spacefm (which is a really great fm otherwise).
    i was thinking of using pcmanfm for the desktop and spacefm as a file manager but clicking a folder on the desktop still opens pcmanfm even if i symlink it to spacefm.
    (the same for xfdesktop - it always opens Thunar - is it possible to customize that?)

    i searched session protocol, not much info on the xfce pages.
    seems to have sth to do with entries in desktop files?!

  9. #9
    Join Date
    Mar 2012
    Beans
    308

    Re: Is it Possible to Integrate pcmanfm (and other apps) into Xfce Session?

    Quote Originally Posted by ohnonot View Post
    that means it would get restarted every 5 secs if not running
    The command starts pcmanfm (desktop mode), if there is no pcmanfm process running. Otherwise it will query the process list every 5 seconds (loop) and restart pcmanfm only if needed.

    By the way, are the crashes reproducible and did you try to debug them using GDB?
    GNU/Linux

  10. #10
    Join Date
    Dec 2011
    Beans
    Hidden!

    Re: Is it Possible to Integrate pcmanfm (and other apps) into Xfce Session?

    right now i'm back to thunar

    and i've never used a debugger.

    @mips: have you tried spacefm as desktop manager?

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •