General :: Send Command To Another User's Screen Terminal
Mar 22, 2011I have two users; user1 and user2. I have a bash script run by user1, that needs to run a command on a screen terminal started by user2.
View 1 RepliesI have two users; user1 and user2. I have a bash script run by user1, that needs to run a command on a screen terminal started by user2.
View 1 RepliesI open up 2 xterms on my desktop, A(/dev/pts/0) and B(/dev/pts/1).I can write from A to B using redirection e.g. echo "test" > /dev/pts/1How do I run a command from A on B? e.g. "clear"Basically I'm putting the 2 terminals side by side, and using terminal B to display the contents of the current working directory, by running the following in A:export PROMPT_COMMAND="ls -a > /dev/pts/1"but this fills up the screen pretty fast. I was actually looking for a way to clear up the second terminal.
View 6 Replies View RelatedI'm currently writing a C++ application to manage some screen functions in Debian(server).
However this issue have bothered me for 2 days now...
What I want to do is to send a command to an attached screen which is running.
Used the following command: Code: screen -S screenwindow So I send a command with the -X parameter, which works just fine... Code: screen -S screenwindow -X stuff yes The command I want to send is "yes" and it does appear in my screen window when I attach it.
But the problem is that I need it to submit it... well I need to press "enter" and I've been looking everywhere on how to do that.
Because right now it hangs on a line like this: Code: Something here, do you want bla bla: yes Obviously I could just press enter myself, but the problem is that it's running as a deamon and but it is supposed to do this all by itself .
So are there any way I can submit it?
I open up 2 xterms on my desktop, A(/dev/pts/0) and B(/dev/pts/1).
I can write from A to B using redirection e.g. echo "test" > /dev/pts/1
How do I run a command from A on B? e.g. "clear"
Ideally I should be able to do this from a script.
I was looking for a command to log off the user who froze the screen. I logged in as a new user but I got some errors now all I see is the color screen, how can I log the new user off (the GUI)? I did the above command but nothing came in return?
View 8 Replies View RelatedIs there a script I can use to send a command VIA terminal to wipe an entire machine of data? If for example there is an intrusion valuable data can be at risk, it would need to be erased.
View 14 Replies View Relatedin the middle of script, i need to send the output of (send command on line 8) to a file
#!/usr/bin/expect
spawn telnet 172.20.64.133
expect "ENTER USERNAM <"
[cod]....
i treid the below on line 8 :
1- send "show command;
" > logfile.txt : gives an error extra character after the "
2- logsave logfile.txt 'send "show command;
" ': error invalid command
3- i simply tried to send the output of the whole script to file logsave /home/logfile ./script : seems that logsave work under root only
4- ./script > logfile : the problem with this is that the output of echo or (read "enter your id") command will not be displayed on the screen (actually nothing will be displayed, i have to open the log file to see the output). is there any way to save the log of the "send" ? or to save the log of the complete script without hiding the output on the screen?
I am writing an expect script and I want to send the command for the print-screen function. So, what is the command? Alternatively, is there some terminal application which may be well suited to take screen-shots via commands from the terminal or automation scripts?
View 2 Replies View RelatedI am currently working to develop a perl script for irssi that will capture data from irc channel hold it in memory as variable and send it to a shell. Does anyone know a good irssi irc scripting guide? something that will include $botname, $msg, $nick, $channel etc scripting explanation. Is it possible to send a run program command to shell thats located in my /home/user/myapp using ./myapp from irssi? i am using bash. I've only just started, so i dont have any code written yet,
View 2 Replies View RelatedI am wanting to try to change my normal user (bbq) to a different screen size within my secondary user (lfs). I was wondering how one would do that.
This happened when OpenClonk changed my screen resolution and when i changed it back my screen blacked out (and me being the idiot save it).
Debian 8 GNOME
Also (a bit unrelated) could a video card problem cause a user to log out? I have been having some severe problems with my monitor and I am thinking it is th video card. Sometimes when I am starting a program my monitor will lose connection to my computer (HDMI signal not found) and I will either have to wait a few seconds and it will turn on or it will just stay blacked out.
Is there a terminal command to lock the screen? I am using GNOME if that matters
View 3 Replies View RelatedI typically use rm to delete files, but they don't end up in my trash folder in case I want to recover them. How do I make that happen and how do I access my trash folder via terminal? Doing me best to work from terminal rather than GUI and this one has me stumped. I am using Mint Julia.
View 2 Replies View RelatedHow to send message via terminal in windows or linux?
View 4 Replies View RelatedI've got used to using the ftp command from the terminal, which is useful, especially with macros. But it requires user input, and what I want to do now is upload a specific file to a server, once I've finished working with it every day. It's the same file every day. II would like to be able to do this semi-automatically: I just give the command and it connects to the server and uploads the file. (I will probably want to encrypt the file before uploading it.)I don't know how I could use ftp without any user input: I want it to be automatic.
View 5 Replies View Relatedthe code when recording a screen using terminal command? it has this code "xllgrab".. that's all i can remember.. i read it somewhere in this forum and it really works but i can't find that thread anymore
View 3 Replies View RelatedIs it possible to make terminal (xfce4-terminal) transparent from bash script?
Maybe by enabling compostion?
I have a favorite REXX program called fv2. When I was a Windows user I had an icon for fv2 on the Quick Launch bar. Click that icon, and the program ran. Now, as a Linux (Ubuntu) user it is necessary to go through several steps to run fv2.
1) Launch a terminal by clicking on the terminal icon at the top of the screen. What's that area called? The GNOME panel?
2) Enter: ~/Desktop/RexxScripts
3) Enter: regina fv2
I run fv2 several times per day and would really like to have the convenience of a clickable icon.
how can i send message to other user in shelli try use write before but it say permission deny from user
View 2 Replies View RelatedHow can I make terminal applications immune to terminal emulator close, but still able to use all virtual terminal features?
egin{UPDATE}I want my terminal application remain alive and accessible if I accidentally close terminal emulator. This functionality is provided by screen and tmux, but they have issues with colors and they flush screen.Yes,I can run the shell inside screen, but I do not want the shell remain alive unless there is some other program running.
end{UPDATE}I see this must be something like screen, but without VT100 terminal emulation, something which will just apply whatever application does with "terminal proxy"'s terminal (like outputting something to stdout/stderr or using stty to set terminal options) to the terminal this proxy runs in.
// I know about screen and altscreen on, but it makes either this (screen with TERM=screen):
or this (screen with TERM=rxvt-unicode):
while I want this (rxvt-unicode without screen):
I have figured out that everything looks fine if I compile rxvt-unicode with USE=-xterm-color (in fact vim looks like on the second picture even without screen if I add this USE flag) and set TERM=screen-256color, but I do not like this workaround because it actually changes colors and I can't be sure that it will always change them only this way:
I am using openSUSE 10.3.When I install software from tarball then to record time required I send output of date to beg.txt(when installation begins) and end.txt (when installation finishes).How can I append output of date to a file so I don't need two files?
View 4 Replies View RelatedIs possible to send a message (popup window or something) to local user logged into X (xdm, fluxbox) from console ? For example: user1 is logged and using X/fluxbox, user2 logging into the same box by ssh to console. Now - what user2 have to do to send message to user1 ?
View 1 Replies View RelatedI am using Qmail mailing system. Now I want to block the outlook users to send mail(SMTP). I think it can be done through qmail smtp relay option.Is it the right way to block SMTP for outlook users??
View 3 Replies View RelatedI have a minecraft server running as a daemon. When you run it normally (not as a daemon), you can type commands into the console. How can you get to the console so I can send it commands while it's running as a daemon?
View 1 Replies View RelatedWe all know how to kill multi process but if we want to send different signals to different process like to stop,-9,to hungup simultaneously at the same time then how we will do it,is there any particular command to do it.
View 1 Replies View Relatedhope you will know the net send command of windows.in the same way we are working on linux red hat 5.0 we want to know the equivalent command of net send for linux if any body know then please tell us? we are here only when we not found on google so please do not give the suggestion of searching on google.
View 5 Replies View RelatedI scan a document with root pressing the scanner button. I would like to send an email using my gmail account. OK. nothing difficult with that... mbsmtp + mutt for sending trhough the sh script.
1-root is to be avoided at max to do some internet duties, due to security. Apt-get is good, but ok surfing or email sending shall be avoided for higher security.
2- sudo or su running mutt through this way, ok, using an existing user. OK, possible and simple, but not comfortable since you have to use an account of an user existing (create a new user for scanner and email?? - no, come on, we have linux and can maybe find a solution)
how to send an Email from root console using an non created USER?
Is there a way to configure the at command to send to someone other than root?
View 1 Replies View RelatedI'm looking for an easy way to send basic emails for the command line. I have tried configuring sendmail and mailx, but I have yet been able to receive a test email at my remote address. I have read through a fair amount of "how to" on this but I am a little confused and obviously not doing something right. My sendmail.mc file is as follows
Code:
divert(0)dnl
VERSIONID(`$Id: generic-linux.mc,v 8.1 1999/09/24 22:48:05 gshapiro Exp $')
OSTYPE(linux)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
MAILER(smtp)dnl
When I try to send a test mail via
[Code]....
Is it true that the UNIX commands to send a file to a printer for printing are system-dependent?
View 2 Replies View RelatedI've got a Debian Squeeze computer on which the graphics have packed up, but the terminal in single user mode work perfectly fine.
There are a few files on this Debian computer that I want to transfer off, to a networked computer, but I have no idea how to do this.
The destination computer is a freshly re-setup Mandriva install, without (as yet) samba. I don't think it's necessary though. The Mandriva install works fine, has graphics, etc, but can't see the Debian Squeeze computer on the network, possibly because it's in single user mode, thus prompting the problem of how to transfer the files, using only a command line.