Announcement

Collapse
No announcement yet.

Apps pause execution when switched to other user's session

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Apps pause execution when switched to other user's session

    Hi dear readers!
    I use 2 plasma sessions at work. It is very convenient to switch between them by using ctrl+alt+f1 and ctrl+alt+f2
    But I have a problem that when I switch to other session. The apps in current session get to halt.
    For example if I build my C++ app with make in current session and switch to other session. The building pauses until the comeback to the session.
    How to make apps to keep running in not active session?

    #2
    I doubt you can do that. You might consider running a VM for one purpose and sharing folders to transfer data back and forth.

    Please Read Me

    Comment


      #3
      Thank you for the answer. It would be great to have such option not to suspend apps

      Comment


        #4
        why not just use a separate activity (basically a different desktop) you could set it up as your build desktop with it's own launchers for whatever tools you use for that and switch between the 2 with "meta+tab"

        VINNY
        i7 4core HT 8MB L3 2.9GHz
        16GB RAM
        Nvidia GTX 860M 4GB RAM 1152 cuda cores

        Comment


          #5
          Originally posted by fro0m View Post
          How to make apps to keep running in not active session?
          If you run the build in the background, it will keep going. F.ex.
          Code:
          $ nohup make -j8 &>> make.log &
          To watch it, you could run tail -f (or less +F) on the log. When you switch sessions, the tail -f will suspend, and catch up when you switch back, but the background job will be running the whole time.
          Regards, John Little

          Comment


            #6
            Originally posted by vinnywright View Post
            why not just use a separate activity (basically a different desktop) you could set it up as your build desktop with it's own launchers for whatever tools you use for that and switch between the 2 with "meta+tab"

            VINNY
            Good idea Vinny! It's been so long since I've looked at Activities I'd totally forgotten about it. This kinda sounds like what Activities were designed for.

            Please Read Me

            Comment


              #7
              This seems to work for me! Thank you.
              However I need to track if background process is finished in parent process. I found a solution of checking PID in the loop https://unix.stackexchange.com/quest...a-shell-script
              did not check it yet. However it seems not easy to understand.

              Comment


                #8
                Originally posted by fro0m View Post
                However I need to track if background process is finished in parent process. I found a solution of checking PID ...
                That seems overkill. I use zsh and it tells me when jobs finish (old school shells would only tell you just before outputting a prompt). Or run ps to see what's running. Or tail the log file to see what it's up to.

                Perhaps you'd like a notification in the other session. I couldn't find examples of this, except using the ancient unix write command; it's a bit clunky, but some part of KDE makes it work.

                Dredging something up from 25 years ago, if one session runs "xhost +", then the other session can open windows on the first. The sessions get different values of $DISPLAY, when I did it ":0" and ":1". So if xhost + has been run in the first session, the second can run DISPLAY=:0 kdialog --msgbox "don't panic".
                Regards, John Little

                Comment

                Working...
                X