File gdm-no-uri-handler.patch of Package gdm.import4636

commit b9678dab44cfb0f1ab4904ee12ac5b3719599b83
Author: Vincent Untz <vuntz@gnome.org>
Date:   Mon May 23 18:34:46 2011 +0200

    Register /bin/true as URI scheme handler for several schemes
    
    Starting with glib 2.28, we don't use gconf to find out which handler
    should be used for a URI scheme, and we need to provide a custom MIME
    configuration for the gdm user to ensure no default URI scheme handler
    is used.

diff --git a/data/Makefile.am b/data/Makefile.am
index 4b13387..f252b64 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -98,6 +98,8 @@ EXTRA_DIST =			\
 	PostLogin 		\
 	gconf.path		\
 	session-setup.entries	\
+	mime-dummy-handler.desktop	\
+	mimeapps.list			\
 	$(NULL)
 
 CLEANFILES = 				\
@@ -247,6 +249,12 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.pa
 		chown root:gdm $(DESTDIR)$(workingdir) || : ; \
 	fi
 
+	if test '!' -d $(DESTDIR)$(workingdir)/.local/share/applications; then \
+		$(mkinstalldirs) $(DESTDIR)$(workingdir)/.local/share/applications; \
+		chmod 0755 $(DESTDIR)$(workingdir)/.local/share/applications; \
+		chown gdm:gdm $(DESTDIR)$(workingdir)/.local/share/applications || : ; \
+	fi
+
 	if test '!' -d $(DESTDIR)$(cachedir); then \
 		$(mkinstalldirs) $(DESTDIR)$(cachedir); \
 		chmod 1755 $(DESTDIR)$(cachedir); \
@@ -275,3 +283,5 @@ install-data-hook: gdm.conf-custom Xsession Init PostSession PreSession gconf.pa
 	chmod 1640 $(DESTDIR)$(workingdir)/.gconf.mandatory/*.xml
 

+	$(INSTALL_DATA) $(srcdir)/mime-dummy-handler.desktop $(DESTDIR)$(workingdir)/.local/share/applications/mime-dummy-handler.desktop
+	$(INSTALL_DATA) $(srcdir)/mimeapps.list $(DESTDIR)$(workingdir)/.local/share/applications/mimeapps.list
diff --git a/data/mime-dummy-handler.desktop b/data/mime-dummy-handler.desktop
new file mode 100644
index 0000000..c94779c
--- /dev/null
+++ b/data/mime-dummy-handler.desktop
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Type=Application
+Name=Dummy URI Handler
+Exec=/bin/true %U
+Terminal=false
+StartupNotify=false
diff --git a/data/mimeapps.list b/data/mimeapps.list
new file mode 100644
index 0000000..db3a144
--- /dev/null
+++ b/data/mimeapps.list
@@ -0,0 +1,19 @@
+[Default Applications]
+x-scheme-handler/file=mime-dummy-handler.desktop
+x-scheme-handler/ftp=mime-dummy-handler.desktop
+x-scheme-handler/ghelp=mime-dummy-handler.desktop
+x-scheme-handler/help=mime-dummy-handler.desktop
+x-scheme-handler/http=mime-dummy-handler.desktop
+x-scheme-handler/https=mime-dummy-handler.desktop
+x-scheme-handler/info=mime-dummy-handler.desktop
+x-scheme-handler/irc=mime-dummy-handler.desktop
+x-scheme-handler/itms=mime-dummy-handler.desktop
+x-scheme-handler/mailto=mime-dummy-handler.desktop
+x-scheme-handler/man=mime-dummy-handler.desktop
+x-scheme-handler/mms=mime-dummy-handler.desktop
+x-scheme-handler/rtp=mime-dummy-handler.desktop
+x-scheme-handler/rtsp=mime-dummy-handler.desktop
+x-scheme-handler/sip=mime-dummy-handler.desktop
+x-scheme-handler/trash=mime-dummy-handler.desktop
+x-scheme-handler/webcal=mime-dummy-handler.desktop
+x-scheme-handler/xmpp=mime-dummy-handler.desktop
openSUSE Build Service is sponsored by