<?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>Allen Pomeroy &#187; mac</title>
	<atom:link href="http://www.networkforensics.us/tag/mac/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.networkforensics.us</link>
	<description>Blog of an IT security specialist  .: beta :.</description>
	<lastBuildDate>Sun, 07 Feb 2010 18:06:34 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Accessing Ubuntu desktop from Mac Snow Leopard</title>
		<link>http://www.networkforensics.us/2010/02/accessing-ubuntu-desktop-from-mac-snow-leopard/</link>
		<comments>http://www.networkforensics.us/2010/02/accessing-ubuntu-desktop-from-mac-snow-leopard/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 18:06:34 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=109</guid>
		<description><![CDATA[Accessing my Ubuntu 9.04 Gnome desktop from the built in Mac OS X 10.6.2 VNC viewer took a bit of tweaking on the Ubuntu Gnome side.  I have an OpenVPN SSL tunnel between the Mac and the Ubuntu desktop, however a SSH tunnel could also be used to protect the VNC session.  In [...]]]></description>
			<content:encoded><![CDATA[<p>Accessing my Ubuntu 9.04 Gnome desktop from the built in Mac OS X 10.6.2 VNC viewer took a bit of tweaking on the Ubuntu Gnome side.  I have an OpenVPN SSL tunnel between the Mac and the Ubuntu desktop, however a SSH tunnel could also be used to protect the VNC session.  In this post, I&#8217;ll just cover the VNC server setup assuming a secure connection between the Mac and the desktop.</p>
<p>Initially I followed the guidance at sanity, inc.&#8221;<a title="mac-screen-sharing-with-linux" href="http://www.sanityinc.com/articles/mac-screen-sharing-with-linux" target="_blank">How to OS X Leopard Screen Sharing with Linux</a>&#8220;, on Ubuntu I installed tightvnc:<br />
<code><br />
apt-get install tightvncserver<br />
</code><br />
Then tested it out by starting up the vnc server on the Ubuntu system as the user I want to run the remote session as:<br />
<code><br />
tightvncserver -geometry 1024x700 -depth 24 :1<br />
</code><br />
As tightvncserver starts up the VNC service, it will check for a .vncpasswd file in the user home directory.  If it doesn&#8217;t exist, you will be prompted for a password to use to protect the remote session.  Note VNC is not designed to be used for multi-user remote access.<br />
On the Mac, rather than use Bonjour to automatically discover the Ubuntu screen sharing service, I just referred to the VNC session directly within Finder  which invokes the built in VNC viewer. Enter the VNC session password when prompted and the Ubuntu desktop is displayed. <a href="http://www.networkforensics.us/wp-content/uploads/2010/02/connect-to-server1.png"><img class="alignright size-full wp-image-112" title="connect-to-server" src="http://www.networkforensics.us/wp-content/uploads/2010/02/connect-to-server1.png" alt="connect-to-server" width="316" height="86" /></a> Within Finder, either use Go -&gt; Connect to Server or Apple-K to bring up the Connect to Server window.  The server address is the URL that points to the Ubuntu VNC instance <code>vnc://10.10.1.2:5901</code> where the port is 5900 + the display number specified when starting up the tightvncserver (5901).</p>
<p>This all worked fantastic, except for the keyboard mapping within Gnome &#8211; it was scrambled.  After googling several possible solutions, the only one that was successful for me was to disable the keyboard plugin in Gnome<br />
<code><br />
<a title="gnome-keyboard-fix" href="https://bugs.launchpad.net/baltix/+source/tightvnc/+bug/112955">Amit Gurdasani  wrote on 2008-04-28:  	  #51</a></code></p>
<blockquote><p>I&#8217;ve also encountered this issue with TightVNC and the hardy release. My solution was to capture the xmodmap -pke output as ${HOME}/.Xmodmap at the login screen (DISPLAY=:0 XAUTHORITY=/var/lib/gdm/:0.Xauth sudo xmodmap -pke &gt; ${HOME}/.Xmodmap). When gnome-settings-daemon starts up and finds an .Xmodmap, it asks if it should be loaded &#8212; I answer yes. As a side effect, if gnome-settings-daemon were to be restarted without the .Xmodmap, it&#8217;d scramble the keyboard layout again. With an .Xmodmap in place, it&#8217;ll load the .Xmodmap every time.</p>
<p>Due to another issue (#199245, gnome-settings-daemon crashing with BadWindow every time a window is mapped), <em><strong>I disabled the keyboard plugin using gconf-editor, at /apps/gnome_settings_daemon/plugins/keyboard.</strong></em> Since it&#8217;s not being loaded, I suspect it might not garble the layout even if I remove the .Xmodmap now.</p>
<p>So maybe disabling the keyboard plugin is a better fix.</p></blockquote>
<p>On the Ubuntu system, invoke the Gnome configuration editor (gconf-editor on command line), then navigate to  apps -&gt; gnome_settings_daemon -&gt; plugins -&gt; keyboard  uncheck the Active keyword.  Kill the VNC daemon and relaunch it &#8211; problem fixed.<br />
<code><br />
pkill vnc<br />
tightvncserver -geometry 1024x700 -depth 24 :1<br />
</code><br />
Various methods exist to automatically start and kill the VNC server, but for now this will do it for me. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2010/02/accessing-ubuntu-desktop-from-mac-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bash_history</title>
		<link>http://www.networkforensics.us/2010/01/bash_history/</link>
		<comments>http://www.networkforensics.us/2010/01/bash_history/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 17:42:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://www.networkforensics.us/?p=103</guid>
		<description><![CDATA[Here&#8217;s some notable cli entries that I refer to occassionally:
Mac OS X:

sudo /usr/sbin/sysctl -w net.inet.ip.fw.enable=1
sudo /sbin/ipfw -q /etc/firewall.conf
sudo ifconfig en0 lladdr 00:1e:c2:0f:86:10
sudo route add -net 10.2.1.0/24 10.3.1.1

Linux:
]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s some notable cli entries that I refer to occassionally:</p>
<p>Mac OS X:<br />
<code><br />
sudo /usr/sbin/sysctl -w net.inet.ip.fw.enable=1<br />
sudo /sbin/ipfw -q /etc/firewall.conf<br />
sudo ifconfig en0 lladdr 00:1e:c2:0f:86:10<br />
sudo route add -net 10.2.1.0/24 10.3.1.1<br />
</code><br />
Linux:</p>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2010/01/bash_history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OS X 10.5 Command Line notes</title>
		<link>http://www.networkforensics.us/2009/06/mac-os-x-command-line-notes/</link>
		<comments>http://www.networkforensics.us/2009/06/mac-os-x-command-line-notes/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 00:24:54 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://blog.networkforensics.us/?p=81</guid>
		<description><![CDATA[Encrypted Filesystems with Sparse Bundles
Mac OS X offers encrypted filesystems through sparse bundles.  To mount up a sparse bundle, given the password used to create the bundle, use the hdiutil:
hdiutil attach -verbose -readonly /path/to/sparse.bundle.directory
This will mount up the sparse bundle located at the directory path specified.  To unmount the sparse bundle, use:
hdiutil detach /Volume/sparse.bundle.name
Adding entries [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Encrypted Filesystems with Sparse Bundles</strong><br />
Mac OS X offers encrypted filesystems through sparse bundles.  To mount up a sparse bundle, given the password used to create the bundle, use the hdiutil:</p>
<blockquote><p>hdiutil attach -verbose -readonly /path/to/sparse.bundle.directory</p></blockquote>
<p>This will mount up the sparse bundle located at the directory path specified.  To unmount the sparse bundle, use:</p>
<blockquote><p>hdiutil detach /Volume/sparse.bundle.name</p></blockquote>
<p><strong>Adding entries to /etc/hosts</strong><br />
Although simply editing /etc/hosts should work, there are times where the new entries may not be recognized, in these cases the OS X name cache daemon needs to be kicked:</p>
<blockquote><p>dscacheutil -flushcache</p></blockquote>
<p><strong>Mac OS X Hostnames</strong><br />
Although you can change the hostname of your Mac OS X device through the System Control Panel -&gt; Sharing, the following command line can lock the name so DHCP and other dynamic networking protocols don&#8217;t mess up your hostname (from <a title="http://ma.tt/2004/07/os-x-hostname/" href="http://ma.tt/2004/07/os-x-hostname/">RichardBronosky</a>):</p>
<blockquote><p>sudo hostname my-permanent-name</p>
<p>sudo scutil –set LocalHostName $(hostname)</p>
<p>sudo scutil –set HostName $(hostname)</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2009/06/mac-os-x-command-line-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Synchronizing directories</title>
		<link>http://www.networkforensics.us/2009/05/synchronizing-directories/</link>
		<comments>http://www.networkforensics.us/2009/05/synchronizing-directories/#comments</comments>
		<pubDate>Sun, 24 May 2009 17:46:52 +0000</pubDate>
		<dc:creator>edhacker</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://blog.networkforensics.us/?p=67</guid>
		<description><![CDATA[Fast way to synchronize the content of your iTunes libraries &#8211; this doesn&#8217;t sync the playlists or any iTunes meta information (and you may need to perform an Add to Library .. to import any new content).  This was just a quick and dirty way to sync up my iTunes downloads with another iTunes [...]]]></description>
			<content:encoded><![CDATA[<p>Fast way to synchronize the content of your iTunes libraries &#8211; this doesn&#8217;t sync the playlists or any iTunes meta information (and you may need to perform an Add to Library .. to import any new content).  This was just a quick and dirty way to sync up my iTunes downloads with another iTunes library at home.  This assumes that you&#8217;ve opened up the ability to Remote Login (ssh) to the target Mac (topic for another time).</p>
<blockquote>
<pre>rsync -av -e ssh "Music/iTunes/iTunes Music/" ahull@10.20.1.103:"/Users/ahull/Music/iTunes/iTunes\ Music"</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.networkforensics.us/2009/05/synchronizing-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
