HowTo Configure The Default Terminal Application for ssh:// For A Browser
Overview
The steps below are for your NST Linux system and associated Google Chrome Browser. The procedure to configure the default terminal application for ssh:// links in Linux involves modifying the system's MIME type associations. This configuration ensures that when a browser encounters an ssh:// link, it opens the specified terminal application with the appropriate parameters. Identify the Terminal Application and its Command-line Arguments: Determine the terminal application you want to use (e.g., GNOME Terminal, Konsole, Xfce Terminal) and its command-line arguments for initiating an SSH connection. For example, with Mate Terminal, the command might look like:
mate-terminal -- ssh username@host
Configure: "mimeapps.list"
Edit the mimeapps.list File: The mimeapps.list file, typically located at "~/.config/mimeapps.list", handles MIME type associations. If the file doesn't exist, create it. Open the file in a text editor and add or modify the following lines:
[Default Applications] x-scheme-handler/ssh=mate-terminal-ssh.desktop
Configure: "mate-terminal-ssh.desktop"
Create or modify the .desktop file if necessary: If the terminal application's .desktop file does not exist in "/usr/share/applications/", create one or modify an existing one. Ensure it contains the correct Exec line with the appropriate command-line arguments. For example ("/usr/share/applications/mate-terminal-ssh.desktop"):
[Desktop Entry] Type=Application Name=Mate Terminal for SSH Exec=mate-terminal -- ssh %u NoDisplay=true MimeType=x-scheme-handler/ssh
The %u is a placeholder for the URL.
Update Desktop Database
Update the System: After making these changes, update the system's MIME database to ensure the changes are applied:
update-desktop-database ~/.local/share/applications
Test ssh:// Link
Test the Configuration: Open a browser and click on an ssh:// link. The configured terminal application should launch and attempt to establish an SSH connection. The procedure above could also be used to associate a telnet:// link.