X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fopenbox.c;h=291b694b90328b574e4a6f5cd7cdfa7ac37482ae;hb=f857b0eb99471c9123d6e641afafeab5f47700e2;hp=d6da5ec7a60aee9e390883fbf3c1fe3991809c6c;hpb=0ffd1ccc4701a9814e6ee570461b1250dd16f1e3;p=chaz%2Fopenbox diff --git a/openbox/openbox.c b/openbox/openbox.c index d6da5ec7..291b694b 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -128,6 +128,10 @@ gint main(gint argc, gchar **argv) bind_textdomain_codeset(PACKAGE_NAME, "UTF-8"); textdomain(PACKAGE_NAME); + if (chdir(g_get_home_dir()) == -1) + g_message(_("Unable to change to home directory \"%s\": %s"), + g_get_home_dir(), g_strerror(errno)); + /* parse the command line args, which can change the argv[0] */ parse_args(&argc, argv); /* parse the environment variables */ @@ -148,7 +152,7 @@ gint main(gint argc, gchar **argv) * remote_control = 2 -> restart */ OBT_PROP_MSG(ob_screen, obt_root(ob_screen), OB_CONTROL, remote_control, 0, 0, 0, 0); - obt_display_close(obt_display); + obt_display_close(); exit(EXIT_SUCCESS); } @@ -384,7 +388,7 @@ gint main(gint argc, gchar **argv) session_shutdown(being_replaced); - obt_display_close(obt_display); + obt_display_close(); if (restart) { if (restart_path != NULL) { @@ -398,7 +402,7 @@ gint main(gint argc, gchar **argv) g_strfreev(argvp); } else { g_message( - _("Restart failed to execute new executable '%s': %s"), + _("Restart failed to execute new executable \"%s\": %s"), restart_path, err->message); g_error_free(err); } @@ -613,7 +617,7 @@ static void parse_args(gint *argc, gchar **argv) else { /* this is a memleak.. oh well.. heh */ gchar *err = g_strdup_printf - (_("Invalid command line argument '%s'\n"), argv[i]); + (_("Invalid command line argument \"%s\"\n"), argv[i]); ob_exit_with_error(err); } }