GNOME Bugzilla – Bug 544101
gnome-terminal documentation vague about custom_command
Last modified: 2013-03-24 10:19:39 UTC
Documentation Section: Under Preferences/Title and Command Under Title and Command... Run a custom command instead of my shell ---------------------------------------- Select this option to run a specified command, other than the normal shell, in the terminal. Specify the custom command in the Custom command text box. Correct version: Specifics about how this custom_command is used. Specifically, what's searched for the executable, how's it invoked, what variable expansion will be performed, where any errors will be logged, etc. Going from 2.18.1 to this version I've observed that PATH has been honored in the past, but it does not seem to be in 2.22.1. May be some other problem in my environment, but the lack of documented behavior here prevents me tracing the problem elsewhere in my system. Other information:
I can't confirm this bug or I do not understand you well. IMHO this feature works as documentation says, it's section 4.2. Title and Command. Can you provide more detailed information this bug is about?
Let me know if this isn't detailed enough-- Details that should be included: 1) How is the custom command located? If the user's path searched? Must the user provide an explicit pathname to the custom command? 2) What, if any, flags will be passed to the custom command? Will the custom command run in the same environment as the gnome-terminal process does (i.e. inheriting environment variables set when gnome-terminal was run)? 3) What, if any, substitution will be performed on the custom command string? Will environment variables be expanded? E.g. may I include $HOME/bin/something and expect $HOME to be expanded? 4) Will the string be treated as if bash was interpreting it? ksh was interpreting it? The user's $SHELL was interpreting it? 5) How and where can the user obtain information about the custom command, especially if it fails/exits with non-zero status? I opened the bug because I saw different behavior with respect to (1) going from version 2.18.1 to version 2.22.1. I think items' (1) and (5) should be addressed at a minimum to close the bug. Hope that helps, Rhys
I'm currently re-writing help for Terminal using Mallard. I have written a page to explain custom shells and starting Terminal to run a command instead of a shell. I will address the above concerns in the page. As for point number 5, I do not know if logs are stored for a command that exits with non-zero status but I do know that the user is able to see any messages should the command that exits prematurely write to the Terminal if the user has set the Terminal to be held open despite the command's exit.
The custom command preference is covered on pref-custom-command.page (In reply to comment #2) > 1) How is the custom command located? If the user's path searched? Must the > user provide an explicit pathname to the custom command? This is done. > 2) What, if any, flags will be passed to the custom command? Will the custom > command run in the same environment as the gnome-terminal process does (i.e. > inheriting environment variables set when gnome-terminal was run)? Only arguments that are specified by the user will be passed to the command. The custom command will inherit the environment variables as it is a child process of the terminal. Sindhu, add these details (in a user friendly way) to the bottom of the page… maybe in a "here are some more details" style. > 3) What, if any, substitution will be performed on the custom command string? > Will environment variables be expanded? E.g. may I include $HOME/bin/something > and expect $HOME to be expanded? > > 4) Will the string be treated as if bash was interpreting it? ksh was > interpreting it? The user's $SHELL was interpreting it? > > 5) How and where can the user obtain information about the custom command, > especially if it fails/exits with non-zero status? The custom command is just a command line. It only executes the command that is passed to it without doing anything else. I think this is sufficiently covered in the new user help.
Fix pushed to master in commit 8d1b328e062b3a8f6fd2404a839a3a94d5c4db20 and to gnome-3-8 in commit 51ee3ef28b3bcff8456855ace977c167f12a42a2. Please re-open the bug if you think that we can improve the instructions further, patches also welcome! :)