You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the custom commands launcher, setting a command containing ; (i.e. doing multiple commands in one line) makes only the first command working.
It behaves this way because the launching uses sh -c 'exec <command>' (see source) and exec only applies to the first command, which removes the ability to continue with any other command.
Other information
It was chosen to use exec because sh -c is used to get shell features (for example >) and the method Gio.Subprocess.force_exit only sends SIGINT to its direct child (see this "discussion" about it). So to allow the force_exit to work, exec is used to replace the sh process by the command it executes so it becomes the direct child.
The idea is that the commands launcher should be able to responsibly abort the command after a timeout in the case it is blocked because in the context of an Applet the visibility of what happens is limited and in this applet the commands accumulates silently and automatically over time.
A solution could be to parse the command string with ; as separator to multiple commands to be run sequentially.
The text was updated successfully, but these errors were encountered:
Applet version/Build date
1.2.1
Cinnamon version
Cinnamon 6.2.9
Distribution
Mint 22
Graphics hardware and driver used
No response
Applet name and maintainer
auto-dark-light@gihaume @guillaume-mueller
What happened?
In the custom commands launcher, setting a command containing
;
(i.e. doing multiple commands in one line) makes only the first command working.It behaves this way because the launching uses
sh -c 'exec <command>'
(see source) andexec
only applies to the first command, which removes the ability to continue with any other command.Other information
It was chosen to use
exec
becausesh -c
is used to get shell features (for example>
) and the methodGio.Subprocess.force_exit
only sendsSIGINT
to its direct child (see this "discussion" about it). So to allow theforce_exit
to work,exec
is used to replace thesh
process by the command it executes so it becomes the direct child.The idea is that the commands launcher should be able to responsibly abort the command after a timeout in the case it is blocked because in the context of an Applet the visibility of what happens is limited and in this applet the commands accumulates silently and automatically over time.
A solution could be to parse the command string with
;
as separator to multiple commands to be run sequentially.The text was updated successfully, but these errors were encountered: