Re: [sshmenu] (no subject)
Brought to you by:
grantm
From: Grant M. <gr...@mc...> - 2009-07-09 00:02:14
|
Hi On Wed, 2009-07-08 at 11:58 +0200, ste...@fr... wrote: > > I want to used your application. > I have a little problem on it: i must used tsock to connect to my server. > So my question is: Who can i launch tsock before ssh command ? > in xterm, i must write : > tsocks -on;sleep 5;ssh ai...@to... I'm not familiar with tsocks but you should be able to achieve what you want easily by overriding the 'ssh_command' method in the SSHMenu::App class. That might sound hard if you've never programmed in Ruby, but there are a number of resources on the web site that you can use to reach a solution. Nicholas Roman wrote an article that described how to customise SSHMenu to use a different terminal program (instead of gnome-terminal): http://sshmenu.sourceforge.net/articles/terminator.html In his example, he overrode the 'build_window_command' method but you would want to override 'ssh_command'. Normally this method just returns 'ssh' but if you simply changed it to return 'tsocks-ssh' you could write a tsocks-ssh shell script that does what you need. Do all your SSH connections need to use tsocks? If not, you might want to add a checkbox to the host dialog. There's an article on the web site that describes doing that to allow some connections to use telnet and some to use SSH: http://sshmenu.sourceforge.net/articles/sshtelnetmenu.html To debug your customisations, you can run the /usr/bin/sshmenu-gnome command - that will be easier that restarting the applet. Once you have your customisations working in the standalone menu program you can just log out and back in to have the applet pick up the new code (or remove the applet from the panel and add it again). Cheers Grant |