Index: main.c =================================================================== --- main.c (Revision 4424) +++ main.c (Arbeitskopie) @@ -126,6 +126,7 @@ { "no-preprocessing", 'P', 0, G_OPTION_ARG_NONE, &no_preprocessing, N_("Don't preprocess C/C++ files when generating tags"), NULL }, #ifdef HAVE_SOCKET { "new-instance", 'i', 0, G_OPTION_ARG_NONE, &cl_options.new_instance, N_("Don't open files in a running instance, force opening a new instance"), NULL }, + { "socket-file", 0, 0, G_OPTION_ARG_FILENAME, &cl_options.socket_filename, N_("Use this socket filename for communication with a geany instance"), NULL }, #endif { "line", 'l', 0, G_OPTION_ARG_INT, &cl_options.goto_line, N_("Set initial line number for the first opened file"), NULL }, { "no-msgwin", 'm', 0, G_OPTION_ARG_NONE, &no_msgwin, N_("Don't show message window at startup"), NULL }, @@ -451,7 +452,7 @@ GError *error = NULL; GOptionContext *context; gint i; - CommandLineOptions def_clo = {FALSE, TRUE, -1, -1, FALSE}; + CommandLineOptions def_clo = {FALSE, NULL, TRUE, -1, -1, FALSE}; /* first initialise cl_options fields with default values */ cl_options = def_clo; @@ -535,6 +536,10 @@ #ifdef HAVE_SOCKET socket_info.ignore_socket = cl_options.new_instance; + if ( cl_options.socket_filename ) + { + socket_info.file_name = cl_options.socket_filename; + } #endif #ifdef HAVE_VTE vte_info.lib_vte = lib_vte; Index: main.h =================================================================== --- main.h (Revision 4424) +++ main.h (Arbeitskopie) @@ -28,6 +28,7 @@ typedef struct { gboolean new_instance; + gchar *socket_filename; gboolean load_session; gint goto_line; gint goto_column;