09-08-2006
It would be helpful to know why this operation is important because there may be a better way to accomplish the "why" than you might realize.
I can't image a use for having Terminal launch at startup without a window. Not that there isn't one, but I just can't imagine it.
AppleScript can be used to hide a window, but the application first has to create the window (which displays on creation), then hide it immediately. The window is thus only visible for a split second.
You can send applescript code from shell scripts using the osascript command (man osascript).
You can examine Terminal's applescript functionality from within Script Editor.app by selecting "Open Dictionary..." from the Script Editor "File" menu, then navigating to Terminal.app.
Otherwise, I don't know if this is possible from the command line.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I just changed from windows NT to XP and I am no longer able
to connect to my unix system. I used to use hyper terminal -- which acts as dumb terminal to my main frame unix system. I think one of the options used to be "direct to comX". This option isn't listed now. I use a serial port and the... (2 Replies)
Discussion started by: michelle
2 Replies
2. UNIX for Advanced & Expert Users
I am trying to automate a SSH login using Keys using the following command
ssh -i id_rsa usernamw@ipaddr.
I am successful in doing this and i am getting the Warning Screen and I logon successfully.
but when I am executing the command
tail -1cf put.dat | ssh -i id_rsa username@ipaddr > get.dat ... (1 Reply)
Discussion started by: Shivdatta
1 Replies
3. Linux
for all friends
i am using linux enterprise 4. i installed oracle 10g
in user name oracle.at the end of install i got a pop up window
saying that u should run the following scripts(root.sh,orainstRoot.sh) in terminal from root account(cui) without log out oracle account .
how i can run these... (5 Replies)
Discussion started by: sadiquep
5 Replies
4. Shell Programming and Scripting
suppose we have a file
ab
81
and another file
exec < $1
while read line
do
ssh root@172.16.1.$line
done
while running the command
sh file.sh ab
output display as shown
Pseudo-terminal will not be allocated because stdin is not a terminal.
root@172.16.1.81's password:
after... (3 Replies)
Discussion started by: cdfd123
3 Replies
5. OS X (Apple)
Hello,
i am trying to write a script for terminal for my mac that i may drag into the terminal and will excute the following command:
script -akq Desktop/TerminalLogin/Cisco1Bob.txt
telnet x.x.x.x
the problem is that when i drag the text file to the terminal window the script stops after... (6 Replies)
Discussion started by: drdread
6 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I installed ubuntu recently on my pc. And I installed gnuplot as well.
When I first started working with gnuplot it was working . I did a plot and when I wanted to fit my data something happened and not the default terminal of gnuplot is xwt!
I changed it to: set terminal x11, but it... (0 Replies)
Discussion started by: cosmologist
0 Replies
7. OS X (Apple)
Hi All
I have this script that checks to see if ntp is enabled on a machine
launchctl load -w /System/Library/LaunchDaemons/org.ntp.ntpd.plist
It retuns
org.ntp.ntpd: Already loaded
if it is loaded, is there a way to script it so that if it is loaded it does not say anything but... (2 Replies)
Discussion started by: ab52
2 Replies
8. Shell Programming and Scripting
Hi Guys,
I have a script that runs certain simulations in batch mode. I need to schedule some simulations to run over night.
For each simulation to complete it should be run in separate terminal.
My script is as follows
sh run_test.sh <arg1> <arg2> <arg3> ...
I need to launch this... (5 Replies)
Discussion started by: aelhosiny
5 Replies
9. Shell Programming and Scripting
I have been having an extremely annoying problem. For the record, I am relatively new at this. I've only been working with unix-based OS's for roughly two years, mostly Xubuntu and some Kali. I am pretty familiar with the BASH language, as that's the default shell for debian. Now, I've made this... (16 Replies)
Discussion started by: Huitzilopochtli
16 Replies
10. Shell Programming and Scripting
Hello All,
I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly.
Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies
LEARN ABOUT SUSE
tk::send
send(3) User Contributed Perl Documentation send(3)
NAME
send - Execute a command in a different application
SYNOPSIS
$result = $widget->send(?options,?app=>cmd?arg arg ...?)
DESCRIPTION
This method arranges for cmd (and args) to be 'sent' to the application named by app. It returns the result or an error (hence above
should probably be 'wrapped' in eval{} and $@ tested). App may be the name of any application whose main window is on the display
containing the sender's main window; it need not be within the same process. If no arg arguments are present, then the string to be sent
is contained entirely within the cmd argument. If one or more args are present, they are concatenated separated by white space to form the
string to be sent.
If the initial arguments of the call begin with ``-'' they are treated as options. The following options are currently defined:
-async
Requests asynchronous invocation. In this case the send command will complete immediately without waiting for cmd to complete in the
target application; no result will be available and errors in the sent command will be ignored. If the target application is in the
same process as the sending application then the -async option is ignored.
-- Serves no purpose except to terminate the list of options. This option is needed only if app could contain a leading ``-'' character.
APPLICATION NAMES
The name of an application is set initially from the name of the program or script that created the application. You can query and change
the name of an application with the appname method.
WHAT IS A SEND
The send mechanism was designed to allow Tcl/Tk applications to send Tcl Scripts to each other. This does not map very well onto perl/Tk.
Perl/Tk "sends" a string to app, what happens as a result of this depends on the receiving application. If the other application is a
Tcl/Tk4.* application it will be treated as a Tcl Script. If the "other" application is perl/Tk application (including sends to self) then
the string is passed as an argument to a method call of the following form:
$mainwindow->Receive(string);
There is a default (AutoLoaded) Tk::Receive which returns an error to the sending application. A particular application may define its own
Receive method in any class in MainWindow's inheritance tree to do whatever it sees fit. For example it could eval the string, possibly in
a Safe "compartment".
If a Tcl/Tk application "sends" anything to a perl/Tk application then the perl/Tk application would have to attempt to interpret the
incoming string as a Tcl Script. Simple cases are should not be too hard to emulate (split on white space and treat first element as
"command" and other elements as arguments).
SECURITY
The send command is potentially a serious security loophole, since any application that can connect to your X server can send scripts to
your applications. Hence the default behaviour outlined above. (With the availability of Safe it may make sense to relax default behaviour
a little.)
Unmonitored eval'ing of these incoming "scripts" can cause perl to read and write files and invoke subprocesses under your name. Host-
based access control such as that provided by xhost is particularly insecure, since it allows anyone with an account on particular hosts to
connect to your server, and if disabled it allows anyone anywhere to connect to your server. In order to provide at least a small amount
of security, core Tk checks the access control being used by the server and rejects incoming sends unless (a) xhost-style access control is
enabled (i.e. only certain hosts can establish connections) and (b) the list of enabled hosts is empty. This means that applications
cannot connect to your server unless they use some other form of authorization such as that provide by xauth.
SEE ALSO
"eval" in perlfunc, Safe, system's administrator/corporate security guidelines etc.
KEYWORDS
application, name, remote execution, security, send
perl v5.12.1 2007-05-05 send(3)