3

Anyone knows how to accommodate for new gnome-terminal-server magic?

Before gnome-terminal got its new "client/server" architecture I used to use it as vim wrapper with great success for many years. Since --disable-factory got dropped the following code doesn't lock the process (due to forking) therefore it's useless as an editor for e.g. text areas in browser:

#!/bin/bash
TERMINAL=gnome-terminal
TERMARGS="--disable-factory --full-screen -e"

for ARG in "$@"; do
    # arguments quotation, etc.
    ARGS="$ARGS $ARG"
done

$TERMINAL $TERMARGS "vim $ARGS"
Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
cprn
  • 1,025
  • What if you start another terminal server (and use your stuff in a new client inside that server)... – don_crissti Aug 18 '16 at 18:45
  • http://unix.stackexchange.com/questions/201900/run-true-multiple-process-instances-of-gnome-terminal/201915#201915 ? – Gilles 'SO- stop being evil' Aug 18 '16 at 21:33
  • 1
    Did any of you actually try that? It doesn't work. Server just dies after 10 seconds no matter what I do. And if I try to open a terminal in newly created server, it doesn't spawn any windows - the gnome-terminal process just locks until gnome-terminal-server dies. – cprn Aug 19 '16 at 12:56
  • If I somehow manage to spawn a gnome-terminal window with --app-id parameter, I have a feeling, it will not lock the wrapper execution anyway. The idea is for the wrapper to wait until the terminal closes so it could only then give the control back to the parent. – cprn Aug 19 '16 at 15:18
  • A related question is http://unix.stackexchange.com/questions/201900/ . – JdeBP Dec 16 '16 at 01:29
  • Yeah, and as I commented on that question on Aug 29 and 30, it doesn't work. So unless someone gives me a working example, I'm stuck with the old version --disable-factory merge. – cprn Dec 16 '16 at 14:32
  • 1
    https://chrisirwin.ca/posts/multiple-instances-of-gnome-terminal/ Looks helpful... if you're okay with some root-permission setup. – stevesliva Mar 19 '18 at 18:58
  • Ahh... You see I asked that question long time ago and by now I remember getting even further than what Chris Irwin describes on his blog, still, with no success as it never locked the process and therefore gnome-terminal remains useless as a wrapper. They simply removed that functionality. – cprn Mar 19 '18 at 20:03

0 Answers0