• Christoph CullmannOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 months ago

    Yeah, it is all not that easy. Perhaps others have better ideas or one will be able to generalize some dbus api other terminal emulators could then expose, too. Or we see the solution is crap in real life ;)

    • krake
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 months ago

      The primary issue is always that the shell is an “unaware participant”, essentially blocking the flow of information between the terminal and the newly launched application. Your approach essentially creates a by-pass communication channel which is likely the least hackish way even if it might not feel like that.

      I have tried to come up with alternative ideas but they all have their own difficulties.

      One option would be to use a mechanism like LD_PRELOAD to intercept the shell’s exec-family calls and inject an updated activation token.

      A rather wild idea was to run the shell in-process on a thread of the terminal. This would then allow access to the now shared environment.

      Probably best to somehow get various terminal developers together to think about this. They all have this use case at hand and best understand how they are currently “embedding” the shell.