-
Notifications
You must be signed in to change notification settings - Fork 45
CM Setup
The first time you add the CM extension, you must launch preferences window to setup your hosts / application.
You configure CM by clicking on extension icon and then on "Connection Manager Settings" from the menu, to display the preferences dialog:
You can add hosts, applications, submenu or configuring options.
You add a host by selecting a menu and clicking "Add Host" button which will present you with a dialog for entering the Host Connection Details:
When adding a host, the input fields will initially be pre-populatated with default value. Fill them in as follows:
This field controls what is displayed in the menu. You might enter the hostname (eg: neptune), a description of the host's role (eg: Web Server), some combination of the two (eg: Web Server (neptune)), or pretty much anything else that makes sense to you.
What you enter in this field will be passed as arguments to the ssh command. The simplest thing is to just enter a hostname:
www.example.com
You can also specify a username:
webmaster@www.example.com
And you can include options before the hostname (see the SSH manual pages for details). For example to connect on a non-standard port number with both agent forwarding and X11 forwarding enabled, you might enter:
-p 8022 -A -X webmaster@www.example.com
You can also enter a command after the hostname. This command will be executed instead of an interactive shell, so when the command completes, the window will close. A common use of this feature is to login to a server and 'tail' a log file:
www.example.com "cd /var/log/apache; tail -f error.log"
The output from the ssh command string can also be piped into a command which will be run locally. This is most useful for session logging:
www.example.com | tee $HOME/ssh_logs/www.log
Finally, you can use this field to set environment variables for the terminal program on your local machine (a short list of environment variables will also be propagated to the remote shell, depending on your SSH configuration). For example if your local terminal windows normally use a UTF-8 locale but the server you're connecting to only supports Latin-2 then you might enter something like this to force your local terminal program to use the legacy encoding:
LC_ALL="pl_PL.iso-8859-2" www.example.pl
Warning: If you use the "Open all as tabs" option (described below) one terminal process will be used for all the tabs. If the first host in the menu defines environment settings, those settings will be applied to all hosts and any environment settings defined for later hosts will be ignored.
The profile is used to set window colours, fonts and other effects in the terminal window. This drop-down menu lists all the profiles you have set up in Gnome Terminal (i.e.: if the drop-down lists no profiles, you'll need to define them using gnome-terminal, not CM).
You add an application launcher by clicking the 'Add App' button.
This field controls what is displayed in the menu. You might enter the application name (eg: calculator), a description of your custom app (eg: kill process x), or pretty much anything else that makes sense to you.
What you enter in this field, will be launched as command line. Will be executed in a shell if you click on check button 'Execute in shell'
Your configuration will be saved automatically. A .connmg.bak file will be written before first change.
You can clone Host and App element of your configuration. Select the element you want to duplicate and click on 'Clone it' button.
You can import ssh configuration by clicking the 'Import SSHConf' button.
Will be create a new menu at the first level (under 'Root') with all hosts imported. You can reorganize your imported hosts everywhere in your CM tree.
Warning: if you click on import button and already exists the menu __Imported_from_SSH_config__
all the content will be overwritten from a new import operation.
The import procedure read only the following fields in $HOME/.ssh/config file:
- Host -> Title
- User, HostName -> Host (user@hostname)
- Port, Hostname -> Host (-p hostname)
All other fields will be ignored.
Back in the preferences dialog, you can switch to the 'Options' tab:
The options are:
This option adds a selection to each sub-menu which will open all the host connections on that menu with a single click — each will open in a separate gnome-terminal window.
This option adds a selection to each sub-menu which will open all the host connections on that menu with a single click — each will open in a separate tab of a shared gnome-terminal window.
Removed. Now it save automatically backup file, so previous config file ($HOME/.connmgr) will be always copied to a .bak file. In the event that your configuration got corrupted so the extension wouldn't start, you could rename the .bak file over the main config file.
This option allows you to choose your favorite terminal (only these installed). Due to a code revamping is now possible to easily add support for other terminals. Supported terminals:
-
Gnome terminal (default)
-
Terminator allows multiple terminals in one window. Using CM with Terminator instead of Gnome-Terminal allows a user to split their terminal window and to see multiple terminals at a single glance (i.e. without swapping between tabs). You can see some screenshot and features here.
-
Guake is a top-down terminal for Gnome.
-
TMux is a terminal multiplexer using a client-server model. Trivial support. It's necessary to launch a tmux instance first. (Thanks to Paul Robins)
-
URXVT / URXVT256c is a fork of the well known terminal emulator rxvt.
-
LilyTerm is a terminal emulator based off of libvte that aims to be fast and lightweight. Only windows support now.
After your changes to CM configuration, CM reloads automatically the new configuration.
Used with permission of Grant McLean