virtuawin and clipx…

 

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.

Konsole – the KDE terminal program – can be duplicated by console2, with UNIX functionality added in on the backend by Cygwin.

Klipper, KDE’s clipboard and history program – 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 – clipx.

Some minor glitches – 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 – 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 – each individual program seems to be different. Sometimes clicking “paste” in the window will actually paste text in – for other programs it sets the current clipboard to that entry – but you will still need to shift-ins or right-click or whatever to actually paste.

 

clipx screenshot

This has some of the same risks as a clipboard history in KDE and your .bash_history file – if your system is compromised (hacked), data is kept available to be perused and used. Some caution is in order, be aware of this.

Multiple desktops – 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’t follow my method of working closely enough to be really useful.

One of the desktop programs – I can’t recall which, it didn’t stay on the machine very long – 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.

virtuawin 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’ve been using a two-headed windows machine (two 1650×1400 LCD screens), and this hasn’t been as necessary as in the past. It still comes in very handy on a single head desktop or laptop.

 

1st screen2nd screen3rd screen

 

— dsm

 

TERM=vt220

 

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…) 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 that setting “export TERM=vt220″ 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.

A second gotcha – DON’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’s an alpha feature enabling tranparency – looks cool, but isn’t stable. Ctrl-r (history searching in bash) is mapped to renaming the tabs for console windows – you’ll set that to ctrl-alt-n as below and resolve that.

Here are the settings in console2 I’ve found to come very close to what I use in Konsole in KDE:

  • base underneath is cygwin – therefore need “export TERM=vt220″ in .profile to have vi behave on SUN – run on command line initially to test and to edit .profile…
  • add “c:\cygwin\bin to path in control panel -> system -> advanced -> environmental variables
  • console:
    • shell is c:\cygwin\bin\bash.exe
    • working directory is c:\
    • buffer size Rows is 5000, columns is 0
  • appearance:
    • more – set tabs to always be present (uncheck “hide single tab”)
  • behavior:
    • check copy on select
    • check clear selection on copy
    • select UNIX LF
  • map hotkeys to emulate konsole
    • shift-left for previous window
    • shift-right for next
    • ctrl-alt-n for new windows
    • ctrl-alt-s for rename
    • shift-up arrow for line up
    • shift-arrow down for line down
    • shift-page-up for page up
    • shift-page-down for page down
    • shift-ctrl-c for copy
    • ctrl-v for paste
  • mouse:
    • right button to paste
    • set copy on select
    • left button to select
    • copy/clear selection is “none”
  • tabs:
    • set shell as C:\cygwin\bin\bash.exe
    • working directory is C:\

 

— dsm

 


 

UPDATE 20080904: I installed console2 on all of my windows machines (dual boot, except for work). It worked perfectly – then a co-worker tried it out and had issues. He searched and found that in some instances cygwin’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.

I laughed and said, “It works for me.”

He said, “You can tell when you work in an IT shop – when something fails for someone, you always get that response – “It works for me.”"

 

Update 20090329 Sunday

export TERM=ansi

I installed eclipse with Remote System Explorer. vt220 caused VI to fail to refresh (at least SUN’s crippled vi version). ansi worked much better within RSE.

— doug

 

console2…

 

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 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’s not KDE, that’s UNIX itself.

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’t need access to internal sites that require Internet Explorer. Just for a day I could be a UNIX wonk.

Today, two days later, I’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’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 [1]… Windows centric is windows centric.

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…

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, the KDE on Windows project. But that brief taste… It was good. Strange, seeing the full KDE desktop running within the Windows desktop. But within that environment I had Konsole, Klipper, multiple desktops.

I’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 – not bad. Once it completed installing I went to look for Konsole… Uh Oh.

Not there?! WTF?

I’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 console2. 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.

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.

screenshot of console2

 

— dsm

 

 

Synergy… Another path to a solution.

There is a partial solution I’ve been playing around with at home – synergy. 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.

It does require two separate computers, two separate monitors, and a bit of effort…

return to article

decay of structures holding data…

 

I have photographs my grandmother had taken at a photo studio in San Francisco in 1927. I have other photographs of her dancing with a straw hat through fields in Italy taken in the late 1940′s. I don’t have the negatives, but I do have (black and white) prints, that have stood up pretty well.

Take that as a standard. Images still available and visible 81 years later. How many of the digital photographs we take are going to be available that long? A very few. Most of those images I’m pretty sure will be gone. To have it last that long you would have to print it in archival ink on acid-free paper now, and then it would have to survive through the gulf of time the same as my photo from 1927 has.

