Changing Preferences in Command Line?

本區專門提供 Mac OS X 使用者交換使用心得

版主: ross_ttbryanchangdigdogchester

回覆文章
內容
發表人
頭像
paladin
留言破百
文章: 248
註冊時間: 08/10/2001 1:01 am
來自: Tokyo/Japan

Changing Preferences in Command Line?

#1 文章 paladin »

I need help from you power users...

I am now working somewhere three to four hours away from my old office. Last weekend I went back to my office, turned on my Mac, turned on the "remote login" option, and hoped that I could ssh to my Mac from another place.

This morning, however, when I tried to ssh to the Mac I couldn't get connected. I am guessing that it might be sleeping -- I forgot to turn that option off.

So I am planning to take the following actions:
<UL TYPE=SQUARE><LI>Make a phone call to my friend in the office, ask them to wake up my computer (they are not Mac users, I have locked my screen and I remembered the primary language was set to Chinese -- so I wouldn't ask them to do the next step for me).
<LI>Remotely login to my Mac, and turn off the corresponding energy saver options using command line so that it won't sleep again.</UL>

The question is how do I do the second step: changing the preference settings in command line?

Thanks.

[ 12-30-2002: 留言編輯者: Paladin ]
頭像
謝孟叡
討論區管理員
文章: 960
註冊時間: 05/01/2001 1:01 am
來自: 邪教組織 #osxchat
聯繫:

Changing Preferences in Command Line?

#2 文章 謝孟叡 »

<BLOCKQUOTE><font size="1" face="XYZ">quote:</font><HR>原始發信人 Paladin:
<STRONG>
The question is how do I do the second step: changing the preference settings in command line?

Thanks.

[ 12-30-2002: 留言編輯者: Paladin ]</STRONG><HR></BLOCKQUOTE>

Dear Paladin:
How about VNC?
頭像
paladin
留言破百
文章: 248
註冊時間: 08/10/2001 1:01 am
來自: Tokyo/Japan

Changing Preferences in Command Line?

#3 文章 paladin »

<BLOCKQUOTE><font size="1" face="XYZ">quote:</font><HR>原始發信人 孟叡:
<STRONG>How about VNC?</STRONG><HR></BLOCKQUOTE>

Provided that I can install VNC via the command line interface...

Well, the command line interface is the only means I can access the Mac, also the only thing I need. I now just need a way to alter the preference setting so the computer wouldn't go to sleep when I am not around.
頭像
digdog
討論區管理員
文章: 1297
註冊時間: 05/02/2001 1:01 am
聯繫:

Changing Preferences in Command Line?

#4 文章 digdog »

sudo pico /private/var/db/SystemConfiguration/com.apple.PowerManagement.xml

把 Wake On LAN 改成 1(碰一下就醒來)
把 System Sleep Timer 改成 0(不睡覺)
頭像
paladin
留言破百
文章: 248
註冊時間: 08/10/2001 1:01 am
來自: Tokyo/Japan

Changing Preferences in Command Line?

#5 文章 paladin »

<BLOCKQUOTE><font size="1" face="XYZ">quote:</font><HR>原始發信人 digdog:
<STRONG>sudo pico /private/var/db/SystemConfiguration/com.apple.PowerManagement.xml

把 Wake On LAN 改成 1(碰一下就醒來)
把 System Sleep Timer 改成 0(不睡覺)</STRONG><HR></BLOCKQUOTE>

Great! Thanks. Will try it when there is someone in the office.

BTW, in what document/books I find information like that?
頭像
digdog
討論區管理員
文章: 1297
註冊時間: 05/02/2001 1:01 am
聯繫:

Changing Preferences in Command Line?

#6 文章 digdog »

<BLOCKQUOTE><font size="1" face="XYZ">quote:</font><HR>原始發信人 Paladin:
<STRONG>BTW, in what document/books I find information like that?</STRONG><HR></BLOCKQUOTE>
http://www.macosxhints.com 應該就夠了。
頭像
oeyvind
嗜冰客
文章: 1990
註冊時間: 10/03/2001 1:01 am
來自: 大馬/星洲
聯繫:

Changing Preferences in Command Line?

#7 文章 oeyvind »

You might need something like this as well:
http://gsd.di.uminho.pt/jpo/software/wakeonlan/

i.e. waking up an eMac locally from my Indy:

<BLOCKQUOTE><font size="1" face="XYZ">code:</font><HR><pre>
[19] GUINNESS % arp -a ~ [12:32]
gw-int (192.168.0.1) at 0:10:db:5:##:##
? (192.168.0.8) at 0:50:e4:80:##:##
? (192.168.0.178) at 0:3:93:a7:9d:a4
[20] GUINNESS % wakeonlan 0:3:93:a7:9d:a4 ~ [12:32]
Sending magic packet to 255.255.255.255:9 with 0:3:93:a7:9d:a4
[21] GUINNESS %</pre><HR></BLOCKQUOTE>

And to sleep a machine remotely:
http://www.snoize.com/SleepNow/

[ 12-31-2002: 留言編輯者: oeyvind ]
頭像
paladin
留言破百
文章: 248
註冊時間: 08/10/2001 1:01 am
來自: Tokyo/Japan

#8 文章 paladin »

A quick thanks to digdog and oeyvind. :)
回覆文章