diff -C2 galeon-1.3.9/src/galeon-automation.c galeon-1.3.9.patches/src/galeon-automation.c
*** galeon-1.3.9/src/galeon-automation.c	Mon Aug 25 21:15:49 2003
--- galeon-1.3.9.patches/src/galeon-automation.c	Sat Nov  1 18:01:24 2003
***************
*** 58,61 ****
--- 58,62 ----
  typedef struct {
  	char *url;
+ 	char *display;
  	guint open_in_existing_tab : 1;
  	guint open_in_new_window : 1;
***************
*** 96,99 ****
--- 97,101 ----
  static void
  galeon_automation_loadurl (const char *url,
+ 			   const char *display,
  			   gboolean fullscreen,
  			   gboolean open_in_existing_tab,
***************
*** 105,109 ****
  	const char *load_page = NULL;
  	GaleonWindow *window;
! 	
  	window = galeon_shell_get_active_window (galeon_shell);
  	
--- 107,113 ----
  	const char *load_page = NULL;
  	GaleonWindow *window;
! 
! 	printf("XXXXXXXXXXXXXXXXXX display == %s\n", display);
! 
  	window = galeon_shell_get_active_window (galeon_shell);
  	
***************
*** 143,147 ****
  	}
  	
! 	galeon_shell_new_tab (galeon_shell, window, NULL, load_page, 
  			      flags);
  }
--- 147,151 ----
  	}
  	
! 	galeon_shell_new_tab2 (galeon_shell, window, NULL, load_page, display,
  			      flags);
  }
***************
*** 151,154 ****
--- 155,159 ----
  				const CORBA_char * url,
  				const CORBA_char * geometry,
+ 				const CORBA_char * display,
  				const CORBA_boolean fullscreen,
  				const CORBA_boolean open_in_existing_tab,
***************
*** 159,163 ****
  {
  	if (initialized) {
! 		galeon_automation_loadurl (url, fullscreen, open_in_existing_tab,
  					   open_in_new_window, 
  					   open_in_new_tab, raise );
--- 164,168 ----
  {
  	if (initialized) {
! 		galeon_automation_loadurl (url, display, fullscreen, open_in_existing_tab,
  					   open_in_new_window, 
  					   open_in_new_tab, raise );
***************
*** 166,169 ****
--- 171,175 ----
  
  		data->url                  = g_strdup (url);
+ 		data->display              = g_strdup (display);
  		data->open_in_existing_tab = open_in_existing_tab;
  		data->open_in_new_window   = open_in_new_window;
***************
*** 225,228 ****
--- 231,235 ----
  			GaleonAutomationLoadurlData *data = iterator->data;
  			galeon_automation_loadurl (data->url,
+ 						   data->display,
  						   data->fullscreen,
  						   data->open_in_existing_tab,
***************
*** 231,234 ****
--- 238,242 ----
  						   data->raise);
  			g_free (data->url);
+ 			g_free (data->display);
  			g_free (data);
  		}
diff -C2 galeon-1.3.9/src/galeon-main.c galeon-1.3.9.patches/src/galeon-main.c
*** galeon-1.3.9/src/galeon-main.c	Tue Sep  9 22:29:43 2003
--- galeon-1.3.9.patches/src/galeon-main.c	Sat Nov  1 02:15:45 2003
***************
*** 197,200 ****
--- 197,201 ----
  	GNOME_GaleonAutomation gaserver;
  	int i;
+ 	const char *display;
  
  	CORBA_exception_init (&corba_env);
***************
*** 203,206 ****
--- 204,211 ----
  						       0, NULL, &corba_env);
  
+ 	display = gdk_display_get_name(gdk_display_get_default());
+ 	printf("XXXXXXXXXXXXXXXXXX display = %s\n", display);
+ 			
+ 
  	/* if none of the open in tab/window/existing options is given, fall
  	 * back to open in a new window, otherwise the url can get opened in a
***************
*** 259,262 ****
--- 264,268 ----
  			 geometry_string ?
  			 geometry_string : "",
+ 			 display,
  			 open_fullscreen,
  			 open_in_existing,
***************
*** 275,278 ****
--- 281,285 ----
  				 geometry_string ?
  				 geometry_string : "",
+ 				 display,
  				 open_fullscreen,
  				 open_in_existing,
diff -C2 galeon-1.3.9/src/galeon-shell.c galeon-1.3.9.patches/src/galeon-shell.c
*** galeon-1.3.9/src/galeon-shell.c	Mon Sep  8 10:23:25 2003
--- galeon-1.3.9.patches/src/galeon-shell.c	Sat Nov  1 18:03:38 2003
***************
*** 463,472 ****
  	
  	return galeon_shell_new_tab_from_embed
! 		(shell, parent_window, previous_embed, url, flags);
  }
  
  
  /**
!  * galeon_shell_new_tab_from_embed:
   * @shell: a #GaleonShell
   * @parent_window: the target #GaleonWindow or %NULL
--- 463,491 ----
  	
  	return galeon_shell_new_tab_from_embed
! 		(shell, parent_window, previous_embed, url, "", flags);
  }
  
+ /* quick hack */
+ GaleonTab *
+ galeon_shell_new_tab2 (GaleonShell *shell,
+ 		       GaleonWindow *parent_window,
+ 		       GaleonTab *previous_tab,
+ 		       const char *url,
+ 		       const char *display,
+ 		       GaleonNewTabFlags flags)
+ {
+         GaleonEmbed * previous_embed = NULL;
+ 
+         if (previous_tab)
+ 	{
+                 previous_embed = galeon_tab_get_embed (previous_tab);
+ 	}
+ 
+ 	return galeon_shell_new_tab_from_embed
+ 		(shell, parent_window, previous_embed, url, display, flags);
+ }
  
  /**
!  * galeon_shell_new_tab_from_embed
   * @shell: a #GaleonShell
   * @parent_window: the target #GaleonWindow or %NULL
***************
*** 484,487 ****
--- 503,507 ----
  				 GaleonEmbed *previous_embed,
  				 const char *url,
+ 				 const char *display,
  				 GaleonNewTabFlags flags)
  {
***************
*** 509,512 ****
--- 529,541 ----
  	{
          	window = galeon_window_new ();
+ 
+ 		/* open the window on the right display */
+ 		printf("XXXXXXXXXXXXXXXXXXX default display = %s\n", gdk_display_get_name(gdk_display_get_default ()));
+ 		printf("XXXXXXXXXXXXXXXXXXX         display = %s\n", display);
+ 		if (g_ascii_strcasecmp(gdk_display_get_name(gdk_display_get_default ()), display) != 0)
+ 		{
+ 			GdkScreen *screen = gdk_display_get_default_screen(gdk_display_open (display));
+ 			gtk_window_set_screen(GTK_WINDOW(window), screen);
+ 		}
  	}
  
diff -C2 galeon-1.3.9/src/galeon-shell.h galeon-1.3.9.patches/src/galeon-shell.h
*** galeon-1.3.9/src/galeon-shell.h	Sun Aug 31 18:30:49 2003
--- galeon-1.3.9.patches/src/galeon-shell.h	Sat Nov  1 18:04:33 2003
***************
*** 94,101 ****
--- 94,109 ----
  						      GaleonNewTabFlags flags);
  
