Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DBUS, Yakuake und DCOP
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
manuels
Advocate
Advocate


Joined: 22 Nov 2003
Posts: 2146
Location: Europe

PostPosted: Thu Apr 05, 2007 3:01 pm    Post subject: DBUS, Yakuake und DCOP Reply with quote

Hallo,

ich möchte, dass, wenn ich einen USB-Stick einstecke, dieser gemountet wird, in Yakuake eine neue Session gestartet wird und dort in den "mount point" gewechselt wird.
Bis jetzt sieht mein Script so aus:
Code:
#!/bin/bash
DEV=$1

mount $DEV
dcop yakuake DCOPInterface slotAddSession
dcop yakuake DCOPInterface selectedSession
SESSION=$?
dcop yakuake DCOPInterface slotRunCommandInSession $SESSION "cd $DEV"
dcop yakuake yakuake-mainwindow#1 show


Yakuake startet zwar eine neue Session, aber der cd-Befehl wird in der "alten" Session ausgeführt.
Außerdem wird nicht /mnt/usb als $? übergeben, sondern system:/media/sda1.
Habt ihr Ideen, wie ich das gebacken kriege?

Tschö mit ö
Manuel
_________________
Build your own live cd with catalyst 2.0!
Back to top
View user's profile Send private message
firefly
Watchman
Watchman


Joined: 31 Oct 2002
Posts: 5343

PostPosted: Thu Apr 05, 2007 8:43 pm    Post subject: Reply with quote

das "problem" das anstelle des eigentlichen mount-punktes system:/media/* angegeben wird, ist bei kde "normal". Denn das ist, meines wissens nach, eine URI wie file://XXX http://XXX

Und über udev/hal wird nur das neue device an kde übergeben, und nicht der mount-point.
Wenn du aber "/media/usb /dev/sda1 ****" in der fstab stehen hast, dann ist das kein Problem.
Du musst nur noch das system: aus der URI entfernen und dann reicht ein simples mount.
_________________
Ein Ring, sie zu knechten, sie alle zu finden,
Ins Dunkel zu treiben und ewig zu binden
Im Lande Mordor, wo die Schatten drohn.
Back to top
View user's profile Send private message
manuels
Advocate
Advocate


Joined: 22 Nov 2003
Posts: 2146
Location: Europe

PostPosted: Thu Apr 05, 2007 9:19 pm    Post subject: Reply with quote

hmm, ich starte das script (durch klauncher vom KDE-DBUS-Daemon) mit
Code:
script %u

Ich habe auch schon versucht herraus zu finden, ob man statt %u einen anderen Parameter nutzen kann, aber bis jetzt nichts gefunden.
_________________
Build your own live cd with catalyst 2.0!
Back to top
View user's profile Send private message
manuels
Advocate
Advocate


Joined: 22 Nov 2003
Posts: 2146
Location: Europe

PostPosted: Fri Apr 13, 2007 11:31 am    Post subject: Reply with quote

*boing*
_________________
Build your own live cd with catalyst 2.0!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum