Ads by Google

Showing posts with label cygwin. Show all posts
Showing posts with label cygwin. Show all posts

Friday, August 9, 2013

A small GNU Screen tip for Cygwin MinTTY

I use Cygwin a lot and use the default mintty terminal emulator for most of my scripting work.  While I used GNU Screen, I never used it much till the vertical split patch was merged into it and made available on Cygwin(found the default horizontal split a bit distracting).  Even then, I found the region traversal a chore, having remapped C-a to C-z and using C-z TAB to switch between regions.  Too many keystrokes and a bit awkward for a bad typist like me.

And so I was rooting around mintty settings and was reading the mintty tips page, when I found the following tip for Gnu Screen.
bindkey "^[[1;5I" next
bindkey "^[[1;6I" prev

Well, the above just replaces the session in the current region with the next one or the previous on using Ctrl+Tab and Ctrl+Shift+Tab key combinations.  Which sort of doesn't do screen a bit of justice.  My way of using screen was

Split the mintty screen estate(maximised) into 4 regions as a 2x2 grid, each grid cell starting off a bash shell; this is what I have on my .screenrc

screen -ln -t "home" 1
split -v
focus right
screen -t "bash2" 2 bash
split
focus down
screen -t "bash4" 4 bash
focus left
split
focus down
screen -t "bash3" 3 bash
focus up
Change keybindings above to
bindkey "^[[1;5I" focus next
bindkey "^[[1;6I" focus prev

and now what you have is the ability to use Ctrl and Tab keys chord combination to quickly switch between regions instead of sessions listed in the tips page.  Over the last few days, this settings alone has lead me to use Screen more in my shell work.

Anyone has anything for cut and paste and buffer copy/paste to external applications? Especially with mouse use?

Monday, March 5, 2012

TeX Live has been added to the Cygwin distribution

If you've been wondering what replaces the obsoleted TeTeX package in cygwin, here's some news for you.  Tex Live is now available as installable package on cygwin. as native you'd want it to be with Emacs and AucTeX.

Wednesday, May 19, 2010

Gnus: Making your emails a bit more difficult for spammers to harvest

Well, I don't know all the methods that spammers use to harvest email addresses but I got mildly chewed out for putting in email addresses in the reply-to citations of my emails.  I was told to PCYMTNQREAIYR to fix my replies. 

Which I did by configuring Gnus to omit the raw email address in the replies.

;;; setting the reply to omit email address to avoid spam harvesting
;;; see the documentation for line format and the line-function has to
;;; be set explicitly, as per the Changelog.
(setq message-citation-line-format "On %a, %b %d %Y,%F %L wrote:\n")
(setq message-citation-line-function 'message-insert-formatted-citation-line)

Thanks to Daniel Pittman for pointing it out. Though I'm not sure whether it breaks any standards or prevents citation folding, at least for the Gnus mail client at the receiving end.

And there are other acronyms  on the cygwin page that are made up that might be of use too, so be sure to read it


Thursday, December 24, 2009

Cygwin 1.7 Released

Just saw on the mailing list that cygwin 1.7 has been released. For people who have to work on Windows, Cygwin provides an Unix like emulation on Windows.

Just in time for Xmas and the new year.

Season's greetings to all and best wishes for the new year.

Wednesday, September 3, 2008

Building TeXLive Binaries on Cygwin

A few months ago I had asked about whether there was a cygwin version of the TeXLive system as the TeTeX system was no longer being actively maintained.

Today I received a response that it can be built successfully on cygwin , thanks to Angelo Graziosi. It might be useful for some. Please read the README so that you don't run into surprises. You have to download the lzma file and install it as suggested in the README.

As for me, I'm sticking with MiKTeX as it works without a hassle and the update feature synchronises all the packages I have installed already. If the cygwin maintainers add TeXLive to the official list of maintained packages, I'd change my mind. It's easier to keep everything under one roof than having to get it from ten different places.

So, if you want a cygwin version, it can be done.

Wednesday, April 2, 2008

Making CD images and ISOs on Windows

Thanks to cygwin, there is now a way to create isos and CD images on windows. You don't need to get those commercial software to create those images.

This list of software is what you'd need to work with to create, query and extract info from iso files.

Monday, March 31, 2008

Finding out which file belongs to which package in cygwin

Today, while trying to add some directories to the PATH variable in my startxwin.bat, I managed to corrupt the file.

I don't know what was wrong but the script refused to start the X server.

Well, I'll just recover the script by re-installing the package I thought.

The only problem is, I don't know which package the file belonged to! And I didn't want to re-install ALL the X packages of the X-server. That would have been the last resort, anyway.
A google search revealed that someone else had faced the same problem and cygwin had a package search which does the same thing; it can search within the packages.

I found the package and reinstalled it from the local copy on my HDD and all was well. X server started up as usual along with my customisations which I applied again.

Sunday, March 30, 2008

Installing MikTeX with Emacs-22.1 and Cygwin

Since I decided to go with MikTeX, I downloaded and installed the base MikTeX package. The MikTeX install offers a net based install of additional packages that is easy to use. Install the additional packages that you'd generally use. Don't forget to refresh the FNDB to make sure that the package is registered with TeX (I think it's the equivalent of texhash.)

Open a cygwin prompt.

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/MiKTeX2.7/miktex/bin:

That will not help as the TeTeX binaries will be found before MikTeX. Change that by

$ PATH=/cygdrive/c/MiKTeX2.7/miktex/bin:$PATH
$export PATH
$ cd c:/gnu/elisp/auctex-11.85
$ ./configure --with-emacs=c:/gnu/emacs-22.1/bin/emacs --disable-preview \
--with-texmf-dir=c:/MiKTeX-2.7/miktex/tex/ --prefix=c:/gnu/ \
--with-lispdir=c:/gnu/emacs-22.1/site-lisp/
$ make
$make install

assuming that you have auctex tarball untarred already. You'd need to change the paths to point to your emacs, the MiKTeX tree and where you want the installation files to go. Obviously.

The configure script generates the Makefile and the echoed messages on the screen will tell where it is picking different binaries from. Check the Makefile carefully especially the installation paths of various auctex .el files.

I have these entries in my .emacs


(setq exec-path (cons "C:/gnu/bin/" exec-path))
(setq exec-path (cons "c:/cygwin/usr/bin" (cons "C:/cygwin/bin" exec-path)))
(setq exec-path (cons "C:/MiKTeX2.7/miktex/bin" exec-path))
(setenv "PATH" (concat "C:\\MiKTeX2.7\\miktex\\bin;C:\\cygwin\\bin;C:\\cygwin\\usr\\bin;
C:\\gnu\\bin\\;" (getenv "PATH")))

;; AUC TeX
(load "auctex.el" nil t t)
(require 'tex-mik)
;; ;;; some basic customizations
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
(add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
(setq reftex-plug-into-AUCTeX t)
(setq reftex-enable-partial-scans t)
(setq reftex-save-parse-info t)
(setq reftex-use-multiple-selection-buffers t)

Note that, I'm forcing emacs too, to look in the MikTeX distribution first for the respective binaries before looking under cygwin.

Testing these on a random tex file, it generated the output pdf.

Because I had both TeTeX and MikTeX installed, I wasn't sure which binaries would be picked up. The first time I tried, the PATH variable made TeTeX binaries as the values to various configure checks. I had to set the MikTeX path first to force it to choose MikTeX. And you get messages like this


checking for tex... /cygdrive/c/MiKTeX2.7/miktex/bin/tex
checking for pdftex... /cygdrive/c/MiKTeX2.7/miktex/bin/pdftex
checking for dvips... /cygdrive/c/MiKTeX2.7/miktex/bin/dvips
checking for perl... /usr/bin/perl
checking for makeinfo... /cygdrive/c/MiKTeX2.7/miktex/bin/makeinfo
checking for texi2html... /usr/bin/texi2html
checking for texi2dvi... /cygdrive/c/MiKTeX2.7/miktex/bin/texi2dvi
checking for texi2pdf... /usr/bin/texi2pdf
checking for install-info... /usr/bin/install-info
configure: creating ./config.status
config.status: creating Makefile
...
As you can see, there are binaries chosen from MikTeX as well as cygwin. If you have not chosen the TeTeX binaries during the cygwin install, there is a lot less to worry about. You'll have to force the configure script to find every binary it is looking for, from the MikTeX distribution.

And as far as possible, install the MikTeX in folders without spaces in the names. It would make things simpler.

That is pretty much it.

Wednesday, March 26, 2008

Emacs-22.2 Released!

Saw a posting on the cygwin mailing list that Emacs-22.2 has been released.

Indeed, a quick check on the GNU website, revealed that it was done today. Unofficial cygwin builds can be found here.


Go get it.