+ GaleonTab          *galeon_shell_new_tab2            (GaleonShell *shell,
+                                                       GaleonWindow *parent_window,
+                                                       GaleonTab *previous_tab,
+                                                       const char *url,
+ 						      const char *display,
+                                                       GaleonNewTabFlags flags);
+ 
  GaleonTab          *galeon_shell_new_tab_from_embed  (GaleonShell *shell,
  						      GaleonWindow *parent_window,
  						      GaleonEmbed *previous_embed,
  						      const char *url,
+ 						      const char *display,
  						      GaleonNewTabFlags flags);
  
diff -C2 galeon-1.3.9/src/popup-commands.c galeon-1.3.9.patches/src/popup-commands.c
*** galeon-1.3.9/src/popup-commands.c	Sun Sep 14 23:08:49 2003
--- galeon-1.3.9.patches/src/popup-commands.c	Sat Nov  1 11:47:34 2003
***************
*** 265,269 ****
  
  	galeon_shell_new_tab_from_embed
! 		(galeon_shell, window, embed, NULL,
  		 GALEON_NEW_TAB_VIEW_SOURCE);
  }
--- 265,269 ----
  
  	galeon_shell_new_tab_from_embed
! 		(galeon_shell, window, embed, NULL, NULL,
  		 GALEON_NEW_TAB_VIEW_SOURCE);
  }
diff -C2 galeon-1.3.9/idl/GaleonAutomation.idl galeon-1.3.9.patches/idl/GaleonAutomation.idl
*** galeon-1.3.9/idl/GaleonAutomation.idl	Tue Aug  5 21:42:56 2003
--- galeon-1.3.9.patches/idl/GaleonAutomation.idl	Sat Nov  1 00:56:03 2003
***************
*** 6,9 ****
--- 6,10 ----
  		boolean loadurl  (in string  url, 
  				  in string  geometry, 
+ 				  in string  display,
  				  in boolean fullscreen,
  				  in boolean open_in_existing_tab,
