12-23-2008
How to send a Xterm command via a shell command
Hello,
I would like to send via a shell script a command to my XTerm.
For instance, I would like a shell script of mine to perform the command "clear-saved-lines()" to my Xterm.
Indeed, I don't want to use /usr/bin/clear but a command that erases everything in my xterm.
Thank you,
-- Marc
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Dear Sirs
Whenever I bring up an xterm window on my laptop running Mandrivia Linux, the font in the xterm window is so small that it is practically unreadable !
What switches do I need to use with the xterm command
xterm -??
in order to make the font larger ? (3 Replies)
Discussion started by: kanejm
3 Replies
2. Shell Programming and Scripting
Sorry for the duplicate thread this one is similar to the one in
https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121
Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies
3. UNIX for Dummies Questions & Answers
All,
Stuck with a XTERM issue ?? For some users, who are having execute permission (valid users), it's not showing the scroll bar in the GUI. Whereas for other invalid users( who do not have the execute permission) shows the scroll bar in the GUI. Confused ??? what could be the problem ?? Even,... (2 Replies)
Discussion started by: ronix007
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a commands in a file called commands.file, I am using this file with the following commnad
xterm -e "commands.file"
After executing this file in the new xterm, it is closing automatically.
I want to use that xterm after that.
Please help me regarding this?
:)
... (4 Replies)
Discussion started by: chaitubek
4 Replies
5. Shell Programming and Scripting
Hi All,
I wish to automate the unix command 'su' through a shell script.
I would like to pass the content of a file as password to 'su' command.
My script is as below,
#! /bin/sh
su userA
while read line
do
rpm -ivh $line
done < pwd.txt
where pwd.txt contains the password of... (6 Replies)
Discussion started by: little_wonder
6 Replies
6. UNIX for Dummies Questions & Answers
Hi guys i'm trying to run an xterm with a particular command in it. I have looked at the man page of xterm and it says to do this we use following command: -e program
I want it to open the man page of the bash file.
I tried xterm -e.
It doesnt seem to work. I must be doing it... (1 Reply)
Discussion started by: Shyamz1
1 Replies
7. Shell Programming and Scripting
I have written a simple script to show battery life remaining. I would like to be able to quickly view it with a predefined keybinding or launcher.
xterm -e scriptname should do the trick but the xterm closes when the script finishes, not giving me chance to read the output. How can I keep... (3 Replies)
Discussion started by: spoovy
3 Replies
8. UNIX for Dummies Questions & Answers
I have a unix command that prompts for 'y'. How do I run this from my shell script? (4 Replies)
Discussion started by: Sree10
4 Replies
9. Shell Programming and Scripting
I am trying to automate a testcase . I am installing some software and it waits for user input after displaying "Do you want to continue ? " I am trying to do this in shell scripting.
#!/bin/bash
#!/usr/bin/expect -f
/usr/bin/expect << EOF
spawn apt-get install openjdk-7-jdk
expect "*Do you... (1 Reply)
Discussion started by: Abdul Navaz
1 Replies
10. Shell Programming and Scripting
Hello Experts,
Greeting to all of you.
I have a requirement, that we have a shell script status.sh
that check the status of server and server status shows as status.sh
Enterprise Server - Running
Admin Server - Shutdown
Requirement is like whenever the output shows shutdown it should... (2 Replies)
Discussion started by: aks_1902
2 Replies
LEARN ABOUT ULTRIX
resize
resize(1X) MIT X11R4 resize(1X)
Name
resize - utility to set TERMCAP and terminal settings to current window size
Syntax
resize [-u] [-s [row col]]
Description
The uitility prints a shell command for setting the TERM and TERMCAP environment variables to indicate the current size of xterm window
from which the command is run. For this output to take effect, resize must either be evaluated as part of the command line (usually done
with a shell alias or function) or else redirected to a file which can then be read in. From the C shell (usually known as /bin/csh), the
following alias could be defined in the user's .cshrc:
% alias rs 'set noglob; `eval resize`'
After resizing the window, the user would type:
% rs
Users of versions of the Bourne shell (usually known as /bin/sh) that do not have command functions will need to send the output to a tem-
porary file and the read it back in with the ``.'' command:
$ resize >/tmp/out
$ . /tmp/out
Options
The following options may be used with resize:
-u This option indicates that Bourne shell commands should be generated even if the user's current shell is not /bin/sh.
-c This option indicates that C shell commands should be generated even if the user's current shell is not /bin/csh.
-s [rows columns]
This option indicates that the Sun console escape sequences will be used instead of the special xterm escape code. If rows and col-
umns are given, resize will ask the xterm to resize itself. However, the window manager may choose to disallow the change.
Restrictions
The -u or -c must appear to the left of -s if both are specified.
There should be some global notion of display size; termcap and terminfo need to be rethought in the context of window systems. (Fixed in
4.3BSD, and ULTRIX-32 1.2)
Files
For the base termcap entry to modify.
User's alias for the command.
See Also
csh(1), tset(1), xterm(1X)
resize(1X)