There are inks that are reputed to be archival, but they haven’t actually stood up to the time they have promised. Paper is a lesser problem, we’ve done archival paper.

Leave those images as digital, don’t print them and the loss will be staggering.

I keep notes and documentation of much of my job. Processes, procedures, configurations, commands, settings, notes on applications, more specific notes on rogue, unusual, non-standard applications. I’ve kept this information since I started.

My first repository for notes and docs was an Access (Microsoft) database. It worked. It was fragile. It corrupted easily. I had to keep multiple backups of the file holding the database. It wasn’t accessible except on the local computer. But it kept me from having to rediscover process and procedure, and in many cases at least gave me a launching point for solving a problem or creating a service.

Why Access? It was there, it had been installed on the windows system I was given. I didn’t know better.

I became more UNIX-centered in time. My workstation became a Sun Sparcstation. I had a laptop running windows for corporate access, but the Sparcstation was my primary tool. It would not run Access (surprise!). I needed to get the data out of Access, into some other format and available via a web browser.

I was doing some perl DBI database work at the time, so over a period of a little over a year – spare time for script and database, and then loads more spare time needed to convert and migrate data out – I put together a website using perl DBI to place and grab text data from a mysql database, then eventually the mysql database was replaced by Postgresql.

That database interface worked. It was quite a lot of program for what was really a set of notes and procedures. Each time I upgraded or rebuilt a server, part of the checklist was to install and bring up postgres, perlDBI, whatever module worked that time with that version of postgres, plus any other dependencies. Import a current sql backup. A lot of work for content that just wasn’t that complicated.

I started using a wiki as a documentation structure – and started using it personally as well. At one point my work switched from twikiwiki to MoinMoin, and I followed along. MoinMoin was written in python, used css and was relatively easy to customize. It was extensively searchable. And it used a directory structure and text-based files instead of a database.

That struck me as right. It really appealed to me. It could be run locally or on a server, and the structure was simple.

The wiki grew into wikis. It grew into a music database, a data CD and DVD database, a movie database, a systems administration database and a personal database. This was all in text and directory structure, really quite cool.

Toward the beginning of using it I wrote a perl script to parse out through the structure and convert pages to text, and to grab and store attachments with them. In other words to make the whole thing readable without any structure, no wiki, no special program needed. Remember, by this time I have converted this into different structures 6 times. This isn’t new.

MoinMoin wiki stayed in development over the last six years. The website is available today. At least, it is so far today.

It was NOT available much of last week, nor the week before that. I don’t know why. Maybe my repeated attempts to get to the site and find out what was happening with the project caused someone to see it was down…

Having the development site unavailable was a shock. I went back, found my MoinMoin-to-text-files script and tested it. Just in case…

Structure tends to decay. Structures holding digital information seem to do this alot.

There’s the personal entropy – having to maintain and keep running the computers that access and serve the digital data. There’s a new version of the operating system, or a different version of the webserver, or a patch that breaks the process. Upgrading a hard drive. I’ve gone from 40 GB to 60GB to 120GB to 250GB to 500GB drives in just my personal systems.

There’s format entropy. My notes went from “.mdb” format to mysql database format to postgresql database format to text embedded in directories and files referenced within MoinMoin to (via my perl script) text. There was a brief trip BACK to mysql format when I tried out tikiwiki, when for a couple of days it looked like MoinMoin was ended as a project.

Digital images will hit that format entropy fast – most consumer digitals take jpeg format images. Originally those images were 1 – 2 Mp, now a good camera is 8 – 12 Mp. I caught the digital wave at 2.1 megapixels. I have pictures of my daughter and my son, priceless to me, in digital format, in jpeg format, at that 2.1 megapixel resolution. Not very good today. Not very good even across the history of photography.

So there’s the degradation of the image just by using a digital camera at all. JPEG is a lossy, compressed image form, losing more information every time it is opened, changed and then saved. You can do the equivalent of acid-free paper – with a good digital SLR you can take RAW format, which gives you all of the data from the sensor, and you can preserve that, creating jpegs to be viewed but always archiving the original digital negative. How many people taking snapshots do this? And even RAW format support is questionable over time, better to convert to Adobe DNG.

Then there’s archival media format – to what? 5-1/4″ floppies? 3-1/2″ floppies? Zip drive cartridges? 4mm DAT tape? No – CDR and DVD optical disc. And then ten years from now, or sooner, you will need to move them to the next format. And multiple copies, because the media degrade as well. The amount of entropy and change you have to anticipate and account for is huge.

