Sponsored Content
Top Forums Shell Programming and Scripting Xterm using python subprocess Post 302841101 by wisecracker on Wednesday 7th of August 2013 02:44:04 AM
Old 08-07-2013
I have no idea what fname2 is but

Try:-
Code:
subprocess.call(["xterm", "-e", "./script.sh", fname2])

OR...
Code:
subprocess.call(["/full/path/to/xterm", "-e", "/full/path/to/script.sh", fname2])

This User Gave Thanks to wisecracker For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getting value of variable set in subprocess script

I am writing a shell script that executes another script by fetching it over the network and piping its contents into sh (ftp -o - $script | sh; or wget -O - |sh). Since this bypasses putting the script on the filesystem, this means I can't source the script directly (using . ), but rather it... (1 Reply)
Discussion started by: hadarot
1 Replies

2. Shell Programming and Scripting

Killing an Xterm while leaving subprocess alive...

Hi, I'm not quite understanding what I'm doing (happens often). This pseudocode works: #!/bin/pseudoksh function kill_parent { when i_want_to ; do sleep 2 kill -TERM $PPID exit done } kill_parent & ssh remote_host sh <<-EOF ... (0 Replies)
Discussion started by: mschwage
0 Replies

3. Shell Programming and Scripting

How to wait for the subprocess to finish in tcl

Hi All Here i have a piece of code, set filename "./GopiRun.sh" #I need to wait here until the GopiRun.sh is completed how do i achive this exit. (1 Reply)
Discussion started by: nathgopi214
1 Replies

4. Shell Programming and Scripting

Doubt about pipes and subprocess

Hi, I am having a trivial doubt. Please see the below pipeline code sequence. command1 | (command 2; commend 3) I am aware that the command that follows pipe will run in the sub shell by the Unix kernel. But how about here? Since these set of commands are grouped under "parantheses", will... (6 Replies)
Discussion started by: royalibrahim
6 Replies

5. AIX

Subprocess errors

Hi Guys, Just a question about subprocesses.. Lately one of our servers has started to throw out the following error: SYSTEM ERROR: Too many subprocesses, cannot fork. Errno=12 We've already increased the threshold twice. Its now up to 8000 and the swap space has also been increased. We... (6 Replies)
Discussion started by: Jazmania
6 Replies

6. Shell Programming and Scripting

python: what's wrong with my subprocess.Popen

my script is #!/usr/bin/env python import datetime import subprocess import sys import os import signal from time import sleep def runForAWhile(cmd, secs=10): print("running %s" % cmd) timeout = datetime.timedelta(seconds=secs) print timeout proc = subprocess.Popen(cmd,... (0 Replies)
Discussion started by: yanglei_fage
0 Replies

7. Shell Programming and Scripting

Python subprocess module

