Last year I posted how-to-run-programs-over-secure-shell, in which I described how to add a menu entry to the menu. In that example I used the Network catorgory. Which is ok for one or two , however if you have more then one program you wish to run and/or more then one server it could make the network submenu look untidy. Because of this I thought I would share how to create another submenu for ssh programs. This is easily achieved by created two files and depending on whether or not your wanting to create this menu for just one user or all users.
The first file is a .menu and can be anything. Since this is for ssh I’m going to call it ssh.menu and should be saved to should be saved as ~/.config/menus/applications-merged/ssh.menu for a single user and /etc/xdg/menus/applications-merged/ssh.menu for all users. This file should look like,
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd"> <Menu> <Name>ssh</Name> <Menu> <Name>ssh</Name> <Directory>ssh.directory</Directory> <Include> <Category>ssh</Category> </Include> <Layout> <Merge type="all"/> </Layout> </Menu> </Menu>
The second file is a .directory and since its already been referenced as ssh.directory it needs to match that. This file needs to be saved as ~/.local/share/desktop-directories/ssh.directory for a single user and /usr/share/desktop-directories/ssh.directory for all users. This file should be look like,
Each user still needs to create their own .desktop files for their programs running over ssh. These files are saved in ~/.local/share/applications/ Each .desktop file should look something like this example for mousepad,
Name=Mousepad on Server
Exec=ssh -X email@example.com “mousepad”