I started taking film photographs as well as digital in light of this. 35mm and medium format. They still become digital through scanning, but the source is proven archival – film. Film is just a high capacity sensor you use once…

I started keeping paper notebooks several years ago. Pocket-sized, moleskine-brand with a black cover and an elastic closer and lined pages. These replaced a couple of Palm Pilots.

I swear, I love technology – but…

Writings I would have committed to a journal page in the wiki now go on paper. I know it’ll be available in thirty or forty years. Someday my grandkids can find it. I know I found that kind of communication from my great-grandfather, in journals and letters. That was way more important in forming an idea of him as a person than anything else I could have from him.

I started writing by hand to keep up the practice of writing with a pen – I was finding that I wrote so seldom by hand, almost all communication was via a keyboard, that I was finding it very difficult to write more than a line or two. Just no practice, and the muscles were no longer used to it.

This black book is a place to put lists. Ideas around those lists, as well, but primarily it is “The Book That Tells Me What To Do”. There is an associated volume, a Day Timer spiral-bound compact-size date book in a leather cover, which would be “The Book That Tells Me When To Do What The Other Book Says”.

The structure here makes the data more useful – writing on paper, crossing out, adding notes next to the line in a list, reworking, sketching – all of that is intuitive on paper – and harder to accomplish in a form of that size any other way that is as effective. The structure creates a possibility of longevity and persistence. The books could get lost or destroyed. But they might not.

On the Palm Pilots, the lists took more time to maintain, and I found them somehow less real and less useful than the low-tech solution I use now. And more subject to entropy and decay.

My first computer had a hard drive. 20 MB. Running Dos 6.2, I had perhaps 11 MB free. Toward the end of its life I was doing a physical format, low level, on the hard drive and then restoring the data from floppy disks every three months. Backups were absolutely critical, because you could not determine when the hard drive would start to lose sectors and drop data out – it just happened. And a single copy of the data on a single set of floppies was dangerous – any one of them could become unreadable for some unknow reason at any time. That was a learnign experience – a more intense version of what happens over, what, five years today?

The data remains separate from the structure. Data decays differently. It falls out of use. It no longer has relevance to any purpose or dream you might have that it originally led to, or fed on. Structure seems to connect directly to immediate use, and connects directly to the long term need for the data, and to how portable it can be when the structure needs to be discarded.

Could always go way old school and print it all out and file it in a cabinet…

— dsm



Definition: entropy

entropy

SYLLABICATION: en·tro·py
PRONUNCIATION: ntr-p
NOUN: Inflected forms: pl. en·tro·pies
1. Symbol S For a closed thermodynamic system, a quantitative measure of the amount of thermal energy not available to do work.
2. A measure of the disorder or randomness in a closed system.
3. A measure of the loss of information in a transmitted message.
4. The tendency for all matter and energy in the universe to evolve toward a state of inert uniformity.
5. Inevitable and steady deterioration of a system or society.

ETYMOLOGY: German Entropie : Greek en-, in; see en–2 + Greek trop, transformation; see trep- in Appendix I.
OTHER FORMS: en·tropic (n-trpk, -trpk) —ADJECTIVE
en·tropi·cal·ly —ADVERB

source: The American Heritage® Dictionary of the English Language: Fourth Edition. 2000

back to article
back to top of article

moved, left forwarding address…

…sort of.

My ISP fixed the DNS flaw. In doing so, they managed to stop caching ANY DNS results and slowed every action from within my local network to a crawl. This lasted for about nine days. Aaaarggggg.

Tech support or any kind of customer service from Verizon is a nightmare. So are they all, it seems. Somewhere along the line, service became an option, rather than a requirement. I was almost at my point-of-no-return – where the pain of waiting on hold and then escalating up until I find someone who understands that this is their issue, not mine, and that they need to fix the DNS caching was unavoidable.

Fortunately I went out of town for a week.

On my return the DNS had been fixed, and the speed was much better. And Verizon finally realized if they want to prevent web servers from running out of home networks they need to block port 443 as well as port 80. I’m pretty sure this was as a result of investigating the slowness in their own network – one of the things I would have done was to look at traffic. In taking a closer look at what was flowing over their lines, they plugged the port.

That means… Actually that just made an immediate necessity of what I had determined to do anyway. I needed to get this site into a data center. I already knew that. In a real network it can run on port 80, there are UPSes and backup power, 24×7 monitoring. Much bigger pipes.

Thanks for finding the site again, on port 80 this time. It no longer needs SSL, really, except for admin tasks. In moving it I put in relative links instead of full URLs, so it becomes a bit more portable, and easier to maintain.

 

