I've noticed that kde-open is unable to open some urls. After running it, it first shows a "loading" dialog, and after few seconds, it either opens the page in browser, or a file viewer, text editor or whatever else. This is particularly a problem when trying to open a URL with GET parameters, as I'll show in the example. Even stranger is that not even urls shortened with goo.gl work, as kde-open somehow attempts to resolve them and fails in the process. Reproducible: Always Steps to Reproduce: Let's have an example URL: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=B9X6Q5QU7FKPC Try to open it: kde-open "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=B9X6Q5QU7FKPC" Actual Results: kde-open does somethign wrong with the GET parameters, apparently attempts to resolve the redirection, and as a result, you will get a paypal error page. Expected Results: kde-open should open the web browser once it detects that the parameter is a url, instead of trying to resolve and download it. Those both work correctly: xdg-open "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=B9X6Q5QU7FKPC" gnome-open "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=B9X6Q5QU7FKPC"
Also, you'll get a load of those: (kde-open:11535): Gtk-CRITICAL **: IA__gtk_progress_configure: assertion `value >= min && value <= max' failed
I cannot reproduce this. I get the PayPal billing page when I try the link with kde-open. However, the version of kde I am running is what will become 4.12.
Created attachment 83719 [details] The page opened by kde-open Direct result of kde-open "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=B9X6Q5QU7FKPC"
Created attachment 83720 [details] The same page opened with gnome-open I suspect kde-open did not handle session cookies or headers properly while trying to resolve the url.
(In reply to comment #4) > Created attachment 83720 [details] > The same page opened with gnome-open > > I suspect kde-open did not handle session cookies or headers properly while > trying to resolve the url. No. That is not the problem. The problem is that the original request is handled by kde-open (read: KIO) while the redirected URL is handled by the browser which in your case seems to be Firefox. That is because kde-open attempts to determine the content type of the requested resource in order to launch it with the correct application. It does not simply guess or blindly send the request. Unfortunately, this need to determine the actual content-type of the resource results in the cookie from the original request being stored in KDE's cookiejar. That of course means Firefox will never see that cookie. Hence, the end result you got. This will probably require some sort of workaround in KIO.
(In reply to comment #5) > (In reply to comment #4) > > Created attachment 83720 [details] > > The same page opened with gnome-open > > > > I suspect kde-open did not handle session cookies or headers properly while > > trying to resolve the url. > > No. That is not the problem. > > The problem is that the original request is handled by kde-open (read: KIO) > while the redirected URL is handled by the browser which in your case seems > to be Firefox. That is because kde-open attempts to determine the content > type of the requested resource in order to launch it with the correct > application. It does not simply guess or blindly send the request. > > Unfortunately, this need to determine the actual content-type of the > resource results in the cookie from the original request being stored in > KDE's cookiejar. That of course means Firefox will never see that cookie. > Hence, the end result you got. This will probably require some sort of > workaround in KIO. That makes sense, but why does the routine, after determining mime type, not pass the original URI to the appropriate application? I believe the cookies would then be properly handled by the browser.
(In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > Created attachment 83720 [details] > > > The same page opened with gnome-open > > > > > > I suspect kde-open did not handle session cookies or headers properly while > > > trying to resolve the url. > > > > No. That is not the problem. > > > > The problem is that the original request is handled by kde-open (read: KIO) > > while the redirected URL is handled by the browser which in your case seems > > to be Firefox. That is because kde-open attempts to determine the content > > type of the requested resource in order to launch it with the correct > > application. It does not simply guess or blindly send the request. > > > > Unfortunately, this need to determine the actual content-type of the > > resource results in the cookie from the original request being stored in > > KDE's cookiejar. That of course means Firefox will never see that cookie. > > Hence, the end result you got. This will probably require some sort of > > workaround in KIO. > > That makes sense, but why does the routine, after determining mime type, not > pass the original URI to the appropriate application? > > I believe the cookies would then be properly handled by the browser. Let me ask you one more question. How did you set Firefox to be the default browser? Through the Default Applications or using the File Associations module in the control panel? Or did it already come configured that way in your distro? If you used Default Application to set you default web browser preference, you will not encounter this problem where as you would if you used the File Associations to change the default browser for text/html.
(In reply to comment #7) > Let me ask you one more question. How did you set Firefox to be the default > browser? Through the Default Applications or using the File Associations > module in the control panel? Or did it already come configured that way in > your distro? > > If you used Default Application to set you default web browser preference, > you will not encounter this problem where as you would if you used the File > Associations to change the default browser for text/html. Oh wow, thanks for this suggestion! Well tbh I don't know how was it set to be a the default browser, it was pre-configured in Mint. But I just checked and in KDE settings and it was configured in the file associations, but not in default applications. After adding it to default applications, it works fine (with the command in the original post). My system is a strange mix of Gnome, Mate and KDE, so that might be part of the reason why it didn't work. --- I'm not sure if this should be marked as resolved, because the original bug (without "default application") is still valid.
(In reply to comment #8) > (In reply to comment #7) > > Let me ask you one more question. How did you set Firefox to be the default > > browser? Through the Default Applications or using the File Associations > > module in the control panel? Or did it already come configured that way in > > your distro? > > > > If you used Default Application to set you default web browser preference, > > you will not encounter this problem where as you would if you used the File > > Associations to change the default browser for text/html. > > Oh wow, thanks for this suggestion! > > Well tbh I don't know how was it set to be a the default browser, it was > pre-configured in Mint. But I just checked and in KDE settings and it was > configured in the file associations, but not in default applications. After > adding it to default applications, it works fine (with the command in the > original post). > > My system is a strange mix of Gnome, Mate and KDE, so that might be part of > the reason why it didn't work. > > --- > > I'm not sure if this should be marked as resolved, because the original bug > (without "default application") is still valid. I think I will leave this bug open since it is a very legitimate problem.
Is this still relevant or applicable with KDE Frameworks 5.45?
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!