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.
You can have XTerm translate keystrokes into "actions". (See the man page, search for "Actions"). As an example, you'd add this to your X resource file:
That means that F11 will execute your function in the Xterm. How do you get such a key to Xterm? First, get the WindowID of your xterm. Then, use xvkbd:
Does this get you closer to your solution?
Getting the WindowID is, well, it depends on your needs and it's not normally done from the command line. But several solutions exist. You can find these solutions described here and here.
Now it's possible to have a process send keystrokes into another X window.
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)
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)
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)
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)
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)
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)
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)
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)
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)