Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
software:cygwin [2022/02/13 14:15] solar |
software:cygwin [2022/03/02 12:48] solar [Recommended Packages] |
===== Getting the Cygwin Installer ===== | ===== Getting the Cygwin Installer ===== |
| |
The Cygwin installer executable is available at [[https://cygwin.com/setup-x86_64.exe|https://cygwin.com/setup-x86_64.exe]]. You will need it again later on, so make sure you save it (instead of just executing it this once). | The Cygwin installer executable is available at [[https://cygwin.com/setup-x86_64.exe|https://cygwin.com/setup-x86_64.exe]]. You will need it again later on, as it is also the package manager for Cygwin. So make sure you save it (instead of just executing it this once). |
| |
===== Spaces in Path ===== | ===== Spaces in Path ===== |
| |
Cygwin does not play well when installed in a path that contains spaces. In this context, be aware that not all Windows paths are equal; e.g. the German "C:\Programme" is actually an alias for "C:\Program Files" (which contains a space). Ideally, install to "C:\Cygwin" to avoid any problems. | Cygwin does not play well when installed in a path that contains spaces. In this context, be aware that not all Windows paths are equal; e.g. the German "C:\Programme" is actually an alias for "C:\Program Files" (which contains a space). Ideally (if you have the necessary permissions), install to "C:\Cygwin" to avoid any problems. |
| |
===== First Install ===== | ===== First Install ===== |
| |
For the first installation, do not make any package selections. I have experienced problems with too heavily customized package selections in the past. Just go with the default package selection (but *do* select a mirror close to you as package source). | For the first installation, do not make any package selections. I have experienced problems with too heavily customized package selections for the initial installation in the past. Just go with the default package selection (but //do// select a mirror close to you as package source). |
| |
This will not include any X11 functionality yet. We will fix that in a later step. | This will not include any X11 functionality yet. We will fix that in a later step. |
Once you are done with the installation, and **before** you start the Cygwin shell the first time, adjust your home path. | Once you are done with the installation, and **before** you start the Cygwin shell the first time, adjust your home path. |
| |
By default Cygwin will create your user's home directory in ''<InstallPath>/home/<UserName>''. Usually it is much more convenient to work from your ''%USERPROFILE%'' directory -- you know, where //Windows// already created your directories for Documents, Pictures, Videos, Downloads etc. | By default Cygwin will create your user's home directory in ''<InstallPath>/home/<UserName>''. But it is much more convenient to work from your ''%USERPROFILE%'' directory -- you know, where //Windows// already created your directories for Documents, Pictures, Videos, Downloads etc. |
| |
To change the home location, navigate to ''<InstallPath>/etc/'' and open the file ''nsswitch.conf'' in your favorite text editor. Among other things, you will find this line: | To change the home location, navigate to ''<InstallPath>/etc/'' and open the file ''nsswitch.conf'' in your favorite text editor. Among other things, you will find this line: |
''cp /etc/skel/.[a-z]* ~'' | ''cp /etc/skel/.[a-z]* ~'' |
| |
When a new bash shell is started, it loads setup files in the following order: | They do not do much, but contain a lot of useful tips and documentation. You are urged to look through those files to get an idea of what they could do for you. |
| |
| While the files in ''/etc/skel/'' might be updated by Cygwin, the copies in your home directory are yours alone and will not be touched by the system. |
| |
| ===== Invocation ===== |
| |
| When a new bash login shell is started (see below for the meaning of "login shell"), it sources setup files in the following order: |
| |
* ''/etc/profile'' -- which sets up certain Cygwin specifics and therefore looks a bit different than your average Linux ''/etc/profile'' | * ''/etc/profile'' -- which sets up certain Cygwin specifics and therefore looks a bit different than your average Linux ''/etc/profile'' |
* The first of | * The **first** of |
* ''~/.bash_profile'' | * ''~/.bash_profile'' (which, when you use the one from ''/etc/skel/'', will source ''~/.bashrc'') |
* ''~/.bash_login'' | * ''~/.bash_login'' |
* ''~/.profile'' | * ''~/.profile'' (which is also sourced if some other shell than bash is started) |
| |
| If a non-login shell is started, it loads ''~/.bashrc''. |
| |
===== Setting up Setup ===== | ===== Setting up Setup ===== |
| |
Installing additional Cygwin software is done by starting the installer executable again. My recommendation is to move ''setup-x86_64.exe'' to your Cygwin directory, and creating an alias for easy access. | Installing additional Cygwin software is done by starting the installer executable again. My recommendation is to move ''setup-x86_64.exe'' to your Cygwin directory, and creating an alias for easy access. The best place to set up aliases would be ''~/.bashrc'' -- unless you would like to uncomment the part in ''~/.bashrc'' that sources ''~/.bash_aliases'' and use //that// file for that alias: |
| |
| ''alias setup=/cygdrive/c/<InstallPath>/setup-x86_64.exe'' |
| |
| ===== X11 Basics ===== |
| |
| Start a new shell, or source the file that sets the ''setup'' alias (see above). Then call ''setup'' to bring up the Cygwin package manager. |
| |
| Now we will install the packages ''xinit'' and ''xorg-server'', which provide basic X11 support for Cygwin, and ''alacarte'', which will allow customization of the XDG menu provided by Cygwin/X. |
| |
| After installation, you will find in your start menu the group "Cygwin-X", and in it the shortcut "XWin Server". Copy this shortcut to ''%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup'' to have X11 start automatically for your user. Copy the shortcut to ''%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\StartUp'' to have X11 start automatically for **every** user on your machine. |
| |
| If you want some special keyboard setup, call up the properties of the shortcut, and add the necessary options -- in my case, I added ''-xkbmodel pc105 -xkblayout us -xkbvariant altgr-intl''. |
| ===== Recommended Packages ===== |
| |
| * alacarte |
| * vim, gvim |
| * ctags |
| * openssh |
| * perl |
| * git, gitk |
| * curl |
| * cmake, make, ninja |
| * dos2unix |
| * unzip |
| * rcs |
| * bash-completion, chere |
| * gnome-terminal |
| * dialog, zenity |
| * dia, dia-shapes |
| * shutdown |
| * audacity |