Index: srcore/srmain.c
===================================================================
--- srcore/srmain.c	(Revision 1924)
+++ srcore/srmain.c	(Arbeitskopie)
@@ -47,6 +47,24 @@
 static guint mouse_is_moving_idle_handler = 0;
 static gint context_switched = 0;
 
+/* command line options */
+static gboolean  enable_braille 	= FALSE;
+static gboolean  disable_braille 	= FALSE;
+static gboolean  enable_speech 	= FALSE;
+static gboolean  disable_speech 	= FALSE;
+static gboolean  enable_magnifier	= FALSE;
+static gboolean  disable_magnifier	= FALSE;
+static gboolean  enable_braille_monitor 	= FALSE;
+static gboolean  disable_braille_monitor 	= FALSE;    
+static gboolean  invert 	     = FALSE;
+static gboolean  horiz_split    = FALSE;
+static gboolean  login_enabled	 = FALSE; 
+static gchar    *config_source  = NULL;
+static gchar    *mouse_tracking = NULL;
+static gchar	 *focus_tracking = NULL;
+static gint      zoom_factor    = 0;
+       
+
 gboolean login_time;
 
 static SRLClientHandle src_srl_client;
@@ -2558,193 +2576,202 @@
 
     sru_debug_terminate ();
 }
+
+GnomeProgram *
+program_init (gint argc, 
+              gchar **argv)
+{
+    GOptionContext *context;
+    gchar *description;
+    GnomeProgram *program;
+
+    const GOptionEntry options[] = 
+    {		
+        {
+         "enable-braille",
+         'b',
+         0,
+         G_OPTION_ARG_NONE,
+         &enable_braille,
+         N_("Enable braille service"),
+         NULL
+        },
+        {
+         "disable-braille",
+         'B',
+         0,
+         G_OPTION_ARG_NONE,
+         &disable_braille,
+         N_("Disable braille service"),
+         NULL
+        },
+        {
+         "enable-speech",
+         's',
+         0,
+         G_OPTION_ARG_NONE,
+         &enable_speech,
+         N_("Enable speech service"),
+         NULL
+        },
+        {
+         "disable-speech",
+         'S',
+         0,
+         G_OPTION_ARG_NONE,
+         &disable_speech,
+         N_("Disable speech service"),
+         NULL
+        },
+        {
+         "enable-magnifier",
+         'm',
+         0,
+         G_OPTION_ARG_NONE,
+         &enable_magnifier,
+         N_("Enable magnifier service"),
+         NULL
+        },
+        {
+         "disable-magnifier",
+         'M',
+         0,
+         G_OPTION_ARG_NONE,
+         &disable_magnifier,
+         N_("Disable magnifier service"),
+         NULL
+        },
+        {
+         "enable-braille-monitor",
+         'o',
+         0,
+         G_OPTION_ARG_NONE,
+         &enable_braille_monitor,
+         N_("Enable braille monitor service"),
+         NULL
+        },
+        {
+         "disable-braille-monitor",
+         'O',
+         0,
+         G_OPTION_ARG_NONE,
+         &disable_braille_monitor,
+         N_("Disable braille monitor service"),
+         NULL
+        },
+        {
+         "braille-port",
+         'p',
+         0,
+         G_OPTION_ARG_INT,
+         &braille_port,
+         N_("Serial port (ttyS)"),
+         N_("ttyS[1..4]")
+        },
+        {
+         "braille-device",
+         'e',
+         0,
+         G_OPTION_ARG_STRING, 
+         &braille_device,
+         N_("Braille Device"),
+         N_("DEVICE NAME")
+        },
+        {
+        "settings-dir",
+         'c',
+         0,
+         G_OPTION_ARG_STRING,
+         &config_source,
+         N_("Use gconf settings file"),
+         N_("PATH")
+        },
+        {
+        "magnification-zoom",
+         'z',
+         0,
+         G_OPTION_ARG_INT,
+         &zoom_factor,
+         N_("Set magnification zoom level"),
+         N_("[1..16]")
+        },
+        {
+        "magnification-invert",
+         'i',
+         0,
+         G_OPTION_ARG_NONE,
+         &invert,
+         N_("Magnification with reverse video"),
+         NULL
+        },
+        {
+        "magnification-horizontal-split",
+         'u',
+         0,
+         G_OPTION_ARG_NONE,
+         &horiz_split,
+         N_("Magnification with horizontal-split"),
+         NULL
+        },
+        {
+        "login",
+         'l',
+         0,
+         G_OPTION_ARG_NONE,
+         &login_enabled,
+         N_("Used at login time"),
+         NULL
+        },
+        {
+        "magnification-mouse-tracking",
+         't',
+         0,
+         G_OPTION_ARG_STRING,
+         &mouse_tracking,
+         N_("How the mouse pushed the region"),
+         N_("[CENTERED, PROPORTION, PUSH, NONE]")
+        },
+        {
+        "magnification-focus-tracking",
+         'f',
+         0,
+         G_OPTION_ARG_STRING,
+         &focus_tracking,
+         N_("How the focus pushed the region"),
+         N_("[AUTO, CENTERED, NONE]")
+        },
+        {
+         NULL
+        }
+     };
+
+    description = g_strdup_printf ("- %s",
+                  _("Assistive Technologies for Blind and Visually Impaired"));
+    context = g_option_context_new (description);
+    g_free (description);
     
+    g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
+ 
+    program = gnome_program_init ("srcore", VERSION,
+				  LIBGNOMEUI_MODULE,
+				  argc, argv,
+				  GNOME_PARAM_GOPTION_CONTEXT, context,
+				  GNOME_PARAM_HUMAN_READABLE_NAME, _("srcore"),
+				  LIBGNOMEUI_PARAM_CRASH_DIALOG, FALSE,
+				  NULL);
+
+    return program;
+}
+	
+	
 gint
 main (gint argc, 
       gchar **argv)
 {
-    gboolean enable_braille 	= FALSE;
-    gboolean disable_braille 	= FALSE;
-    gboolean enable_speech 	= FALSE;
-    gboolean disable_speech 	= FALSE;
-    gboolean enable_magnifier	= FALSE;
-    gboolean disable_magnifier	= FALSE;
-    gboolean enable_braille_monitor 	= FALSE;
-    gboolean disable_braille_monitor 	= FALSE;    
-    
-    gchar 	*config_source 	= NULL;
-    gchar 	*mouse_tracking = NULL;
-    gchar	*focus_tracking = NULL;
 
-    gint  	zoom_factor     = 0;
-    gboolean 	invert 	    	= FALSE;
-    gboolean    horiz_split     = FALSE;
-    gboolean 	login_enabled	= FALSE;        
+    GnomeProgram *program;
 
-    struct poptOption poptopt[] = 
-     {		
- 	{
-	 "enable-braille",	
-	 'b', 	
-	 POPT_ARG_NONE, 
-	 &enable_braille,		
-	 0, 
-	 "Enable braille service", 
- 	 NULL
- 	},
- 	{
-	 "disable-braille",	
-	 'B', 	
-	 POPT_ARG_NONE, 
-	 &disable_braille,		
-	 0, 
-	 "Disable braille service", 
- 	 NULL
- 	},
- 	{
-	 "enable-speech",	
-	 's', 	
-	 POPT_ARG_NONE, 
-	 &enable_speech,		
-	 0, 
-	 "Enable speech service", 
- 	 NULL
- 	},
- 	{
-	 "disable-speech",	
-	 'S', 	
-	 POPT_ARG_NONE, 
-	 &disable_speech,		
-	 0, 
-	 "Disable speech service", 
- 	 NULL
- 	},
- 	{
-	 "enable-magnifier",	
-	 'm', 	
-	 POPT_ARG_NONE, 
-	 &enable_magnifier,		
-	 0, 
-	 "Enable magnifier service",  
- 	 NULL
- 	},
- 	{
-	 "disable-magnifier",	
-	 'M', 	
-	 POPT_ARG_NONE, 
-	 &disable_magnifier,		
-	 0, 
-	 "Disable magnifier service",  
- 	 NULL
- 	},
 
- 	{
-	 "enable-braille-monitor", 
-	 'o', 
-	 POPT_ARG_NONE, 
-	 &enable_braille_monitor, 	
-	 0, 
-	 "Enable braille monitor service", 
- 	 NULL
- 	},
- 	{
-	 "disable-braille-monitor", 
-	 'O', 
-	 POPT_ARG_NONE, 
-	 &disable_braille_monitor, 	
-	 0, 
-	 "Disable braille monitor service", 
- 	 NULL
- 	},
- 	{
-	 "braille-port", 
-	 'p',   
-	 POPT_ARG_INT,  
-	 &braille_port, 	
-	 0, 
-	 "Serial port (ttyS)", 
-	 "ttyS[1..4]"
- 	},
- 	{
-	 "braille-device", 
-	 'e', 
-	 POPT_ARG_STRING, 
-	 &braille_device, 	
-	 0, 
-	 "Braille Device", 
-	 "DEVICE NAME"
- 	},
- 	{
-	"settings-dir", 
-	 'c', 
-	 POPT_ARG_STRING, 
-	 &config_source, 	
-	 0, 
-	 "Use gconf settings file", 
-	 "PATH"
- 	},
- 	{
-	"magnification-zoom", 
-	 'z', 
-	 POPT_ARG_INT, 
-	 &zoom_factor, 	
-	 0, 
-	 "Set magnification zoom level", 
-	 "[1..16]"
- 	},
- 	{
-	"magnification-invert", 
-	 'i', 
-	 POPT_ARG_NONE, 
-	 &invert, 	
-	 0, 
-	 "Magnification with reverse video", 
-	 ""
- 	},
-	
- 	{
-	"magnification-horizontal-split", 
-	 'u', 
-	 POPT_ARG_NONE, 
-	 &horiz_split, 	
-	 0, 
-	 "Magnification with horizontal-split", 
-	 ""
- 	},
-	
- 	{
-	"login", 
-	 'l', 
-	 POPT_ARG_NONE, 
-	 &login_enabled, 	
-	 0, 
-	 "Used at login time", 
-	 ""
- 	},
- 	{
-	"magnification-mouse-tracking", 
-	 't', 
-	 POPT_ARG_STRING, 
-	 &mouse_tracking, 	
-	 0, 
-	 "How the mouse pushed the region", 
-	 "[CENTERED, PROPORTION, PUSH, NONE]"
- 	},
-
- 	{
-	"magnification-focus-tracking", 
-	 'f', 
-	 POPT_ARG_STRING, 
-	 &focus_tracking, 	
-	 0, 
-	 "How the focus pushed the region", 
-	 "[AUTO, CENTERED, NONE]"
- 	},
- 	{
-	 NULL, 0,     0, NULL, 0
- 	}
-     };
-    
 #ifdef ENABLE_NLS
     bindtextdomain (GETTEXT_PACKAGE, GNOPERNICUSLOCALEDIR);
     textdomain (GETTEXT_PACKAGE);
@@ -2756,15 +2783,9 @@
     fprintf (stderr, "\n**********************");
     fprintf (stderr, "\n* SCREEN READER CORE *");
     fprintf (stderr, "\n**********************\n\n");
-        
-    gnome_program_init ("srcore", VERSION,
-		    LIBGNOMEUI_MODULE,
-		    argc, argv,
-		    GNOME_PARAM_POPT_TABLE, poptopt,
-		    GNOME_PARAM_HUMAN_READABLE_NAME, _("srcore"),
-		    LIBGNOMEUI_PARAM_CRASH_DIALOG, FALSE,
-		    NULL);
 
+    program = program_init (argc, argv);
+
     sru_log_init ();
     
     login_time = FALSE;	
@@ -2812,6 +2833,8 @@
     
     sru_log_terminate ();
 
+    g_object_unref (program);
+
     return EXIT_SUCCESS;
 }
 
Index: gnopi/gnopi.c
===================================================================
--- gnopi/gnopi.c	(Revision 1924)
+++ gnopi/gnopi.c	(Arbeitskopie)
@@ -145,127 +145,153 @@
 static gchar   *gn_braille_device = NULL;
 static gint     gn_braille_port = -1;
 
-struct poptOption poptopt[] = 
+
+GnomeProgram *
+program_init (gint argc, 
+              gchar **argv)
+{
+    GOptionContext *context;
+    gchar *description;
+    GnomeProgram *program;
+
+    static const GOptionEntry options[] = 
     {		
-	{
-	 "default", 	
-	 'd', 	
-	 POPT_ARG_NONE, 
-	 &gn_defaultmode, 	
-	 0, 
-	 "Launch in execution with default settings", 
- 	 NULL
- 	},
- 	{
-	 "enable-braille",	
-	 'b', 	
-	 POPT_ARG_NONE, 
-	 &gn_braille_enable,		
-	 0, 
-	 "enable braille service", 
- 	 NULL
- 	},
- 	{
-	 "disable-braille",	
-	 'B', 	
-	 POPT_ARG_NONE, 
-	 &gn_braille_disable,		
-	 0, 
-	 "enable braille service", 
- 	 NULL
- 	},
- 	{
-	 "enable-speech",	
-	 's', 	
-	 POPT_ARG_NONE, 
-	 &gn_speech_enable,		
-	 0, 
-	 "enable speech service", 
- 	 NULL
- 	},
- 	{
-	 "disable-speech",	
-	 'S', 	
-	 POPT_ARG_NONE, 
-	 &gn_speech_disable,		
-	 0, 
-	 "disable speech service", 
- 	 NULL
- 	},
- 	{
-	 "enable-magnifier",	
-	 'm', 	
-	 POPT_ARG_NONE, 
-	 &gn_magnifier_enable,		
-	 0, 
-	 "enable magnifier service",  
- 	 NULL
- 	},
- 	{
-	 "disable-magnifier",	
-	 'M', 	
-	 POPT_ARG_NONE, 
-	 &gn_magnifier_disable,		
-	 0, 
-	 "disable magnifier service",  
- 	 NULL
- 	},
+       {
+        "default",
+        'd',
+        0,
+        G_OPTION_ARG_NONE,
+        &gn_defaultmode,
+        N_("Launch in execution with default settings"),
+        NULL
+       },
+       {
+        "enable-braille",
+        'b',
+        0,
+        G_OPTION_ARG_NONE,
+        &gn_braille_enable,
+        N_("enable braille service"),
+        NULL
+       },
+       {
+        "disable-braille",
+        'B',
+        0,
+        G_OPTION_ARG_NONE,
+        &gn_braille_disable,
+        N_("enable braille service"),
+        NULL
+       },
+       {
+        "enable-speech",
+        's',
+        0,
+        G_OPTION_ARG_NONE,
+        &gn_speech_enable, 
+        N_("enable speech service"),
+        NULL
+       },
+       {
+        "disable-speech",
+        'S',
+        0,
+        G_OPTION_ARG_NONE,
+        &gn_speech_disable,
+        N_("disable speech service"),
+        NULL
+       },
+       {
+        "enable-magnifier",
+        'm',
+        0,
+        G_OPTION_ARG_NONE,
+        &gn_magnifier_enable,
+        N_("enable magnifier service"),
+        NULL
+       },
+       {
+        "disable-magnifier",
+        'M',
+        0,
+        G_OPTION_ARG_NONE,
+        &gn_magnifier_disable,
+        N_("disable magnifier service"),
+        NULL
+       },
+       {
+        "enable-braille-monitor",
+        'o',
+        0,
+        G_OPTION_ARG_NONE,
+        &gn_braille_monitor_enable,
+        N_("enable braille monitor service"),
+        NULL
+       },
+       {
+        "disable-braille-monitor",
+        'O',
+        0,
+        G_OPTION_ARG_NONE,
+        &gn_braille_monitor_disable,
+        N_("disable braille monitor service"),
+        NULL
+       },
+       {
+        "login",
+        'l',
+        0,
+        G_OPTION_ARG_NONE,
+        &gn_login,
+        N_("Used at login time"),
+        NULL
+       },
+       {
+        "braille-port",
+        'p',
+        0,
+        G_OPTION_ARG_INT,
+        &gn_braille_port,
+        N_("Serial port (ttyS)"),
+        N_("ttyS[1..4]")
+       },
+       {
+        "braille-device",
+        'e',
+        0,
+        G_OPTION_ARG_STRING,
+        &gn_braille_device,
+        N_("Braille Device"),
+        N_("DEVICE NAME")
+        },
+        {
+         NULL
+        }
+      };
+    
+    description = g_strdup_printf ("- %s",
+                  _("Assistive Technologies for Blind and Visually Impaired"));
+    context = g_option_context_new (description);
+    g_free (description);
+    g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
 
- 	{
-	 "enable-braille-monitor", 
-	 'o', 
-	 POPT_ARG_NONE, 
-	 &gn_braille_monitor_enable, 	
-	 0, 
-	 "enable braille monitor service", 
- 	 NULL
- 	},
- 	{
-	 "disable-braille-monitor", 
-	 'O', 
-	 POPT_ARG_NONE, 
-	 &gn_braille_monitor_disable, 	
-	 0, 
-	 "disable braille monitor service", 
- 	 NULL
- 	},
- 	{
-	 "login", 
-	 'l', 
-	 POPT_ARG_NONE, 
-	 &gn_login, 	
-	 0, 
-	 "Used at login time", 
- 	 NULL
- 	},
- 	{
-	 "braille-port", 
-	 'p',   
-	 POPT_ARG_INT,  
-	 &gn_braille_port, 	
-	 0, 
-	 "Serial port (ttyS)", 
-	 "ttyS[1..4]"
- 	},
- 	{
-	 "braille-device", 
-	 'e', 
-	 POPT_ARG_STRING, 
-	 &gn_braille_device, 	
-	 0, 
-	 "Braille Device", 
-	 "DEVICE NAME"
- 	},
- 	{
-	 NULL, 0,     0, NULL, 0
- 	}
-     };
+    program = gnome_program_init ("gnopernicus", VERSION,
+				  LIBGNOMEUI_MODULE,
+				  argc, argv,
+				  GNOME_PARAM_GOPTION_CONTEXT, context,
+				  GNOME_PARAM_HUMAN_READABLE_NAME, _("gnopernicus"),
+				  GNOME_PARAM_APP_DATADIR, DATADIR,
+				  NULL);
 
+    return program;
+}
+
 gint 
 main (gint argc,gchar *argv[])
 {
     gint i;
     gchar **argv1;
+    GnomeProgram *program;
 
 #ifdef ENABLE_NLS
     bindtextdomain (GETTEXT_PACKAGE, GNOPERNICUSLOCALEDIR);
@@ -290,13 +316,8 @@
     argc++;
     argv = argv1;
 
-    gnome_program_init ("gnopernicus", VERSION,
-			LIBGNOMEUI_MODULE,
-			argc, argv,
-			GNOME_PARAM_POPT_TABLE, poptopt,
-			GNOME_PARAM_HUMAN_READABLE_NAME, _("gnopernicus"),
-			GNOME_PARAM_APP_DATADIR, DATADIR,
-			NULL);
+    program = program_init (argc, argv);
+    
     sru_log_init ();
 
     if (srcore_magnifier_status_get ())
@@ -383,6 +404,8 @@
     
     g_free (argv1);
 
+    g_object_unref (program);
+
     return EXIT_SUCCESS;
 }
 
Index: configure.in
===================================================================
--- configure.in	(Revision 1924)
+++ configure.in	(Arbeitskopie)
@@ -131,14 +131,7 @@
 
 AM_GCONF_SOURCE_2
 
-dnl **********************************************************************
-dnl Check for popt version
-dnl **********************************************************************
 
-AC_CHECK_LIB(popt, poptDupArgv,,
-AC_MSG_ERROR([You must have popt 1.5 or greater to compile the utilities.]))
-
-
 dnl some OS's have 'res_init' in libc, others like Cygwin use -lresolv,
 dnl and Darwin also has some symbol mangling which necessitates a different check
 dnl (hence the second line, based on ORBit2's configure.in).
@@ -415,7 +408,7 @@
 GTK_REQUIRED=2.8.0
 GCONF_REQUIRED=2.6.1
 LIBGLADE_REQUIRED=2.3.6
-LIBGNOME_REQUIRED=2.6.0
+LIBGNOME_REQUIRED=2.14.0
 LIBGNOMEUI_REQUIRED=2.6.1
 BONOBO_REQUIRED=2.6.1
 GNOME_SPEECH_REQUIRED=0.3.5
Index: brlmon/brlmon.c
===================================================================
--- brlmon/brlmon.c	(Revision 1924)
+++ brlmon/brlmon.c	(Arbeitskopie)
@@ -159,25 +159,51 @@
 
 extern GdkColor *brlmon_colors;
 
-/**
- *
- * Main arg list.
- *
-**/
-struct poptOption poptopt[] = 
+
+GnomeProgram *
+program_init (gint argc,
+              gchar **argv)
+{
+    GnomeProgram *program;
+    GOptionContext *context;
+    gchar *description;
+    
+    static const GOptionEntry options[] = 
      {		
-	{"line", 	'l', POPT_ARG_INT, &brlmon_line,  'l', "Number of line on display [line_no >= 2].", "line_no"},
-	{"column", 	'c', POPT_ARG_INT, &brlmon_column,'c', "Number of column in line on display [column_no >= 1].", "column_no"},
-	{"port", 	'p', POPT_ARG_INT, &brlmon_cmd_port,  'p', "UDP port number [1025 - 30000] ", "port_no"},
-	{"mode", 	'm', POPT_ARG_STRING, &brlmon_cmd_mode,  'm', "Display Mode[normal|braille|dual] ", "modetype"},
-	{NULL, 		0,0, NULL, 0}
-    };
+    {"line", 	'l', 0, G_OPTION_ARG_INT, &brlmon_line,  N_("Number of line on display [line_no >= 2]."), N_("line_no")},
+    {"column", 	'c', 0, G_OPTION_ARG_INT, &brlmon_column,  N_("Number of column in line on display [column_no >= 1]."), N_("column_no")},
+    {"port", 	'p', 0, G_OPTION_ARG_INT, &brlmon_cmd_port,  N_("UDP port number [1025 - 30000] "), N_("port_no")},
+    {"mode", 	'm', 0, G_OPTION_ARG_STRING, &brlmon_cmd_mode,  N_("Display Mode[normal|braille|dual] "), N_("modetype")},
+    {NULL}
+     };
 
+     description = g_strdup_printf ("- %s", 
+                   _("Assistive Technologies for Blind and Visually Impaired"));
+     context = g_option_context_new (description);
+     g_free (description);
 
+     g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
+ 
+     brlmon_initialize_values ();
+  
+     program = gnome_program_init ("brlmonitor", VERSION,
+ 				  LIBGNOMEUI_MODULE, 
+ 				  argc, argv,
+ 				  GNOME_PARAM_GOPTION_CONTEXT, context,
+ 				  GNOME_PARAM_HUMAN_READABLE_NAME, _("Braille monitor"),
+ 				  GNOME_PARAM_APP_DATADIR, DATADIR,
+ 				  NULL);
+
+
+    return program;
+}
+
 gint 
 main (gint argc, gchar *argv[])
 {
     gboolean rv;
+    GnomeProgram *program;
+
     
 #ifdef ENABLE_NLS
     bindtextdomain (GETTEXT_PACKAGE, GNOPERNICUSLOCALEDIR);
@@ -187,16 +213,8 @@
 #endif
 #endif    
 
-    brlmon_initialize_values ();
+    program = program_init (argc, argv);
 
-    gnome_program_init ("brlmonitor", VERSION,
-			LIBGNOMEUI_MODULE, 
-			argc, argv,
-			GNOME_PARAM_POPT_TABLE, poptopt,
-			GNOME_PARAM_HUMAN_READABLE_NAME, _("Braille monitor"),
-			GNOME_PARAM_APP_DATADIR, DATADIR,
-			NULL);
-
     sru_log_init ();
 
     
@@ -234,6 +252,8 @@
     
     sru_log_terminate ();
 
+    g_object_unref (program);
+
     return EXIT_SUCCESS;
 }
 
