~haakan/do-plugins/sshfix

« back to all changes in this revision

Viewing changes to SSH/src/SSHAction.cs

  • Committer: Håkan Nilsson
  • Date: 2010-08-10 20:25:12 UTC
  • Revision ID: hakan@laptop-20100810202512-vo7kjdrn0zt8lmuc
Fixed terminal exec code so it will work with more terminal emulators. Confirmed to work with rxvt and konsole now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
                        GConf.Client client = new GConf.Client ();
67
67
 
68
68
                        string exec;
 
69
                        string exec_arg;
69
70
                        try {
70
71
                                exec = client.Get ("/desktop/gnome/applications/terminal/exec") as string;
 
72
                                exec_arg = client.Get ("/desktop/gnome/applications/terminal/exec_arg") as string;
71
73
                        } 
72
74
                        catch {
73
75
                                exec = "gnome-terminal";
 
76
                                exec_arg = "-e";
74
77
                        }
75
78
                        
76
79
                        string hostname;
86
89
 
87
90
                        Process term = new Process ();
88
91
                        term.StartInfo.FileName = exec;
89
 
                        term.StartInfo.Arguments = "-e 'ssh " + hostname + "'";
 
92
                        term.StartInfo.Arguments = exec_arg + " ssh " + hostname;       
90
93
                        term.Start ();
91
94
                        yield break;
92
95
                }