Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Monday, February 7, 2011

Cygwin: Setting up the environment and locale

When using Cygwin to connect to linux servers, and when using Cygwin in a windows environment in general, it is important to get the locale right.

I am using Cywin through cmd-sessions, and I load Cygwin manually for each cmd-prompt session, as I do not want to override the Windows/Dos commands by default.
Thus I run the file loadcygwin.cmd each time I want to switch to/load Cygwin.
The content of loadcygwin.cmd is listed below:

loadcygwin.cmd:

@echo off
call setcygwinenvironment.cmd
:: WinXp
set path=c:\Program Files\CygWin\bin;%path%
::Win7
::set path=C:\Program Files (x86)\cygwin\bin;%path%
echo Cygwin now loaded.

In this file I am calling the script setcygwinenvironment.cmd which sets the locale. (As you can see I am living in Denmark, which my locale settings reflect)

setcygwinenvironment.cmd:

echo Setting up CYGWIN environment...

:: Set cygwin locale to the same as windows locale.
set LANG=da_DK-UTF-8
set LC_CTYPE=da_DK.UTF-8
set LC_NUMERIC=da_DK.UTF-8
set LC_TIME=da_DK.UTF-8
set LC_COLLATE=da_DK.UTF-8
set LC_MONETARY=da_DK.UTF-8
set LC_MESSAGES=da_DK.UTF-8
set LC_ALL=da_DK
set CYGWIN=acl nodosfilewarning
echo done.

Thursday, October 21, 2010

Introducing the Linksys NSLU2

The first series in this blog will be on my implementation of Debian Linux on the Linksys NSLU2 (Wikipedia link).The Linksys NSLU2 is a quite old piece of hardware, and has gone out of production. However, I was only introduced to it a couple of years ago. Since then I have bought two of them, placed them in different locations and set them both up to run Debian and to sync data to each other.
One of them is located in my own basement, and the other in the basement of my brother. The advantage is obvious, considering that the one in my home is acting as my backup server. If I were to have a break-in or a fire, or a flood or a number of things, the other one will be a backup to my backup.
Furthermore the NSLU2 (aka the Slug) acts as file server, media server, iTunes server, running ftp server, http server and ssh server.

However, you will not get all of this for free... Which is reason I am writing this blog series. The slug comes with a native operating system (based on some Linux distribution). However, the posibilities with this version is highly limited.
A number of different alternative operating systems can be installed, as desribed on the website nslu2-linux.org.

However I chose Debian. The reason? That I then would get a full Linux server with the entire repository available on my NSLU2.

How I did it will follow... stay updated:-)