3

pluma, and I believe gedit also, does not start a new instance, if it is running already, but instead opens the file with the existing instance. The call then returns immediately. Normally this is desired behaviour. But sometimes the immediate return is a problem when the editor is called from a script or program, which relies on the file having been edited before the call is returned (e.g. git commit or crontab -e).

Is there a way to either start a new instance of pluma or otherwise force a call to pluma (when one instance is already open) to not return immediately but only after the file in question has been closed in the editor.

frederik
  • 133
  • 5

1 Answers1

1

OS: Ubuntu 18.04.1

$ gedit --version
gedit - Version 3.28.1
$ 

I opened gedit from the launcher, pasted part of man gedit into it, and then opened gnome-terminal and ran gedit -s & exit. This opened gedit in a new window.

From man gedit:

-s, --standalone Run gedit in standalone mode.

Two instances of gedit


Edit: I don't have pluma installed but man pluma doesn't list the -s option. It does have

--new-window
       Create a new toplevel window in an existing instance of pluma.

--new-document
       Create a new document in an existing instance of pluma, on the  
       last Pluma window that had focus.

similar to gedit's

--new-window
       Create a new toplevel window in an existing instance of gedit.

--new-document
       Create a new document in an existing instance of gedit.
DK Bose
  • 44,553