[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

KDE 'applets' in Ruby?

ptkwt

4/30/2005 12:59:00 AM


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).

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
3 Answers

tsuraan

4/30/2005 1:29:00 AM

0

> 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.

> 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.



Richard Dale

4/30/2005 9:29:00 AM

0

tsuraan wrote:

>> 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...

>> 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

Alexandre CLERICI

5/9/2005 2:30:00 PM

0

> >> 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.
>

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