`
jacklan
  • 浏览: 134535 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Reacquainting with an old friend named Cygwin

阅读更多
Reacquainting with an old friend named Cygwin
Wiping out my Fedora Core 5 partition off my laptop as soon as I get home tonight.

Set up Cygwin at work today, played around with some rc files, and after little tuning, I have the perfect setup I need to write the random script and the one-off program--without having to dual boot or manage a full blown Linux installation.

With Cygwin I'm able to run gawk, sed, ruby, write the random bash script, mess with vim, and not have to worry about why my video isn't loading subtitles, why the video scaling isn't working, why audio sometimes works and sometimes doesn't, seemly by random, and countless of other small but annoying problems that I don't want to deal with.

There's times when you want to do hardcore system level hacking in Linux. There's other times when you just want a small environment to hack out some trivial code.

The trouble with setting up FC5 is that it isn't any one of those. I spent two days following installation guides, copying down commands to make the OS a better place for work and play, only to stomp my foot in frustration at how pointless it all was.

It all comes down to the conclusion I've come to again and again. There's no "learning" when it comes to setting up a Linux system. It's just following a bunch of instructions and hoping the things come out right. If not, well, GOOGLE TIME, and cross your fingers, hope someone encountered the same problem and that people have been nice enough to not answer in mockery, and perhaps have an actual useful answer. And if no one knows anything, well, chances are it's some quirk that you find annoying and no one else does, so you learn to live with it.

Cygwin setup notes:

----- extra packages --------
cvs, gcchelper, make, wget, inetutils, openssh, ruby, unzip, patch, rxvt, vim
------ cygwin.bat -----------
@echo off
C:
chdir C:\cygwin\bin
set SHELL=/bin/bash
rxvt --loginShell
------ .Xdefaults -----------
rxvt*font: Lucida Console-13
rxvt*geometry: 80x50
------- .vimrc ---------------
/usr/share/vim/vim64/vimrc_example.vim -> .vimrc
>> fixes arrow key, backspace key garbage in insert mode
set backupdir=/tmp,~/,.
>> dump all backup files (.X~) into /tmp
--------- .bashrc -----------
shopt -s cdspell
export HISTIGNORE
export HISTCONTROL...
enable all aliases (less -r in particular for non-english characters)
add --show-control-chars to ls alias for non-english characters
---------- .bash_profile -----
path ~/bin
----------- .inputrc --------
# allow 8-bit input/output
$if Bash
set bell-style none
set mark-directories on
set mark-symlinked-directories on
set match-hidden-files on
$endif
-----------------------------
VISUAL - EDITOR environment variables -- don't need these
http://www.faqs.org/docs/artu/ch10s04.html
-----------------------------
wheat

... ls colors suck.
rxvt/Xdefault - vim - ls

rxvt*background: midnight blue
rxvt*foreground: white
rxvt*cursorColor: red

http://user.it.uu.se/~hamo0815/win32unix/
http://ask.metafilter.com/mefi/22545
-----------------------------
quit vim and restore previous screen
TERM=cygwin
>> this messes up Home/End/... under vi/INS!
fix: TERM=rxvt
>> vi/INS ok, vi restore ok.
>> rxvt*termName=rxvt
>> side effects?
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics