Ubuntu 22.04: xdg-open opening Text Editor instead of browser when called from C++ program

105 Views Asked by At

I'm a currently running on Ubuntu 22.04 and calling the following xdg-open system call from a C++ program:

QString cmd = "xdg-open /home/user/foo.html &";
int ret = system(cmd.toStdString().c_str());

Instead of opening the default Firefox browser the xdg-open system call opens foo.html in a Text Editor.

The same program xdg-open call on Ubuntu 20.04 opens foo.html in a Firefox browser.

0

There are 0 best solutions below