Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 618364 Details for
Bug 833357
metacity will kill local gedit window when aborting remote gedit window
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
solve remote gedit single instance
gedit-2.28.4-disable-factory.patch (text/plain), 1.96 KB, created by
wq
on 2012-09-28 00:48:07 UTC
(
hide
)
Description:
solve remote gedit single instance
Filename:
MIME Type:
Creator:
wq
Created:
2012-09-28 00:48:07 UTC
Size:
1.96 KB
patch
obsolete
>diff -up gedit-2.28.4/gedit/gedit.c.disable-factory gedit-2.28.4/gedit/gedit.c >--- gedit-2.28.4/gedit/gedit.c.disable-factory 2012-09-18 13:49:45.453983280 +0800 >+++ gedit-2.28.4/gedit/gedit.c 2012-09-18 13:59:29.411984205 +0800 >@@ -411,6 +411,22 @@ on_message_received (const char *message > > free_command_line_data (); > } >+static gboolean >+display_is_over_local_socket (void) >+{ >+ GdkDisplayManager *manager; >+ GdkDisplay *display; >+ const char *name; >+ >+ manager = gdk_display_manager_get (); >+ display = gdk_display_manager_get_default_display (manager); >+ name = gdk_display_get_name (display); >+ >+ if (name[0] == ':') >+ return TRUE; >+ >+ return FALSE; >+} > > /* clientside */ > static void >@@ -619,7 +635,16 @@ main (int argc, char *argv[]) > #ifndef G_OS_WIN32 > gedit_debug_message (DEBUG_APP, "Create bacon connection"); > >- connection = bacon_message_connection_new ("gedit"); >+ /* It's possible this gedit instance is getting run over an >+ * ssh tunnel, which means the remote running instance won't >+ * have access to the auth cookie set up by ssh. >+ * >+ * The easy approach is just disable the factory in that scenario >+ */ >+ if (display_is_over_local_socket ()) >+ connection = bacon_message_connection_new ("gedit"); >+ else >+ connection = NULL; > > if (connection != NULL) > { >@@ -653,7 +678,7 @@ main (int argc, char *argv[]) > } > else > { >- g_warning ("Cannot create the 'gedit' connection."); >+ gedit_debug_message (DEBUG_APP, "Cannot create the 'gedit' connection."); > } > #endif > >@@ -739,8 +764,9 @@ main (int argc, char *argv[]) > gtk_main(); > > #ifndef G_OS_WIN32 >- bacon_message_connection_free (connection); > #endif >+ if(connection != NULL) >+ bacon_message_connection_free (connection); > > /* We kept the original engine reference here. So let's unref it to > * finalize it properly.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 833357
: 618364