Mailinglist Archive: opensuse (3566 mails)
| < Previous | Next > |
[opensuse] Re: function in .bashrc
- From: Jonathan Arnold <jdarnold@xxxxxxxxxxxx>
- Date: Thu, 26 Apr 2007 12:28:31 -0400
- Message-id: <f0qjvg$a15$1@xxxxxxxxxxxxx>
Jonathan Arnold wrote:
> Randall R Schulz wrote:
>> On Wednesday 25 April 2007 14:26, Randall R Schulz wrote:
>>> ...
>>>
>>> Furthermore, the answer to the primary question from the OP is given
>>> there directly, making those of us who claimed it wasn't possible
>>> flat wrong:
>>>
>>> #!/bin/sh
>>> konsole=$(dcopstart konsole-script)
>>> session=$(dcop $konsole konsole currentSession)
>>> dcop $konsole $session renameSession Local
>>>
>>> session=$(dcop $konsole konsole newSession)
>>> dcop $konsole $session renameSession Remote
>>>
>>> # Send a command to a Konsole session (tab)
>>> session=$(dcop $konsole konsole newSession)
>>> dcop $konsole $session renameSession Code
>>> dcop $konsole $session sendSession 'cd /my/work/directory'
>> Sadly, the "sendSession" function appears to be a figment of the mind of
>> the writer of that page. In fact, just above this example is a listing,
>> produced by dcop itself, of the functions available, and sendSession is
>> nowhere in evidence.
>>
>> And in fact, on my 10.0 system, the sample code does not work:
>>
>> % dcop konsole-7761 session-5 "sendSession 'dl'"
>> no such function
>
> Here's a bug report on it:
>
> http://bugs.kde.org/show_bug.cgi?id=48516
>
> You have to start konsole with --script to get the sendAllSessions command.
> I don't, however, see sendSession still.
To answer my own question - using 'kdcop' and browsing a konsole session, I
can see that 'sendSession' is a session-specific dcop command. So, to send
ls to a specific session:
$ dcop konsole-16527 session-1 sendSession "ls -l"
Cool beans.
--
Jonathan Arnold (mailto:jdarnold@xxxxxxxxxxxx)
Daemon Dancing in the Dark, an Open OS weblog:
http://freebsd.amazingdev.com/blog/
UNIX is user-friendly. It's just a bit picky about who its friends are.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
> Randall R Schulz wrote:
>> On Wednesday 25 April 2007 14:26, Randall R Schulz wrote:
>>> ...
>>>
>>> Furthermore, the answer to the primary question from the OP is given
>>> there directly, making those of us who claimed it wasn't possible
>>> flat wrong:
>>>
>>> #!/bin/sh
>>> konsole=$(dcopstart konsole-script)
>>> session=$(dcop $konsole konsole currentSession)
>>> dcop $konsole $session renameSession Local
>>>
>>> session=$(dcop $konsole konsole newSession)
>>> dcop $konsole $session renameSession Remote
>>>
>>> # Send a command to a Konsole session (tab)
>>> session=$(dcop $konsole konsole newSession)
>>> dcop $konsole $session renameSession Code
>>> dcop $konsole $session sendSession 'cd /my/work/directory'
>> Sadly, the "sendSession" function appears to be a figment of the mind of
>> the writer of that page. In fact, just above this example is a listing,
>> produced by dcop itself, of the functions available, and sendSession is
>> nowhere in evidence.
>>
>> And in fact, on my 10.0 system, the sample code does not work:
>>
>> % dcop konsole-7761 session-5 "sendSession 'dl'"
>> no such function
>
> Here's a bug report on it:
>
> http://bugs.kde.org/show_bug.cgi?id=48516
>
> You have to start konsole with --script to get the sendAllSessions command.
> I don't, however, see sendSession still.
To answer my own question - using 'kdcop' and browsing a konsole session, I
can see that 'sendSession' is a session-specific dcop command. So, to send
ls to a specific session:
$ dcop konsole-16527 session-1 sendSession "ls -l"
Cool beans.
--
Jonathan Arnold (mailto:jdarnold@xxxxxxxxxxxx)
Daemon Dancing in the Dark, an Open OS weblog:
http://freebsd.amazingdev.com/blog/
UNIX is user-friendly. It's just a bit picky about who its friends are.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |