From 7baf47b70eff28f4ce5382531dbc409da80dbf9f Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Mon, 30 May 2005 12:53:48 +0000 Subject: [PATCH] fixing #344 --- src/gajim.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/gajim.py b/src/gajim.py index 70be4788a..b5ca9f200 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -21,16 +21,21 @@ exec python -OOt "$0" ${1+"$@"} ## GNU General Public License for more details. ## +import sys import pygtk pygtk.require('2.0') -import gtk +try: + import gtk +except RuntimeError, msg: + if str(msg) == 'could not open display': + print 'Gajim needs Xserver to run. Exiting...' + sys.exit(0) import gtk.glade import pango import gobject import os import sre import signal -import sys import getopt from common import i18n @@ -57,7 +62,7 @@ except getopt.error, msg: sys.exit(2) for o, a in opts: if o in ('-h', '--help'): - print 'gajim [--help] [--profile name]' + print 'gajim [--help] [--verbose] [--profile name]' sys.exit(0) elif o in ('-v', '--verbose'): gajim.verbose = True