LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 07-29-2011, 07:26 PM   #1
musonio
Member
 
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:

Code:
#!/bin/sh 
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"
done
the first problem I have is with the 1st line:
Code:
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?

UPDATE:

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.
 
  


Reply


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 Session....how? vous Linux - Security 2 03-20-2005 05:32 AM


All times are GMT -5. The time now is 02:32 AM.

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