![]() Registered Member ![]()
|
Hi,
I'm trying to get a very basic windows manager using only kwin and khotkeys (user can only interact with the application we start using hotkeys (ctrl+F1/F4)). Currently I start kwin from xinitrc with only a terminal window (terminal windows will be removed once the hotkeys work). [ -x /usr/bin/xterm ] && /usr/bin/xterm -geometry 80x50-50+150 & exec /usr/bin/kwin The problem is that I don't have my hotkeys working and I can't get khotkeys to start from the command line. I can get the hotkeys to work using "kcmshell4 khotkeys" and just click ok but this is not practical (though I gives me hope that a solution exists). startkde works, but then i get all the plasma and desktop features I need to remove. Is there a way to start khotkeys from command line? kcminit khotkeys didn't work Thanks I'm on Centos 6 Qt: 4.6.2 KDE: 4.3.4 (KDE 4.3.4) KWin: 4.3.4 (KDE 4.3.4) |
![]() ![]()
|
you need to run
* kded (with khotkeys module loaded) * kglobalaccel (as that's what does global shortcuts across all KDE - kwin receives them as any other client from there) |
![]() Registered Member ![]()
|
Thanks
I'm able to load the khotkey module in my terminal window using: /usr/lib/qt4/bin/qdbus org.kde.kded /kded org.kde.kded.loadModule khotkeys But where can I put this line to be loaded with kwin? It doesn't work in my xinitrc |
![]() ![]()
|
Two pitfalls:
a) kded must be running (kwin -or any KDE application- would start it implicitly) b) the dbus server address - it's exported in KDE sessions, but that may fail in your setup. => You could fork kded first and then grep the PIDs environment for the server address
|
![]() Registered Member ![]()
|
Thanks again
I couldn't find DBUS_SESSION_BUS_ADDRESS in /proc but it is in ~/.dbus/session-bus it looks like DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-4ydCSVB5dJ,guid=857aef640a9bce0a90a03dea00084624 Try as I might I can't get this to work form command line. qdbus --address "$DBUS_SESSION_BUS_ADDRESS" org.kde.kded /kded org.kde.kded.loadModule khotkeys I get Service 'unix:abstract=/tmp/dbus-4ydCSVB5dJ,guid=857aef640a9bce0a90a03dea00084624' is not a valid name (I also tried with 857aef640a9bce0a90a03dea00084624 or /tmp/dbus-4ydCSVB5dJ ... instead of fulls address) feels like --address doesn't work? any idea / alternatives to qdbus |
![]() ![]()
|
it's more likely the bus id is wrong/dated - also ~/.dbus/session-bus should be a directory containing some hash-named files containing some bus informations - only one of them will be the correct one.
DBUS_SESSION_BUS_ADDRESS is *not* supposed to be found in proc, but in the environment of some (KDE) applications. Anyway, you will require some session dbus daemon to be running ("ps aux | grep -i dbus-daemon") and in doubt pass that address to qdbus (or dbus-send) The address switch generally works, don't worry ![]() |
![]() Registered Member ![]()
|
Ok, I've got something that works turns out that my main problems was to figure out that the actual syntax of qdbus is:
qdbus --address="$DBUS_SESSION_BUS_ADDRESS ... So now my xinitrc looks like this ... ${HOME}/bin/qdbusaddress.sh ${DISPLAY} & exec /usr/bin/kwin where qdbusaddress.sh is
This seems to hold for now, though I hope I don't get into trouble with the files in .dbus/session-bus -type. I'm assuming they are always available before I reach the call to kwin in xinitrc? Thanks a lot for the help ![]() |
![]() ![]()
|
D'ohh, i forgot to strip the var name =)
The session bus availability depends on your login system, ie. systemd/logind (and consolekit?) will automatically provide a session bus and KDE applications should afair launch one implicitly - otherwise you've to (better) launch one by hand, eg. source /etc/X11/xinit/xinitrc.d/30-dbus.sh
|
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]