@@ -35,14 +35,14 @@ typedef struct _client_info {
35
35
int fd ;
36
36
} ClientInfo ;
37
37
38
- static gboolean init (LXTermWindow * lxtermwin , gint argc , gchar * * argv );
38
+ static gboolean init (LXTermWindow * lxtermwin , const char * profile , gint argc , gchar * * argv );
39
39
static void start_controller (struct sockaddr_un * sock_addr , LXTermWindow * lxtermwin , int fd );
40
40
static void send_msg_to_controller (int fd , gint argc , gchar * * argv );
41
41
static gboolean handle_client (GIOChannel * source , GIOCondition condition , LXTermWindow * lxtermwin );
42
42
static void accept_client (GIOChannel * source , LXTermWindow * lxtermwin );
43
43
static gboolean handle_request (GIOChannel * gio , GIOCondition condition , ClientInfo * info );
44
44
45
- static gboolean init (LXTermWindow * lxtermwin , gint argc , gchar * * argv ) {
45
+ static gboolean init (LXTermWindow * lxtermwin , const char * profile , gint argc , gchar * * argv ) {
46
46
/* Normally, LXTerminal uses one process to control all of its windows.
47
47
* The first process to start will create a Unix domain socket in
48
48
* g_get_user_runtime_dir(). It will then bind and listen on this socket.
@@ -59,12 +59,14 @@ static gboolean init(LXTermWindow* lxtermwin, gint argc, gchar** argv) {
59
59
60
60
/* Formulate the path for the Unix domain socket. */
61
61
#if GLIB_CHECK_VERSION (2 , 28 , 0 )
62
- gchar * socket_path = g_strdup_printf ("%s/.lxterminal-socket-%s" ,
62
+ gchar * socket_path = g_strdup_printf ("%s/.lxterminal-socket%s%s -%s" ,
63
63
g_get_user_runtime_dir (),
64
+ profile ? "-" : "" , profile ? profile : "" ,
64
65
gdk_display_get_name (gdk_display_get_default ()));
65
66
#else
66
- gchar * socket_path = g_strdup_printf ("%s/.lxterminal-socket-%s" ,
67
+ gchar * socket_path = g_strdup_printf ("%s/.lxterminal-socket%s%s -%s" ,
67
68
g_get_user_cache_dir (),
69
+ profile ? "-" : "" , profile ? profile : "" ,
68
70
gdk_display_get_name (gdk_display_get_default ()));
69
71
#endif
70
72
@@ -262,6 +264,6 @@ static gboolean handle_request(GIOChannel* gio, GIOCondition condition, ClientIn
262
264
return TRUE;
263
265
}
264
266
265
- gboolean lxterminal_socket_initialize (LXTermWindow * lxtermwin , gint argc , gchar * * argv ) {
266
- return init (lxtermwin , argc , argv );
267
+ gboolean lxterminal_socket_initialize (LXTermWindow * lxtermwin , const char * profile , gint argc , gchar * * argv ) {
268
+ return init (lxtermwin , profile , argc , argv );
267
269
}
0 commit comments