Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto-dark-light@gihaume: custom commands launcher doesn't support ; #6549

Open
guillaume-mueller opened this issue Nov 1, 2024 · 0 comments
Labels

Comments

@guillaume-mueller
Copy link
Contributor

guillaume-mueller commented Nov 1, 2024

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) 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.

@guillaume-mueller guillaume-mueller changed the title auto-dark-light@gihaume: custom commands launcher bugs auto-dark-light@gihaume: custom commands launcher doesn't support ; Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant