From 4ff5be3a7687dde79f8aa61a5e7be3524f11166d Mon Sep 17 00:00:00 2001 From: Camille GOUTTEBROZE Date: Fri, 29 Aug 2014 16:10:13 +0200 Subject: [PATCH] More clever way to get user name in runSession --- bin/runSession.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/runSession.py b/bin/runSession.py index f698e323d..837fe7877 100644 --- a/bin/runSession.py +++ b/bin/runSession.py @@ -25,6 +25,7 @@ import os import sys from optparse import OptionParser from NSparam import getNSparams +from salome_utils import getUserName import socket import subprocess @@ -72,7 +73,7 @@ If PORT is not given, try to connect to the remote session associated to port 28 # neither MACHINE nor PORT are given # --- set omniORB configuration to current session if any omniorbUserPath = os.environ['OMNIORB_USER_PATH'] - fileOmniConfig = omniorbUserPath + '/.omniORB_' + os.environ['USER'] + '_last.cfg' + fileOmniConfig = omniorbUserPath + '/.omniORB_' + getUserName() + '_last.cfg' if os.path.isfile(fileOmniConfig): os.environ['OMNIORB_CONFIG'] = fileOmniConfig # --- set environment variables for port and hostname of NamingService -- 2.39.2