Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-29-2011, 07:26 PM   #1
Registered: Jun 2009
Distribution: PCLinuxOS
Posts: 33

Rep: Reputation: 15
running four commands in yakuake quad session

I'm trying to run 4 instances of folding@home (one for each core) in a quad yakuake session. I tried with the following:

qdbus org.kde.yakuake /yakuake/sessions addSessionQuad
Term1=`qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.activeTerminalId`
let Term2=$Term1+1
let Term3=$Term1+2
let Term4=$Term1+3
echo "Term1"=$Term1
echo "Term2"=$Term2

for i in 1 2 3 4 ; do
  echo $Term$i
  qdbus org.kde.yakuake /yakuake/sessions runCommandInTerminal $Term$i "cd ~/.FOLDING_HOME/F$i/ ; ls"
  # qdbus org.kde.yakuake /yakuake/sessions runCommandInTerminal $"$TermP" "cd ~/.FOLDING_HOME/F$i/ ; ./fah6 -verbosity 9"
the first problem I have is with the 1st line:
Term1=`qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.activeTerminalId`
If I run that command in a terminal and echo its value it works fine, but not from within the script.
Any ideas?


The problem seems to be that when a quad session is created, no active terminal is defined (which is perhaps a logical behaviour).

Last edited by musonio; 07-30-2011 at 05:44 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending commands to a screen session owned by root. Rendman Linux - Software 3 01-28-2011 01:34 AM
Sending commands to a screen session tirwit Linux - Software 6 08-08-2010 09:46 PM
how can i enter unix commands in a putty session--> thru batch programming skipper_penguin Linux - General 2 06-19-2009 02:40 PM
2.1GHz Quad Core Barcelona CPU was recognized as 1.3GHz Quad Core libin88 Linux - Hardware 6 11-03-2008 02:08 PM
Log all commands used in a vous Linux - Security 2 03-20-2005 05:32 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration