<?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>intuitive engineering &#187; cygwin</title>
	<atom:link href="http://dougmunsinger.com/tag/cygwin/feed" rel="self" type="application/rss+xml" />
	<link>http://dougmunsinger.com</link>
	<description>doug munsinger</description>
	<lastBuildDate>Mon, 07 Jun 2010 16:44:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>virtuawin and clipx&#8230;</title>
		<link>http://dougmunsinger.com/2008/09/virtuawin-and-clipx.html</link>
		<comments>http://dougmunsinger.com/2008/09/virtuawin-and-clipx.html#comments</comments>
		<pubDate>Wed, 03 Sep 2008 04:46:04 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[UNIX & Windows]]></category>
		<category><![CDATA[cygwin]]></category>

		<guid isPermaLink="false">http://dougmunsinger.com/?p=286</guid>
		<description><![CDATA[&#160; I tested a large number of clipboard history managers in windows, as well as several virtual desktop programs. There are two programs in KDE and one functionality I use all the time. In order to at least have some semblance of a sane working environment and not feel completely crippled in using Windows, duplicating [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>I tested a large number of clipboard history managers in windows, as well as several virtual desktop programs.  There are two programs in KDE and one functionality I use all the time.  In order to at least have some semblance of a sane working environment and not feel completely crippled in using Windows, duplicating this on windows was important to me.  </p>
<p>Konsole &#8211; the KDE terminal program &#8211; can be duplicated by <a href="2008/08/console2.html" title="console2 article">console2</a>, with UNIX functionality added in on the backend by <a href="http://www.cygwin.com/" title="cygwin">Cygwin</a>. </p>
<p> Klipper, KDE&#8217;s clipboard and history program &#8211; to duplicate that functionality would require a searchable clipboard history available instantly.  By default Windows has nothing like this.  I tested a large number of programs before finding what worked best for me &#8211; <a href="http://bluemars.org/clipx/" title="clipx">clipx</a>.  </p>
<p>Some minor glitches &#8211; if the history setting is very large (800 plus entries) bringing it up for use can take several minutes.  The solution is to set a reasonable history &#8211; 250 entries seems to be workable.  The history is brought up by shift-ctrl-F3, and then searching is typing text within the search field in that window.  Pasting depends on the windows program behavior &#8211; each individual program seems to be different.  Sometimes clicking &#8220;paste&#8221; in the window will actually paste text in &#8211; for other programs it sets the current clipboard to that entry &#8211; but you will still need to shift-ins or right-click or whatever to actually paste. </p>
<p>&nbsp;</p>
<p><a href="../../../images/posts/2008/clipx_lg.jpg" title="clipx screenshot" rel="lightbox"><img src="../../../images/posts/2008/clipx.jpg" title="clipx screenshot" alt="clipx screenshot"/></a></p>
<p>This has some of the same risks as a clipboard history in KDE and your .bash_history file &#8211; if your system is compromised (hacked), data is kept available to be perused and used.  Some caution is in order,  be aware of this. </p>
<p>Multiple desktops &#8211; I had tried the desktop utility that came with the Windows Resource Kits back when I had a Microsoft Tech Net subscription (a long-time-ago).  I tried various other free desktop products including a java-based program in the last several years. They mostly all worked but either had some odd way of reordering and dropping windows when shut down, or didn&#8217;t follow my method of working closely enough to be really useful.  </p>
<p>One of the desktop programs &#8211; I can&#8217;t recall which, it didn&#8217;t stay on the machine very long &#8211; was unpredictable in behavior and occasionally made windows unusable. It required a reset of the machine to resolve, either a three finger salute (ctrl-alt-del) or a hard reset by holding the power button for ten seconds until it powered down. </p>
<p><a href="http://virtuawin.sourceforge.net/" title="virtuawin virtual desktops for windows">virtuawin</a> has turned out to be stable in over two years of use and to provide much of the functionality of UNIX desktops in KDE.  I set up hot-keys to have ctrl-alt-1 bring up desktop #1, ctrl-alt-2 desktop #2, etc.  I&#8217;ve been using a two-headed windows machine (two 1650&#215;1400 LCD screens), and this hasn&#8217;t been as necessary as in the past. It still comes in very handy on a single head desktop or laptop. </p>
<p>&nbsp;</p>
<p><img src="../../../images/posts/2008/screen_1.jpg" title="first screen virtuawin" alt="1st screen"/><img src="../../../images/posts/2008/screen_2.jpg" title="second screen virtuawin" alt="2nd screen"/><img src="../../../images/posts/2008/screen_3.jpg" title="third screen virtuawin" alt="3rd screen"/></p>
<p>&nbsp;</p>
<p>&mdash; dsm</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dougmunsinger.com/2008/09/virtuawin-and-clipx.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TERM=vt220</title>
		<link>http://dougmunsinger.com/2008/08/termvt220.html</link>
		<comments>http://dougmunsinger.com/2008/08/termvt220.html#comments</comments>
		<pubDate>Sat, 30 Aug 2008 01:41:56 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[UNIX & Windows]]></category>

		<guid isPermaLink="false">http://dougmunsinger.com/?p=254</guid>
		<description><![CDATA[&#160; console2 with cygwin bash shell and ssh behind it (and a lot of other UNIX commands too, like ls, and find and grep and awk and gpg&#8230;) has turned out to be a good solution. I discovered that cygwin sets the terminal as TERM=cygwin. That plays hell with vi on SUN servers. I found [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p><a href="http://sourceforge.net/projects/console/" title="console2">console2</a> with <a href="http://www.cygwin.com/" title="cygwin">cygwin</a> bash shell and ssh behind it (and a lot of other UNIX commands too, like ls, and find and grep and awk and gpg&#8230;) has turned out to be a good solution.</p>
<p>I discovered that cygwin sets the terminal as TERM=cygwin.  That plays hell with vi on SUN servers.  I found that setting &#8220;export TERM=vt220&#8243;  in .profile (this is SUN Solaris 10) resolved vi, getting the console2 window to show the display correctly, and letting the arrow keys work again.</p>
<p>A second gotcha &#8211; DON&#8217;T set ctrl-c as copy in the hot-keys.  That ctrl-c you use to break out of errant commands or scripts stops working at all, very disconcerting.  Instead map  shift-ctrl-c.  There&#8217;s an alpha feature enabling tranparency &#8211; looks cool, but isn&#8217;t stable.  Ctrl-r (history searching in bash) is mapped to renaming the tabs for console windows &#8211; you&#8217;ll set that to ctrl-alt-n as below and resolve that. </p>
<p>Here are the settings in console2 I&#8217;ve found to come very close to what I use in Konsole in KDE:</p>
<ul>
<li>base underneath is cygwin &#8211; therefore need &#8220;export TERM=vt220&#8243; in .profile to have vi behave on SUN &#8211; run on command line initially to test and to edit .profile&#8230;</li>
<li>add &#8220;c:\cygwin\bin to path in control panel -> system -> advanced -> environmental variables</li>
<li>console:</li>
<ul>
<li>shell is c:\cygwin\bin\bash.exe</li>
<li>working directory is c:\</li>
<li>buffer size Rows is 5000, columns is 0 </li>
</ul>
<li>appearance:</li>
<ul>
<li>more &#8211; set tabs to always be present (uncheck &#8220;hide single tab&#8221;)</li>
</ul>
<li>behavior:</li>
<ul>
<li>check copy on select</li>
<li>check clear selection on copy</li>
<li>select UNIX LF</li>
</ul>
<li>map hotkeys to emulate konsole</li>
<ul>
<li>shift-left for previous window</li>
<li>shift-right for next</li>
<li>ctrl-alt-n for new windows</li>
<li>ctrl-alt-s for rename</li>
<li>shift-up arrow for line up</li>
<li>shift-arrow down for line down</li>
<li>shift-page-up for page up</li>
<li>shift-page-down for page down </li>
<li>shift-ctrl-c for copy</li>
<li>ctrl-v for paste</li>
</ul>
<li>mouse:</li>
<ul>
<li>right button to paste</li>
<li>set copy on select</li>
<li>left button to select</li>
<li>copy/clear selection is &#8220;none&#8221; </li>
</ul>
<li>tabs:</li>
<ul>
<li>set shell as C:\cygwin\bin\bash.exe</li>
<li>working directory is C:\ </li>
</ul>
</ul>
<p>&nbsp;</p>
<p>&mdash; dsm </p>
<p>&nbsp;</p>
<hr/>
<p>&nbsp;</p>
<p><b>UPDATE 20080904:</b> I installed console2 on all of my windows machines (dual boot, except for work).  It worked perfectly &#8211; then a co-worker tried it out and had issues.  He searched and found that  in some instances cygwin&#8217;s bash shell refused to complete loading and never returns a command prompt.  The solution looks to be a reinstall or upgrade of cygwin, or possibly some difference in the way cygwin was installed.  </p>
<p>I laughed and said, &#8220;It works for me.&#8221;</p>
<p>He said, &#8220;You can tell when you work in an IT shop &#8211; when something fails for someone,  you always get that response &#8211; &#8220;It works for me.&#8221;"  </p>
<p>&nbsp;</p>
<h2>Update 20090329 Sunday</h2>
<p>export TERM=ansi</p>
<p>I installed eclipse with Remote System Explorer.  vt220 caused VI to fail to refresh (at least SUN&#8217;s crippled vi version).  ansi worked much better within RSE.</p>
<p>&mdash; doug</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dougmunsinger.com/2008/08/termvt220.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>console2&#8230;</title>
		<link>http://dougmunsinger.com/2008/08/console2.html</link>
		<comments>http://dougmunsinger.com/2008/08/console2.html#comments</comments>
		<pubDate>Fri, 29 Aug 2008 03:11:53 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[UNIX & Windows]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://dougmunsinger.com/?p=239</guid>
		<description><![CDATA[&#160; My ideal workstation to manage UNIX servers is kubuntu, running KDE. I recently did a day of off-site work. I used a laptop running exactly that environment. I fell back in love with the terminal program Konsole. There are two primary reasons I use KDE instead of Gnome in the desktop wars. Konsole, and [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>My ideal workstation to manage UNIX servers is kubuntu, running KDE. </p>
<p>I recently did a day of off-site work.  I used a laptop running exactly that environment.  I fell back in love with the terminal program Konsole.  There are two primary reasons I use KDE instead of Gnome in the desktop wars.  Konsole, and the ctrl-n for a new tab window, ctrl-s to name that tab, and shift-left / shift-right to move between windows, and Klipper, the searchable, expandable clipboard utility that by default appears in the system tray. And the select-and-copy, middle mouse button paste default behavior, that too, but that&#8217;s not KDE, that&#8217;s UNIX itself. </p>
<p>I could use kubuntu for the day because I was NOT expected to access email, nor did I need access to the change management software.  I didn&#8217;t need access to internal sites that require Internet Explorer.  Just for a day I could be a UNIX wonk.  </p>
<p><a id="return"></a>Today, two days later, I&#8217;m feeling the loss.  I have a linux workstation.  From that workstation I have access to the systems I need to work with.  What I don&#8217;t have is email access, Internet Explorer, access to the change management ticketing system, and on and on.  I end up using the Windows XP workstation right next to it out of expediency.  I CAN copy and paste data out of the ticketing system.  I CAN create Microsoft Project updates.  I CAN access the internal Instant Messaging system, I CAN get direct access to email, without switching systems <a href="#synergy" title="synergy - a different solution">[1]</a>&#8230; Windows centric is windows centric.  </p>
<p>My taskbar in windows is three labels deep.  This is to accommodate the 15 to 25 or more ssh sessions running each in a separate window that appear by the end of each day.  Each labeled with the name of the server to which it is connected.  Finding a specific window, or in some cases another window to the same server, is a nightmare.  I realized today that easily 60% to 80% of the clutter on the taskbar is ssh sessions.  I looked out of desperation for KDE to run on windows.  It does.  Sort of&#8230;</p>
<p>A long time ago (2 years?) I found a KDE windows installer that ran on top of cygwin, as long as X11 was fully installed and configured.   I got it all working together in a giant balancing act maybe twice.  The package for KDE was never updated.  The development took off on another direction, <a href="http://windows.kde.org/" title="KDE on Windows">the KDE on Windows project</a>.  But that brief taste&#8230;  It was good.  Strange, seeing the full KDE desktop running within the Windows desktop.  But within that environment I had Konsole, <a href="http://bluemars.org/clipx/" title="clipx - close to klipper">Klipper</a>, <a href="http://virtuawin.sourceforge.net/" title="virtuaWin multiple desktop utility">multiple desktops</a>.  </p>
<p>I&#8217;ve been watching KDE on Windows for a while now.  I tried it maybe a year ago.  The installation process was a number of independent steps, all eerily reminiscent of configuring and recompiling a kernel.  I completed about four steps, and determined to wait and watch and see where the project went.  I waited.  I downloaded and installed a version today &#8211; not bad.  Once it completed installing I went to look for Konsole&#8230;   Uh Oh.</p>
<p>Not there?! WTF?</p>
<p>I&#8217;m not the only one who wanted this.  In searching for Konsole, or a way to install Konsole, I found that Konsole as written is deeply dependent on the whole UNIX X11 environment, and I found <a href="http://sourceforge.net/projects/console" title="console2 on sourceforge">console2</a>. Interesting.  And after mapping a few hot-keys, I have a very close approximation of Konsole, running in windows.  I added C:\cygwin\bin to my path, configured console2 to start with C:\cygwin\bin\bash.exe, and with cygwin providing the ssh binary, I can reduce my taskbar to two labels high instead of three.  Very nice.  </p>
<p>I still miss an agnostic work environment where provisions are made to make sure UNIX users can do corporate stuff too (imap or pop for email, evolution or web access for calendaring, a browser-based access to tickets, etc.).  But this is good coping.  </p>
<p><a href="../../../images/posts/2008/console2_720.jpg" title="console2 screenshot" rel="lightbox"><img src="../../../images/posts/2008/console2_160.jpg" title="screenshot of console2" alt="screenshot of console2"/></a></p>
<p>&nbsp;</p>
<p>&mdash; dsm </p>
<p>&nbsp;</p>
<p><a id=synergy></a></p>
<p>&nbsp;</p>
<p>Synergy&#8230; Another path to a solution.</p>
<p>There is a partial solution I&#8217;ve been playing around with at home &#8211; <a href="http://synergy2.sourceforge.net/" title="synergy website">synergy</a>.  This program allows sharing keyboard and mouse between systems.  Just put the separate monitors next to one another, assign one system as server and the other or others as secondary, tell it where the monitors are in relation to each other, start the server, connect a client, and go.  It copys and syncs the clipboard between systems, which makes it a different approach to solving the same problems. </p>
<p> It does require two separate computers, two separate monitors, and a bit of effort&#8230; </p>
<p><a href="#return" title="return to article">return to article</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dougmunsinger.com/2008/08/console2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>stupid shell (and UNIX) tricks</title>
		<link>http://dougmunsinger.com/2008/07/stupid-shell-and-unix-tricks.html</link>
		<comments>http://dougmunsinger.com/2008/07/stupid-shell-and-unix-tricks.html#comments</comments>
		<pubDate>Tue, 29 Jul 2008 23:52:49 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[shell]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[bash shell]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">https://dougmunsinger.com/?p=97</guid>
		<description><![CDATA[I love using abobe photoshop C2&#8242;s automation &#8211; especially when resizing a series of images for the web. I would love to run linux entirely &#8211; but linux keeps falling short in graphics programs (yes, I use gimp &#8211; sorry, but Photoshop is better) and printer drivers &#8211; linux still can&#8217;t run my Canon Pixma [...]]]></description>
			<content:encoded><![CDATA[<p>I love using abobe photoshop C2&#8242;s automation &#8211; especially when resizing a series of images for the web.  I would love to run linux entirely &#8211; but linux keeps falling short in graphics programs (yes, I use gimp &#8211; sorry, but Photoshop is better) and printer drivers &#8211; linux still can&#8217;t run my Canon Pixma pro 9000 color printer.  That and every corporation I do work for has some required program or access method that seems to insist on only running on windows. </p>
<p> That said, while all operating systems suck to some degree, Windows consistently manages to suck more than most.  Cygwin supplements Windows pathetic command line with a bash shell and a lot of UNIX functionality.  </p>
<p>When you run adobe batch scripting to resize a series of jpg&#8217;s and then save them in a different directory as gif files, it insists on writing &#8220;copy&#8221; in the file name.  photograph1.jpg becomes &#8220;photograph1 copy.gif&#8221;.  To remove the &#8221; copy&#8221; string, run:</p>
<p><code>$ for i in *<br />
> do<br />
> mv "$i" "${i/\ copy.gif}".gif<br />
> done </code></p>
<p>sed and awk</p>
<p>One of the instructors I had in UNIX system administration courses was&#8230; How to put this&#8230; One brick short of a wall.  He was supposed to include sed and awk UNIX commands i the course, and he glossed over them as &#8220;something you would never use, trust me&#8221;.  A couple of years later, when I needed and had to learn the commands, I thoroughly realized he was very wrong. </p>
<p>I had to rename a series of website pages in a site redesign &#8211; including altering the names inside the pages themselves.  Here&#8217;s how I did it.</p>
<p> Here&#8217;s the command that changed one set of links from the old page to the new:</p>
<p><code><br />
for i in ` grep photographs_5.html * | awk -F : '{ print $1 }'`<br />
do<br />
echo $i<br />
sed  's/photographs_5.html/photographs_001.html/g' &lt; $i &gt; $i.1<br />
mv ${i}.1 ${i}<br />
done<br />
</code></p>
<p>This loops through and finds any files with the string &#8220;photographs_5.html&#8221; <br/><br />
echos out each file, changes (using the sed command, standard UNIX tool&#8230;) from photographs_5.html to photographs_001.html, creating a new file named [file].1,<br/><br />
then replacing the original file by moving (mv) the [file].1 file over on top of the [file].</p>
<p>I love UNIX.  Both of these were done on Windows using the bash shell in <a href="http://www.cygwin.com/" title="cygwin">cygwin</a>.  This supplies basic UNIX functionality to Windows, including the bash shell, sed and awk, ssh and rsync (by selecting the package), wget and gpg (extra package selection), and many other functions.  The setup program downloads a list, within which you can select additional packages, download and install.</p>
<p>Cygwin at least makes Windows somewhat command line friendly.</p>
<p>&mdash;dsm</p>
]]></content:encoded>
			<wfw:commentRss>http://dougmunsinger.com/2008/07/stupid-shell-and-unix-tricks.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.536 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-07-29 18:53:07 -->
