ssh_remote_command = ['/bin/bash', '--login', '-c', " ".join( ['\'', 'env', lang_command, 'LTSP_CLIENT="%s"' % (socket.gethostname()), ] + sound_cmd + [ session_manager, '\''] ), ';', 'ssh -S /tmp/.ltspfs-socket', server, 'ltsp_local', ';' 'kill -1 $PPID'] Where ltsp_local is: #!/bin/bash test -z "$HOME/ltspmounts" || mkdir "$HOME/ltspmounts"; ltspfs $LTSP_CLIENT:/media $HOME/ltspmounts