A custom terminal emulator with an integrated shell.
- Command Execution: Run standard Unix commands.
- Pipelines: Chain commands using
|. - Redirection: Support for input (
<), output (>), and append (>>) redirection. - Background Processes: Use
&to run commands in the background. Shell notifies when background processes complete. - Command History:
- View history with
history. Entries are timestamped. - Navigate history using Up/Down arrows.
- Persistent history saved to
~/.sdn_history.
- View history with
- Autocompletion:
- Tab completion for commands (with inline suggestions) and filenames/directories.
- Completes to the longest common prefix for multiple file/directory matches.
- Displays matching filenames/directories if multiple options exist after a Tab press.
- Wildcard Expansion (Globbing): Supports
*,?,[], and{}patterns for filename expansion in command arguments. - Alias Support:
- Define and use aliases for commands (e.g.,
alias ll="ls -al"). - Manage aliases with
aliasandunaliascommands.
- Define and use aliases for commands (e.g.,
- Directory-Local Aliases: Automatically loads aliases from a
.sdn_local_aliasesfile in the current directory when youcdinto it. These aliases are cleared when youcdout. This allows for project-specific command shortcuts. - Built-in Commands:
cd: Change directory.exit: Exit the shell.history: Show command history.
- Interactive Editing: Backspace, arrow keys, and Ctrl+D for input control.
- Error Handling: Informative messages for syntax and execution errors.
- Terminal Features:
- Copy/Paste with Ctrl+Shift+C and Ctrl+Shift+V
- Customizable colors via command-line themes (dark (default), light, light-blue, gray)
- 10,000 lines of scrollback buffer
The terminal requires the following libraries:
- GTK+ 3.0
- VTE 2.91 (Virtual Terminal Emulator)
On Ubuntu/Debian, install dependencies with:
sudo apt-get install libgtk-3-dev libvte-2.91-devOn Fedora:
sudo dnf install gtk3-devel vte291-develOn Arch Linux:
sudo pacman -S gtk3 vte3Use the included Makefile:
makeThis builds both the sdn shell and the sdn_terminal application.
To install the applications to your user directory:
make installThis installs to ~/.local/bin/ and adds a desktop entry.
You can run the terminal emulator in several ways:
-
From the build directory:
./sdn_terminal
-
If installed:
sdn_terminal # To use a specific theme, for example "light": sdn_terminal --theme light # Available themes: dark(default), light, light-blue, gray
-
From your desktop environment's application menu (search for "SDN Terminal")
Note: The desktop entry (
sdn.desktop) uses theExecfield to launchsdn_terminalfrom your user install location. If you are installing from a release archive (e.g,sdn-0.1.tar.gz), thesdn.desktopfile within the archive will have a placeholder username in theExecpath (e.g.,Exec=/home/your_username/.local/bin/sdn_terminal). You must manually edit this file after installation (usually found in~/.local/share/applications/sdn.desktop) and replaceyour_usernamewith your actual username for the desktop entry to work correctly. By default, if you build and install from source usingmake install, theExecpath in thesdn.desktopfile copied to~/.local/share/applications/should reflect the username of the user who ran the install command. However, always verify this path if the desktop entry doesn't work.
If you want to use the SDN shell without the terminal emulator:
./sdnOr if installed:
sdnTo uninstall:
make uninstallCtrl+Shift+C: Copy selected textCtrl+Shift+V: Paste from clipboardCtrl+Shift+T: Open a new tabCtrl+W: Close the current tabAlt+[1-9]: Switch to tab 1 through 9Alt+0: Switch to tab 10Ctrl+D: Exit the shell