Create a Term & Run chars on this Term


 
Thread Tools Search this Thread
Top Forums Programming Create a Term & Run chars on this Term
# 1  
Old 08-12-2003
Question Create a Term & Run chars on this Term

hi floks !
i'd like to know how can i transmete a character or a string from my source code to a term and make it interpret or un by the shell wich is running in my term.
I'd like to create a Term from my code (and get its file descriptor) and then transmete each char typed on the keyboard to this Term.
The easier way to do it seemed to be redirection :
ex: echo "ls -al" > /dev/pts/mytty
but the command is not runned on the console
then i tried to write directly on the file :
ex: fp=fopen("/dev/pts/mytty","w"); fputs("ls -al\n",fp);
but the command is only written on the output of the term but not runned on the shell.

if someone has an idea, it'll be great Smilie cause i'm getting mad Smilie
# 2  
Old 08-12-2003
People often leave their terminal world writable. If you could do this to your terminal, you could do it to theirs as well. That would be quite a security problem. I'm sure that your intentions are noble. But we don't discuss ways to violate system security here. So I will close this thread. Thank you for your understanding.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Error term undefined

i keep getting this error when i ssh using my id - any idea (2 Replies)
Discussion started by: tariq_m
2 Replies

2. UNIX for Dummies Questions & Answers

qvt term with windows xp

I.m using qvt term to convert my windows xp laptop to work with sun ultra 5 unix system but i can't connect - my settings are off and i can't figure it out - i have a feeling it is my serial port # the porgramm is asking for. Can someone tell me where i can find this number. thanks Christine (9 Replies)
Discussion started by: lucenta tire
9 Replies

3. UNIX for Dummies Questions & Answers

Awk For a Specific Term

I'm having trouble pulling specific ROWS out of a very large file. I've been using an awk command in unix that looks like this: awk '{if ($16=="ACCEPTOR" || $16=="DONOR") print $0}' file1 > file2 However, it is not selecting all of the rows which include either acceptor or donor in them. I... (7 Replies)
Discussion started by: infiniteabyss
7 Replies

4. Shell Programming and Scripting

killproc -term

Hi, I am trying the function killproc -term and it seems to be doing something extra that kill <pid> doesn't do. My daemon cleanly terminates using kill, but not using killproc. I tried strace on killproc and then killproc works well. I read online that strace ignores SIGSTOP. does that mean... (4 Replies)
Discussion started by: fosfat
4 Replies

5. Shell Programming and Scripting

Testing for TERM type

There are times where I want to use putty(vt100 TERM) and hummingbird (XTERM) is there a way to test what terminal connection I am using in my .profile so I can set my commands like stty erase correctly. (4 Replies)
Discussion started by: BeefStu
4 Replies

6. Shell Programming and Scripting

Search term and output term in desired field

Hi All, I have an input_file below and i would like to use Perl to search for the term "aaa" and output the 3rd term in the same row as "aaa".For Example, i want to search for the term "ddd" and would want the code to ouput the 3rd term in the same row which is "fff". Can somebody help ? ... (28 Replies)
Discussion started by: Raynon
28 Replies

7. Shell Programming and Scripting

Help with TERM script

I am trying to amend an existing TERM script to prompt the end user for a password - then take that password and add it to a specific part of an existing file. Here is what I have - BUT - I am confusing Unix with Term and my script does not like what I added b/c the script simply runs through... (1 Reply)
Discussion started by: Surdeymon
1 Replies

8. UNIX for Dummies Questions & Answers

diff between $TERM & $DISPLAY

Can anybody pls explain me the diff between $TERM & $DISPLAY ? Thanks in advance. (1 Reply)
Discussion started by: Venky
1 Replies

9. UNIX for Dummies Questions & Answers

X-Term for Windows

Hi Everyone, I need some information from all of you guys. I generally work on a Solaris OS in my school and I had heard that I can download something called X-Term on a Windows system and still work on some of the graphical things on windows which generally work only on unix. This is what I... (5 Replies)
Discussion started by: yelamarthi
5 Replies

10. UNIX for Dummies Questions & Answers

Setting TERM variable

Does anybody know how to give a default TERM variable while telnetting to Solaris (1 Reply)
Discussion started by: DPAI
1 Replies
Login or Register to Ask a Question