[Mono-bugs] [Bug 77389][Wis] Changed - System.Diagnostics.Process.Start does not open file/uri-scheme through associated apps

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Jan 28 15:37:49 EST 2007

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by jopsen at gmail.com.


--- shadow/77389	2006-01-30 09:33:32.000000000 -0500
+++ shadow/77389.tmp.10742	2007-01-28 15:37:48.000000000 -0500
@@ -45,6 +45,34 @@
 ------- Additional Comments From dick at ximian.com  2006-01-30 09:33 -------
 I don't see this happening with mono on Linux any time soon unless a
 third party writes a desktop-agnostic library with a minimum of
 dependencies that does all the work.
+------- Additional Comments From jopsen at gmail.com  2007-01-28 15:37 -------
+Hi, don't know if this is the method to post comments, but I geuss
+I'll know in a minute... :)
+The problem may be solved using xdg-open from the portland project:
+It opens a resource with default associated application, and it's
+desktop independent... The only problem is that xdg-open doesn't open
+programs, in the sense that "xdg-open firefox" doesn't work... 
+I can't think of anyway to determine whether a given string is a
+resource or *nix shell command...
+Anyway I tried to make a small solution, but I think it's better if
+it's used a workaround instead:
+public static Process Start(string fileName) {
+	Process process;
+	try{
+		process = Start(new ProcessStartInfo(fileName));
+	}
+	catch(Win32Exception w){
+		process = Start(new ProcessStartInfo("xdg-open \"" + fileName + "\""));
+	}
+	return process;
+\\Regards Jop... (Jonas Finnemann Jensen).

More information about the mono-bugs mailing list