From 8ed11b6feeded0e30e7b9596fdb58a2bfa4858a5 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Fri, 10 Aug 2007 12:57:43 -0400 Subject: [PATCH 1/2] sugar console changes directory to the user's home directory and sets proc title --- services/console/sugar-console | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/console/sugar-console b/services/console/sugar-console index af709a63..357b7fee 100755 --- a/services/console/sugar-console +++ b/services/console/sugar-console @@ -6,7 +6,15 @@ pygtk.require('2.0') import os import sys from sugar import env +from sugar import util sys.path.append(env.get_service_path('console')) +# change to the user's home directory if it is set +# root if not +os.chdir(os.environ.get('HOME', '/')) + +#set the process title so it shows up as sugar-console not python +util.set_proc_title('sugar-console') + import console From d2e4e99226e2074f0d09dc9baeadc2e7f7e31c25 Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Fri, 10 Aug 2007 13:32:24 -0400 Subject: [PATCH 2/2] hack to make sure vte does not wrap too early in first instance * vte does not reflow if you add the widget before its container is realized so we hack around this by calling set_size with a high number for width --- services/console/interface/terminal/terminal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/console/interface/terminal/terminal.py b/services/console/interface/terminal/terminal.py index 5eebfb36..4aba8584 100644 --- a/services/console/interface/terminal/terminal.py +++ b/services/console/interface/terminal/terminal.py @@ -32,7 +32,7 @@ class Terminal(gtk.HBox): self._vte = vte.Terminal() self._configure_vte() - self._vte.set_size(30, 5) + self._vte.set_size(100, 5) self._vte.set_size_request(200, 450) self._vte.show() self.pack_start(self._vte)