According to this link https://developer.gnome.org/desktop-entry-spec/ If the .desktop file has the Entry
DBusActivatable set to
true It will ignore the
A boolean value specifying if D-Bus activation is supported for this
application. If this key is missing, the default value is false. If
the value is true then implementations should ignore the Exec key and
send a D-Bus message to launch the application. See D-Bus Activation
for more information on how this works. Applications should still
include Exec= lines in their desktop files for compatibility with
implementations that do not understand the DBusActivatable key.
Ubuntu 19.10 has this entry
DBusActivatable=true for gedit .desktop file which is
This answer is just a workaround because just to make the Exec key to work in this case.. I am making the
DBusActivatable=false with out knowing the advantages of this key (https://developer.gnome.org/desktop-entry-spec/#dbus) and its implementation in newer versions of Ubuntu starting from 19.10.
Ok now we set the
DBusActivatable=false this means
Exec= line will work.
So in my case I have changed
Exec = gedit %U
Exec = gedit --new-window
man gedit you can choose the options for
[Desktop Action new-document]
Create a new toplevel window in an existing instance of gedit.
Create a new document in an existing instance of gedit.
Run gedit in standalone mode.