intr_system(lyx_exe + c[9:] + "&")
else:
intr_system(lyx_exe + " -userdir " + lyx_userdir + " " + c[9:] + "&")
- while True:
+ count = 5
+ while count > 0:
lyx_pid=os.popen("pidof " + lyx).read().rstrip()
if lyx_pid != "":
lyx_window_name=os.popen("wmctrl -l -p | grep ' " + str(lyx_pid) + " ' | cut -d ' ' -f 1").read().rstrip()
if lyx_window_name != "":
break
+ else:
+ count = count - 1
print 'lyx_win: ' + lyx_window_name + '\n'
print "Waiting for LyX to show up . . ."
time.sleep(1)
+ if count <= 0:
+ print 'Timeout: could not start ' + lyx_exe, '\n'
+ sys.stdout.flush()
+ failed = True
print 'lyx_pid: ' + lyx_pid + '\n'
print 'lyx_win: ' + lyx_window_name + '\n'
elif c[0:5] == 'Sleep':
lang = c[5:].rstrip()
print "Setting LANG=" + lang + "\n"
os.environ['LANG'] = lang
- os.environ['LANGUAGE'] = lang
+ os.environ['LC_ALL'] = lang
# If it doesn't exist, create a link <locale_dir>/<country-code>/LC_MESSAGES/lyx<version-suffix>.mo
# pointing to the corresponding .gmo file. Needed to let lyx find the right translation files.
# See http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg165613.html