I need to run this command using python subprocess module (notice I'm using only variables): cmd = TESTPATH + ' -s ' + serviceName + ' -r ' + rdir + \ ' -m ' + masterAcct + ' -p ' + persona + ' -P ' + passwd (3 Replies)
Discussion started by: erick_tuk
3 Replies

8. Shell Programming and Scripting

Python subprocess

Hi guys, I'm learning python and perl and i was trying to run from python a perl script using the subprocess module. I have an issue that i don't understand regarding this. I run this code: #!/usr/bin/python import subprocess p2 = subprocess.Popen(,stdout=subprocess.PIPE) output2 =... (2 Replies)
Discussion started by: capitanui
2 Replies

9. Shell Programming and Scripting

Python3 subprocess troubles

After struggling with this for days now, I'm reaching out to the experts of all things linux for some help with this. I'm trying to run the following working command (on command line) inside a python script using subprocess: rsync -avzh --no-perms --delete --include="*sub*" --exclude='*'... (2 Replies)
Discussion started by: timj123
2 Replies

10. Programming

[Python] - subprocess issue

So I have this basic script, see below import subprocess import shlex command = "gcloud projects list" subprocess.check_output(shlex.split(command)) subprocess.check_call(shlex.split(command)) The subprocess.check_call(shlex.split(command)) actually return what I expect. It returns... (6 Replies)
Discussion started by: scj2012
6 Replies
vboxtcl(5)                                                  Linux System Administration                                                 vboxtcl(5)

NAME
vboxtcl - tcl commands for vboxgetty CONTENT
With vbox version 2.0, tcl can be used as a script language to act on incoming calls. Incoming calls are still taken by vboxgetty, but further actions are made by the tcl script. VARIABLES
These are additional variables supplied by vboxgetty. vbox_var_bindir directory with vbox commands. vbox_var_savename name for this message to save. The name is constructed from time and process id. It's a good idea to use this name, but you can also use a different name. vbox_var_rectime maximum seconds to record. vbox_var_spooldir path of the users spool directory (/var/spool/vbox/<user>). vbox_var_checknew path for new files (/var/spool/vbox/<user>/incoming). vbox_msg_standard filename with full path of the message to play as the standard message (/var/spool/vbox/<user>/messages/standard.msg). vbox_msg_beep filename with full path of the message to play as beep (/var/spool/vbox/<user>/messages/beep.msg). vbox_msg_timeout filename with full path of the message to play after a timeout (/var/spool/vbox/<user>/messages/timeout.msg). vbox_caller_id CALLERID of current caller. If unknown, this is "0". vbox_caller_phone full phone number of current caller. If unknown, this is "*** Unknown ***". vbox_caller_name name of current caller. If unknown, this is "*** Unknown ***". vbox_user_name name of the user that runs this vboxgetty. vbox_user_home home directory of the user that runs this vboxgetty. vbox_flag_standard this is TRUE if the script should play the standard message, and FALSE if the script should not. vbox_flag_beep this is TRUE if the script should play the beep message, and FALSE if the script should not. vbox_flag_timeout this is TRUE if the script should play the timeout message, and FALSE if the script should not. vbox_flag_record this is TRUE if the script should record a message, and FALSE if the script should not. FUNCTIONS
vboxgetty also provides some additional functions to the user. Return Codes Most functions will use these return codes: ERROR An error occurred. HANGUP The connection was ended. Script should end now. OK The whole message was played, nothing occurred. Any other error code is a touchtone sequence, that was detected during playing the message. vbox_breaklist <add|rem> <sequence> [...] With this command you can control which touchtone sequences vboxgetty will recognize. Touchtone sequences have the format *NUMBER#, where NUMBER is a sequence of the characters 0-9 and A-D. Even single numbers must be given in the format *NUMBER#. Vboxgetty detects if the caller gives a number as a single digit or as a part of a sequence. add <sequence> [...] Add a touchtone sequence to breaklist. You can add up to 8 sequences at one time. rem <sequence> [...] Remove a touchtone sequence from breaklist. You can remove up to 8 sequences at one time. You can use all to remove all sequences. vbox_put_message <message> Play a message and returns an error code depending on the reason to stop playing. Default return codes. message full name of the message file (with path). vbox_get_message <savename> <timelimit> Records a message. Default return codes. Options are: savename full name of the file for saving the message. timelimit maximum time to record the message. vbox_wait <seconds> Waits for several seconds for an input from caller. Default return codes. Options are: seconds time to wait. vbox_init_touchtones Clears vboxgetty touchtone sequence. Normal way is to append all new touchtones to the sequence, the sequence is only cleared when a "*" touchtone is received. vbox_pause <ms> waits a specific number of milliseconds. ms number of milliseconds to wait. vbox_get_nr_new_messages <messagebox> Return the number of new messages in the directory. messagebox the directory to scan vbox_get_nr_all_messages <messagebox> Return the number of messages in the directory. messagebox the directory to scan SEE ALSO
Look at the tcl documentation for any tcl specific questions. For vbox : vboxgetty(8), vboxgetty.conf(5), vbox.conf(5) AUTHOR
This manual page was written by Andreas Jellinghaus <aj@dungeon.inka.de>, for Debian GNU/Linux and isdn4linux. ISDN 4 Linux 3.25 2000/09/15 vboxtcl(5)
All times are GMT -4. The time now is 04:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy