It might sound like a stupid question by I'm trying to work this out for a while but I can't figure out how to solve it.
I have two images named imagem.bmp
and imagem2.bmp
and a shell script that is supposed to open these two images using eye of gnome. I have written this in the script:
#!/usr/bash
eog imagem.bmp
eog imagem2.bmp
The problem is that only one image is opened, i.e., eog opens the first image and then the second image is loaded in the same screen. All I need is to open it in two separate screens so that i can compare the images.
The help text is always useful:
$ eog --help
Usage:
eog [OPTION...] [FILE…]
Help Options:
-h, --help Show help options
--help-all Show all help options
--help-gtk Show GTK+ Options
Application Options:
-f, --fullscreen Open in fullscreen mode
-c, --disable-image-collection Disable image collection
-s, --slide-show Open in slideshow mode
-n, --new-instance Start a new instance instead of reusing an existing one
--version Show the application's version
--display=DISPLAY X display to use
Notice this option:
-n, --new-instance Start a new instance instead of reusing an existing one
Instead of running eog
, run eog -n
to open a new instance.
bash
waits for one command to finish executing before starting another. You can use &
to execute a program "in the background". Try this:
#!/bin/bash
eog imagem.bmp &
eog imagem2.bmp &
I also fixed the /usr/bash
bug.
Strictly speaking, the second line doesn't need the &
, but this will return your prompt to you faster, without waiting for the second eog
process to terminate.
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