<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mac OS X &#8211; Johnny Morano&#039;s Tech Articles</title>
	<atom:link href="https://jmorano.moretrix.com/category/mac-os-x/feed/" rel="self" type="application/rss+xml" />
	<link>https://jmorano.moretrix.com</link>
	<description>Ramblings of an old-fashioned space cowboy</description>
	<lastBuildDate>Tue, 04 Sep 2012 07:01:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>

<image>
	<url>https://jmorano.moretrix.com/wp-content/uploads/2022/04/cropped-jmorano_emblem-32x32.png</url>
	<title>Mac OS X &#8211; Johnny Morano&#039;s Tech Articles</title>
	<link>https://jmorano.moretrix.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Finder and Samba share support</title>
		<link>https://jmorano.moretrix.com/2011/07/finder-samba-share-support/</link>
					<comments>https://jmorano.moretrix.com/2011/07/finder-samba-share-support/#respond</comments>
		
		<dc:creator><![CDATA[Johnny Morano]]></dc:creator>
		<pubDate>Tue, 26 Jul 2011 13:22:30 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[UNIX]]></category>
		<guid isPermaLink="false">http://jmorano.moretrix.com/?p=658</guid>

					<description><![CDATA[I&#8217;ve answered a question on StackOverflow (actually on SuperUser) regarding Finder and Samba shares on Ubuntu Linux. It&#8217;s&#8230;]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve answered a question on StackOverflow (actually on SuperUser) regarding Finder and Samba shares on Ubuntu Linux. It&#8217;s only Ubuntu which has this problem, Finder works perfect with Samba when that Samba is installed on Debian, CentOS, &#8230;</p>
<p><a href="https://jmorano.moretrix.com/go/adfadfweradf/" title="Finder and Samba Shares" target="_blank">http://superuser.com/questions/283863/force-finder-to-log-in-as-guest-to-a-smb-share/300382#300382</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://jmorano.moretrix.com/2011/07/finder-samba-share-support/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Connect your home and company networks with OpenVPN</title>
		<link>https://jmorano.moretrix.com/2011/06/connect-your-home-and-company-networks-with-openvpn/</link>
					<comments>https://jmorano.moretrix.com/2011/06/connect-your-home-and-company-networks-with-openvpn/#respond</comments>
		
		<dc:creator><![CDATA[insaniac]]></dc:creator>
		<pubDate>Wed, 22 Jun 2011 14:27:41 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[IPTables]]></category>
		<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[OpenVPN]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<guid isPermaLink="false">http://jmorano.moretrix.com/?p=618</guid>

					<description><![CDATA[Introduction OpenVPN is an opensource Virtual Private Networking (VPN) solution which can be downloaded freely on the Internet.&#8230;]]></description>
										<content:encoded><![CDATA[<h4>Introduction</h4>
<p><a href="http://www.openvpn.net/">OpenVPN</a> is an opensource Virtual Private Networking (VPN) solution which can be downloaded freely on the Internet. It also included in almost every Linux distro to-date, so it can be easily installed using your distro&#8217;s favourite package manager tools. It uses the SSL/TLS VPN stacks, which makes it different from almost every other VPN solution (which are usually based on IPSec).</p>
<p>This guide will described how OpenVPN can be installed and configured on a Debian system, so that it can be used as a means to connect to your home and company networks. </p>
<p><span id="more-618"></span></p>
<h4>The Server</h4>
<p>First install the openvpn package:</p>
<pre class="brush:bash"># apt-get install openvpn</pre>
<p>If apt-get suggests extra packages to install, just install them!</p>
<p>Two networks will be created:<br />
* one to create a secure network for servers: 192.168.1.0/24<br />
* one to create a secure network of client PC&#8217;s, Macbooks, Linux desktops, &#8230; : 10.66.99.0/24</p>
<p>Next, we will need an OpenVPN configuration file for the OpenVPN we&#8217;re about to create:</p>
<pre class="brush:bash">
.oO( ieyasu | /etc/openvpn )Oo. cat server.conf 
# LIKE A BOSS
local 176.9.64.17
port 1194
proto udp
dev tun0

mode server
tls-server

persist-key
persist-tun

#certificates and encryption
ca ca.crt
cert ieyasu.crt
key ieyasu.key
dh dh2048.pem
tls-auth ta.key 0
cipher AES-256-CBC
comp-lzo

server 192.168.1.0 255.255.255.0
route  10.66.99.0 255.255.255.0

ifconfig-pool-persist ipp.txt
push "route 10.66.99.0 255.255.255.0"

# separate client configs
client-config-dir ccd

#log and security
user nobody
group nogroup
keepalive 5 30
status /var/log/openvpn-status.log
verb 3
</pre>
<p>We will also need some firewall rules allowing our OpenVPN traffic:</p>
<pre class="brush:bash">
$IPTABLES -A INPUT   -i tun0 -s 192.168.1.0/24 -d 192.168.1.0/24 -j ACCEPT
$IPTABLES -A INPUT   -i tun0 -s 10.66.99.0/24  -d 192.168.1.1    -j ACCEPT
$IPTABLES -A INPUT   -i tun0 -s 10.66.99.0/24  -d 10.66.99.0/24  -j ACCEPT

$IPTABLES -P FORWARD DROP
$IPTABLES -A FORWARD -i tun0 -s 10.66.99.0/24  -d 192.168.1.1    -j ACCEPT
$IPTABLES -A FORWARD -i tun0 -s 10.66.99.0/24  -d 10.66.99.0/24  -j ACCEPT
$IPTABLES -A FORWARD -i tun0 -s 192.168.1.0/24 -d 192.168.1.0/24 -j ACCEPT

$IPTABLES -A INPUT -p udp --dport 1194 -j ACCEPT
</pre>
<p>Now we need to create a CCD file for each client. The CCD file contains the network settings for the connection OpenVPN clients.<br />
Example:</p>
<pre class="brush:bash">
.oO( ieyasu | ~ )Oo. cat /etc/openvpn/ccd/bear
ifconfig-push 192.168.1.11 192.168.1.12
.oO( ieyasu | ~ )Oo. cat /etc/openvpn/ccd/lion
ifconfig-push 10.66.99.3 10.66.99.4
</pre>
<p>The final thing to do for the OpenVPN server, is to create the x509 certificates.</p>
<p>First:</p>
<pre class="brush:bash">
# mkdir /etc/openvpn/easy-rsa/
# cp -R /usr/share/doc/openvpn/examples/easy-rsa/2.0/* /etc/openvpn/easy-rsa/
</pre>
<p>This will copy the required tools for creating the certificates for both the server as the clients.</p>
<p>Next, specify your information in /etc/openvpn/easy-rsa/vars, only the bottom is of real importance:</p>
<pre class="brush:bash">
vi /etc/openvpn/easy-rsa/vars
*snip*
# These are the default values for fields
# which will be placed in the certificate.
# Don't leave any of these fields blank.
export KEY_COUNTRY="BE"
export KEY_PROVINCE="LIM"
export KEY_CITY="As"
export KEY_ORG="MORETRIX"
export KEY_EMAIL="info@moretrix.com"
</pre>
<p>Finally we will create the CA and the server certificate (we&#8217;re making a 2048 one!):</p>
<pre class="brush:bash">
# cd /etc/openvpn/easy-rsa/
# chown -R root:admin .
# chmod g+w .
# source ./vars
# ./clean-all
# ./build-dh
# ./pkitool --initca
# ./pkitool --server server
# cd keys
# openvpn --genkey --secret ta.key
# cp server.crt server.key ca.crt dh2048.pem ta.key ../../
</pre>
<p>Finally we just need to start the OpenVPN service and the server is ready!</p>
<pre class="brush:bash">
# /etc/init.d/openvpn restart
</pre>
<h4>The Clients</h4>
<p>Every client will need his own x509 certificate:</p>
<pre class="brush:bash">
# cd /etc/openvpn/easy-rsa
# ./pkitool bear
</pre>
<p><strong>bear</strong> is the name of the client host.</p>
<p>Now create a client configuration file, let&#8217;s call it <em>bear.conf</em> and we&#8217;ll save in it <em>/tmp/client_config/</em>:</p>
<pre class="brush:bash">
client
dev tun
remote 176.9.64.17 1194
nobind
resolv-retry infinite
persist-key
persist-tun
ca ca.crt
cert bear.crt
key bear.key
tls-auth ta.key 1
cipher AES-256-CBC
comp-lzo
verb 3
</pre>
<p>Finally grab all the files the client will need</p>
<pre class="brush:bash">
# cd /etc/openvpn/easy-rsa/keys/
# cp ca.crt ta.key bear.crt bear.key /tmp/client_config/
# cd /tmp/client_config/
# ls -ltr
total 24
-rw------- 1 root root  636 Jun 22 16:17 ta.key
-rw-r--r-- 1 root root 1537 Jun 22 16:17 ca.crt
-rw-r--r-- 1 root root 5053 Jun 22 16:17 bear.crt
-rw------- 1 root root 1704 Jun 22 16:17 bear.key
-rw-r--r-- 1 root root  185 Jun 22 16:17 bear.conf
</pre>
<p>If the client also uses the OpenVPN command line tools, just copy the above files to /etc/openvpn and restart the openvpn service.</p>
<pre class="brush:bash">
root@bear:/etc/openvpn# ls -ltr
total 28
-rwxr-xr-x 1 root root 1357 2011-03-11 02:03 update-resolv-conf
-rw-r--r-- 1 root root  636 2011-06-20 22:40 ta.key
-rw-r--r-- 1 root root 1537 2011-06-20 22:40 ca.crt
-rw-r--r-- 1 root root 1704 2011-06-20 22:40 bear.key
-rw-r--r-- 1 root root 5053 2011-06-20 22:40 bear.crt
-rw-r--r-- 1 root root  185 2011-06-21 20:13 bear.conf
root@bear:/etc/openvpn# /etc/init.d/openvpn restart
</pre>
<h4>Resources</h4>
<p>* <a href="https://help.ubuntu.com/community/OpenVPN">https://help.ubuntu.com/community/OpenVPN</a><br />
* <a href="http://openvpn.net/index.php/open-source/documentation/howto.html">http://openvpn.net/index.php/open-source/documentation/howto.html</a><br />
* <a href="http://openvpn.net/index.php/open-source/documentation/miscellaneous/76-ethernet-bridging.html">http://openvpn.net/index.php/open-source/documentation/miscellaneous/76-ethernet-bridging.html</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://jmorano.moretrix.com/2011/06/connect-your-home-and-company-networks-with-openvpn/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Recovering Subject column in Apple&#8217;s Mail.app</title>
		<link>https://jmorano.moretrix.com/2011/04/recovering-subject-column-in-apples-mail-app/</link>
					<comments>https://jmorano.moretrix.com/2011/04/recovering-subject-column-in-apples-mail-app/#respond</comments>
		
		<dc:creator><![CDATA[insaniac]]></dc:creator>
		<pubDate>Sun, 03 Apr 2011 11:58:07 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[Mail.app]]></category>
		<guid isPermaLink="false">http://jmorano.moretrix.com/?p=568</guid>

					<description><![CDATA[This weekend I had to install an Apple update, which seems to have updated the Mail.app. This new&#8230;]]></description>
										<content:encoded><![CDATA[<p>This weekend I had to install an Apple update, which seems to have updated the Mail.app.<br />
This new update caused the <a href="http://widemailplugin.com/">WideMail plugin</a> not to work anymore (and so it got disabled). Normally this shouldn&#8217;t cause any problems, unless the software the poorly written. So the next time I&#8217;ve started the Mail.app, the Subject column was missing. I couldn&#8217;t even enable it anymore in View -> Columns.</p>
<p>After the browsing the Internet a little bit, I have found this solution:</p>
<ol>
<li>Exit Mail.app</li>
<li>In Terminal.app enter the command:</li>
<pre class="brush:shell">defaults delete com.apple.mail TableColumns</pre>
<li>Start Mail.app</li>
</ol>
<p>Now you should see the Subject column again, although it is still missing from View -> Columns.</p>
<p>You could of course also install the updated version of <a href="http://widemailplugin.com/">WideMail</a>&#8230;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jmorano.moretrix.com/2011/04/recovering-subject-column-in-apples-mail-app/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Bash and the Screen</title>
		<link>https://jmorano.moretrix.com/2011/03/bash-and-the-screen/</link>
					<comments>https://jmorano.moretrix.com/2011/03/bash-and-the-screen/#comments</comments>
		
		<dc:creator><![CDATA[insaniac]]></dc:creator>
		<pubDate>Tue, 08 Mar 2011 13:17:03 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[Screen]]></category>
		<category><![CDATA[UNIX]]></category>
		<guid isPermaLink="false">http://jmorano.moretrix.com/?p=522</guid>

					<description><![CDATA[Beauty and the Beast When working in a UNIX/Linux/MacOSX environment, the command is often used to execute some&#8230;]]></description>
										<content:encoded><![CDATA[<h3>Beauty and the Beast</h3>
<p>When working in a UNIX/Linux/MacOSX environment, the command is often used to execute some tasks. The default shell in the <a href="http://en.wikipedia.org/wiki/Apple_Terminal">Terminal.app</a> (MacOSX) and in most other terminals, is the <a href="http://www.gnu.org/software/bash/">Bourne Again Shell</a> aka bash.</p>
<p>Bash is intended to be a conformant implementation of the Shell and Utilities portion of the IEEE POSIX specification. Bash also incorporates useful features from the Korn and C shells (ksh and csh).</p>
<p><a href="http://www.gnu.org/software/screen/">Screen</a> is a full-screen text-based window manager with VT100/ANSI terminal emulation. It has the ability to detach shell sessions, which is extremely useful for executing remote processes or executing processes that should be terminated after log out or termination of the shell process itself.<br />
<span id="more-522"></span></p>
<h3>my ~/.bashrc</h3>
<p>First we start off with configuration the Bash configuration file, which is located at ~/.bashrc for the current user or at /etc/bashrc.bashrc for system-wide configurations. </p>
<p>Most users will just edit their own bashrc file.<br />
The options defined in this file, have comments above them so I won&#8217;t re-explain them.</p>
<pre class="brush:bash">
# define your local timezone
export TZ='Europe/Brussels'

# If not running interactively, don't do anything
[ -z "$PS1" ] &amp;&amp; return

# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups
# ... and ignore same sucessive entries.
export HISTCONTROL=ignoreboth

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] &amp;&amp; eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] &amp;&amp; [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# define all aliases in a separate file
if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# turn on bash completion, must be installed separately
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

# define some colors which will be used in PS1 and PS2
BLUE="[�33[0;34m]"
LIGHT_GRAY="[�33[0;37m]"
GREEN="[�33[0;32m]"
LIGHT_BLUE="[�33[1;34m]"
LIGHT_CYAN="[�33[1;36m]"
YELLOW="[�33[1;33m]"
WHITE="[�33[1;37m]"
RED="[�33[0;31m]"
NO_COLOUR="[�33[0m]"

# if this shell was started in the screen command, use a different PS1 prompt
if [[ $TERM =~ screen ]] ; then
    PS1="${GREEN}.oO( $BLUEh $GREEN|$BLUE w $GREEN)Oo"'[�33k][�33\]'".$NO_COLOUR "
else
    PS1="${GREEN}.oO( $BLUEh $GREEN|$BLUE w $GREEN)Oo.$NO_COLOUR "
fi
PS2="$GREEN.oO($NO_COLOUR "</pre>
<p>This local bashrc file enables some default settings and creates a fancy bash prompt in colour. (See screenshot)</p>
<p><img decoding="async" src="https://jmorano.moretrix.com/wp-content/uploads/2011/03/Screenshot-insaniac@musashi.moretrix.com-home-insaniac-1.png" alt="Screen Shell Prompt" /></p>
<p>Next we&#8217;ll set up the Screen configuration file.</p>
<h3>my ~/.screenrc</h3>
<p>The following Screen configuration file sets some options that I find useful. These options included:</p>
<ul>
<li>no splash screen at startup</li>
<li>no visual bell</li>
<li>a customized status bar at the bottom of the screen</li>
<li>a huge scrollback buffer</li>
<li>updated window names, based on the current command</li>
<li>UTF8 encoding</li>
</ul>
<p>The file will be saved in the user home directory, at ~/.screenrc</p>
<pre class="brush:bash">
# some default settings
startup_message off
vbell off
msgwait 1
defutf8 on
compacthist on

# Monitor windows
defmonitor on
activity ""

# Turns off alternate screen switching in xterms,
# so that text in screen will go into the xterm's scrollback buffer:
termcapinfo xterm* ti@:te@
altscreen on

# Enable 256 color terminal
attrcolor b ".I"
termcapinfo xterm 'Co#256:AB=E[48;5;%dm:AF=E[38;5;%dm'
defbce "on"

# Log 10000 lines
defscrollback 50000

backtick 2 60 60 echo $USERNAME

screen 0

shelltitle '. |bash'
hardstatus alwayslastline '%{= .y}.oO(%{= .b}%2`@%H%{= .y})Oo. %{= .b}%{+} %= %-w %{= .yb} %n:[%t] %{= db} %+w %{= .y}time: [%c]'

bindkey -k k2 screen                                    # F2  | Create new window
bindkey -k k3 prev                                      # F3  | Previous Window
bindkey -k k4 next                                      # F4  | Next Window
register r "^a:source $HOME/.screenrc^M"                #     | Goes with F5 definition
bindkey -k k5 process r                                 # F5  | Reload profile
bindkey -k k6 detach                                    # F6  | Detach from this session
bindkey -k k7 copy                                      # F7  | Enter copy/scrollback mode
register t "^aA^aa^k^h"                                 #     | Goes with the F8 definition
bindkey -k k8 process t                                 # F8  | Re-title a window
</pre>
<p>In order to have updated window names, it is important that the above Bash configuration regarding the PS1 variable, has been enabled. If not, then there will be no updated window names!</p>
<p>This configuration file was used to create the following screenshot:<br />
<img decoding="async" src="https://jmorano.moretrix.com/wp-content/uploads/2011/03/Screenshot-johnny@ubuntu-sunray1-Dev-Elop.png" alt="Screenshot Screen with 3 open windows" /></p>
<h3>References</h3>
<p>Some options were taken out of the <a href="https://launchpad.net/byobu">Byobu</a> configuration file, others were found on the <a href="http://www.google.com/">Interweb</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://jmorano.moretrix.com/2011/03/bash-and-the-screen/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Updating Darwin ports on Mac OS X</title>
		<link>https://jmorano.moretrix.com/2010/08/updating-darwin-ports-on-mac-os-x/</link>
		
		<dc:creator><![CDATA[insaniac]]></dc:creator>
		<pubDate>Sun, 29 Aug 2010 13:48:09 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[MacOSX]]></category>
		<guid isPermaLink="false">http://jmorano.moretrix.com/?p=250</guid>

					<description><![CDATA[MacOSX can install and upgrade your favourite UNIX and Linux packages. The Darwin Ports project (http://darwinports.com/) was created&#8230;]]></description>
										<content:encoded><![CDATA[<p>MacOSX can install and upgrade your favourite UNIX and Linux packages. The Darwin Ports project (<a title="Darwin Ports Project" href="http://darwinports.com/" target="_blank">http://darwinports.com/</a>) was created to help in these tasks.</p>
<p>First we need to update the list of updates available on the internet:</p>
<pre class="brush:shell">$ sudo su -
# /opt/local/bin/port -d selfupdate</pre>
<p>Secondly, we update the already installed Darwin ports:</p>
<pre class="brush:shell"># /opt/local/bin/port upgrade outdated</pre>
<p>This process might take a long while, depending on the amount of ports you have installed. But after this process, all the installed Darwin ports will be upgraded.</p>
<p>Finally, we can also install new packages using the port command:</p>
<pre class="brush:shell"># /opt/local/bin/port install mc</pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
