<page xmlns="http://projectmallard.org/1.0/" type="topic" id="pref-custom-command"> <info> <revision pkgversion="3.8" date="2013-03-02" status="candidate"/> <revision pkgversion="3.12" date="2014-09-08" status="candidate"/> <revision pkgversion="3.34" date="2020-01-04" status="candidate"/> <link type="guide" xref="index#preferences"/> <link type="guide" xref="pref#profile"/> <link type="seealso" xref="gs-execute-commands"/> <!-- <link type="seealso" xref="prob-add-to-path"/>--> <credit type="author copyright"> <name>Sindhu S</name> <email>sindhus@live.in</email> <years>2013</years> </credit> <credit type="copyright editor"> <name>Ekaterina Gerasimova</name> <email>kittykat3756@gmail.com</email> <years>2013-2014</years> </credit> <credit type="copyright editor"> <name>Michael Hill</name> <email>mdhillca@gmail.com</email> <years>2013</years> </credit> <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/> <desc>Set <app>Terminal</app> to run a command or a different shell on startup.</desc> </info> <title>Custom commands and shells</title> <p>A <em>shell</em> is software that provides an interface for users of an operating system to run <em>commands</em>, which can be programs such as <app>top</app> or a command line shell. The default shell is usually <app>Bash</app>.</p> <p>You can set <app>Terminal</app> to run a command when it starts up instead of awaiting input from you:</p> <steps> <item> <p>Press the menu button in the top-right corner of the window and select <gui style="menuitem">Preferences</gui>.</p> </item> <item> <p>In the sidebar, select your current profile in the <gui>Profiles</gui> section.</p> </item> <item> <p>Select <gui style="tab">Command</gui>.</p> </item> <item> <p>Check <gui>Run a custom command instead of my shell</gui>.</p> </item> <item> <p>In the text box, type the command or the desired shell.</p> <p>The command will be passed to the terminal exactly as you write it, including any arguments that you specify. Environment variables will be inherited from the terminal as it is a child process of the terminal.</p> </item> <item> <p>Open a new <app>Terminal</app> tab or window to see how the custom shell or command executes.</p> </item> </steps> <p>You can also <link xref="pref-custom-exit">set the behavior</link> of the terminal once the command finishes executing.</p> <note style="important"> <p>You may have to enter full path to the command or the shell if the directory where the command or shell resides is not in the <code>PATH</code> variable of your system.</p> </note> </page>
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
figures | Folder | 0755 |
|
|
adv-keyboard-shortcuts.page | File | 12.98 KB | 0644 |
|
app-colors.page | File | 6.51 KB | 0644 |
|
app-cursor.page | File | 2.08 KB | 0644 |
|
app-fonts.page | File | 4.05 KB | 0644 |
|
app-fullscreen.page | File | 2.07 KB | 0644 |
|
app-terminal-sizes.page | File | 3.08 KB | 0644 |
|
app-zoom.page | File | 1.73 KB | 0644 |
|
gs-execute-commands.page | File | 2.03 KB | 0644 |
|
gs-tabs.page | File | 5.42 KB | 0644 |
|
index.page | File | 1.67 KB | 0644 |
|
introduction.page | File | 1.42 KB | 0644 |
|
legal.xml | File | 998 B | 0644 |
|
overview.page | File | 3.97 KB | 0644 |
|
pref-bell.page | File | 1.92 KB | 0644 |
|
pref-custom-command.page | File | 2.8 KB | 0644 |
|
pref-custom-exit.page | File | 2.43 KB | 0644 |
|
pref-keyboard-access.page | File | 3.19 KB | 0644 |
|
pref-login-shell.page | File | 3.07 KB | 0644 |
|
pref-menubar.page | File | 2.08 KB | 0644 |
|
pref-profile-char-width.page | File | 1.82 KB | 0644 |
|
pref-profile-encoding.page | File | 1.69 KB | 0644 |
|
pref-profiles.page | File | 9.11 KB | 0644 |
|
pref-scrolling.page | File | 5.31 KB | 0644 |
|
pref-tab-window.page | File | 2.54 KB | 0644 |
|
pref-user-input.page | File | 1.56 KB | 0644 |
|
pref.page | File | 746 B | 0644 |
|
prob-reset.page | File | 2.41 KB | 0644 |
|
txt-copy-paste.page | File | 2.12 KB | 0644 |
|
txt-links.page | File | 3.01 KB | 0644 |
|
txt-search.page | File | 3.02 KB | 0644 |
|
txt-select-text.page | File | 1.55 KB | 0644 |
|