diff -Naurb src.orig/terminal-window.c src/terminal-window.c
--- src.orig/terminal-window.c	2003-01-05 02:32:29.000000000 -0300
+++ src/terminal-window.c	2003-03-21 20:51:50.000000000 -0300
@@ -1826,6 +1826,20 @@
 #endif
 }
 
+char *
+terminal_window_get_geometry(TerminalWindow *window)
+{
+  GtkWidget *widget;  
+  gint x, y, w, h;
+   
+  widget = terminal_screen_get_widget (window->priv->active_term);
+
+  gtk_window_get_position(GTK_WINDOW(window), &x, &y);
+  terminal_widget_get_size(widget, &w, &h);
+
+  return g_strdup_printf("%dx%d+%d+%d", w, h, x, y);
+}
+
 /*
  * Config updates
  */
diff -Naurb src.orig/terminal-window.h src/terminal-window.h
--- src.orig/terminal-window.h	2002-12-06 23:49:51.000000000 -0300
+++ src/terminal-window.h	2003-03-21 20:52:34.000000000 -0300
@@ -79,6 +79,7 @@
                                        TerminalScreen *screen);
 void terminal_window_update_icon      (TerminalWindow *window);
 void terminal_window_update_geometry  (TerminalWindow *window);
+char *terminal_window_get_geometry    (TerminalWindow *window);
 void terminal_window_set_size         (TerminalWindow *window,
                                        TerminalScreen *screen,
                                        gboolean        even_if_mapped);
diff -Naurb src.orig/terminal.c src/terminal.c
--- src.orig/terminal.c	2003-02-05 23:34:23.000000000 -0300
+++ src/terminal.c	2003-03-21 22:12:35.000000000 -0300
@@ -145,7 +145,9 @@
 enum {
   OPTION_COMMAND = 1,
   OPTION_EXECUTE,
+  OPTION_WINDOW,
   OPTION_WINDOW_WITH_PROFILE,
+  OPTION_TAB,
   OPTION_TAB_WITH_PROFILE,
   OPTION_WINDOW_WITH_PROFILE_ID,
   OPTION_TAB_WITH_PROFILE_ID,
@@ -157,11 +159,15 @@
   OPTION_STARTUP_ID,
   OPTION_TITLE,
   OPTION_WORKING_DIRECTORY,
+  OPTION_REPEAT,
   OPTION_ZOOM,
+  OPTION_ACTIVE,
   OPTION_COMPAT,
   OPTION_LAST
 };  
 
+static int repeat_count = 1;
+
 struct poptOption options[] = {  
   {
     NULL, 
@@ -191,6 +197,15 @@
     NULL
   },
   {
+    "window",
+    '\0',
+    POPT_ARG_NONE,
+    NULL,
+    OPTION_WINDOW,
+    N_("Open a new window containing a tab with the given profile. More than one of these options can be provided."),
+    NULL
+  },
+  {
     "window-with-profile",
     '\0',
     POPT_ARG_STRING,
@@ -200,6 +215,15 @@
     N_("PROFILENAME")
   },
   {
+    "tab",
+    '\0',
+    POPT_ARG_NONE,
+    NULL,
+    OPTION_TAB,
+    N_("Open a new tab in the last-opened window with the default profile. More than one of these options can be provided."),
+    NULL
+  },
+  {
     "tab-with-profile",
     '\0',
     POPT_ARG_STRING,
@@ -298,7 +322,15 @@
     N_("Set the terminal's working directory"),
     N_("DIRNAME")
   },
-
+  {
+    "repeat",
+    '\0',
+    POPT_ARG_INT | POPT_ARGFLAG_OPTIONAL,
+    &repeat_count,
+    OPTION_REPEAT,
+    N_("Repeat the last tab COUNT times"),
+    N_("COUNT")
+  },
   {
     "zoom",
     '\0',
@@ -308,6 +340,15 @@
     N_("Set the terminal's zoom factor (1.0 = normal size)"),
     N_("ZOOMFACTOR")
   },
+  {
+    "active",
+    '\0',
+    POPT_ARG_NONE,
+    NULL,
+    OPTION_ACTIVE,
+    N_("Set the last specified tab as the active one in its window"),
+    N_("ZOOMFACTOR")
+  },
   
   /*
    * Crappy old compat args
@@ -507,8 +548,10 @@
   char **exec_argv;
   char *title;
   char *working_dir;
+  int   repeat;
   double zoom;
   guint zoom_set : 1;
+  guint active : 1;
 } InitialTab;
 
 typedef struct
@@ -531,13 +574,15 @@
 
   it = g_new (InitialTab, 1);
 
-  it->profile = g_strdup (profile);
+  it->profile = profile ? g_strdup (profile) : NULL;
   it->profile_is_id = is_id;
   it->exec_argv = NULL;
   it->title = NULL;
   it->working_dir = NULL;
+  it->repeat = 1;
   it->zoom = 1.0;
   it->zoom_set = FALSE;
+  it->active = FALSE;
   
   return it;
 }
@@ -545,7 +590,7 @@
 static void
 initial_tab_free (InitialTab *it)
 {
-  g_free (it->profile);
+  if (it->profile) g_free (it->profile);
   g_strfreev (it->exec_argv);
   g_free (it->title);
   g_free (it->working_dir);
@@ -764,34 +809,47 @@
       }
       break;
           
+    case OPTION_WINDOW:
     case OPTION_WINDOW_WITH_PROFILE:
     case OPTION_WINDOW_WITH_PROFILE_ID:
       {
         InitialWindow *iw;
+        const char *profile;
 
-
-        if (arg == NULL)
+        if (opt->val == OPTION_WINDOW)
+          profile = NULL;
+        else if (arg == NULL)
           {
             g_printerr (_("Option --window-with-profile requires an argument specifying what profile to use\n"));
             exit (1);
           }
+        else 
+          profile = arg;
 
-        iw = add_new_window (results, arg,
+        iw = add_new_window (results, profile,
                              opt->val == OPTION_WINDOW_WITH_PROFILE_ID);
       }
       break;
 
+    case OPTION_TAB:
     case OPTION_TAB_WITH_PROFILE:
     case OPTION_TAB_WITH_PROFILE_ID:
       {
         InitialWindow *iw;
+        const char *profile;
 
 
-        if (arg == NULL)
+        if (opt->val == OPTION_TAB)
+          {
+            profile = NULL;
+          }
+        else if (arg == NULL)
           {
             g_printerr (_("Option --tab-with-profile requires an argument specifying what profile to use\n"));
             exit (1);
           }
+        else 
+          profile = arg;
 
                 
         if (results->initial_windows)
@@ -799,12 +857,12 @@
             iw = g_list_last (results->initial_windows)->data;
 
             iw->tabs = g_list_append (iw->tabs,
-                                      initial_tab_new (arg,
+                                      initial_tab_new (profile,
                                                        opt->val == OPTION_TAB_WITH_PROFILE_ID));
           }
         else
           {
-            iw = add_new_window (results, arg, 
+            iw = add_new_window (results, profile, 
                                  opt->val == OPTION_TAB_WITH_PROFILE_ID);
           }
       }
@@ -974,6 +1032,26 @@
       }
       break;
 
+    case OPTION_REPEAT:
+      {
+        InitialTab *it;            
+
+        if (repeat_count == 0)
+          repeat_count = 1;
+        else if (repeat_count < 0)
+          {
+            g_printerr (_("Option --repeat need a positive argument\n"));
+            exit (1);
+          }
+        
+        it = ensure_top_tab (results);
+
+        it->repeat += repeat_count;
+
+        repeat_count = 1;
+      }
+      break;
+
     case OPTION_ZOOM:
       {
         InitialTab *it;            
@@ -1030,6 +1108,15 @@
       }
       break;
 
+    case OPTION_ACTIVE:
+      {
+        InitialTab *it;
+
+        it = ensure_top_tab (results);
+
+        it->active = TRUE;
+      }
+      break;
       
     case OPTION_COMPAT:
       g_printerr (_("Option given which is no longer supported in this version of gnome-terminal; you might want to create a profile with the desired setting, and use the new --window-with-profile option\n"));
@@ -1239,12 +1326,15 @@
       TerminalProfile *profile;
       GList *tmp2;
       TerminalWindow *current_window;
+      TerminalScreen *active_screen;
+      int i;
       
       InitialWindow *iw = tmp->data;
 
       g_assert (iw->tabs);
 
       current_window = NULL;
+      active_screen = NULL;
       tmp2 = iw->tabs;
       while (tmp2 != NULL)
         {
@@ -1273,6 +1363,8 @@
           
           g_assert (profile);
 
+          i = 0;
+
           if (tmp2 == iw->tabs)
             {
               terminal_app_new_terminal (app,
@@ -1292,9 +1384,11 @@
                                          results->screen_number);
 
               current_window = g_list_last (app->windows)->data;
+
+              ++i;
             }
-          else
-            {
+
+            for( ; i < it->repeat; i++)
               terminal_app_new_terminal (app,
                                          profile,
                                          current_window,
@@ -1307,11 +1401,22 @@
                                          it->zoom_set ?
                                          it->zoom : 1.0,
                                          NULL, NULL, -1);
+          
+          if (it->active)
+            {
+              /* TerminalWindow's interface does not expose the list of TerminalScreens,
+               * so we use the fact that terminal_app_new_terminal() sets the new terminal
+               * to be the active one. Not nice.
+               */
+              active_screen = terminal_window_get_active(current_window);
             }
           
           tmp2 = tmp2->next;
         }
       
+      if (active_screen)
+        terminal_window_set_active(current_window, active_screen);
+
       tmp = tmp->next;
     }
 
@@ -3126,6 +3231,10 @@
 
   argc += n_windows; /* one --role per window */
 
+  argc += n_windows; /* one --active per window */
+
+  argc += n_windows; /* one --geometry per window */
+
   argc += n_tabs - n_windows; /* one --with-tab-profile-internal-id
                                * per extra tab
                                */
@@ -3156,6 +3265,9 @@
       GList *tabs;
       GList *tmp2;
       TerminalWindow *window = tmp->data;
+      TerminalScreen *active_screen;
+      
+      active_screen = terminal_window_get_active(window);
       
       tabs = terminal_window_list_screens (window);
 
@@ -3166,6 +3278,7 @@
           const char *profile_id;
           const char **override_command;
           const char *title;
+          char       *geometry;
           double zoom;
           
           profile_id = terminal_profile_get_name (terminal_screen_get_profile (screen));
@@ -3183,6 +3296,10 @@
               argv[i] = g_strdup_printf ("--role=%s",
                                          gtk_window_get_role (GTK_WINDOW (window)));
               ++i;
+              geometry = terminal_window_get_geometry(window);
+              argv[i] = g_strdup_printf("--geometry=%s", geometry);
+              g_free(geometry);
+              ++i;
             }
           else
             {
@@ -3191,6 +3308,12 @@
               ++i;
             }
 
+          if (screen == active_screen)
+            {
+              argv[i] = g_strdup ("--active");
+              ++i;
+            }
+
           override_command = terminal_screen_get_override_command (screen);
           if (override_command)
             {
