The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - Newcomers (http://hintsforums.macworld.com/forumdisplay.php?f=15)
-   -   Quitting Terminal after shell script runs (http://hintsforums.macworld.com/showthread.php?t=109504)

tlarkin 02-18-2010 01:41 PM

I'm not going to argue, but here read for yourself

http://www.macosxhints.com/article.p...11010033851924

http://www.mytechmusings.com/2007/06...-template.html

http://www.makemacwork.com/customize...r-template.htm

top hits off google, and yes you do need to clear cache when you do this, but it does in fact work.

Hal Itosis 02-18-2010 02:49 PM

I don't need to google. I just deleted my own dock.plist.

The thing is:
  1. what is the actual "problem" being discussed? -- and
  2. how do these "solutions" you propose relate in a practical manner?

>>> and yes you do need to clear cache when you do this, but it does in fact work.


If some suggestion doesn't really fit a particular problem (let alone offer any advantage over methods already given), then i don't quite follow the purpose.

tlarkin 02-18-2010 03:05 PM

Quote:

Originally Posted by Hal Itosis (Post 573051)
I don't need to google. I just deleted my own dock.plist.

The thing is:
  1. what is the actual "problem" being discussed? -- and
  2. how do these "solutions" you propose relate in a practical manner?

>>> and yes you do need to clear cache when you do this, but it does in fact work.


If some suggestion doesn't really fit a particular problem (let alone offer any advantage over methods already given), then i don't quite follow the purpose.


Did you actually modify the user template? Just because you don't quite grasp the benefits doesn't make it an invalid option. There are plenty of things you do with your Mac that I have not a clue which you are doing from reading your posts, but I would hardly try to claim them to be irrelevant.

The logic behind my suggestion was if you can modify the user template in /System, or perhaps the default template with in the application's contents itself, you can modify the default plist so you never have to run a script.

Also, I was unaware of the frequency of this problem, and there have been many solutions which address this in the same manner. I will give an example that Mike Bombich posted on his website.

1) Create a set of plists you want the end user to have

2) Modify the user template and copy over your plists, but make sure to clear caches, logs and other things you don't want every user to have

3) Create a log out script that wipes out all plist files in case the end user modifies anything so next time they log in they get the fresh set of plists from the user template.

From the OP:
Quote:

The script is a fix for an application which invariably corrupts its preference file, causing a crash at the next launch. All it does is to replace the corrupt preference file with a backup. I suppose there's no reason why it couldn't be an AppleScript.

So bash scripts in the script menu don't run in Terminal...?
If there were a way to just fix this all together, then why not try it? Why even bother with a script? I don't know and still don't know all the details so I can't deduct if that is possible.

You are very smart when it comes to Unix, no doubt smarter than I am, but my methods aren't out of this world when addressing problems like this. I deal with tons of crappily coded educational apps that I have to do things like this from time to time. I try to package it up in composer, with the files modified exactly how I want them to, thus fixing the problem with out having to do any post scripts.

Hal Itosis 02-18-2010 06:07 PM

As far as the 'plist' goes, perhaps it could simply be locked and that might obviate everything.


Quote:

The logic behind my suggestion was if you can modify the user template in /System, or perhaps the default template with in the application's contents itself, you can modify the default plist so you never have to run a script.
:
:
:
3) Create a log out script that wipes out all plist files in case the end user modifies anything so next time they log in they get the fresh set of plists from the user template.
Well, that seems to be somewhat contradictory (never run a script <--> run script every logout). So then what, he needs to logout each time before relaunching the app? Not practical, imho.

Anyway, this thread had another aspect: "Quitting Terminal after shell script runs"... and,
i think one thing readers can take away from all this is the Script Menu tip works for that.

If a 'user template' solution ever materializes, i'll be happy to look at it.


All times are GMT -5. The time now is 10:37 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.