Link to home
Create AccountLog in
Avatar of Tolgar
Tolgar

asked on

Why doesn't xdg-open work in Perl on Unix without issues?

Hi,
I use xgd-open to open a web page in Perl in Unix platform.

It works fine but I see the following message on the shell where I run my Perl code:

<unknown program name>(14582)/ ClientApp::doIt: Creating ClientApp
kioclient(14582) ClientApp::kde_open: KUrl("/path/to/the/file.html")

Open in new window



This is how I run this command in Perl:

`xdg-open "$path2Report"`;

Open in new window

Avatar of wilcoxon
wilcoxon
Flag of United States of America image

If you don't want to capture whatever xdg-open returns, I would recommend switching to system:
system("xdg-open '$path2Report'") == 0 or die "call to xdg-open failed: $?";

Open in new window

Avatar of Tolgar
Tolgar

ASKER

Thanks, I will try it.
Avatar of Tolgar

ASKER

Hi Wilcoxon,
I tried it but it didn't work.

How can I suppress this error in a different way?

Thanks,
ASKER CERTIFIED SOLUTION
Avatar of wilcoxon
wilcoxon
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Tolgar

ASKER

I used this instead and it works now:

`xdg-open "$path2Report" > /dev/null 2>&1`;