What I want to do is have an icon on my KDE desktop which, when clicked
will open a terminal and connect via ssh to a particular remote host
without my having to enter username or password.
Phil
It's quite a bit older than six months, but korundum is the name of the
kde-ruby bindings, I believe. If you use gentoo, it's in the portage
tree.
> What I want to do is have an icon on my KDE desktop which, when clicked
> will open a terminal and connect via ssh to a particular remote host
> without my having to enter username or password.
I don't think you need to write a kde app to do this. Just writing
your script and putting it on the desktop will let you click it to
execute it.
>> It seems I recall an announcment sometime in the last six months or so
>> about a Ruby library/package/module that allows you to write KDE
>> 'applets' (I may be misnaming this object).
>
> It's quite a bit older than six months, but korundum is the name of the
> kde-ruby bindings, I believe. If you use gentoo, it's in the portage
> tree.
Or you can download it from RubyForge:
http://rubyforge.org/projects/korundum/
>> What I want to do is have an icon on my KDE desktop which, when clicked
>> will open a terminal and connect via ssh to a particular remote host
>> without my having to enter username or password.
>
> I don't think you need to write a kde app to do this. Just writing
> your script and putting it on the desktop will let you click it to
> execute it.
I would use KDE::System tray to add an icon with a menu to the kicker system
tray, here's an example:
require 'Korundum'
class MainWin < KDE::MainWindow
slots 'slotQuitSelected()'
def initialize(*args)
super
@exitFlag = false
icons = KDE::IconLoader.new
systray = KDE::SystemTray.new(self)
systray.setPixmap(icons.loadIcon("stop", 0))
connect(systray, SIGNAL("quitSelected()"), self,
SLOT('slotQuitSelected()'))
systray.show
end
def queryClose
hide
return @exitFlag
end
def slotQuitSelected
@exitFlag = true
$kapp.quit
end
end
about = KDE::AboutData.new("systray", "A system tray", "0.1")
KDE::CmdLineArgs.init(ARGV, about)
app = KDE::Application.new
mainWindow = MainWin.new(nil, "main window")
mainWindow.show
app.exec
Then start a konsole instance with a DCOP call:
error = ""
pid = Qt::Integer.new
errcode = KDE::Application.startServiceByDesktopName("konsole", "", error,
"", pid)
dcopService = "konsole-" + pid.to_s
I'm not sure how you send an ssh login command to konsole though.
-- Richard
Easier
Right-click on your desktop->Create New->Link to location and put
ssh://<your login>:<your pass>@<your ssh serv>
its should work
You can also use the ssh:// kioslave on your bookmarks