LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-10-2013, 07:05 AM   #1
jejuba
LQ Newbie
 
Registered: Oct 2013
Location: Paris, France
Distribution: debian wheezy; 3.10-0.bpo.3-amd64
Posts: 7

Rep: Reputation: Disabled
make a script that opens a specific terminal and enter commands into that terminal


Dear all,

I would like to run a program; the command to run that program is 'R'. I have a specific terminal with adequate properties (position, size, etc) to run that program on. Here is the script for that terminal

Code:
#!/bin/bash
#Give a name to the terminal window.
TITLE=termR
TERMOPTS="--hide-borders --hide-toolbars --hide-menubar --disable-server --title=$TITLE"

XDG_CONFIG_HOME=$HOME/.config3 xfce4-terminal $TERMOPTS --geometry=80x48+0+0 &
However, this script only opens the terminal window and then I have to type in the command 'R' to start the program. Nothing to cumbersome but still I was wondering if there was a way to open that terminal AND start the program.

I came across that previous thread:
http://www.linuxquestions.org/questi...rminal-358651/

with which I managed to open a standard terminal and the command R:
Code:
xfce4-terminal -e R
but this doesn't work and only opens the relevant terminal
Code:
~/myterminal -e R

so any idea how to do it?

thanks.
 
Old 11-10-2013, 08:58 AM   #2
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
untested

Code:
#!/bin/bash
#Give a name to the terminal window.
TITLE=termR
TERMOPTS="--hide-borders --hide-toolbars --hide-menubar --disable-server --title=$TITLE $@"

XDG_CONFIG_HOME=$HOME/.config3 xfce4-terminal $TERMOPTS --geometry=80x48+0+0 &
 
Old 11-10-2013, 01:43 PM   #3
jejuba
LQ Newbie
 
Registered: Oct 2013
Location: Paris, France
Distribution: debian wheezy; 3.10-0.bpo.3-amd64
Posts: 7

Original Poster
Rep: Reputation: Disabled
Dear Fireat,

it doesn't work but you gave me a good idea and this is the script that does it for me:

Code:
#!/bin/bash
TITLE=termR
TERMOPTS="--hide-borders --hide-toolbars --hide-menubar --disable-server --title=$TITLE -e R"
XDG_CONFIG_HOME=$HOME/.config3 xfce4-terminal $TERMOPTS --geometry=80x48+0+0 &
so thank you very much.
 
  


Reply

Tags
command, script, terminal



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Script to input commands into gnome-terminal zensunni Linux - Newbie 1 11-24-2010 01:33 PM
[SOLVED] Write a script to open a terminal and run a few commands. jmdennis1987 Linux - General 27 11-18-2010 02:24 PM
[SOLVED] Terminal commands working in terminal but not in a script GreYFoXGTi Linux - Newbie 1 08-04-2010 09:36 AM
making a script that opens terminal and enter commands into that terminal Cinematography Linux - General 8 12-16-2008 10:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:58 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration