Posts Tagged ‘UNIX & Windows’

* virtuawin and clipx…

Posted on September 3rd, 2008 by doug. Filed under UNIX & Windows.


 

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

 

Tags: , .



* TERM=vt220

Posted on August 29th, 2008 by doug. Filed under Uncategorized, shell.


 

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

 

Tags: , .



engineers

recent posts

What I'm Doing...

  • flying back to Boston tomorrow, and watching my daughter come off a ventilator and breathe on her own... 2 weeks ago
  • writing a startup and shutdown sc ript for all of jboss-land 2009-08-25
  • finished and deployed svnadmin.pl cgi, documented it and checked into subversion... next is more log4j edits, and deploy jsvn (java svn) 2009-05-08
  • More updates...

Posting tweet...

categories

archives

tag cloud

apache apache2 bash shell browsers comics compile cygwin data databases daughter eclipse economics engineer entropy finances firefox 3 hallucinations Heinlein internet java jboss KDE linux moinmoin monitoring nagios plugins RSE scifi script Solaris structure subversion support svn testing tweet UNIX UNIX & Windows web hosting website websphere windows WordPress writing

admin