catherine (nyanbinyary)
catherine (nyanbinyary)
TTermux
Created by catherine (nyanbinyary) on 2/1/2025 in #support
RUN_COMMAND_SHELL_NAME extra does nothing with am?
I'm trying to use the functionality added by https://github.com/termux/termux-app/pull/2668. This is the script I have so far:
#!/usr/bin/bash

am startservice --user 0 -n com.termux/com.termux.app.RunCommandService \
-a com.termux.RUN_COMMAND \
--es com.termux.RUN_COMMAND_SHELL_NAME 'Test Name' \
--es com.termux.RUN_COMMAND_SESSION_ACTION '2' \
--es com.termux.RUN_COMMAND_SHELL_CREATE_MODE 'no-session-with-name' \
--es com.termux.RUN_COMMAND_PATH '/data/data/com.termux/files/usr/bin/bash'
#!/usr/bin/bash

am startservice --user 0 -n com.termux/com.termux.app.RunCommandService \
-a com.termux.RUN_COMMAND \
--es com.termux.RUN_COMMAND_SHELL_NAME 'Test Name' \
--es com.termux.RUN_COMMAND_SESSION_ACTION '2' \
--es com.termux.RUN_COMMAND_SHELL_CREATE_MODE 'no-session-with-name' \
--es com.termux.RUN_COMMAND_PATH '/data/data/com.termux/files/usr/bin/bash'
Running this script successfully spawns a new session running bash, but the session has the default name of [0] bash still, and hence the SHELL_CREATE_MODE doesn't do anything either. I've just updated to 118.1, in case that was the issue, to no avail. I'm likely doing something wrong, but I don't know what, and I don't know how to figure out what.
1 replies