Question: "How to default each new gedit window to standalone?"
Radio Controlled 17 Sept 2019
Background: gedit opens text files. The default application for opening files
of type TEXT was likely set to gedit. Application gedit opens new files in a
separate tab, not in a separate window.
Solution: Change the default application from gedit to another application.
Let's name the replacement application geditx. Application geditx will be
application gedit with a different command line option (see below).
In desktop environment MATE, a change of application for a file type is made
by right-click on a file name of that exact type, then select "Open With" and "Other Application ...".
Other desktop environments have similar steps. Ubuntu:
Wait! To change existing gedit to geditx requires application geditx to exist.
How to define geditx? Some solutions:
In a terminal create an alias: alias geditx="gedit -s"
While command geditx works in a terminal, it is not an option in
the desktop environment. Fail.
However, the alias geditx for application gedit may be useful
in a terminal window. In the work space used by the terminal
window, geditx would open a standalone gedit window.
Create a shell script named geditx. Application geditx will be
an option in the desktop environment. Switching from gedit to geditx
as the default application for files of type TEXT will change from
opening files in tabs to opening files in separate windows.
Warning: Opening a file within geditx (which is gedit) from the File Menu
will open a new tab, not a new window.
Warning: Double-click on a text file in the graphical interface will use
gedit, unless the default application for text files is changed to geditx.
Contents of shell script geditx:
gedit -s "$@"
Details about the save location for geditx and permissions
Save the shell script in some $HOME folder.
Make geditx executable, which translates to:
Open a terminal in the folder where geditx was saved.
Then: chmod +x geditx
The folder in $HOME where geditx was saved has to be
in environment variable PATH. If not, then solve this
An alternative is to copy file geditx to /usr/local/bin
and execute chmod +x in that folder. This requires
administrator access to the folder /usr/local/bin which
is normally done in Linux as follows:
sudo cp geditx /usr/local/bin
sudo chmod +x /usr/local/bin/geditx