mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-21 17:11:58 +00:00
Add xterm as default terminal for nodeconsole -w
This commit is contained in:
parent
8a3105cd51
commit
e20e978e04
@ -41,7 +41,7 @@ argparser.add_option('-l', '--log', action='store_true', default=False,
|
||||
argparser.add_option('-w','--windowed', action='store_true', default=False,
|
||||
help='Open terminal windows for each node. The '
|
||||
'environment variable NODECONSOLE_WINDOWED_COMMAND '
|
||||
'must be set, which should be a text string corresponding '
|
||||
'should be set, which should be a text string corresponding '
|
||||
'to a command that can be used to open a windowed console,'
|
||||
' omitting the "nodeconsole <noderange>" part of the '
|
||||
'command, for example, to open a set of consoles for a '
|
||||
@ -55,7 +55,9 @@ argparser.add_option('-w','--windowed', action='store_true', default=False,
|
||||
'nodes in separate Windows Terminal windows, with the '
|
||||
'title set for each node, set NODECONSOLE_WINDOWED_COMMAND'
|
||||
' to "wt.exe wsl.exe -d AlmaLinux-8 '
|
||||
'--shell-type login".')
|
||||
'--shell-type login". If the NODECONSOLE_WINDOWED_COMMAND '
|
||||
'environment variable isn\'t set, xterm will be used by'
|
||||
'default.')
|
||||
(options, args) = argparser.parse_args()
|
||||
if len(args) != 1:
|
||||
argparser.print_help()
|
||||
@ -73,9 +75,9 @@ if options.log:
|
||||
if options.windowed:
|
||||
envstring=os.environ.get('NODECONSOLE_WINDOWED_COMMAND')
|
||||
if not envstring:
|
||||
print("NODECONSOLE_WINDOWED_COMMAND not defined and -w specified. Exiting...\n")
|
||||
sys.exit(1)
|
||||
envlist=os.environ.get('NODECONSOLE_WINDOWED_COMMAND').split(' ')
|
||||
envlist=["xterm", "-e"]
|
||||
else:
|
||||
envlist=os.environ.get('NODECONSOLE_WINDOWED_COMMAND').split(' ')
|
||||
nodes = []
|
||||
sess = client.Command()
|
||||
for res in sess.read('/noderange/{0}/nodes/'.format(args[0])):
|
||||
|
@ -30,7 +30,7 @@ a new session.
|
||||
* `-w`, `--windowed`:
|
||||
Open terminal windows for each node. The
|
||||
environment variable **NODECONSOLE_WINDOWED_COMMAND**
|
||||
must be set, which should be a text string corresponding
|
||||
should be set, which should be a text string corresponding
|
||||
to a command that can be used to open a windowed console,
|
||||
omitting the `nodeconsole <noderange>` part of the
|
||||
command, for example, to open a set of consoles for a
|
||||
@ -43,8 +43,9 @@ a new session.
|
||||
environment, to open a set of consoles for a range of
|
||||
nodes in separate Windows Terminal windows, with the
|
||||
title set for each node, set **NODECONSOLE_WINDOWED_COMMAND**
|
||||
to `wt.exe wsl.exe -d AlmaLinux-8
|
||||
--shell-type login`.
|
||||
to `wt.exe wsl.exe -d AlmaLinux-8 --shell-type login. If the
|
||||
NODECONSOLE_WINDOWED_COMMAND environment variable isn't set,
|
||||
xterm will be used bydefault.
|
||||
|
||||
## ESCAPE SEQUENCE COMMANDS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user