Support for running arbitrary command when starting terminal (other than bash)
This commit is contained in:
+2
-2
@@ -35,7 +35,7 @@ def tunnelX11( node, display=None):
|
|||||||
"EXEC:'mnexec -a 1 socat STDIO %s'" % connection ]
|
"EXEC:'mnexec -a 1 socat STDIO %s'" % connection ]
|
||||||
return 'localhost:' + screen, node.popen( cmd )
|
return 'localhost:' + screen, node.popen( cmd )
|
||||||
|
|
||||||
def makeTerm( node, title='Node', term='xterm', display=None ):
|
def makeTerm( node, title='Node', term='xterm', display=None, cmd='bash'):
|
||||||
"""Create an X11 tunnel to the node and start up a terminal.
|
"""Create an X11 tunnel to the node and start up a terminal.
|
||||||
node: Node object
|
node: Node object
|
||||||
title: base title
|
title: base title
|
||||||
@@ -54,7 +54,7 @@ def makeTerm( node, title='Node', term='xterm', display=None ):
|
|||||||
display, tunnel = tunnelX11( node, display )
|
display, tunnel = tunnelX11( node, display )
|
||||||
if display is None:
|
if display is None:
|
||||||
return []
|
return []
|
||||||
term = node.popen( cmds[ term ] + [ display, '-e', 'env TERM=ansi bash'] )
|
term = node.popen( cmds[ term ] + [ display, '-e', 'env TERM=ansi %s' % cmd ] )
|
||||||
return [ tunnel, term ] if tunnel else [ term ]
|
return [ tunnel, term ] if tunnel else [ term ]
|
||||||
|
|
||||||
def runX11( node, cmd ):
|
def runX11( node, cmd ):
|
||||||
|
|||||||
Reference in New Issue
Block a user