开发者

Execute specific command from plasmoid

I'm writing a Remote Control Plasmoid, I want it to send certain commands over ssh to a remote host, I've tried:

QProcess p;
p.start("/home/user/bin/command");
p.waitfForFinished(-1);

where command is a script which has

#!/bin/bash
ssh user@remote_host remote_command &> /dev/null &

I've also tried using

KRun::ru开发者_运维技巧n(QString("/home/user/bin/command"), NULL);

but it does nothing, perhaps I'm using it the wrong way? Any suggestions?


OK, my problem was that I didn't connect the signals correctly, now I've done that and this part of code works perfectly.

best regards!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