New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Apps and Games Discussion of applications and games available for Mac OS X.

start xampp at boot


Post Reply New Thread Subscribe

 
Thread Tools
MacPC

 
Member Since: Jun 12, 2008
Posts: 14
MacPC is on a distinguished road

MacPC is offline
Hi,

I am running xampp for Mac on my dev machine. I like it a lot because of its easy setup but I have a problem- I can't get xampp to start at boot, which is bad because I use my mac as a demo server to show my web design to my clients. My Mac is set to reboot automatically after a power failure, unlike to web server comes with OS X, xampp won't restart without my intervention.

I wrote a shell script to start xampp, but it requires sudo which requires the root password. then I use AppleScript to start the shell script like this:

do shell script "sudo ./Desktop/xamppBash"

Once I run the AppleScript, the Terminal comes up, waiting for a password, here is where I get stuck. Does anyone know how I can use AppleScript to enter the password? or better yet, can someone also tell me a easier way to start xampp at boot? It's driving me CRAZY

Thanks in advance.

BTW, My Mac is a G4 mini
QUOTE Thanks
harryb2448

 
harryb2448's Avatar
 
Member Since: Nov 28, 2007
Location: Nambucca Heads Australia
Posts: 17,538
harryb2448 has a reputation beyond reputeharryb2448 has a reputation beyond reputeharryb2448 has a reputation beyond reputeharryb2448 has a reputation beyond reputeharryb2448 has a reputation beyond reputeharryb2448 has a reputation beyond reputeharryb2448 has a reputation beyond reputeharryb2448 has a reputation beyond reputeharryb2448 has a reputation beyond reputeharryb2448 has a reputation beyond reputeharryb2448 has a reputation beyond repute
Mac Specs: iMac i5 2.7GHz OS X.9.4 and OS X.10

harryb2448 is offline
You do not give OS but if using Leopard, or Tiger, have you tried going to User>Log In Items and see if you can select it there.
QUOTE Thanks
MacPC

 
Member Since: Jun 12, 2008
Posts: 14
MacPC is on a distinguished road

MacPC is offline
Quote:
Originally Posted by harryb2448 View Post
You do not give OS but if using Leopard, or Tiger, have you tried going to User>Log In Items and see if you can select it there.
My bad. It's Tiger 10.4.11. Hum, I don't think there is User>Log In Items.
QUOTE Thanks
MacPC

 
Member Since: Jun 12, 2008
Posts: 14
MacPC is on a distinguished road

MacPC is offline
Since I got no help, here I answered my own question. In case someone else has the same question, here it is.

It's so simple and obvious. Open Script editor, type in this line:

do shell script "sudo /Applications/xampp/xamppfiles/mampp start" password "YOUR ADMIN PWD" with administrator privileges

Save it as an application. Go to System Preferences->Account->Login items, add this app to the list. Voila, once you reboot, Your xampp is served.

It works on both my Mac Tiger 10.4.11 and Leopard 10.5.3.
QUOTE Thanks
volcs0

 
Member Since: Mar 24, 2009
Posts: 1
volcs0 is on a distinguished road

volcs0 is offline
Thanks for this - exactly what I was looking for.

But I wish there was a way to not have my admin password saved on my machine like that. Any ideas?
QUOTE Thanks
krezreb

 
Member Since: May 06, 2009
Posts: 1
krezreb is on a distinguished road

krezreb is offline
There are actually two problems with the previous recommendations. 1) they require you store and update your admin password in cleartext form on the machine
2) They require you to log in.

If you want to set up custom scripts that run when your computer boots, I would recommend an application called Lingon. I use it on Leopard 10.5.6, but presumably it works on Tiger as well.

Open Lingon, Click the new plus sign -> New User Daemon, call it whatever you want under "What" put:

/Applications/xampp/xamppfiles/xampp start

(no need to use sudo, it will already run with god powers). Now enable it and restart your machine. If you look in your process tree, you should see xampp running as root.
QUOTE Thanks

Post Reply New Thread Subscribe


« Share Safari 3 bookmarks across many Macs | Elminating duplicate files/photos »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting 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 Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
How to Change start up programs during boot ImBatman OS X - Operating System 2 05-25-2008 03:46 PM
Can You Install Boot Camp AFTER Parallels? bluto00 Running Windows (or anything else) on your Mac 2 11-03-2007 10:34 PM
G4 MDD will only boot from firewire bovey Apple Desktops 2 08-29-2007 09:24 AM
SuperDuper gone in boot mode mako OS X - Apps and Games 7 01-29-2007 05:45 AM
Can't boot from cdrom rickenbacherus Other Hardware and Peripherals 2 07-31-2003 04:18 PM

All times are GMT -4. The time now is 02:26 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?