Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Startup stuff on login and How to open New Terminal from Terminal Command?

Startup stuff on login and How to open New Terminal from Terminal Command?
Thread Tools
Dedicated MacNNer
Join Date: Mar 2003
Location: boston, ma
Status: Offline
Reply With Quote
Jun 18, 2003, 11:32 AM
 
2 questions:

1. How do I run things on startup? SHould I have a .xinitrc file with things like:
(complete pathname)/Safari.app
(pathname)/Adium.app

?

2. How can I open 2 terminal windows automatically and place them where i want(i.e. like the -geometry 41x31+0-0)


Basically I want to open some apps and 2 terminal windows at a certain location when I login. Any tips? Thanks.
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Jun 18, 2003, 12:18 PM
 
There is a 'Login Items' pane in System Preferences.

You can add apps like Adium.

You can also add AppleScript apps - that will allow you to open two terminal windows in specific places.
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Jun 18, 2003, 12:43 PM
 
I spoke too soon - it seems that Terminal does not actually support making new windows.

Perhaps you can do something with .term files
     
kelesh  (op)
Dedicated MacNNer
Join Date: Mar 2003
Location: boston, ma
Status: Offline
Reply With Quote
Jun 18, 2003, 12:56 PM
 
is there some command that will act as a keypress? like applekey + N, or whatever it is for a new shell in terminal? that wouldn't let me place it though.
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Jun 18, 2003, 01:02 PM
 
You can use .term files.

open the windows in the positions you want then choose Save... from the File Menu - you can then save "all windows" - and if you tick the checkbox then Terminal will start-up like that always.
     
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Jun 18, 2003, 02:23 PM
 
Originally posted by Diggory Laycock:
I spoke too soon - it seems that Terminal does not actually support making new windows.

Perhaps you can do something with .term files
Surely you could do that with AppleScript? Create an AppleScript which starts the Terminal and opens two windows, then add that to your login items.
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Jun 18, 2003, 03:35 PM
 
tried that - telling Terminal to 'make new window' then you get:

Terminal got an error: NSArgumentsWrongScriptError

and if you tell it to "make new window at front
" then you get a window ID back - but Terminal does not create one.
     
kelesh  (op)
Dedicated MacNNer
Join Date: Mar 2003
Location: boston, ma
Status: Offline
Reply With Quote
Jun 18, 2003, 04:01 PM
 
man, Terminal is gaytastic. This would be easy to do in linux.
     
P
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status: Offline
Reply With Quote
Jun 18, 2003, 04:42 PM
 
Originally posted by kelesh:
man, Terminal is gaytastic. This would be easy to do in linux.
The terminal is not very important to most users of Mac OS X. There are other terminals around:

http://www.pollet.net/GLterm/
http://iterm.sourceforge.net/

knock yourself out. Also, if your really need to have some funky terminal emulation that neither of these apps do, you can always run xterm from within XDarwin.

Finally: You shoudl be able to do it in AppleScript with something like

menu item "New" in menu "File"

Google for info if you want to do it, I'm not very good.
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Jun 18, 2003, 04:52 PM
 
Originally posted by P:
The terminal is not very important to most users of Mac OS X. There are other terminals around:

http://www.pollet.net/GLterm/
http://iterm.sourceforge.net/

knock yourself out. Also, if your really need to have some funky terminal emulation that neither of these apps do, you can always run xterm from within XDarwin.

Finally: You shoudl be able to do it in AppleScript with something like

menu item "New" in menu "File"

Google for info if you want to do it, I'm not very good.
That only works if you have the Beta GUI Scripting installed.

.Term files don't seem to be that bad a work around.

p.s. Gaytastic is my new word of the day!
     
Professional Poster
Join Date: Jan 2001
Location: Between Sydney and Melbourne
Status: Offline
Reply With Quote
Jun 18, 2003, 08:52 PM
 
Originally posted by Diggory Laycock:
There is a 'Login Items' pane in System Preferences.

You can add apps like Adium.

You can also add AppleScript apps - that will allow you to open two terminal windows in specific places.
But how do you do this with the terminal or with Applescript?
     
kelesh  (op)
Dedicated MacNNer
Join Date: Mar 2003
Location: boston, ma
Status: Offline
Reply With Quote
Jun 18, 2003, 10:28 PM
 
GLterm does not have transparency, so its out of my consideration. Iterm looks nifty though. I could just run screen to get the same effect though, i'll check it out.

so there is no way to open 2 terminal windows at my specified locations other than to place the windows there and do the "save as" and "start this when terminal starts up"?
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Jun 19, 2003, 03:55 AM
 
If the problem is that you don't want those two windows to open *every* time you start terminal then you can unselect the "open when terminal starts up"

then put the following applescript (saved as an application) in your login items.

tell application "Finder"
open ":users:diggory:desktop:Test.term"
open ":users:diggory:desktop:Test2.term"
end tell

obviously replace Test.term and Test2.term with two term files that you make.
(Last edited by Diggory Laycock; Jun 19, 2003 at 04:01 AM. )
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:59 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2