Say for example, to open multiple instances of gedit
editor I wrote a shell script like this-
gedit&
gedit&
gedit&
gedit&
But after I ran my shell script ./example.sh
, I can find only one instance of gedit! I've even used the &
operator, so that the shell doesn't wait for one instance to finish. Still I cannot see four instances of gedit
.
Also I tried directly from the command prompt. If I just enter gedit&
on the command line, it showed 1906
( this is the PID of the newly created gedit
process ), started one new gedit
instance and returned to prompt again. When I typed gedit&
on the command line, it showed 1909
this time, but no new instance of gedit! And I couldn't find any process with PID 1909
in the System Monitor too. Where did this new process go away?
Is the happening specific to gedit
? If so, what is the generic behavior when creating multiple instances of a program?
Instead, to open another instance of the program, simply middle mouse click (or if you're on a laptop, press both left button and right button simultaneously to simulate a middle click) on the icon which will spawn a new window with the same application.
Open multiple instances of an app using Shift + Click Then, hold down the Shift key on your keyboard and click with your cursor - or tap with your finger - on its taskbar icon. One click or tap opens a new instance, two clicks or taps open two, and so on.
On Linux, there are three ways to run multiple commands in a terminal: The Semicolon (;) operator. The Logical OR (||) operator. The Logical AND (&&) operator.
An instance is a virtual server in the AWS Cloud. With Amazon EC2, you can set up and configure the operating system and applications that run on your instance. When you sign up for AWS, you can get started with Amazon EC2 using the AWS Free Tier .
It is specific to gedit. You are likely looking for gedit --new-window &
.
From man gedit
:
--new-window Create a new toplevel window in an existing instance of gedit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With