Index: braille/test/remote.c
===================================================================
--- braille/test/remote.c	(Revision 1924)
+++ braille/test/remote.c	(Arbeitskopie)
@@ -104,17 +104,7 @@
 /* GLOBALS */
 GMainLoop* g_loop  = NULL;
 
-struct poptOption poptopt[] = 
-     {		
-	{"device", 	'd', POPT_ARG_STRING, 	&device,  	'd', "Braille Device", 		"device_name"},
-	{"serial", 	's', POPT_ARG_STRING, 	&serial_port,	's', "Serial port (ttyS)", 	"serial_port"},
-	{"port", 	'p', POPT_ARG_INT, 	&hostport,  	'p', "UDP port number", 	"port_no"},
-	{"ip", 		'i', POPT_ARG_STRING, 	&hostip, 	'i', "Restricted host ip ", 	"ip"},
-	{NULL, 		0,0, NULL, 0}
-    };
 
-
-
 void 
 brl_input_event (BRLInEvent* brl_in_event)
 {	
@@ -523,10 +513,39 @@
     return TRUE;
 }
 
+GnomeProgram *
+program_init (gint argc,
+              gchar **argv)
+{
+    GnomeProgram *program;
+    GOptionContext *context;
+    
+    static const GOptionEntry options[] = 
+     {		
+    {"device", 	'd', 0, G_OPTION_ARG_STRING, 	&device,  	N_("Braille Device"),		N_("device_name")},
+ 	{"serial", 	's', 0, G_OPTION_ARG_STRING, 	&serial_port,	N_("Serial port (ttyS)"), 	N_("serial_port")},
+ 	{"port", 	'p', 0, G_OPTION_ARG_INT, 	&hostport,  	N_("UDP port number"),		N_("port_no")},
+ 	{"ip", 		'i', 0, G_OPTION_ARG_STRING, 	&hostip, 	N_("Restricted host ip "), 	N_("ip")},
+ 	{NULL}
+     };
+       
+    context = g_option_context_new (NULL);
+    g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
+
+    program = gnome_program_init ("Braille_remote", VERSION,
+				  LIBGNOMEUI_MODULE, argc, argv,
+				  GNOME_PARAM_GOPTION_CONTEXT, context,
+				  GNOME_PARAM_HUMAN_READABLE_NAME, _("Braille remote"),
+				  NULL);
+
+    return program;
+}
 /* Main */
 gint 
 main (gint argc, gchar** argv)
 {
+    GnomeProgram *program;
+
 #ifdef ENABLE_NLS
     bindtextdomain (GETTEXT_PACKAGE, GNOPERNICUSLOCALEDIR);
     textdomain (GETTEXT_PACKAGE);
@@ -535,16 +554,13 @@
 #endif
 #endif    
 
+
     serial_port = NULL;
 	
     hostport = -1;
     	
-    gnome_program_init ("Braille_remote", VERSION,
-		        LIBGNOMEUI_MODULE, argc, argv,
-		        GNOME_PARAM_POPT_TABLE, poptopt,
-		        GNOME_PARAM_HUMAN_READABLE_NAME, _("Braille remote"),
-		        NULL);
-
+    program = program_init (argc, argv);
+    
     if (!brl_gconf_client_init()) 
 	return -1;
 		
@@ -607,6 +623,8 @@
 	
     g_free(hostip);
 
+    g_object_unref (program);
+
     printf ("Braille remote end.\n");	
 	
     return 0;