— dsm

two bugs…

I fixed two bugs in this site design…

The first was a failed comments function. The “Submit Comment” button failed to submit any actual comments. I hadn’t tested it. I was looking through google’s picture of the website, and found google complaining that /comments/feed (the rss url for comments) didn’t exist… OK, I can fix that. I’ll just submit an initial comment…

It would not submit, and further looking didn’t show any reason. I took a look at the comment code in a different theme for wordpress that did have the comment code functioning correctly, and by slowly changing one bit at a time, I got the code in this one to work

The second was minor – the “engineer” image was a relative link on the front page, and failed to translate (IT SHOULD!) to the comments page (WTF?). I changed that to a full URL and it should work now anywhere in the site.

 

—dsm

 

Store and Forward Messages wrote about the irony of writing about SSL certificates in websphere MQ, and also running a site only under https (which this one is) without a proper certificate… He’s correct, that’s bug #3.

With the DNS exploits running particularly rampant, it’s no longer workable to leave a mismatched cert. Firefox 3.x also makes certificate errors much more glaring and intimidating. I ordered and placed a correct signed certificate.

The site now runs on port 8443 on a separate server with the corrected cert. I’m still investigating being able to port shift from the original (virtual) server at port 443 to the new one on 8443 without having to have the 443 cert validated… ProxyPass in Apache works directly to dougmunsinger.com. The old URLs will work the same and still throw the same certificate error. Directly to 8443 after that, and no further mismatches…

I can live with running this on a separate server, but the apache2 config for virtual servers SUGGESTS that each named server can use a separate SSL cert and it doesn’t work that way. All the virtuals use the first certificate encountered in the config.

refreshing SSL certificates in websphere MQ

The first project I was given when I started at Evergreen Investments involved IBM’s WebSphere MQ messaging application. I took a development instance of the application and translated that to the requirements for a production deployment of the application.

It has been completely bulletproof. Set up correctly and sized appropriately, it just works. Eventually all good things come to an end, and you must maintain the service. SSL certificates expire, and must be replaced with new certificates.

In WebSphere versions prior to 6.0, you had to restart the queue manager, the local god of the application, to have the new certificate information deploy. That was somewhat disruptive, but it ensured that the information you were using for bringing up encrypted channels of communication was the new information, not the old.

With version 6.0, there is a command you can run in runmqsc (the WebSphere MQ command line shell and script interface) –


REFRESH SECURITY TYPE(SSL)

The same command run as


REFRESH SECURITY

will touch USER security, but leave the SSL certificate information untouched and unrefreshed. Thus leaving you with an invalid certificate in place, even though you have replaced and refreshed (you think) the information…

This is obvious in hindsight. And completely baffling, until you find it, while trying to get the application to come back up after replacing an expired certificate.

—dsm

stupid shell (and UNIX) tricks

I love using abobe photoshop C2′s automation – especially when resizing a series of images for the web. I would love to run linux entirely – but linux keeps falling short in graphics programs (yes, I use gimp – sorry, but Photoshop is better) and printer drivers – linux still can’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.

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.

When you run adobe batch scripting to resize a series of jpg’s and then save them in a different directory as gif files, it insists on writing “copy” in the file name. photograph1.jpg becomes “photograph1 copy.gif”. To remove the ” copy” string, run:

$ for i in *
> do
> mv "$i" "${i/\ copy.gif}".gif
> done

sed and awk

One of the instructors I had in UNIX system administration courses was… How to put this… 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 “something you would never use, trust me”. A couple of years later, when I needed and had to learn the commands, I thoroughly realized he was very wrong.

I had to rename a series of website pages in a site redesign – including altering the names inside the pages themselves. Here’s how I did it.

Here’s the command that changed one set of links from the old page to the new:


for i in ` grep photographs_5.html * | awk -F : '{ print $1 }'`
do
echo $i
sed 's/photographs_5.html/photographs_001.html/g' < $i > $i.1
mv ${i}.1 ${i}
done

This loops through and finds any files with the string “photographs_5.html”

echos out each file, changes (using the sed command, standard UNIX tool…) from photographs_5.html to photographs_001.html, creating a new file named [file].1,

then replacing the original file by moving (mv) the [file].1 file over on top of the [file].

I love UNIX. Both of these were done on Windows using the bash shell in cygwin. 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.

Cygwin at least makes Windows somewhat command line friendly.

—dsm

doug munsinger

Bad Behavior has blocked 424 access attempts in the last 7 days.