How to open a specific application like macOS `open -a`?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
On macOS in the default Terminal running bash
, I can type open -a Firefox http://www.wikipedia.org
to open a URL with Firefox, or another browser. It also works to launch a program, e.g. open -a maps
, and to open a file in the default program, e.g. open file.pdf
.
How can I do the same on Ubuntu in the default GNOME Terminal also running bash
? I know that I can open a file or URL with xdg-open /path/to/file
, and I can open the default browser with sensible-browser
. Does Ubuntu have a general command to open files, applications, or files in specific applications?
I am running bash
on both machines, 3.2.57(1)-release
on macOS and 4.4.19(1)-release
on Ubuntu.
command-line bash
New contributor
mmorin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
1
down vote
favorite
On macOS in the default Terminal running bash
, I can type open -a Firefox http://www.wikipedia.org
to open a URL with Firefox, or another browser. It also works to launch a program, e.g. open -a maps
, and to open a file in the default program, e.g. open file.pdf
.
How can I do the same on Ubuntu in the default GNOME Terminal also running bash
? I know that I can open a file or URL with xdg-open /path/to/file
, and I can open the default browser with sensible-browser
. Does Ubuntu have a general command to open files, applications, or files in specific applications?
I am running bash
on both machines, 3.2.57(1)-release
on macOS and 4.4.19(1)-release
on Ubuntu.
command-line bash
New contributor
mmorin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
On macOS in the default Terminal running bash
, I can type open -a Firefox http://www.wikipedia.org
to open a URL with Firefox, or another browser. It also works to launch a program, e.g. open -a maps
, and to open a file in the default program, e.g. open file.pdf
.
How can I do the same on Ubuntu in the default GNOME Terminal also running bash
? I know that I can open a file or URL with xdg-open /path/to/file
, and I can open the default browser with sensible-browser
. Does Ubuntu have a general command to open files, applications, or files in specific applications?
I am running bash
on both machines, 3.2.57(1)-release
on macOS and 4.4.19(1)-release
on Ubuntu.
command-line bash
New contributor
mmorin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
On macOS in the default Terminal running bash
, I can type open -a Firefox http://www.wikipedia.org
to open a URL with Firefox, or another browser. It also works to launch a program, e.g. open -a maps
, and to open a file in the default program, e.g. open file.pdf
.
How can I do the same on Ubuntu in the default GNOME Terminal also running bash
? I know that I can open a file or URL with xdg-open /path/to/file
, and I can open the default browser with sensible-browser
. Does Ubuntu have a general command to open files, applications, or files in specific applications?
I am running bash
on both machines, 3.2.57(1)-release
on macOS and 4.4.19(1)-release
on Ubuntu.
command-line bash
command-line bash
New contributor
mmorin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
mmorin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
mmorin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 56 mins ago
mmorin
1145
1145
New contributor
mmorin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
mmorin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
mmorin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
You can specifically use your desired program's name (if it's able to be used as a command line tool).
For example, urls:
firefox duckduckgo.com
chromium-browser askubuntu.com
PDF:
evince foo.pdf
okular bar.pdf
Images:
gpicview foo.png
feh bar.jpeg
Texts:
gedit foo.txt
mousepad /etc/config
leafpad bar.xml
Video/Music:
mpv foo.mp3
vlc bar.mp4
eog picture.jpg
for images too if you have gnome-desktop installed :)
– Videonauth
48 mins ago
@Videonauth Yeah, or any other kind of tools ;)
– Ravexina
47 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
You can specifically use your desired program's name (if it's able to be used as a command line tool).
For example, urls:
firefox duckduckgo.com
chromium-browser askubuntu.com
PDF:
evince foo.pdf
okular bar.pdf
Images:
gpicview foo.png
feh bar.jpeg
Texts:
gedit foo.txt
mousepad /etc/config
leafpad bar.xml
Video/Music:
mpv foo.mp3
vlc bar.mp4
eog picture.jpg
for images too if you have gnome-desktop installed :)
– Videonauth
48 mins ago
@Videonauth Yeah, or any other kind of tools ;)
– Ravexina
47 mins ago
add a comment |Â
up vote
2
down vote
accepted
You can specifically use your desired program's name (if it's able to be used as a command line tool).
For example, urls:
firefox duckduckgo.com
chromium-browser askubuntu.com
PDF:
evince foo.pdf
okular bar.pdf
Images:
gpicview foo.png
feh bar.jpeg
Texts:
gedit foo.txt
mousepad /etc/config
leafpad bar.xml
Video/Music:
mpv foo.mp3
vlc bar.mp4
eog picture.jpg
for images too if you have gnome-desktop installed :)
– Videonauth
48 mins ago
@Videonauth Yeah, or any other kind of tools ;)
– Ravexina
47 mins ago
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
You can specifically use your desired program's name (if it's able to be used as a command line tool).
For example, urls:
firefox duckduckgo.com
chromium-browser askubuntu.com
PDF:
evince foo.pdf
okular bar.pdf
Images:
gpicview foo.png
feh bar.jpeg
Texts:
gedit foo.txt
mousepad /etc/config
leafpad bar.xml
Video/Music:
mpv foo.mp3
vlc bar.mp4
You can specifically use your desired program's name (if it's able to be used as a command line tool).
For example, urls:
firefox duckduckgo.com
chromium-browser askubuntu.com
PDF:
evince foo.pdf
okular bar.pdf
Images:
gpicview foo.png
feh bar.jpeg
Texts:
gedit foo.txt
mousepad /etc/config
leafpad bar.xml
Video/Music:
mpv foo.mp3
vlc bar.mp4
edited 41 mins ago
answered 51 mins ago


Ravexina
28.8k147098
28.8k147098
eog picture.jpg
for images too if you have gnome-desktop installed :)
– Videonauth
48 mins ago
@Videonauth Yeah, or any other kind of tools ;)
– Ravexina
47 mins ago
add a comment |Â
eog picture.jpg
for images too if you have gnome-desktop installed :)
– Videonauth
48 mins ago
@Videonauth Yeah, or any other kind of tools ;)
– Ravexina
47 mins ago
eog picture.jpg
for images too if you have gnome-desktop installed :)– Videonauth
48 mins ago
eog picture.jpg
for images too if you have gnome-desktop installed :)– Videonauth
48 mins ago
@Videonauth Yeah, or any other kind of tools ;)
– Ravexina
47 mins ago
@Videonauth Yeah, or any other kind of tools ;)
– Ravexina
47 mins ago
add a comment |Â
mmorin is a new contributor. Be nice, and check out our Code of Conduct.
mmorin is a new contributor. Be nice, and check out our Code of Conduct.
mmorin is a new contributor. Be nice, and check out our Code of Conduct.
mmorin is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1080846%2fhow-to-open-a-specific-application-like-macos-open-a%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password