Presentation is loading. Please wait.

Presentation is loading. Please wait.

Wouter Verkerke, NIKHEF Preparation for La Mainaz or how to run Unix apps and ROOT on your Windows Laptop without installing Linux Wouter Verkerke (NIKHEF)

Similar presentations


Presentation on theme: "Wouter Verkerke, NIKHEF Preparation for La Mainaz or how to run Unix apps and ROOT on your Windows Laptop without installing Linux Wouter Verkerke (NIKHEF)"— Presentation transcript:

1 Wouter Verkerke, NIKHEF Preparation for La Mainaz or how to run Unix apps and ROOT on your Windows Laptop without installing Linux Wouter Verkerke (NIKHEF)

2 Wouter Verkerke, NIKHEF Introduction Want to do some hands-on analysis tutorials on ATLAS data analysis at La Mainaz Have ~15 Windows-only Laptops available Need ROOT Solution: Install CygWin – A Unix/Windows interface layer that allows Unix apps to run in Windows Side Benefit: You get full suite of Unix apps to run on your laptop

3 Wouter Verkerke, NIKHEF What is CygWin Cygwin is a Linux-like environment for windows, it consists of –A library that interface Unix applications transparently to the Windows operating system –A collection of tools, which provide Linux look and feel List of apps that come with CygWin installation –Shells: tcsh, csh, bash, ksh, zsh,… –Unix utils: find, grep, awk, top, ps, ls, cp, tar, gzip,… –X: server, xterm etc –GhostView –Latex, xdvi –Emacs, XEmacs –GCC 3.3 compiler suite –Scripting languages: perl, python, tcl, …

4 Wouter Verkerke, NIKHEF How does CygWin work? CygWin is a library that interfaces Unix system calls to Windows system calls –Application only ‘see’ OS through system function calls –CygWin makes Windows look like Unix –All applications compiled with native Win32 GCC compiler, no performance overhead except extra forwarding step in system call Linux App Linux Operating System Call fopen(“file.txt”) Return Int handle Linux App CygWin Interface Layer Call fopen(“file.txt”) Return Int handle Windows Operating System Call OpenFile(“file.txt”) Return HFILE handle

5 Wouter Verkerke, NIKHEF What does it look like? (Live Demo) X Windows integrate seamlessly with ‘Windows Windows’ CygWin apps see the same file system as Windows apps –Windows can see all cygwin files: cygWin root ‘/’ = ‘C:\cygwin’ –Cygwin can see all windows files: X: = ‘/cygdrive/x’ –Cygwin also sees all CD drives, mapped network drives etc… –No separate OS  No separate file system

6 Wouter Verkerke, NIKHEF How compatible is it with Unix Pretty much any Unix application for which you have the source code you can compile under CygWin –GCC compiler suite, gmake work out of the box –Single most important caveat: Windows Shared library work slightly differently from Unix shared libraries. Some exposure to differences unavoidable since CygWin only maps existing functionality, it does not implement Unix shared library functionality itself Most visible difference: shared libraries have extension.dll instead of.so –For programmers: creating shared libraries Linux: g++ -shared –o CygWin: g++ -Wl,--export-all-symbols -Wl,--export-dynamic -Wl,--enable-auto-import -Wl,-Bdynamic -shared --enable-auto-image-base -Wl,-soname -o -Wl,--whole-archive -Wl,--no-whole-archive

7 Wouter Verkerke, NIKHEF Installing Basic CygWin Basic CygWin installation from web –Go to www.cygwin.comwww.cygwin.com –Click on ‘install CygWin now’ –Click ‘run’ and ‘run’ to let Windows run installer app –In Installer App (Setup) Click next, (Choose Installation Type) Click next (Select install directory) default of c:\cygwin recommended, Click next (Select scratch area) default of Desktop is OK, Click next (Connection type) Click next (Select download site) pick one, tu-dresden always work well for me, click next (Select Packages) click next [ this will do very basic install, don’t do more now ] –Let installer run to competion (5 mins) When asked to create shortcut on desktop click yes

8 Wouter Verkerke, NIKHEF Customizing Basic Cygwin Double click on CygWin link –You’ll now get a Bourne Shell Window –A home directory is created for you on the fly Choosing your shell –Type ‘emacs –nw /etc/passwd’ –Find your personal entry at the bottom –Change setting to shell of your liking, all shells are in /bin If you have a Windows User Name with spaces in it –Edit your unix username (1 st token in passwd line )to be one without spaces –Rename your home directory c:\cygwin\home\ ) accordingly –Mapping between Windows UserName and Unix username will be retained –Reason: some Unix apps assume there are no spaces in homedir Exit shell and restart cygwin to verify settings are correct now verkerke:unused_by_nt/2000/xp:1005:513:U-X40-WOUTER\Wouter Verkerke,S-1-5-21-280 65713-909673438-2902387540-1005:/home/verkerke:/bin/tcsh [Note d.d. 16/1/05 – WVE Proceed with next slide before executing remainder of this slide, emacs is not in basic installation]

9 Wouter Verkerke, NIKHEF Installing full cygwin Make sure you have ~2.5 GB free on your laptop Access installation kit cygwin-full.tar.bz2 (494Mb) –Option 1: Mount //gandalf/week in windows, look in verkerke/kit –Option 2: Download file from http://www.nikhef.nl/~verkerke/Mainaz/ http://www.nikhef.nl/~verkerke/Mainaz/ Restart cygwin –In shell: –Unpacked full installation is 1.9 GB, includes ROOT, RooFit. –Unpacking will take ca 30 minutes –You will see some error messages (cannot open files). These are system files that are currently in use. This is harmless as the installed version and the kit version are identical anyway cygwin> cd / cygwin> bunzip2 –c | tar –xvf -

10 Wouter Verkerke, NIKHEF Configuring full cygwin Once the full cygwin has been unpacked, restart cygwin –Test Xserver: from shell type startx –If this works OK, you can modify startup script to start X and xterm immediately instead of shell window –To hide shell window, click with right mouse button on CygWin shortcut on desktop, select properties, goto shortcut tab and select ‘Minimized’ in ‘Run:’ list box, press OK Cygwin> emacs /cygwin.bat @echo off C: chdir C:\cygwin\bin echo startx | tcsh -l Change this line

11 Wouter Verkerke, NIKHEF Configuring your home directory Configure your Unix setup to your liking, e.g. copy.cshrc settings from your NIKHEF account –To copy my settings copy my.tcshrc,.Xdefaults,.xinitrc, –You can find them in http://www.nikhef.nl/~verkerke/Mainaz/homehttp://www.nikhef.nl/~verkerke/Mainaz/home If you don’t copy mine –Be sure to set ROOTSYS to /opt/root –Be sure to add $ROOTSYS/bin to your PATH Verify that ROOT works –Type ‘root –l’ on command line

12 Wouter Verkerke, NIKHEF Installing the ntuples for Hands-on session Copy from ntuples.tar from –//gandalf//week/verkerke/kit (via Windows FS) –http://www.nikhef.nl/~verkerke/Mainazhttp://www.nikhef.nl/~verkerke/Mainaz Untar in suitable location in your home directory That’s it


Download ppt "Wouter Verkerke, NIKHEF Preparation for La Mainaz or how to run Unix apps and ROOT on your Windows Laptop without installing Linux Wouter Verkerke (NIKHEF)"

Similar presentations


Ads by Google