publishingtore.blogg.se

Open file in gedit from terminal
Open file in gedit from terminal












open file in gedit from terminal

When using -new-window all windows share the same gedit process.Īnd finally to make sure that this also works if you select multiple files in your file manager and open them, you need another modification of the Exec key. Both will result in the files being opened in a new window, but with -s each window will also belong to its own process. Then there is also an important difference between the two possible flags used to open a new window: -new-window or -s. Files in this path will override files with the same name from the system-wide directory. To do that just copy /usr/share/applications/ to ~/.local/share/applications/. That way the system one will not be overwritten on distro package updates. desktop file you want to modify in your home directory and use that to override the system-wide one than to modify the system-wide one directly. You can prevent this by changing the DBusActivatable key to false.Īlso, it is much better to create a copy of the. This means that it is launched via your session's DBus daemon and then provides a common DBus interface for such activatable programs to specify the files to open. desktop file did not work is that gedit is DBus activated. The reason why your modification of the Exec key in the. (By the way, the default value for "show-tabs-mode" is 'auto'.) Thus, it is the "single window, no tab" mode (as opposed to "multiple windows"). With this "gsettings" method, gedit automatically closes a.txt and reuses the existing window of a.txt to open b.txt in it whenever b.txt is double-clicked on a desktop. I want the "multiple windows" mode.īy the way, the following useless method turns gedit into the "single window, no tab" mode, which is not what I want. The default mode of gedit is "single window, multiple tabs". The b.txt still opens in a tab in the same window as a.txt. Perl -pe 's/Exec=gedit %U/Exec=gedit -s %U/' .bak > ĭiff .bak The configuration file /usr/share/applications/Ĭontains the execution directive Exec=gedit %Uīy the following commands, and restarted the computer. However, by default, Gnome seems to invoke gedit without the "-s" option. Then b.txt would be opened in a new window, while a.txt stays in its existing window. If Gnome invoked gedit with the "-s" option as in gedit -s b.txt However, I want b.txt to be opened in a new window of gedit so that there will be two windows - the existing window for a.txt and a new window for b.txt. Then, unfortunately, by the factory default, b.txt will be opened in a tab in the same window as a.txt. Suppose that a.txt is already open in a gedit window, and that b.txt is double-clicked on a Gnome desktop of Debian 8 Jessie. How can gedit be forced to open a new window independently of existing gedit windows whenever a text file (.txt) is double-clicked on a Gnome desktop of Debian 8, Jessie?














Open file in gedit from terminal