TPT still freezes while it runs xdg-open

  • LBPHacker
    18th Aug 2016 Developer 0 Permalink

    So a while back I started this thread about TPT waiting for xdg-open to finish in Development because I thought this was something not only I'd had. The gist of it is that TPT freezes while xdg-open runs the browser, which means that, with firefox and chromium-browser at least, it either returns instantly if there's a browser session already running, or freezes until the newly created browser session shuts down.

     

    Back then I realised that apparently jacob1 had no problems opening threads from TPT, so I thought it was just something acting up on my side and decided to ignore it. I already knew that if I had a browser open, it wouldn't freeze, so I just rolled with that and have been rolling with it since then.

     

    I forgot to "prepare" a browser session today and TPT froze again, which reminded me of this problem, and now I'd like to ask ... what might cause this? I thought it was because TPT ran xdg-open synchronously, but seeing as jacob1's TPT doesn't freeze, that's unlikely.

  • jacob2
    18th Aug 2016 Member 0 Permalink
    What desktop environment do you use? Maybe it depends on that. I use MATE (based on gnome 2). That seems very broken that xdg-open would block until the process it launches exits. I'm not sure what we could do in that case, maybe somehow detect whatever on your system is broken and launch a new process to call xdg-open in that case (strange)

    If you type xdg-open google.com in a terminal, does the terminal block until the browser closes?
    Edited once by jacob2. Last: 18th Aug 2016
  • LBPHacker
    18th Aug 2016 Developer 0 Permalink

    It does, unless of course there's already an instance open. I thought this was normal behaviour. Also, I'm using LXDE.

    Edited 4 times by LBPHacker. Last: 11th Dec 2020
  • jacob2
    18th Aug 2016 Member 0 Permalink
    I'm not sure if that is normal, I've only ever used MATE. In that xdg-open won't freeze if the browser isn't already open, it just immediately returns and then the browser will open.

    I also tested and it worked like that in gnome 2.

    If the blocking is common there are still workarounds we can do in tpt.