tag:blogger.com,1999:blog-67255315528422823492023-11-16T06:22:56.238-08:00Dr. SavoyeTIPS, TRICKS AND GUIDES FOR LINUX ~ MAC ~ UNIXDr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-6725531552842282349.post-75255624074691342542013-10-31T13:47:00.001-07:002013-11-28T09:46:11.558-08:00Revert Interface changes to Snow Leopard, Part 1: Lion and Mountain LionFor many of us, the graphical and user interface changes made between Lion and Snow Leopard, although few and mostly subtle, were unwelcome. <i>Some</i> of us (*cough*) were so utterly disappointed by the minor annoyances that a full reversion to Snow Leopard was necessary.<br />
<br />
However, drastic measures are not always the answer. With a number of minor tweaks, the most obvious changes to the design can be reverted to a more familiar Snow Leopard functionality.<br />
<ol>
<li>Finder sidebar </li>
<li>Scrolling</li>
<li>Window animations </li>
</ol>
<br />
<u><b><span style="font-size: large;">The Finder</span></b></u><br />
<br />
<table style="width: 100%px;">
<tbody>
<tr>
<td><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifn4KOtApN7IzHmOLdGbWSzrADKj5nxTfZ7JMLjxkDXnZdsZof0DMm1hOGF6MKc88SmPPuEnbvvZgVY2ZZu360BfnVK6d0RTtnNnI7vcCy8f8ZfJZwXnOE4BBZWFjsogEwqnJ8h79GGQGH/s1600/FinderLion.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifn4KOtApN7IzHmOLdGbWSzrADKj5nxTfZ7JMLjxkDXnZdsZof0DMm1hOGF6MKc88SmPPuEnbvvZgVY2ZZu360BfnVK6d0RTtnNnI7vcCy8f8ZfJZwXnOE4BBZWFjsogEwqnJ8h79GGQGH/s320/FinderLion.png" /></a></div>
</td>
<td valign="top">The biggest and most obvious interface change was to the Finder
windows. First, new windows open to a default "All My Files" section. For most of us, Finders in Snow Leopard opened to our home directory or to the Desktop. In addition, many of the subdirectories such as Downloads, Music and Pictures may be missing.</td>
</tr>
</tbody></table>
<br />
<table style="width: 100%px;">
<tbody>
<tr>
<td><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi82v-7BhkBw30KfzydvhoxbgXORO_KBc_Ra8DNab3q1_cACTxc1rtKFqr1y4Jn5WUsAIPntiyC2dyRUPcrlJCdTCUz1K9J70U3uifglvwdIZ0-DMf6q8HILoGx9gbOfIE0qhFCUY-2q4AD/s1600/FinderPrefs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi82v-7BhkBw30KfzydvhoxbgXORO_KBc_Ra8DNab3q1_cACTxc1rtKFqr1y4Jn5WUsAIPntiyC2dyRUPcrlJCdTCUz1K9J70U3uifglvwdIZ0-DMf6q8HILoGx9gbOfIE0qhFCUY-2q4AD/s320/FinderPrefs.png" width="204" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
</td>
<td valign="top">Begin by opening the Finder preferences to "Sidebar".<br />
<br />
Uncheck "All My Files" and "AirDrop", and check whichever other subdirectories you want to appear.<br />
<br />
In addition, check "Hard Disks" and the computer name under "Devices", and the username under "Favorites". In this case, the user is "admin", and the computer is named "Lisiriad". As in this picture, your "Hard Disks" may have a dash through it instead of a checkbox. Uncheck the box and re-check it to enable all hard disks to show up under "Devices".<br />
<br />
If you would like "Library" to show up in the sidebar, enter a Terminal and run the command <span style="color: cyan;">chflags nohidden ~/Library.</span> By default, the Library folder has become hidden post-Snow Leopard. This will enable you to drag it from your home folder view into the sidebar.<br />
<br /></td>
</tr>
</tbody></table>
<br />
Next, under the "General" tab, instead of "All My Files",
choose "Desktop" or "admin" under the heading "New Finder windows
show:".<br />
<br />
Next, we restore the colored icons. Begin by installing the <span style="color: cyan;">SideEffects</span> package, obtainable <span style="color: red;"><b><a href="http://macmatrix.blogspot.hu/p/sideeffects.html" style="color: red;" target="_blank">here</a></b></span>, or <span style="color: red;"><b><a href="http://simonbarnett.co.za/downloads/SideEffects1.9.dmg" style="color: red;" target="_blank">here</a></b></span> (direct link). After installation, you may need to either <span style="color: cyan;">killall Finder</span> or log out and back in. Your Finder sidebar should now have the familiar Snow Leopard colored icons, although they will look a bit odd.<br />
<br />
<table style="width: 100%px;">
<tbody>
<tr>
<td><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3qMHeljLbx3IgTWDuayarb1_OiHc59XzmitWbSiqeOQu_82lqXG_Yq4Y1S1l0HwRPMr4fPJZK4-hZfHKO7TAWMs_l6VwJ3E_ChEtWGmzqJU5QrLRouu2ZvRNunDP4QHHOxxhD5AzuzisB/s1600/FinderIconSize.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="121" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3qMHeljLbx3IgTWDuayarb1_OiHc59XzmitWbSiqeOQu_82lqXG_Yq4Y1S1l0HwRPMr4fPJZK4-hZfHKO7TAWMs_l6VwJ3E_ChEtWGmzqJU5QrLRouu2ZvRNunDP4QHHOxxhD5AzuzisB/s320/FinderIconSize.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
</td>
<td valign="top">Fix this by going into the System Preferences -> General and changing "Sidebar Icon Size" to "Small".</td>
</tr>
</tbody>
</table>
<br />
<br />
<table style="width: 100%px;">
<tbody>
<tr>
<td><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqt-q-vp1V2uefdC_RQr4aFeFa6Sc9zIZWtORGNvSX-7dIuzjtKu17UzDPKWlE1cu3IECiaIDNE2ZqcXsX6hZkiWsRpqjUZB-fQGTIEmrKovhvJLnM3XtNONc23LtYxqHqR7fP4gopbWd3/s1600/FinderFixed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqt-q-vp1V2uefdC_RQr4aFeFa6Sc9zIZWtORGNvSX-7dIuzjtKu17UzDPKWlE1cu3IECiaIDNE2ZqcXsX6hZkiWsRpqjUZB-fQGTIEmrKovhvJLnM3XtNONc23LtYxqHqR7fP4gopbWd3/s320/FinderFixed.png" width="226" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
</td>
<td valign="top">Lastly, grab and drag the "FAVORITES" and "DEVICES" headers to switch their places.<br />
<br />
After all of the above changes, your Finder should now look something like this.</td>
</tr>
</tbody>
</table>
<br />
<u><b><span style="font-size: large;"><br />Scrolling</span></b></u><br />
<br />
The other additions many found particularly annoying was the reversed scrolling direction, inertia, and the bounce when the scrollbar hits the bottom or the top of a container.<br />
<br />
<table style="width: 100%px;">
<tbody>
<tr>
<td><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihLd7Uv8PlYUfmkMGhvsR1EXRvVb-1OXiz03XQqDfJtYnFXGQ14y81xE0wcEi9jnI3x5NJ0B5td80P_nRAcpNC0v3ibO5oxPKNQ4E1PW6WcdXsizH5gbg8oXVdK5mWdrm06NMB2Px5C-gI/s1600/Trackpadinertia.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihLd7Uv8PlYUfmkMGhvsR1EXRvVb-1OXiz03XQqDfJtYnFXGQ14y81xE0wcEi9jnI3x5NJ0B5td80P_nRAcpNC0v3ibO5oxPKNQ4E1PW6WcdXsizH5gbg8oXVdK5mWdrm06NMB2Px5C-gI/s320/Trackpadinertia.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
</td>
<td valign="top">Under Lion, the inertia setting is located in the System Preferences under "Universal Access", within & Trackpad" tab. In Mountain Lion, the setting is instead under "Accessibility".<br />
<br />
In either dialog, click the "Trackpad Options" near the bottom. Change "Scrolling" to "without inertia".</td>
</tr>
</tbody>
</table>
<br />
To disable the reversed scrolling, enter the "Trackpad" pane in System Preferences. Go to the "Scroll & Zoom" tab and uncheck "Scroll direction: natural".<br />
<br />
If you have a USB mouse, you will also need to uncheck this in the "Mouse" preference pane.<br />
<br />
<table style="width: 100%px;">
<tbody>
<tr>
<td><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgChsX-A65WF2FUijCeZafQHf66g6w7f94Ug2-QIMLC6A6yVASlttfRWRJ0IJfn5-n05Rsbqml-qKif6gO7lw6ac3e1lRnvztVeSOH7vy1IMaFTb9XOuy5MuTJZ4beY59tH8tRvdDDlfPpK/s1600/Trackpadscroll.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="92" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgChsX-A65WF2FUijCeZafQHf66g6w7f94Ug2-QIMLC6A6yVASlttfRWRJ0IJfn5-n05Rsbqml-qKif6gO7lw6ac3e1lRnvztVeSOH7vy1IMaFTb9XOuy5MuTJZ4beY59tH8tRvdDDlfPpK/s200/Trackpadscroll.png" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
</td>
<td valign="top"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUzNT9rC7ArQqIZO9cmz4a-D2sz_GF5AmcnC4bgapiumt4DrYBA05iyzUu57vcgG5ys9HoRzIL1eoLf82qmrS0bZgo3ot966IRIFGNjCk_K459s8lUqRunMfxcEyFxiSa2JFP-sunr_DYi/s1600/USBMousescroll.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="116" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUzNT9rC7ArQqIZO9cmz4a-D2sz_GF5AmcnC4bgapiumt4DrYBA05iyzUu57vcgG5ys9HoRzIL1eoLf82qmrS0bZgo3ot966IRIFGNjCk_K459s8lUqRunMfxcEyFxiSa2JFP-sunr_DYi/s200/USBMousescroll.png" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
</td>
</tr>
</tbody>
</table>
<br />
<u><b><span style="font-size: large;">Scroll Bounce</span></b></u><br />
<br />
To disable the bouncing effect when scrolling near the top or bottom of a container, enter the following command in a Terminal:<span style="color: cyan;"> defaults write -g NSScrollViewRubberbanding -int 0</span><br />
<br />
You may have to log out for this option to take effect. To re-enable the bounce, enter <span style="color: cyan;">defaults write -g NSScrollViewRubberbanding -int 1.</span><br />
<br />
<br />
<u><b><span style="font-size: large;">Window Animation</span></b></u><br />
<br />
Finally, many of us found that the window opening animation, which is rather subtle, nevertheless produced a noticeable lag on any activity. This animation happens when a new window of any application opens, and a "zoom" effect quickly takes the window from nothingness to its full size.<br />
<br />
To disable this animation, enter the following command in a terminal: <br />
<span style="color: cyan;">defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool 0</span><br />
<br />
To re-enable window animations, enter: <br />
<span style="color: cyan;">defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool 1</span><br />
<br />
<br />
<br />
<br />
<br />
<span class="fullpost">
</span>Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com0tag:blogger.com,1999:blog-6725531552842282349.post-39316893792605919372013-01-20T07:20:00.000-08:002013-01-20T07:21:42.184-08:00Change a Mac user's password temporarilyAs a sysadmin, there may be times when you absolutely must access somebody's actual desktop for legitimate reasons -- or some clandestine ones. But in an environment where users are allowed their own passwords and are for whatever reason unavailable, and you either don't want to reset the password or don't want to be caught, you may want to reset the password for the duration of your use, and change it back after you're done.<br />
<br />
The first step is to determine the user's hash ID. Password hashes are stored in the <span style="color: cyan;">/var/db/shadow/hash</span> directory. To see the hash IDs for all users, you can use the <span style="color: cyan;">dscl</span> command as root: <span style="color: cyan;">dscl . -list /Users GeneratedUID</span><br />
<br />
<table>
<tbody>
<tr>
<td valign="top"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGABVrfaO9HLk3qde3QoKWIQZnFd5oDm1_tfqe-jjjlP1rKs-p1DUf7qEqShakkDglYKWjqqSlyt7XHC8VpjIwbrEwtqvzdEFIKn-rI4QYUjWW2sf3G7BYeSa9Yi8GVjkXbAil-5qEGacN/s1600/change-pass.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGABVrfaO9HLk3qde3QoKWIQZnFd5oDm1_tfqe-jjjlP1rKs-p1DUf7qEqShakkDglYKWjqqSlyt7XHC8VpjIwbrEwtqvzdEFIKn-rI4QYUjWW2sf3G7BYeSa9Yi8GVjkXbAil-5qEGacN/s320/change-pass.png" width="320" /></a></div>
</td>
<td valign="top">You will see a list of all "short" names for users and their hash IDs. </td>
</tr>
</tbody>
</table>
In this case, the hash ID for the user `drsavoye` is <span style="color: cyan;">6D5D3B6D-5D64-4396-ACD3-6FFCE4DC75E3</span>. Now, navigate to <span style="color: cyan;">/var/db/shadow/hash/</span>, where you will see the files <span style="color: cyan;">6D5D3B6D-5D64-4396-ACD3-6FFCE4DC75E3</span> and <span style="color: cyan;">6D5D3B6D-5D64-4396-ACD3-6FFCE4DC75E3.state</span>. The *.state files store information such as the number of failed login attempts for a user, whether or not the password expires and the last login date.<br />
<br />
Make a backup, preferably outside of this directory, of both files. Now, remove them both from the hash directory. The user will now have no password, but they system still thinks they do, so you will not be able to log in with a blank password.<br />
<br />
Change the user's password to something temporary by using <span style="color: cyan;">passwd drsavoye</span>. Now, you will be able to log in to their desktop with the password you chose. In later versions of OS X you may be prompted to reset or delete their keychain file -- "Cancel" or close the dialog, as you want the keychain to still use the old password.<br />
<br />
When finished, log the user out <b>first</b> and restore the copies of the files you deleted back into the hash directory.<br />
<br />
<br />Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com1tag:blogger.com,1999:blog-6725531552842282349.post-31211929725554793082010-06-01T18:42:00.000-07:002010-06-01T19:43:37.381-07:00Making a custom sudoers fileFor a sysadmin, allowing access to sudo is nerve-wracking, particularly if you work in an environment where you seem to be the only one concerned about security, where passwordless accounts are abundant and all users are made administrators for ease of access. This is most common in OS X clusters, as Linux does not permit empty passwords by default. A properly configured sudoers file is very important.<br /><br />This assumes you have already sorted your users into appropriate groups, such as removing guests from the 'wheel' group.<br /><br /><b>Defining command and user aliases</b><br />The first section to edit will be <span style="color: rgb(153, 255, 255);"># Cmnd alias specification</span>. You can define groups of commands such as:<br /><pre><span style="color: rgb(153, 255, 255);"><br />Cmnd_Alias SYS_COMMANDS = /sbin/unmount, /sbin/mount<br /><br />Cmnd_Alias SERVICES = /bin/ls, /bin/cat, /sbin/halt, /sbin/reboot,<br /> /sbin/shutdown<br /><br />Cmnd_Alias ADMIN_TOOLS = /usr/bin/passwd, /bin/chmod, /bin/chown, /bin/chgrp<br /><br />Cmnd_Alias EDITING = /usr/bin/vi<br /><br />Cmnd_Alias STORAGE = /sbin/fdisk, /sbin/sfdisk, /sbin/parted,<br /> /sbin/partprobe</span><br /></pre>You can also append options to the commands; for example, creating an alias for <span style="color: rgb(153, 255, 255);">/usr/bin/su - Guest</span>, meaning that it is permissible to use <span style="color: rgb(153, 255, 255);">sudo su - Guest</span>, but not <span style="color: rgb(153, 255, 255);">sudo su - some-other-user</span>.<br /><br />User aliases operate using the same syntax:<br /><pre><span style="color: rgb(153, 255, 255);">User_Alias GUESTS = guest, user, bob<br />User_Alias ADMINS = joe, alice</span></pre><b>Limiting and denying commands to users and groups</b><br />Next, edit the <span style="color: rgb(153, 255, 255);"># User privilege specification</span> section. A <span style="color: rgb(153, 255, 255);">%</span> denotes a group, while a string without indicates a user:<br /><pre><span style="color: rgb(153, 255, 255);"># root and 'wheel' group users can run all commands as long as they authenticate<br />with their passwords<br />root ALL = (ALL) ALL<br />%wheel ALL = (ALL) ALL<br /><br /># only bob can use storage tools<br />bob ALL = STORAGE<br /><br /># ADMINS can use chmod, chown, chgrp and passwd, but they can't change root's password<br />%ADMINS ALL = ADMIN_TOOLS !/usr/bin/passwd root<br /><br /># 'admin' group users can use all commands in the EDITING alias with a password, and<br />all commands in SYS_COMMANDS and SERVICES without authenticating; but can't use any<br />other commands<br />%admin ALL = EDITING, NOPASSWD:SYS_COMMANDS,SERVICES<br /><br /># Guest users, who don't have passwords, can only mount and unmount drives<br />%guest ALL = NOPASSWD:SYS_COMMANDS<br /><br /># joe can authenticate to use any command in /bin except for chmod, chown, chgrp,<br />chown and vi, but he can use /bin/find without authenticating (there is no real<br />usefulness to NOPASSWD in this case)<br />joe ALL = /bin, NOPASSWD:/bin/find, !/bin/chmod, !/bin/chgrp,<br /> !/bin/chown, !EDITING<br /><br /># alice can su to any user except for root, but without flags (su - user is not allowed)<br />alice ALL = /usr/bin/su [!-]*, !/usr/bin/su *root*<br /><br /># everybody needs to be able to kill a program when it hangs without authenticating<br />ALL ALL = NOPASSWD:/bin/kill</span><br /><br /></pre><b>Defining default settings</b><br />A few useful Defaults specifications:<br /><pre><br /><span style="color: rgb(153, 255, 255);"># only allow one failed password attempt<br />Defaults passwd_tries += "1"<br /><br /># the message when a user types an incorrect password<br />Defaults badpass_message += "And just what do you think you're doing, Dave?"<br /><br /># this prevents sudo from being used in a script; the user must be logged in<br />Defaults requiretty</span><br /></pre>Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com2tag:blogger.com,1999:blog-6725531552842282349.post-1178783213801564372010-06-01T18:13:00.000-07:002013-11-01T20:59:46.752-07:00Enable root login from LAN onlyHaving SSH access to the root account can be catastrophic if someone ever does succeed in breaking into your machine. While the majority of sysadmins turn into rabid wolves upon mention that your machine allows root access, at times it may be necessary.<br />
<br />
This should work on any UNIX-based operating system running OpenSSH 4.3p or later. You may determine the version of OpenSSH by using <code><span style="color: #99ffff;">ssh -V</span></code>.<br />
<br />
On Linux, edit <span style="color: #99ffff;"><code>/etc/ssh/sshd_config</code></span>. On Macs, edit <span style="color: #99ffff;"><code>/etc/sshd_config</code></span>. Locate the line that defines <span style="color: #99ffff;"><code>PermitRootLogin</code></span>, uncomment if it is commented out, and change its value to <span style="color: #99ffff;"><code>no</code></span>.<br />
<br />
On a separate line, add the following:<br />
<pre><span style="color: #99ffff;">Match Address 192.168.2.*,127.0.0.1
PermitRootLogin yes</span></pre>
<pre>
</pre>
This will allow root to login exclusively from your LAN, while denying all attempts from outside.<br />
<br />
<span style="color: red;">Tips:</span> Extra security features to go along with this would be:<br />
<br />
- Denying usage of 'sudo su'<br />
- Disabling passwordless, guest, or otherwise anauthorized users from using 'su'<br />
- Using the above Match Address syntax to only allow root to login using a publickey, not passwordsDr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com1tag:blogger.com,1999:blog-6725531552842282349.post-11770851247210041272010-04-25T14:42:00.000-07:002010-05-15T09:23:46.806-07:00Streaming audio between Linux machinesMy laptop, being my mobile machine, contains all of the music I listen to on a daily basis. At home, it's nice to hook it up to my stereo so I can hear it throughout the house. However, while there is music playing, the laptop is no longer mobile and stuck within a three-foot leash of the stereo.<br /><br />Having recently resurrected an old desktop to function as a MythTV, DVD-watching and backup machine and wired it into the stereo, it was extremely simplistic to stream the audio wirelessly from my laptop and have it be received on the desktop, to be piped into the stereo.<br /><br />For this guide, I am utilizing Fedora 9 on the laptop (client) and freshly-installed Fedora 12 (server) with glibc on the desktop, although this should work on any Linux distro. You will need the following packages on both machines:<br /><pre><span style="color: rgb(153, 255, 255);">pulseaudio<br />pulseaudio-module-zeroconf<br />paprefs<br />padevchooser</span><br /></pre> <big><b>Setting up the sound server</b></big><br /><br />First, on the server, launch <span style="color: rgb(153, 255, 255);"><b>paprefs</b></span> from the terminal. It can also be accessed through the PulseAudio Device Chooser (located in Applications -> Sound & Video), under "Configure Local Sound Server." In the Network Server tab, check all applicable boxes:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixzWgKbrTnBsfVUIWQzHvmK2Sp9QWdGFpJQ4GECUp0s74huBMG9QsBDZfnwXp9YeE8CjuTTKYq0GK2ay3BtFTCUUHa2gCXRgnL0cYaAofrhLhQAmgIn7k7tS5t0is9mkbpp0_fuXY7x00g/s1600/paprefs2.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixzWgKbrTnBsfVUIWQzHvmK2Sp9QWdGFpJQ4GECUp0s74huBMG9QsBDZfnwXp9YeE8CjuTTKYq0GK2ay3BtFTCUUHa2gCXRgnL0cYaAofrhLhQAmgIn7k7tS5t0is9mkbpp0_fuXY7x00g/s400/paprefs2.png" alt="" id="BLOGGER_PHOTO_ID_5464194292618197730" border="0" /></a><br /><br />You may also enable Multicast/RTP, although this is not required for a simple sound server.<br /><br /><br />Now, start up <b>padevchooser</b>. An alert should appear notifying you of a new sound server.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtzJWPAM5q4dNOGlUoxt-cyUxvZozygONmbBqbWMP-RR5O7_7Dx7S2fSKNx3JRq5SyGOrIZfUWQdA7tVC_KG_7KW1FSLZSvhJpzgmcLUg55coi5LwYkqIJ18C37wAcJSYujcTyRV6IxXR6/s1600/padev.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 160px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtzJWPAM5q4dNOGlUoxt-cyUxvZozygONmbBqbWMP-RR5O7_7Dx7S2fSKNx3JRq5SyGOrIZfUWQdA7tVC_KG_7KW1FSLZSvhJpzgmcLUg55coi5LwYkqIJ18C37wAcJSYujcTyRV6IxXR6/s400/padev.png" alt="" id="BLOGGER_PHOTO_ID_5464194280977304610" border="0" /></a><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Select the new server as the default.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLDbWLBVHCJGIHGY-mLUMD7J8VjSehgujNsp6QAiII7OM0ruP9z1s-w1Fs4yBzde6t4z23YLq8VwPCvxGx02JZVtLz7qSUbqMrGqbqdvAbEL_ipep0B-HKNiRf93x08oYuMxJSMhd8wIYP/s1600/padev-sel.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 226px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLDbWLBVHCJGIHGY-mLUMD7J8VjSehgujNsp6QAiII7OM0ruP9z1s-w1Fs4yBzde6t4z23YLq8VwPCvxGx02JZVtLz7qSUbqMrGqbqdvAbEL_ipep0B-HKNiRf93x08oYuMxJSMhd8wIYP/s400/padev-sel.png" alt="" id="BLOGGER_PHOTO_ID_5464194745845280962" border="0" /></a><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><b><big>Setting up the sound streamer</big></b><br /><br />Now launch <b>padevchooser</b> on the client, and select the same server.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7jLHrAFdwxvLRs7VeuX_909qQy-Hxh3EWFti4-B_FH2eIowLG660q5F6igoUf5R4MvaIyIeTzMhzisAeWtTZh-clvmhg75D7z-WZK1aNUG-XXlBrHHfVBeaOivsC2u61s0lL067NLDcK7/s1600/padev-client.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 104px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7jLHrAFdwxvLRs7VeuX_909qQy-Hxh3EWFti4-B_FH2eIowLG660q5F6igoUf5R4MvaIyIeTzMhzisAeWtTZh-clvmhg75D7z-WZK1aNUG-XXlBrHHfVBeaOivsC2u61s0lL067NLDcK7/s400/padev-client.png" alt="" id="BLOGGER_PHOTO_ID_5464195326809496850" border="0" /></a><br /><br /><br /><br /><br /><br /><br />Configure your sound properties to use PulseAudio as the audio output. This will vary by distribution and by version, as the pictured F9 gnome-sound-properties dialog does not exist in F12.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZwtJu9WqS3ZWwBuqxpe7_hlAW8a9nuxxhsJ54VENhR5frR8mXGbHYpwHTkqVFA0qKhSExhAfcl3DhpOu_kqLlkKdE5Fvmi4-x3FJwNn_5jr367_X8Pw0qr2cGse9Z7Ub0ZdprW_RQFFBj/s1600/gnome-sound.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 378px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZwtJu9WqS3ZWwBuqxpe7_hlAW8a9nuxxhsJ54VENhR5frR8mXGbHYpwHTkqVFA0qKhSExhAfcl3DhpOu_kqLlkKdE5Fvmi4-x3FJwNn_5jr367_X8Pw0qr2cGse9Z7Ub0ZdprW_RQFFBj/s400/gnome-sound.png" alt="" id="BLOGGER_PHOTO_ID_5464194272672972210" border="0" /></a><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />In some cases, such as XMMS, you may have to configure its output manually, in addition to the system-wide output.<br /><br />In fact, if possible, it is far safer to configure individual programs to use Pulse if it is not already your sound device -- those of us using OSS or ALSA for system-wide sound, for example.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCXahcFjTLEoQn-xK7dBJ-714G45l6npYsolZmISALEs6zNSEylLIFHijyKdpq-BHCWufhL33kht0qK6VtkruGuKmyF6lK_xI88jzNi-T4W7slDhNi6DuOfHARWdPKp9B1eBnQfGp9Fl6N/s1600/xmms-config.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 221px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCXahcFjTLEoQn-xK7dBJ-714G45l6npYsolZmISALEs6zNSEylLIFHijyKdpq-BHCWufhL33kht0qK6VtkruGuKmyF6lK_xI88jzNi-T4W7slDhNi6DuOfHARWdPKp9B1eBnQfGp9Fl6N/s400/xmms-config.png" alt="" id="BLOGGER_PHOTO_ID_5464194757558088802" border="0" /></a><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />You do not have to have <b>padevchooser</b> open all the time. You can close it once the default server has been selected. Although the client's volume does not communicate to the PulseAudio server, the individual applications should, (such as XMMS's native volume control) as well as the volume on the server.<br /><br />You may have to open ports 4713 and 59352 on both machines before the audio will connect.Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com0tag:blogger.com,1999:blog-6725531552842282349.post-82308460912362139012010-04-25T12:45:00.000-07:002010-04-26T09:52:37.345-07:00Copy-pasting on the Linux command lineOn Mac OS X, since the Apple key is used for copying instead of Ctrl, copy-pasting works within the Terminal. On Linux, Ctrl-c sends an interrupt signal.<br /><br />Instead, use Ctrl-Shift-c to copy within a terminal, and Ctrl-Shift-v to paste. Other similar commands are:<br /><ul><li>Ctrl-Shift-t : Create a new tab</li><li>Ctrl-Shift-w : Close the tab</li><li>Ctrl-Shift-q : Close the entire window, tabs and all</li><li>Ctrl-Shift-n : Create a new window</li></ul>Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com0tag:blogger.com,1999:blog-6725531552842282349.post-23121902972287653592010-04-25T08:58:00.000-07:002010-04-25T09:47:07.606-07:00Showing hidden files in the FinderBy default, OS X does not show its hidden directories, such as /etc, /var, and /usr, in the Finder, although they are still accessible using Go from the menu.<br /><br />To enable them, use the command <code><span style="color: rgb(153, 255, 255);">defaults write com.apple.finder AppleShowAllFiles -bool true</span></code> as root.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGFkDMs0b2jKH0wyXxyECyGfF8w-QLtJY5m7yFcVlxZz5N6ZrT0cU7futGl7CfLnWr6Wbw2M_evIfvthAUxmLFvKr7ASH-ju2M_SV6PmCVwdbkwXHJJGk6fNhBVGXsBIPvt-_ynCvHkujK/s1600/finder-show-all.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 301px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGFkDMs0b2jKH0wyXxyECyGfF8w-QLtJY5m7yFcVlxZz5N6ZrT0cU7futGl7CfLnWr6Wbw2M_evIfvthAUxmLFvKr7ASH-ju2M_SV6PmCVwdbkwXHJJGk6fNhBVGXsBIPvt-_ynCvHkujK/s400/finder-show-all.png" alt="" id="BLOGGER_PHOTO_ID_5464117414028423634" border="0" /></a>Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com0tag:blogger.com,1999:blog-6725531552842282349.post-84377681088501904152010-04-23T15:35:00.000-07:002010-04-26T09:58:49.050-07:00Fixing a slow SSH promptFor owners of multiple Linux machines, it's happened to all of us -- the machine in the living room responds immediately to SSH; but it takes forever to log in to the one in the closet, although it does succeed eventually.<br /><br />This happens because of the SSH client attempting various authentication methods. Using <span style="color: rgb(153, 255, 255);"><code>ssh -vvv user@host</code></span>, the output of a slow connection will look something like this:<br /><pre><br /><span style="color: rgb(153, 255, 255);">debug3: check_host_in_hostfile: filename /home/drsavoye/.ssh/known_hosts<br />debug3: check_host_in_hostfile: match line 11<br />debug1: Host '192.168.2.107' is known and matches the RSA host key.<br />debug1: Found key in /home/drsavoye/.ssh/known_hosts:11<br />debug2: bits set: 499/1024<br />debug1: ssh_rsa_verify: signature correct<br />debug2: kex_derive_keys<br />debug2: set_newkeys: mode 1<br />debug1: SSH2_MSG_NEWKEYS sent<br />debug1: expecting SSH2_MSG_NEWKEYS<br />debug2: set_newkeys: mode 0<br />debug1: SSH2_MSG_NEWKEYS received<br />debug1: SSH2_MSG_SERVICE_REQUEST sent<br />debug2: service_accept: ssh-userauth<br />debug1: SSH2_MSG_SERVICE_ACCEPT received<br />debug2: key: /home/drsavoye/.ssh/id_rsa (0xb7f541a8)<br />debug2: key: /home/drsavoye/.ssh/identity ((nil))<br />debug2: key: /home/drsavoye/.ssh/id_dsa ((nil))<br />debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password<br />debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password<br />debug3: preferred gssapi-with-mic,publickey,keyboard-interactive,password<br />debug3: authmethod_lookup gssapi-with-mic<br />debug3: remaining preferred: publickey,keyboard-interactive,password<br />debug3: authmethod_is_enabled gssapi-with-mic<br />debug1: Next authentication method: gssapi-with-mic<br />debug3: Trying to reverse map address 192.168.2.107.<br />debug1: Unspecified GSS failure. Minor code may provide more information<br />No credentials cache found<br /><br />debug1: Unspecified GSS failure. Minor code may provide more information<br />No credentials cache found<br /><br />debug1: Unspecified GSS failure. Minor code may provide more information<br /><br /><br />debug2: we did not send a packet, disable method<br />debug3: authmethod_lookup publickey<br />debug3: remaining preferred: keyboard-interactive,password<br />debug3: authmethod_is_enabled publickey<br />debug1: Next authentication method: publickey<br />debug1: Offering public key: /home/drsavoye/.ssh/id_rsa<br />debug3: send_pubkey_test<br />debug2: we sent a publickey packet, wait for reply<br />debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password<br />debug1: Trying private key: /home/drsavoye/.ssh/identity<br />debug3: no such identity: /home/drsavoye/.ssh/identity<br />debug1: Trying private key: /home/drsavoye/.ssh/id_dsa<br />debug3: no such identity: /home/drsavoye/.ssh/id_dsa<br />debug2: we did not send a packet, disable method<br />debug3: authmethod_lookup password<br />debug3: remaining preferred: ,password<br />debug3: authmethod_is_enabled password<br />debug1: Next authentication method: password<br />root@192.168.2.107's password: </span><br /></pre><br />In this case, GSSAPI is failing alongside publickey-authentication, but unlike publickey, takes much longer to give up. To disable it, edit <code>/<span style="color: rgb(153, 255, 255);">etc/ssh/ssh</span><span style="font-weight: bold; color: rgb(153, 255, 255);">d</span><span style="color: rgb(153, 255, 255);">_config</span></code> and remove or comment out the lines <span style="color: rgb(153, 255, 255);"><code>#GSSAPIAuthentication yes</code></span> and <span style="color: rgb(153, 255, 255);"><code>#GSSAPICleanupCredentials yes</code></span>.Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com1tag:blogger.com,1999:blog-6725531552842282349.post-12306303150585899822010-03-21T20:23:00.000-07:002012-01-15T12:48:32.633-08:00Installing OS X with an incompatible "OEM" diskLike Windows, new Macs come with a preloaded disk in case you ever need to reinstall. What many users owning multiple machines -- or desperately borrowing friends' disks after their Mac becomes unbootable -- learn the first time they attempt to use it, however, is that the disk is designed to install on only the original Mac it was shipped with, informing only that the software is incompatible upon installation with no further explanation.<br /><br />If the original Mac exists, booting the intended machine into Target Mode using FireWire and tricking the CD into installing onto the mounted hard drive is the easiest option. But what if the original Mac is missing, sold or no longer functional?<br /><br />Editing and re-burning the disk, although illegal, is possible yet not the simplest solution by any means, not the least of which because most users don't have 8GB DVDs sitting around. You will still need a second Mac running the same version <span style="font-weight: bold; color: rgb(255, 0, 0);">and architecture</span> of OS X which you intend to install, a FireWire cable and the preloaded installation disk (more on architecture below).<br /><br /><ol><li>Preparing the target drive<br /></li><li>Building the installation from source</li><li>Filling in missing files</li><li>Repairing the drive<br /></li><li>Booting the drive and running Setup Assistant</li><li>Common errors</li></ol><b>Preparing the Drive</b><br />Begin by hooking up the target drive to another Mac via FireWire if it is already inside a machine, or via USB if you are installing on an external drive. If it is inside a Mac, start the machine in Target Mode by holding down the T key immediately after powering on, until the blue screen appears with the bouncing FireWire emblem.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBMGs4XJK05dvUoV1Z2mz4wYx0tGt1tkufZ_5IWalCMjG9oejUn9YA7X-xnIahZ2M8ZzEYGfSTTOBeJ1UUT8JmyiOKVffOIVt_f3nyKvP6ud7ZUZ69vK64DFZoTN5kYUgCr8zjEKuzy2hx/s1600-h/targetmode.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 300px; height: 226px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBMGs4XJK05dvUoV1Z2mz4wYx0tGt1tkufZ_5IWalCMjG9oejUn9YA7X-xnIahZ2M8ZzEYGfSTTOBeJ1UUT8JmyiOKVffOIVt_f3nyKvP6ud7ZUZ69vK64DFZoTN5kYUgCr8zjEKuzy2hx/s400/targetmode.png" alt="" id="BLOGGER_PHOTO_ID_5450871729778421586" border="0" /></a>It may take anywhere from several seconds to several minutes for your drive to mount. If the drive is already empty and partitioned, you will not need any preparation; if it contains any data or is not formatted correctly, you will need to repartition the drive.<br /><br /><span style="color: rgb(255, 0, 0);">Note: You do not need to format the disk if you are upgrading instead of reinstalling.</span><br /><br />Be very sure to format the filesystem according to your architecture, or else after all the effort your drive will not be able to boot. Newer Macs such as MacBooks and iMac flatscreens use Intel x86 processors, while older models such as iBooks, PowerBooks and G5 towers use Apple's custom PowerPC architecture. The architecture of the machine can easily be determined by running the <span style="color: rgb(102, 255, 255);"><code>arch</code></span> command. PowerPCs will return <span style="color: rgb(102, 255, 255);"><code>ppc</code></span>, while Intel-based Macs will be either <span style="color: rgb(102, 255, 255);"><code>i386</code></span> or <span style="color: rgb(102, 255, 255);"><code>i686</code></span>. This is important because PowerPCs must be formatted with the Apple Partition Scheme, while Intel Macs are partitioned using the GUID Partition Table. It is very important that the host Mac has the same architecture as the machine to be reinstalled, as the DVD installer will go off of its host's configuration to install the appropriate kernel extensions and drivers.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWSqwBAAt0ELCDKs80egXGAPwB4H1HY3WvyRExQ6n0oPKLUf-GFNifPeptEY4advTJG35JmaI7UjAjJogtHYe2p6hd1IcU9vHHyI7ZPpHEmHxRLxH2-RCtPDSN2MZrBMvKuhndaCzQpMN7/s1600-h/partition-APS.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 346px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWSqwBAAt0ELCDKs80egXGAPwB4H1HY3WvyRExQ6n0oPKLUf-GFNifPeptEY4advTJG35JmaI7UjAjJogtHYe2p6hd1IcU9vHHyI7ZPpHEmHxRLxH2-RCtPDSN2MZrBMvKuhndaCzQpMN7/s400/partition-APS.png" alt="" id="BLOGGER_PHOTO_ID_5450871988823361250" border="0" /></a><br /><br /><br /><br /><br />Format the drive according to your architecture by selecting Options from the Partitions tab.<br /><b><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Building the Installation</b><br />While installing this way is not "from source" in the strictest sense, it is an alternative to running the built-in installer application included on the disk as each package must be installed manually, and more or less in the correct order, although some deviation will not cause any long-term problems aside from the package refusing to install in the first place.<br /><br />If you are installing on the command-line, navigate to <code><span style="color: rgb(102, 255, 255);">/Volumes/Mac\ OS\ X\ Install\ DVD/System/Installation/Packages</span></code>. From the Finder, this folder cannot be accessed directly but can be found by inserting the above location using Go -> Go to Folder. From the Finder, the packages listed herein can be installed by double-clicking. Note that the package will try to install by default on the machine you are currently sitting on. <span style="color: rgb(255, 0, 0);">You must click "Change Install Location" and select the mounted drive for each package</span>. From the command-line, install the packages with the <code></code><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);"><span style="color: rgb(102, 255, 255);"><code>installer</code></span></span></span> command:<br /><br /><code><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);"><span style="color: rgb(102, 255, 255);"><code>sudo installer -pkg package.pkg -target /Volumes/PowerBook\ HD<br /><br /></code></span></span></span></code>Install the packages in the following order. They may vary slightly by distribution.<br /><code><span style="color: rgb(102, 255, 255);">BaseSystem.pkg<br />DeTier.pkg<br />Essentials.pkg<br />AdditionalEssentials.pkg<br />AdditionalFonts.pkg<br />Directory.pkg<br />Java.pkg<br />JavaTools.pkg<br />MigrationAssistant.pkg<br />X11User.pkg (optional if you want to use X11)<br /></span></code><code><span style="color: rgb(102, 255, 255);">MediaFiles.pkg<br />ACL.pkg</span></code><br /><br />Optional Applications:<code><span style="color: rgb(102, 255, 255);"><br /><br />AddressBook.pkg<br />Mail.pkg<br />Safari.pkg<br />iCal.pkg<br />iChat.pkg<br />iTunes.pkg<br />iPodSupport.pkg<br />DVDPlayer.pkg<br /></span></code><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmMVLzIZHB2ZpjadRIq_IpSRQcX_4aELU_1kNGuzWTOkY7O_-bTLiJJpJa92P1VUhKYjlQFj0ooC7Ssq8b45paY5xo7KacWokoNQ6ofG74qtL_nOj5Ptj6hTWPVANpmRCiAqrQJHJaZE8D/s1600-h/terminal-basesystem.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 290px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmMVLzIZHB2ZpjadRIq_IpSRQcX_4aELU_1kNGuzWTOkY7O_-bTLiJJpJa92P1VUhKYjlQFj0ooC7Ssq8b45paY5xo7KacWokoNQ6ofG74qtL_nOj5Ptj6hTWPVANpmRCiAqrQJHJaZE8D/s400/terminal-basesystem.png" alt="" id="BLOGGER_PHOTO_ID_5450872360565889586" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiguc07YYtpwFIieJwwPJlt1Q3GMb1PBspQj3LEqc3bu11qaS3cUuMBNYUMHHWzlUkUf7rVBuGCiPCwiX6jQuu76LsSn_PW04vEyOyypIMPSyxdblRPXm7ErwwUR8AeqpYDC8_FOo8t7hbZ/s1600-h/BaseSystem.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 370px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiguc07YYtpwFIieJwwPJlt1Q3GMb1PBspQj3LEqc3bu11qaS3cUuMBNYUMHHWzlUkUf7rVBuGCiPCwiX6jQuu76LsSn_PW04vEyOyypIMPSyxdblRPXm7ErwwUR8AeqpYDC8_FOo8t7hbZ/s400/BaseSystem.png" alt="" id="BLOGGER_PHOTO_ID_5450872366611750610" border="0" /></a>You can of course install every package in the directory, including the extra language support and XCode Tools, but these files are what is needed for a minimalistic OS X installation. This will take roughly the same amount of time as a normal installation, so allow 30-45 minutes to complete. When finished, you will now have a bare minimum -- albeit only half-functional -- installation of Mac OS X.<br /><br /><b>Filling in the Holes</b><br />I have not been able to find the section of the disk which creates the hidden directories properly. (Please leave a comment if you do.) In the meantime, you will need to recreate the /private/etc and /usr directories, which although they are created during the installation do not contain many files needed to actually boot the system. You will need to clone them from another Mac, ideally one which has not had too many custom executables installed -- e.g. as close to the fresh installation state as possible.<br /><br />The drive will not yet show up in the boot menu, so keep it mounted on the host Mac. Use the following commands to clone the missing directories:<br /><pre><span style="color: rgb(102, 255, 255);">sudo rsync -avH /usr /Volumes/PowerBook\ HD<br /></span><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);"><span style="color: rgb(102, 255, 255);">sudo rsync -avH /private/etc /Volumes/PowerBook\ HD/private/</span></span></span></pre>Be sure not to include the trailing / on /usr and /etc, as including it will copy the contents of the directories instead of the directories themselves.<br /><br /><b>Booting the Drive</b><br />You will now have a close-as-possible legit installation of OS X. Unmount the drive, disconnect the FireWire or USB cord, (some models will refuse to boot with it plugged in) insert the original installation disk into the new machine and boot into it. Click OK when the prompt appears informing you of incompatibility. From here, select Utilities -> Startup Disk from the menu and select your drive. Reboot and eject the disk. If you attempt to boot before this, you will find that while the drive may be seen, it will be unnamed and will freeze at the login screen.<br /><br />Typically, you will now be run through the Setup Assistant and may proceed as you would with a normal installation. It may be frozen at the login screen for several moments before loading Setup Assistant, as it has attempted to load normally before realizing that no users exist, since it was not completed in the usual way.<br /><br /><b>Common errors</b><br />I encountered several errors during my first attempt; namely, I had booted prior to selecting the disk as the startup volume, which froze indefinitely at the login screen. This created a cache file which prevented Setup Assistant from being able to start.<br /><br />The cache is located in <code><span style="color: rgb(102, 255, 255);">/Library/Caches/LaunchServices/com.apple.LaunchServices-0140.csstore</span></code>. There may be several with different trailing numbers depending on how many times you attempted to boot. Remove these files. Upon reboot, Setup Assistant will launch.<br /><br />Setup Assistant will also not launch unless a file located in <code><span style="color: rgb(102, 255, 255);">/var/db/.AppleSetupDone</span></code> is missing. This file contains the registration information for your Mac. Removing it will allow you to re-register any Mac, although you may also edit the file if you simply want to change your name or address. If the file exists, remove it.<br /><br /><br />Several errors may be present due to the copying of the /etc and /usr directories. Most importantly, check that the modes on both directories are correct:<br /><pre><span style="color: rgb(102, 255, 255);">Minimac:/ root# ls -l | grep usr<br />drwxr-xr-x 12 root wheel 408 Nov 23 10:34 usr</span></pre>If they differ, use the following to correct them:<br /><pre><span style="color: rgb(102, 255, 255);">sudo chown -R root:wheel /private/etc /usr<br />sudo chmod 755 /private/etc /usr<br /></span></pre><br />The first time opening Terminal.app, you may be greeted with the following error instead of a prompt:<br /><pre><div><span style="color: rgb(102, 255, 255);">login: PAM Error (line 396): System error</span></div><div><span style="color: rgb(102, 255, 255);">login: Could not determine audit condition</span></div><div><span style="color: rgb(102, 255, 255);"><br /></span></div><div><span style="color: rgb(102, 255, 255);">[Process completed]</span></div></pre>In the Finder, use Go to Folder to navigate to <span style="color: rgb(102, 255, 255);">/usr/bin</span> and drag the <span style="color: rgb(102, 255, 255);">login</span> file to the trash.<br /><br />Sudo may also malfunction, if the <span style="color: rgb(102, 255, 255);">/etc/sudoers</span> file does not exist or its mode is wrong. The correct mode is 0440.<br /><br />Depending on how long you remain logged in and allow the caches and databases to propagate, you should be be prompted with various updates and security fixes, during installation of which you should watch /var/log/system.log for possible errors.<br /><br />You will now have a working, out-of-the-box installation of Mac OS X.Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com0tag:blogger.com,1999:blog-6725531552842282349.post-16500664507480415132010-03-18T08:35:00.000-07:002010-04-14T21:15:13.539-07:00Disable the Screen Sharing menu icon<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix5nkRCTwvhq2j2piA-QILrnsG7hcCf3FTd0oGEuUPs73TV8qo8VcBeWePz8L2V5wySAtQo-LoiORrzWRThNx7dVLc0IG_AmUMJwfXBze-BPMX5s6DXvXmtf_iKSfO4cqL-M2vgY1Yb01H/s1600-h/VNC-icon.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 375px; height: 76px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix5nkRCTwvhq2j2piA-QILrnsG7hcCf3FTd0oGEuUPs73TV8qo8VcBeWePz8L2V5wySAtQo-LoiORrzWRThNx7dVLc0IG_AmUMJwfXBze-BPMX5s6DXvXmtf_iKSfO4cqL-M2vgY1Yb01H/s400/VNC-icon.png" alt="" id="BLOGGER_PHOTO_ID_5451111721579800834" border="0" /></a>Whether your boss has requested you keep an eye on a coworker or you just want to spy on your little brother, the menu icon that alerts users of your watchful presence can be an annoyance and a dead giveaway.<br /><br />There are two ways to disable it. If you are using Apple Remote Desktop (ARD) to control Screen Sharing, you may simply hide it:<br /><code><span style="color: rgb(102, 255, 255);">sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -clientopts -setmenuextra -menuextra no</span></code><br /><br />If you are not using ARD, this will not work and you will have to remove the icon manually. The configuration is located in <code><span style="color: rgb(102, 255, 255);">/System/Library/CoreServices/Menu Extras/RemoteDesktop.menu</span></code>. You can either rename it, remove it completely or change its permissions to 000.<br /><br />This will also work with any of the items in the Menu Extras directory, such as the volume, clock, or Fast User Switching menu.Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com4tag:blogger.com,1999:blog-6725531552842282349.post-2217067319000955702010-03-18T07:41:00.000-07:002010-04-26T10:04:15.894-07:00Customizing the OS X login screen<b>Changing the Background<br /></b>The background image can be changed by simply replacing the file. In Leopard, the default background is located in <code><span style="color: rgb(102, 255, 255);">/System/Library/CoreServices/DefaultDesktop.jpg</span></code>. In Tiger, the file is <code><span style="color: rgb(102, 255, 255);">/Library/Desktop Pictures/Aqua Blue.jpg</span></code>. Rename the default to a different name and copy your file of choice over the original file.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlJ5uF_b18ToaK1kbgSe5J_yBwF8hZ_CJJIXrKeEK_W8FRMTZ-h8Ibsi84Mx9yZIXGm4MO_s85WBI2aiEWjqwD0ZJHiQ7_evgxiQQEU6P1N-8Bvs2XWILsAIjDVnAerSwkdMu5EOF2XLxt/s1600-h/login-bg.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 267px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlJ5uF_b18ToaK1kbgSe5J_yBwF8hZ_CJJIXrKeEK_W8FRMTZ-h8Ibsi84Mx9yZIXGm4MO_s85WBI2aiEWjqwD0ZJHiQ7_evgxiQQEU6P1N-8Bvs2XWILsAIjDVnAerSwkdMu5EOF2XLxt/s400/login-bg.png" alt="" id="BLOGGER_PHOTO_ID_5451105007490412642" border="0" /></a><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><b>Customizing Users</b><br />There are many tweaks one can make to the user list. Say you want to create an invisible user only accessible via SSH. Or to hide all users with certain UIDs, or hide the Other user once the root account has been enabled.<br /><br />First, if you mess up something too badly, it is always possible to remove your edits by using<br /><code><span style="color: rgb(102, 255, 255);">defaults delete /Library/Preferences/com.apple.loginwindow</span></code> and<br /><code><span style="color: rgb(102, 255, 255);">defaults delete /Library/Preferences/com.apple.loginwindow HiddenUsersList</span></code> to delete users you may have hidden. Any value using TRUE may also be reversed by substituting FALSE and vice-versa.<br /><br />To hide a user from the login window, use:<br /><code><span style="color: rgb(102, 255, 255);">defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add 'jason'</span></code><br />You can use the user's UID instead as well. The user will also no longer appear in the Fast User Switching menu once someone has logged in.<br /><br />To hide all users with UIDs under 500 -- e.g. root and the built-in Guest account:<br /><code><span style="color: rgb(102, 255, 255);">defaults write /Library/Preferences/com.apple.loginwindow Hide500Users -bool TRUE</span></code><br /><br />To hide the Other user:<br /><code><span style="color: rgb(102, 255, 255);">defaults write /Library/Preferences/com.apple.loginwindow SHOWOTHERUSERS_MANAGED -bool FALSE</span></code><br /><br />Do not try and hide all your users as this will cause the login window to be unfunctional. The login screen with the three examples shown above:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGtuuFkRuSzbAnR3JFtgTDfIdzcd9Gw4wYX6TJXxDUOG2vjc8I2W0lnUUJbckGGWRd25SiOzt7v4C3LCy6vg2F_NRZk_G6nfU2ZWuXR7goyy2KIfQ40DZm-410keYq9wHuw-ulmVusPBhG/s1600-h/login-nousers.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 267px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGtuuFkRuSzbAnR3JFtgTDfIdzcd9Gw4wYX6TJXxDUOG2vjc8I2W0lnUUJbckGGWRd25SiOzt7v4C3LCy6vg2F_NRZk_G6nfU2ZWuXR7goyy2KIfQ40DZm-410keYq9wHuw-ulmVusPBhG/s400/login-nousers.png" alt="" id="BLOGGER_PHOTO_ID_5451108165063813250" border="0" /></a>Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com0tag:blogger.com,1999:blog-6725531552842282349.post-38276865362877151302010-03-17T17:29:00.000-07:002012-11-09T13:39:08.219-08:00Editing Mac OS X menus and Preference PanesThere is always that one smart mystery student in the lab who manages
to bypass the Parental Controls and mess with the machine settings, or
keeps shutting them down at inconvenient times just to annoy. While
settings such as showing the Shut Down option in the login screen
exist, removing it from the menu once the user has logged in do not. If
they have managed to access the System Preferences, this option can be
unchecked anyway.<br />
<br />
<br />
<table>
<tbody>
<tr>
<td valign="top"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihysa2SiXcMoKcN0MqtZs1DkqtCab6aUJaOdUrGQEi7KFAA3Y2m94qXf5eSZgTuP18dqPzW-cqgdEgTKIPwB20iY65Dq0B-gsqLpnEvoY5QOfIchlQD0o_mmvtOJ5hxfkwa_0XNBYGtJi9/s1600-h/tiger-menu.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5450883508090449202" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihysa2SiXcMoKcN0MqtZs1DkqtCab6aUJaOdUrGQEi7KFAA3Y2m94qXf5eSZgTuP18dqPzW-cqgdEgTKIPwB20iY65Dq0B-gsqLpnEvoY5QOfIchlQD0o_mmvtOJ5hxfkwa_0XNBYGtJi9/s400/tiger-menu.png" style="cursor: pointer; float: left; height: 317px; margin: 0pt 10px 10px 0pt; width: 231px;" /></a>
</td>
<td valign="top"><span style="font-size: 100%;"><b>Editing the
Main Menu</b></span><br />
OS X's user interface is entirely composed of .plist and .xib files,
both of which are text. Although generally difficult to find, in theory
it is possible to change the appearance of nearly anything. Always make
a copy of the entire .nib directory in case something goes wrong, since
displacing a single line could render your Finder unusable.
<br />
The interface file for the Main Menu is located in <span style="color: #66ffff;">/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/<br />
HIToolbox.framework/Versions/A/Resources/English.lproj/StandardMenus.nib/</span><br />
<br />
If you are using a different language, change the English.lproj
appropriately. </td>
</tr>
</tbody>
</table>
<br />
<table border="0" cellpadding="2" cellspacing="2" style="text-align: left; width: 100%;">
<tbody>
<tr>
<td style="vertical-align: top;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8gsUOwnlmdN2hT7UUgfWCVkfVcYYVbsDyPuGK0thjySF3fGnibP1btXCyTZE9DPVGcLwdiQLCsji3ZuZYGJEO5ZBMAii7kiZWMnBZNVQpW0q2vUzxc8oBwIGSnG1aerFDkaN8aE8DWNEW/s1600-h/edit-menu.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5450883373029459874" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8gsUOwnlmdN2hT7UUgfWCVkfVcYYVbsDyPuGK0thjySF3fGnibP1btXCyTZE9DPVGcLwdiQLCsji3ZuZYGJEO5ZBMAii7kiZWMnBZNVQpW0q2vUzxc8oBwIGSnG1aerFDkaN8aE8DWNEW/s400/edit-menu.png" style="cursor: pointer; float: left; height: 290px; margin: 0pt 10px 10px 0pt; width: 400px;" /></a></td>
<td style="vertical-align: top;">The file to be edited is <span style="color: #66ffff;">objects.xib</span>.
Any
command-line, text-based or XML editor will work; I am using vi.
Locate the section of the file containing the object to be removed; you
will notice that there are two different sections for Restart and Shut
Down. Remove both.</td>
</tr>
</tbody>
</table>
<br />
<table border="0" cellpadding="2" cellspacing="2" style="text-align: left; width: 100%;">
<tbody>
<tr>
<td style="vertical-align: top;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT1tgzE_PKxerTEHIgzSOXg4TBzOHEKMbkDzYX_5Z0FOB27LPnTYGOKgK7YH5d2VSBMFTn0UPE4QJNOEyYxUl-eDI-1Hsb2bdM_GCpbY08-rG690dIWUzHZlsWCByYXgqpAkzcdXMpABAW/s1600/edit-menu-lion.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT1tgzE_PKxerTEHIgzSOXg4TBzOHEKMbkDzYX_5Z0FOB27LPnTYGOKgK7YH5d2VSBMFTn0UPE4QJNOEyYxUl-eDI-1Hsb2bdM_GCpbY08-rG690dIWUzHZlsWCByYXgqpAkzcdXMpABAW/s400/edit-menu-lion.png" width="400" /></a></div>
</td>
<td style="vertical-align: top;">UPDATE: For 10.7 users (Lion), you will also need to remove the
"Reference" line at the bottom of the file, corresponding to the ID #
of the object you are removing. In the above example, the object ID is "284". The ID numbers will vary depending on the version of OS X.</td>
</tr>
</tbody>
</table>
<br />
You will need to log out and back in before any changes will take
effect. You can in fact remove everything in the menu, including Log
Out and Force Quit.<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<b>Editing the Preference Panes<br />
<br />
<br />
</b>
<br />
<table border="0" cellpadding="2" cellspacing="2" style="text-align: left; width: 100%;">
<tbody>
<tr>
<td style="vertical-align: top;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf3nxsS0E_bIB3fQp5h7upXoSW5bwBrctk4Y4AJnRy8T6VkREA7AN16osdVu8aJT1njjXLQQYNz7K1ZzjsDRpAP3uBK6oXPOURxJ4PuPAx6dwEmaTZzPlOSic6EveHsLImy0YWSkSBknuU/s1600-h/Remote-Login-Enabled.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5450890084698363234" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf3nxsS0E_bIB3fQp5h7upXoSW5bwBrctk4Y4AJnRy8T6VkREA7AN16osdVu8aJT1njjXLQQYNz7K1ZzjsDRpAP3uBK6oXPOURxJ4PuPAx6dwEmaTZzPlOSic6EveHsLImy0YWSkSBknuU/s400/Remote-Login-Enabled.png" style="cursor: pointer; float: left; height: 328px; margin: 0pt 10px 10px 0pt; width: 400px;" /></a></td>
<td style="vertical-align: top;">A Preference Pane is the
individual icon related to a particular
configuration within System Preferences. What if you have a paranoid
coworker who insists on disabling SSH and VNC, making your job as
sysadmin much more difficult when his machine crashes? Or someone who
keeps changing the Energy Saver settings, having it shut down before
the company-wide backups are made at midnight?</td>
</tr>
</tbody>
</table>
<br />
There are two possible ways to modify a Preference Pane -- removing it
altogether, or simply changing components within it. You want the
coworker to be able to control his Printer Sharing, but not his Remote
Access.<br />
<br />
<span style="font-weight: bold;">These particular instructions will
work only with Leopard or later.</span><br />
<br />
The configuration for the default Preference Panes is located in <span style="color: #66ffff;">/System/Library/PreferencePanes</span>,
while those for custom applications will be in <span style="color: #66ffff;">/Library/PreferencePanes</span>.
The file for the Remote Login service in particular is located in <span style="color: #66ffff;">/System/Library/PreferencePanes/SharingPref.prefPane/Contents/Resources/servicelist.xml</span>.<br />
<br />
<table border="0" cellpadding="2" cellspacing="2" style="text-align: left; width: 100%;">
<tbody>
<tr>
<td style="vertical-align: top;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVCh5cMOtKQo9qsVZXa-_6Atm2n1atAJhy2U-P8DywCTRhypJajmxi67KwU7o9PE6I2LJgwSlTGpdlzN7ulNnYLvaaMcz8CIQhC4CcgTNBcK4hiXvAKS692fG8it69zvoOfwTo0qW6EykZ/s1600-h/Remote-Login-plist-file.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5450890768439261698" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVCh5cMOtKQo9qsVZXa-_6Atm2n1atAJhy2U-P8DywCTRhypJajmxi67KwU7o9PE6I2LJgwSlTGpdlzN7ulNnYLvaaMcz8CIQhC4CcgTNBcK4hiXvAKS692fG8it69zvoOfwTo0qW6EykZ/s400/Remote-Login-plist-file.png" style="cursor: pointer; float: left; height: 291px; margin: 0pt 10px 10px 0pt; width: 400px;" /></a></td>
<td style="vertical-align: top;"><br />
<br />
<br />
<br />
Locate the <span style="color: #66ffff;"> </span> <span style="color: #66ffff;"> </span>enclosed<span style="color: #66ffff;"></span> service to disable in the
xml file and remove it. You will see that the service no longer appears
in the Sharing list:<br />
<br />
<br /></td>
</tr>
</tbody>
</table>
<br />
<table border="0" cellpadding="2" cellspacing="2" style="text-align: left; width: 100%;">
<tbody>
<tr>
<td style="vertical-align: top;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd7rwpKaQP8Yi_9QLSNesMyR8ojeuV9k2L5TNpyjUS3YtP-GQ3KhylSRtWi5n5DWbZKky38FfFl0WkClq_KlqR6DG-897zEo42KfkBHqKn_fgxXpTPcFWjKe0YSG0DrVAR4hBVdyE37Eg0/s1600-h/Remote-Login-disabled.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5450890695217998338" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd7rwpKaQP8Yi_9QLSNesMyR8ojeuV9k2L5TNpyjUS3YtP-GQ3KhylSRtWi5n5DWbZKky38FfFl0WkClq_KlqR6DG-897zEo42KfkBHqKn_fgxXpTPcFWjKe0YSG0DrVAR4hBVdyE37Eg0/s400/Remote-Login-disabled.png" style="cursor: pointer; float: left; height: 328px; margin: 0pt 10px 10px 0pt; width: 400px;" /></a></td>
<td style="vertical-align: top;"><br />
<br />
<br />
By removing the <span style="color: #66ffff;">SharingPref.prefPane</span>
directory, or changing its permissions to 000, it will disappear from
the System Preferences entirely.</td>
</tr>
</tbody>
</table>
<br />
<br />Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com1tag:blogger.com,1999:blog-6725531552842282349.post-42402943856823844402010-03-08T08:17:00.000-08:002010-04-26T10:10:02.786-07:00Use VNC on an existing X displayVNC can be incredibly useful, particularly in a work environment where a troubled coworker could be in an entirely separate subdivision of the building. Mac OS X's proprietary implementation of VNC, known as Screen Sharing, will allow control of whoever is logged in at the moment, while under Linux starting a VNC server will create an entirely new X session independent of anyone already using the machine.<br /><br />In order to use VNC on Linux in the same way as Screen Sharing, we can use a small VNC server called <span style="color: rgb(204, 255, 255);"><a href="http://sourceforge.net/projects/libvncserver/files/x11vnc/0.9.9/"><span style="font-weight: bold;">x11vnc</span>.</a></span> This link is a standard tarball; there may also be a binary distribution available at the <b><span style="color: rgb(204, 255, 255);"><a href="http://www.karlrunge.com/x11vnc/faq.html#faq-binaries">x11vnc website</a></span></b>.<br /><br />To start the VNC server, use:<br /><span style="color: rgb(204, 255, 255);"><code>x11vnc -rfbauth ~/.vnc/passwd -display :0 -auth guess</code></span><br /><br />If you have used VNC before, ~/.vnc/passwd will already exist. If not, you can use <span style="color: rgb(204, 255, 255);"><code>vncpasswd</code></span> to generate one.<br /><br />The <b>auth</b> switch will depend on your display manager. If you are using <span style="color:#99ffff;">xinit,</span> <span style="color:#99ffff;"><code>-auth guess</code></span> should be able to detect the current session cookie, but if you are using GDM you will have to provide it manually.<br /><br />If you are using xinit and x11vnc cannot detect the cookie, running<span style="color: rgb(204, 255, 255);"><code> ps auxw | grep serverauth</code></span> will return something similar to<br /><code><span style="color: rgb(204, 255, 255);">xinit /etc/X11/xinit/xinitrc -- /usr/bin/X :0 -auth /home/drsavoye/<b>.serverauth.3033</b></span></code><br /><b>/home/drsavoye/.serverauth.3033</b> will replace the <b>guess</b> parameter.<br /><br />If you are using GDM, the cookie can be found by running <span style="color: rgb(204, 255, 255);"><code>ps auxw | grep cookie</code></span>, which will return<br /><span style="color: rgb(204, 255, 255);"><code>/usr/bin/Xorg :0 -br -verbose -auth /var/run/gdm/auth-cookie-XX756E9U-for-gdm -nolisten tcp</code></span><br /><b>/var/run/gdm/auth-cookie-XX756E9U-for-gdm</b> will replace the <b>guess</b> parameter.<br /><br />Now, on the client side, you can use whichever VNC viewer you choose.Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com0tag:blogger.com,1999:blog-6725531552842282349.post-28445834266149603212010-03-04T17:59:00.000-08:002010-03-05T12:57:36.347-08:00Disabling / enabling SSH timeout<span style="color: rgb(204, 255, 255);"><code>Read from remote host ariel.localhost: Connection reset by peer<br />Connection to ariel.localhost closed.</code></span><br /><br />There are two ways to prevent SSH from timing out when left idle. The first is on the server, the second on the client. Both require editing the SSH config file.<br /><br />The configuration is split between two files: On Linux, /etc/ssh/ssh_config and /etc/ssh/ssh<b>d</b>_config. On OS X, they tend to reside in /etc/ssh_config and /etc/ssh<b>d</b>_config. ssh_config is the configuration for the SSH program itself on the <b>client</b>, while sshd_config is the configuration for the SSH daemon on the <b>server.</b><br /><br />On the server machine uncomment, or add if it does not exist, the line:<br /><span style="color: rgb(204, 255, 255);"><code>ClientAliveInterval 60</code></span><br /><br />On the client side, the line is:<br /><span style="color: rgb(204, 255, 255);"><code>ServerAliveInterval 60</code></span><br /><br />The interval is in seconds, so you may specify any time period you like. On the server side, this defines the timeout interval after which no data has been received from the client that it should send a quick poke to request a response from the idle client. If the interval is set to 0, or the line does not exist, these messages will not be sent.<br /><br />Similarly, on the client side, the interval is how often it should send a message to the server indicating that the connection is still active.<br /><br />You must restart the sshd daemon after editing the file.<br />On Linux:<br /><span style="color: rgb(204, 255, 255);"><code>/etc/init.d/sshd restart</code></span><br /><br />and on OS X: <span style="color: rgb(204, 255, 255);"><code>launchctl unload /System/Library/LaunchDaemons/ssh.plist</code></span> and<br /><span style="color: rgb(204, 255, 255);"><code>launchctl load /System/Library/LaunchDaemons/ssh.plist</code></span><br /><br />You can also restart sshd on OS X by unchecking and rechecking the box in System Preferences:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi7EHiH_K8AZF-hkCg9WwvHf1ze-8EFV1CpiVVgKtVc8T4FqPWH51GaH9_M9bOu-v5Fn_3iqOiS2OS-Q5V0Lw6VWRWr7jYZ7WKNEKTL_yTDyAsYM4iiOKufv6ATzZxl1FVH9uM4fT4z8yz/s1600-h/mac-remote-login-box.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 247px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi7EHiH_K8AZF-hkCg9WwvHf1ze-8EFV1CpiVVgKtVc8T4FqPWH51GaH9_M9bOu-v5Fn_3iqOiS2OS-Q5V0Lw6VWRWr7jYZ7WKNEKTL_yTDyAsYM4iiOKufv6ATzZxl1FVH9uM4fT4z8yz/s400/mac-remote-login-box.png" alt="" id="BLOGGER_PHOTO_ID_5444968891194255906" border="0" /></a>Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com0tag:blogger.com,1999:blog-6725531552842282349.post-58360066767342370232010-02-26T09:10:00.000-08:002010-02-26T13:31:28.835-08:00How to enable text-only boot in newer Fedora versionsUpgrading for the first time to Fedora 10, I was disappointed to see that my runlevel settings did not seem to carry over through the upgrade, and had to hit Esc in order to see the kernel messages.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmV0E6qNkqXmslh-OYLX2bRPmUoXX2iktLvoBa3y7qU-SzCSSXJQbSNYWlm6vbHQ76rmsVLKK6Lv3ZJuHPytvchIRkCoUeiHFBEYW8a4VQQEGxtMD64LqRfFozpjdqkuou1qP9ph1htLdP/s1600-h/Fedora10bar.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 28px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmV0E6qNkqXmslh-OYLX2bRPmUoXX2iktLvoBa3y7qU-SzCSSXJQbSNYWlm6vbHQ76rmsVLKK6Lv3ZJuHPytvchIRkCoUeiHFBEYW8a4VQQEGxtMD64LqRfFozpjdqkuou1qP9ph1htLdP/s400/Fedora10bar.png" alt="" id="BLOGGER_PHOTO_ID_5442604450222821698" border="0" /></a><br /><br /><br />Fedora 10+ distributions have replaced the anaconda bootloader with plymouth, which is not affected by /etc/inittab, although setting the runlevel will still determine the appearance of the login prompt. In order to disable this bar, you must instead edit /etc/grub.conf or /boot/grub/grub.conf, the former being a symbolic link to the latter.<br /><br />Remove <b>rhgb quiet</b> from the boot parameters:<br /><span style="color: rgb(204, 255, 255);"><pre><span class="color">title Fedora (2.6.27.5-117.fc10.i686)<br /> root (hd0,9)<br /> kernel /boot/vmlinuz-2.6.27.5-117.fc10.i686 ro root=LABEL=/ <b>rhgb quiet</b><br /> initrd /boot/initrd-2.6.27.5-117.fc10.i686.img</span></pre></span><br />Fedora 10+ also comes with a pretty animated boot sequence instead of the progress bar. To enable it, you must add <b>vga=</b> with the appropriate framebuffer resolution to the boot parameters. To find the framebuffer resolution, use the following table:<br /><br /><pre><span style="color: rgb(204, 255, 255);">Colours 640x480 800x600 1024x768 1280x1024 1600x1200<br />--------+---------------------------------------------<br />256 | 769 771 773 775 796<br />32,768 | 784 787 790 793 797<br />65,536 | 785 788 791 794 798<br />16.8M | 786 789 792 795 799</span></pre><code></code>To enable the graphical boot in in plymouth, add the vga resolution to /etc/grub.conf. <b>vga=792</b> is the standard resolution for most modern monitors. Although the<code> <span style="color: rgb(204, 255, 255);">xrandr</span></code> command can show your current screen resolution if you don't know it or it isn't listed, I have had trouble getting plymouth to accept non-standard resolutions, such as those on widescreen laptops. However, the resolution you set will affect only the boot screen and not the GDM/X11 display, so it is purely aesthetic entertainment while you wait for it to boot.<br /><span style="color: rgb(204, 255, 255);"><pre><span class="color">title Fedora (2.6.27.5-117.fc10.i686)<br /> root (hd0,9)<br /> kernel /boot/vmlinuz-2.6.27.5-117.fc10.i686 ro root=LABEL=/ <b>rhgb quiet vga=792</b><br /> initrd /boot/initrd-2.6.27.5-117.fc10.i686.im</span></pre></span>Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com0tag:blogger.com,1999:blog-6725531552842282349.post-67818544970764097782010-02-26T08:58:00.001-08:002010-02-26T13:24:45.229-08:00Enabling the root account in Mac OS XBy default the root account is disabled under Mac OS X, replaced by the first user created during the installation, who although is granted some administrator priviledges, can accomplish very little other than application installation and basic access management. To use many of the UNIX tools or do much with the Terminal, the root account must be enabled.<br /><br />To enable it, use <font style="color: rgb(204, 255, 255);"><code>sudo su</code></font> while logged in as an administrative user, and if you have not enabled NOPASSWD sudo commands, you will be prompted for your password. Now use <font style="color: rgb(204, 255, 255);"><code>passwd<br /></code></font>to change the root password; it does not have to be the same as the administrator password.<br /><br />Once the account is enabled, it will show up as "Other" in the login window.<br />Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com0tag:blogger.com,1999:blog-6725531552842282349.post-45637768908387794612010-02-26T07:43:00.000-08:002010-03-18T22:19:54.267-07:00Why does SSH refuse my RSA publickey?After successfully generating RSA keys and copying the public key to the remote authorized_hosts, I have encountered many times a message like this when trying to ssh in:<br /><span style="color: rgb(204, 255, 255);"><br /></span><code><span style="color: rgb(204, 255, 255);"> Executing: program /usr/bin/ssh host<br />office-minimac, user (unspecified), command scp -v -t<br />~/.ssh/authorized_keys<br />OpenSSH_5.1p1, OpenSSL 0.9.8g 19 Oct 2007<br />debug1: Reading configuration data /etc/ssh/ssh_config<br />debug1: Applying options for *<br />debug1: Connecting to office-minimac [192.168.2.103] port 22.<br />debug1: Connection established.<br />debug1: identity file /home/drsavoye/.ssh/identity type -1<br />debug1: identity file /home/drsavoye/.ssh/id_rsa type 1<br />debug1: identity file /home/drsavoye/.ssh/id_dsa type -1<br />debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3<br />debug1: match: OpenSSH_4.3 pat OpenSSH_4*<br />debug1: Enabling compatibility mode for protocol 2.0<br />debug1: Local version string SSH-2.0-OpenSSH_5.1<br />debug1: SSH2_MSG_KEXINIT sent<br />debug1: SSH2_MSG_KEXINIT received<br />debug1: kex: server->client aes128-cbc hmac-md5 none<br />debug1: kex: client->server aes128-cbc hmac-md5 none<br />debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent<br />debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP<br />debug1: SSH2_MSG_KEX_DH_GEX_INIT sent<br />debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY<br />debug1: Host 'office-minimac' is known and matches the RSA host key.<br />debug1: Found key in /home/drsavoye/.ssh/known_hosts:1<br />debug1: ssh_rsa_verify: signature correct<br />debug1: SSH2_MSG_NEWKEYS sent<br />debug1: expecting SSH2_MSG_NEWKEYS<br />debug1: SSH2_MSG_NEWKEYS received<br />debug1: SSH2_MSG_SERVICE_REQUEST sent<br />debug1: SSH2_MSG_SERVICE_ACCEPT received<br />debug1: Authentications that can continue:<br />publickey,gssapi-with-mic,password<br />debug1: Next authentication method: gssapi-with-mic<br />debug1: Unspecified GSS failure. Minor code may provide more<br />information<br />No credentials cache found<br /><br />debug1: Unspecified GSS failure. Minor code may provide more<br />information<br />No credentials cache found<br /><br />debug1: Unspecified GSS failure. Minor code may provide more<br />information<br /><br /><br />debug1: Next authentication method: publickey<br />debug1: Trying private key: /home/drsavoye/.ssh/identity<br />debug1: Offering public key: /home/drsavoye/.ssh/id_rsa<br />debug1: Authentications that can continue:<br />publickey,gssapi-with-mic,password<br />debug1: Trying private key: /home/drsavoye/.ssh/id_dsa<br />debug1: Next authentication method: pa</span><span style="color: rgb(204, 255, 255);">ssword<br />drsavoye@office-minimac's password:</span><br /></code><br />This happens when the permissions of the .ssh directory or any of its items are incorrect. Commonly the mode of the .ssh directory itself will be set to 775 or 777; setting group write permissions on any of the files will cause this effect. The correct permissions of the .ssh directory:<br /><pre><span style="color: rgb(204, 255, 255);">~/.ssh{drsavoye@ushuaia} pts/4$ ls -la<br />total 40<br /></span><span style="font-weight: bold; color: rgb(204, 255, 255);">drwxr-xr-x</span><span style="color: rgb(204, 255, 255);"> 2 drsavoye drsavoye 4096 feb 26 08:31 .<br /></span><span style="font-weight: bold; color: rgb(204, 255, 255);">drwxr-xr-x</span><span style="color: rgb(204, 255, 255);"> 143 drsavoye drsavoye 20480 feb 26 08:31 ..<br /></span><span style="font-weight: bold; color: rgb(204, 255, 255);">-rw-r--r--</span><span style="color: rgb(204, 255, 255);"> 1 drsavoye drsavoye 408 feb 25 22:01 authorized_keys<br /></span><span style="font-weight: bold; color: rgb(204, 255, 255);">-rw-------</span><span style="color: rgb(204, 255, 255);"> 1 drsavoye drsavoye 1671 feb 25 22:01 id_rsa<br /></span><span style="font-weight: bold; color: rgb(204, 255, 255);">-rw-r--r--</span><span style="color: rgb(204, 255, 255);"> 1 drsavoye drsavoye 405 feb 25 22:01 id_rsa.pub<br /></span><span style="font-weight: bold; color: rgb(204, 255, 255);">-rw-r--r--</span><span style="color: rgb(204, 255, 255);"> 1 drsavoye drsavoye 810 feb 25 22:01 known_hosts<br /></span></pre><br />If they differ, use <span style="color: rgb(204, 255, 255);"><code>chmod 755 ~/.ssh</code></span> and <span style="color: rgb(204, 255, 255);"><code>chmod 644 ~/.ssh/*</code></span> to correct them.<br /><br /><span style="color: rgb(255, 0, 0);">Tip: </span>using <span style="color: rgb(153, 255, 255);"><code>ssh -vvv {host}</code></span> will return this verbose output.Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com0tag:blogger.com,1999:blog-6725531552842282349.post-57196473423089941492010-02-25T07:45:00.000-08:002010-04-26T10:07:37.309-07:00Why do shared Excel workbooks open as Read-Only on OS X sometimes?Most often seen in office and company environments that use Macs, on occasion a certain user will be unable to edit a shared Office document. Because it's shared, the document keeps track of the UID of each user curently accessing it. If two users possessing the same UID try to edit it at the same time, the second one will get locked out because Office thinks they already have it open.<br /><br />Since the default UID on Macs is 501 and progresses by 1 for each additional user, this ends up being quite a mess the more Macs that need to access it.<br /><br />Microsoft's official solution is to use networked user accounts, but this is not always possible depending on what kind of work environment you are in. An easier fix is to change the problem user's UID. Luckily, this is fairly simple using OS X's built-in `dscl` command, although also very simple to make a mistake with.<br /><br />You can see a list of the currently used UIDs by typing<br /><span style="color: rgb(204, 255, 255);"><code>dscl . -list /Users UniqueID | awk '$2 > 400' </code></span><br /><br />Which will return:<br /><pre><span style="color: rgb(204, 255, 255);">administrator 501<br />apple 502<br />drsavoye 503</span><br /></pre><br />By using this on all machines, you can immediately see which users match UIDs, even if the usernames don't match.<br /><br />To change a UID, use<span style="color: rgb(204, 255, 255);"><code> dscl . -delete /Users/drsavoye UniqueID</code></span> and <span style="color: rgb(204, 255, 255);"><code>dscl . -create /Users/drsavoye UniqueID 604<br /><br /></code></span>Generally you will want to use a higher number to ensure that it does not fall within the range of the Mac's default UIDs. Now you must change the UID on the user's home directory as well. If you miss this step, the user will not be able to access or create any files.<br /><br />By using <span style="color: rgb(204, 255, 255);"><code>ls -l /Users</code></span>, you will see that the directory "drsavoye" is now shown as <span style="color: rgb(204, 255, 255);"><code>drwxr-xr-x 15 503 staff</code></span> or similar, because the recorded owner (drsavoye) doesn't match the new UID (604). To update it, you can either use<br /><span style="color: rgb(204, 255, 255);"><code> chmod -R drsavoye:staff /Users/drsavoye</code></span>, or<br /><span style="color: rgb(204, 255, 255);"><code> chmod -R 604:staff /Users/drsavoye</code></span><br /><br />That's it! You should now be able to access all your Office documents. You may have to use `sudo` in order to use dscl if you are not authenticated as root.Dr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com0tag:blogger.com,1999:blog-6725531552842282349.post-74692295104984223282010-02-19T21:24:00.001-08:002010-02-26T13:23:20.066-08:00Test Postblal<br />fklsfksdfsdlfksd lfmskld mfkls mklsmdfksmd kl<br />s fsdm fklsm fkmsk mf sfmls fsldmf mslfmsd<br /><br />skfsDr Savoyehttp://www.blogger.com/profile/07105386499186512546noreply@blogger.com0