[Konsole-devel] [Bug 283719] RFE - Add ability to send commands to Konsole via D-BUS

Mark Atkinson atkin901 at gmail.com
Mon Oct 31 16:45:36 UTC 2011


https://bugs.kde.org/show_bug.cgi?id=283719


Mark Atkinson <atkin901 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |atkin901 at gmail.com




--- Comment #1 from Mark Atkinson <atkin901 gmail com>  2011-10-31 16:45:36 ---
You can send a command and have it execute, but it needs to use the correct
character from your terminfo, not \n or \r\n.   Most likely this is '^M' in
your case, so the following shell function will send a command to a session

sendtab () {
    sessionno=$1
    cmd=$2
    session="/Sessions/${sessionno}"
    dbus-send --session --dest=${KONSOLE_DBUS_SERVICE} --type=method_call \
    --print-reply ${session} org.kde.konsole.Session.sendText string:"$cmd^M"
}

* Note that you must use the actual control character (0x0d) and not just the
string '^M' in your script (i.e.  ctrl-v+<enter key> in vim/gvim)

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the konsole-devel mailing list