Cygwin/x

Содержание:

Downloading and Installing

Cygwin/X is installed via Cygwin’s Installer, either
setup-x86_64.exe (for
the 64-bit version), or
setup-x86.exe (for the
32-bit version of Cygwin), and the installation process is
documented in the
Cygwin/X User’s Guide.

Whether or not you already have Cygwin installed, you can add Cygwin/X to
your installation by downloading and running setup, and selecting the
‘xinit’ package from the ‘X11’ category.

Using Cygwin/X is documented in a step-by-step manner, with
lots of pictures and examples, in the
Cygwin/X User’s Guide. Please notice,
however, that Cygwin/X contains many general-purpose programs,
libraries, and functions that are part of all
X distributions. It
is therefore beyond the scope of the
Cygwin/X User’s Guide to document all of
these X Window System components. To find documentation, for
example, for setxkbmap one should consult the generic X
documentation such as the

setxkbmap(1) manual page. You could always, of course, do a
Google
search for setxkbmap, which finds the manual page
mentioned above.

OPTIONS FOR SPECIFYING X SCREENS

Screen specific parameters can be applied as a
default to all screens by placing those screen specific parameters
before any -screen parameter. Screen specific parameters placed after
the first -screen parameter will apply only to the immediately
preceeding -screen parameter.

-multimonitors or -multiplemonitors

Create a screen 0 that covers all monitors on a system with
multiple monitors.
Fake XINERAMA data is created describing the individual monitors,
(This is similar to the ‘merged framebuffer’ or ‘pseudo-xinerama’ mode provided by
some drivers for the xorg X server).
This option is currently enabled by default in -multiwindow mode.
-screen screen_number [W H [X Y] | [[WxH[+X+Y]][@M]] ]

Create screen number
screen_number

and optionally specify it’s
height,

width

and
initial position.

Additionally a
monitor number

(which count from 1) can be specified to place the screen on,
at which point, all coordinates become relative to that monitor.
Screen numbers must be contiguous starting from zero and cannot be duplicated.

Examples:

-screen 0 @1 ; on 1st monitor using its full resolution (the default)

-screen 0 800×600+100+100@2 ; on 2nd monitor offset 100,100 size 800×600

-screen 0 1024×768@3 ; on 3rd monitor size 1024×768

Cygwin in Wine

Before we plunge into the truly wild and wooly, installing and running the Cygwin suite within Wine is a relatively well-behaved process. Even as early as around Wine v1.0, Dan Kegel reported that much of the Cygwin suite installed and ran successfully.

Cygwin is a set of libraries and tools compiled for Windows that provides a POSIX API. It’s less a compatibility-layer like Wine and more like a miniature distribution that overlays Windows. As a result, unix apps must still be recompiled for Windows to run in Cygwin.

By using Cygwin in Wine, we can do more than uncover bugs with Cygwin itself; we can theoretically rebuild many unix binaries, scripts, etc. into tiny unit tests for Wine. Since the Cygwin sources are completely open too, it should be easier to diagnose the cause of a specific problem. Just remember the Cygwin executables must be run from a Windows/Wine console, not a unix command-line (if you want to start Cygwin’s shell, launch the cygwin.bat script from the same console).

For a less self-referential take on the «let’s run an entire suite on Wine» approach to testing, see Guest Unit Tests

How to Fix Cygwin1.dll Errors

Do not download cygwin1.dll from a «DLL download» website. There are many reasons why downloading a DLL file is a bad idea. If you need a copy of cygwin1.dll, it’s best to obtain it from its original, legitimate source.

Start Windows in Safe Mode to complete any of the following steps if you’re unable to access Windows normally due to the cygwin1.dll error.

  1. Try your best to complete this step. Installing or reinstalling Cygwin, the program that provides the cygwin1.dll file is a very likely solution to this DLL error.

  2. Restore cygwin1.dll from the Recycle Bin. Other than installing Cygwin, the easiest possible cause of a «missing» cygwin1.dll file is that you’ve mistakenly deleted it.

    If you suspect that you’ve accidentally deleted cygwin1.dll but you’ve already emptied the Recycle Bin, you may be able to recover cygwin1.dll with a free file recovery program.

    Recovering a deleted copy of cygwin1.dll with a file recovery program is a smart idea only if you’re confident you’ve deleted the file yourself and that it was working properly before you did that.

  3. Add the path of the cygwin1.dll file as a system environment variable.

    It’s possible that a program that needs the cygwin1.dll file is looking for it through an environment variable that is missing or incorrect. You can fix this by adding the path of the DLL file (e.g. «C:\cygwin64\») as an environment variable.

    See this Stackoverflow thread if you need help doing this.

    This solution is only useful if you’re not actually missing the cygwin1.dll file.

  4. Run a virus/malware scan of your entire system. Some cygwin1.dll errors could be related to a virus or other malware infection on your computer that has damaged the DLL file. It’s even possible that the cygwin1.dll error you’re seeing is related to a hostile program that’s masquerading as the file.

  5. Use System Restore to undo recent system changes. If you suspect that the cygwin1.dll error was caused by a change made to an important file or configuration, a System Restore could solve the problem.

  6. Update the drivers for hardware devices that might be related to cygwin1.dll. If, for example, you’re receiving a «The file cygwin1.dll is missing» error when you play a 3D video game, try updating the drivers for your video card.

    The cygwin1.dll file may or may not be related to video cards — this was just an example. The key here is to pay very close attention to the context of the error and troubleshoot accordingly.

  7. Roll back a driver to a previously installed version if cygwin1.dll errors began after updating a particular hardware device’s driver.

  8. Test your memory and then test your hard drive. We’ve left the majority of hardware troubleshooting to the last step, but your computer’s memory and hard drive are easy to test and are the most likely components that might cause cygwin1.dll errors as they fail.

    If the hardware fails any of your tests, replace the memory or replace the hard drive as soon as possible.

  9. Repair your installation of Windows. If the individual cygwin1.dll file troubleshooting advice above is unsuccessful, performing a startup repair or repair installation might help.

  10. Use a free registry cleaner to repair cygwin1.dll related issues in the registry. A free registry cleaner program may be able to help by removing invalid cygwin1.dll registry entries that might be causing the DLL error.

    We rarely recommend the use of registry cleaners. We’ve included the option here as a «last resort» attempt before the destructive step coming up next.

  11. Perform a clean installation of Windows. A clean install of Windows will erase everything from the hard drive and install a fresh copy of Windows. If none of the steps above correct the cygwin1.dll error, this should be your next course of action.

    All the information on your hard drive will be erased during a clean install. Make sure you’ve made the best attempt possible to fix the cygwin1.dll error using a troubleshooting step prior to this one.

  12. Troubleshoot for a hardware problem if any cygwin1.dll errors persist. After a clean install of Windows, your DLL problem can only be hardware related.

Как установить John the Ripper в Windows

Компиляцию John the Ripper из исходного кода в Windows мы рассмотрим как-нибудь потом. Воспользуемся официальным бинарным файлом.

Со страницы https://github.com/openwall/john-packages/releases/tag/jumbo-dev скачайте файл winX64_1_JtR.7z.

Распакуйте содержимое этого архива в папку C:\cygwin64\home\ИМЯ-ПОЛЬЗОВАТЕЛЯ, например, у меня пользователь MiAl, поэтому я распаковываю в папку C:\cygwin64\home\MiAl\.

На самом деле в Windows можно запустить John the Ripper даже без Cygwin, но в этом случае он не сможет использовать OpenCL (видео ядра) для брут-форса.

Теперь в папке C:\cygwin64\home\ИМЯ-ПОЛЬЗОВАТЕЛЯ\JtR\run\ найдите cygOpenCL-1.dll и переименуйте его в cygOpenCL-1.dll.bac.

Затем в папке c:\Windows\System32 найдите файл OpenCL.dll и скопируйте его в папку C:\cygwin64\home\ИМЯ-ПОЛЬЗОВАТЕЛЯ\JtR\run\.

Затем в папке C:\cygwin64\home\ИМЯ-ПОЛЬЗОВАТЕЛЯ\JtR\run\ переименуйте файл OpenCL.dll в cygOpenCL-1.dll.

Трюк с подменой файла может сработать не для всех систем — но в любом случае вы можете использовать для взлома центральный процессор или встроенную графику.

Откройте консоль Cygwin для выполнения команд.

Запустите тест установки::

~/JtR/run/john --test=0
~/JtR/run/john --test

Но всё-таки JtR это одна из тех программ, которая в первую очередь предназначена для Linux. Дальше вы увидите, что мы будем запускать скрипты для генерации (извлечения) хешей из файлов и, например, для некоторых из вспомогательных программ/скриптов нужно, например, установленное окружение Python, которое в Linux присутствует по умолчанию.

Cygwin 3.1

Основные изменения в v. 3.1

  • FIFO теперь можно открывать несколько раз для записи.
  • Добавлена поддержка 24-битного цвета в режиме совместимости xterm в Windows 10 или более поздней версии.
  • Поддержка псевдо-консоли в PTY. Псевдоконсоль — это новая функция в Windows 10, которая предоставляет консольные API на виртуальном терминале.
  • Устранен конфликт имен файлов заголовков.
  • Поддержка чувствительных к регистру каталогов
  • Добавлены новые инструменты chattr и lsattr для настройки и просмотра файлов в командной строке.
  • Обновлена семантика переименования POSIX в NTFS, начиная с Windows 10.

Review

Cygwin allows us to run commands and Linux applications on Windows operating systems.

Windows is without any doubt the most used Operating System worldwide in desktop computers. Thanks to this, Windows has a multitude of tools and programs available to meet the needs of a large part of its users. However, there are certain tools and utilities that are better developed in other Operating Systems. This is the case of Linux, which stands for the quantity and quality of available tools.

Thanks to Cygwin we can use a great number of Linux Operating System tools and commands on Windows. For example, we can run: ls, vim, joe, ftp, gcc, etc.

Installing this software is simple. The installer gives us the option to install the software directly, or download the files needed for installation and install it later. This is because the installation files can take up a lot of space and take a long time to download.

To make the installation of the program, we must have administrator privileges, if we don’t have admin privileges we need to install it using the following command in Windows Terminal: 32-bit version: “setup-x86.exe —non-admin”. 64-bit version: “setup-x86_64.exe —non-admin”.

When we launch installation, we should select download “mirror” location to download necessary packages. We need to choose a mirror that is near to our location. For example, if we are in Europe, we can use Netherlands mirrors that tend to be very fast. In that case we must find those mirrors that contain “nl” in the URL. If the installation fails we can select other “mirror” from the list.

Once we have selected download “mirror”, we should select packages that we’re going to install. The packages are organized in categories. By default Cygwin installs only packages in “Base” category, which are the essential packages. There are a multitude of packages categories such as: audio, databases, games, graphics, KDE, perl, python, ruby, system, shells, video, web, and more.

We should not worry about packages dependencies, because the program automatically detects it and allow us to select dependencies needed to install the packages.

Once installed, if we launch it, we will see that we have a Linux shell-style. In this shell (command console or terminal), we can run common Linux operating systems commands. For example, we can access file system, and we can navigate it using Linux commands. If we want to access “C:” drive, we must enter “/cygdrive/c” path , so we can make use of commands like grep, ls, or any other. For example, we can run “df-h” to see total space, free and used space in hard disks.

There are exclusive Cygwin “ports”, so we can install a multitude of software in this environment. It’s not restricted to command line tools, we can also install window managers, such as KDE, Gnome or MATTE, which opens a wide range of possibilities.

Thanks to this program we will be able to have a Linux environment on Windows without the use of a Virtual machine.

The program is free and can be used without any restriction or limitation.

Cygwin Installation

Installation of Cygwin begins with downloading the executable file and running it. Here are series of screen shots that can guide you through the complete installation.

1) Make sure that you are using a version of Windows supported by Cygwin, and that you have sufficient disk space. Recommended is 5GB minimum as the complete Installation of Cygwin can weight around 5GB.

2)Run the executable file and then choose the option “install from internet”. This allows application to download the complete repository from the server to your local machine.

3) Choose the default directory. C:\Cygwin, this is always recommended. Click Next.

4) Choose the type of Internet connection. Select “Direct Connection”. Hit Next.

5) Select a nearby mirror site from which to download the Cygwin packages. Any one will do.

6) Selecting packages:This is the critical part. In this step you need to choose the applications you want. The applications or the packages can be selected just by clicking default label adjacent to the package name. In case you are completely new to UNIX, these are most commonly used packages:

  • opennssh
  • keychain (for ssh key pairs)
  • gv
  • ghostscript
  • emacs
  • vi
  • grace
  • tcsh
  • gnu compilers
  • tetex
  • aspell
  • gnuplot
  • rsync

7) As soon as you click next, the installation begins. It takes some time, could be around 30 minutes depending upon the downloading speed. Launch Cygwin by clicking the batch file.

Описание

Cygwin представляет собой инструмент для портирования ПО UNIX в Windows и представляет собой библиотеку, которая реализует интерфейс прикладного программирования POSIX на основе системных вызовов Win32. Кроме того, Cygwin включает в себя инструменты разработки GNU для выполнения основных задач программирования, а также и некоторые прикладные программы, эквивалентные базовым программам UNIX. В 2001 году в Cygwin был включён пакет X Window System.

Кроме того, Cygwin содержит библиотеку MinGW, позволяющую работать с библиотекой Microsoft MSVCRT (Windows API); библиотека MinGW менее требовательна к объёму оперативной и дисковой памяти, распространяется под более свободной лицензией и может работать с любым программным обеспечением, но функциональные возможности спецификации POSIX реализованы в ней не так полно, как в Cygwin.

Red Hat реализует библиотеку Cygwin под лицензией GNU GPL, таким образом, её можно использовать только в программах, распространяемых под GPL. Для распространения программ, использующих библиотеку Cygwin под лицензией, отличной от GPL, необходимо приобретение лицензии у RedHat.

Описание

Cygwin представляет собой инструмент для портирования ПО UNIX в Windows и представляет собой библиотеку, которая реализует интерфейс прикладного программирования POSIX на основе системных вызовов Win32. Кроме того, Cygwin включает в себя инструменты разработки GNU для выполнения основных задач программирования, а также и некоторые прикладные программы, эквивалентные базовым программам UNIX. В 2001 году в Cygwin был включён пакет X Window System.

Кроме того, Cygwin содержит библиотеку MinGW, позволяющую работать с библиотекой Microsoft MSVCRT (Windows API); библиотека MinGW менее требовательна к объёму оперативной и дисковой памяти, распространяется под более свободной лицензией и может работать с любым программным обеспечением, но функциональные возможности спецификации POSIX реализованы в ней не так полно, как в Cygwin.

Red Hat реализует библиотеку Cygwin под лицензией GNU GPL, таким образом, её можно использовать только в программах, распространяемых под GPL. Для распространения программ, использующих библиотеку Cygwin под лицензией, отличной от GPL, необходимо приобретение лицензии у RedHat.

Другие методы (для PuTTY-Lovers)

Миннет великий, но другим это может не понравиться. Мы показали вам, как установить SSH-сервер на Cygwin, и многие люди используют PuTTY или KiTTY для подключения к Cygwin таким образом. Однако, если вы не хотите устанавливать SSH-доступ, есть более простой способ.

Лично я предпочитаю KiTTY через PuTTY, потому что он более настраиваемый и чаще обновлялся за последние 4 года. Существует патч PuTTYcfg, совместимый с KiTTY, который добавляет эту функциональность для других, таких как я. Честно говоря, хотя я начал использовать Mintty с Cygwin, я не трогал KiTTY за несколько недель.

Наконец, если вы ищете что-то, что поддерживает Cygwin, а также командную строку Windows, вы можете быть заинтересованы в консоли. Это консольная замена, которая позволяет использовать несколько типов оболочек, а также добавлять прозрачность и менять шрифты «на лету».

У вас есть привилегированная оболочка Cygwin? У вас есть альтернатива Cygwin? Знать патч, который работает с PuTTY 0.61? Дайте нам знать ниже!

Tweet
Share
Link
Plus
Send
Send
Pin

Overview

Cygwin/X is a port of the X
Window System to the
Cygwin API layer for the
Microsoft Windows family of operating systems.
Cygwin provides a UNIX-like API, thereby minimizing the
amount of porting required.

Cygwin/X consists of an X server, X libraries, and nearly
all of the standard X clients, such as xterm, xhost, xdpyinfo,
xclock, xeyes, etc. Many more X programs are also
packaged
for Cygwin.
See also the features and
screenshots pages.

Cygwin/X is licensed under a
MIT/X11 style license.
Cygwin is
licensed under a modified GNU General Public License that
specifically allows libcygwin.a to be linked to programs that
are licensed under an
Open Source Definition
compliant license without
such linking requiring that those Open Source programs be
licensed under the GNU General Public License (see the
Cygwin licensing
page for more information). Source code and binaries for
both projects are freely available.

Mintty спасает день

Mintty — отличная альтернативная оболочка для Cygwin, которая предоставляет множество полезных функций и устраняет вышеупомянутые проблемы. Если вы используете MSYS / MinGW вместо Cygwin, Mintty прекрасно работает с этим.

Вы можете установить Mintty, схватив его со страницы загрузки проекта (убедитесь, что вы получили правильную версию для своей установки!), Или вы можете снова запустить файл Setup.exe Cygwin.

На экране «Выбрать пакеты» посмотрите в разделе «Оболочки» и найдите Mintty. Нажмите, где написано «Пропустить», и нажмите кнопку «Далее». После того, как вы закончите установку, вы можете запустить Пуск> Все программы> Cygwin> mintty, чтобы запустить его.

Вот как выглядит окно Mintty по умолчанию:

Это немного ванили, но вы заметите, что изменение размера работает правильно, и шрифт, по крайней мере, немного лучше. Вы можете нажать Ctrl и + или — сделать шрифт больше или меньше в любой момент времени. Щелкните правой кнопкой мыши на панели заголовка и выберите «Параметры» …

Первое, что я сделал, это изменить прозрачность окна и курсор на вкладке «Смотри» на то, с чем я больше знаком. После этого перейдите на вкладку «Текст».

Конечно, вы можете изменить шрифт по умолчанию, но также и набор Locale и Character, отличный от того, что Windows использует прямо сейчас. Вы также можете играть с разглаживанием шрифтов, если ваш монитор показывает это немного слишком неровно.

В разделе «Параметры мыши» вы сможете изменить настройки взаимодействия с мышью, такие как копирование и вставка. Вы также можете легко заставить мышь разместить курсор командной строки, что часто нравится пользователям vim. Наконец, нажмите «Окно».

Здесь вы можете изменить размер терминала по умолчанию, размер буфера прокрутки и выбрать модификатор для прокрутки с помощью клавиш со стрелками. По умолчанию Shift + Up / Down будет прокручивать буфер в окне. Теперь вот как выглядит моя измененная конфигурация Mintty.

(Нажмите на изображение выше, чтобы увидеть увеличенную версию.)

Как получить доступ к дискам в Cygwin

Если при установке Cygwin вы оставили путь по умолчанию, то Cygwin храниться в папке C:\cygwin64. Именно эта папка является для Cygwin корнем файловой системы выше которой подняться невозможно.

В ОС Linux другие диски (если они есть) подключаются в выбранные точки монтирования ниже по дереву файловой системы. То есть в Cygwin можно просматривать список файлов, создавать новые файлы, редактировать и удалять существующие файлы на всех дисках ОС Windows (если позволяют права записи). Но нужно знать, куда они смонтированы.

Чтобы просмотреть список физических дисков в системе:

ls -l /dev/s*

Пример вывода:

brw-rw-rw- 2 MiAl Отсутствует 11, 0 окт 14 10:23 /dev/scd0brw-rw-rw- 1 MiAl Отсутствует 8, 0 окт 14 10:23 /dev/sdabrw-rw-rw- 1 MiAl Отсутствует 8, 1 окт 14 10:23 /dev/sda1brw-rw-rw- 1 MiAl Отсутствует 8, 2 окт 14 10:23 /dev/sda2brw-rw-rw- 1 MiAl Отсутствует 8, 3 окт 14 10:23 /dev/sda3brw-rw-rw- 1 MiAl Отсутствует 8, 4 окт 14 10:23 /dev/sda4brw-rw-rw- 2 MiAl Отсутствует 11, 0 окт 14 10:23 /dev/sr0lrwxrwxrwx 1 MiAl Отсутствует 15 июл 12 23:41 /dev/stderr -> /proc/self/fd/2lrwxrwxrwx 1 MiAl Отсутствует 15 июл 12 23:41 /dev/stdin -> /proc/self/fd/0lrwxrwxrwx 1 MiAl Отсутствует 15 июл 12 23:41 /dev/stdout -> /proc/self/fd/1

Как можно понять из предыдущего вывода, диск /dev/sda разделён на четыре раздела: /dev/sda1, /dev/sda2, /dev/sda3 и /dev/sda4.

Чтобы просмотреть информацию о смонтированных дисках и точках монтирования, выполним команду:

mount

Пример вывода:

C:/cygwin64/bin on /usr/bin type ntfs (binary,auto)C:/cygwin64/lib on /usr/lib type ntfs (binary,auto)C:/cygwin64 on / type ntfs (binary,auto)C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)Z: on /cygdrive/z type vboxsharedfolderfs (binary,posix=0,user,noumount,auto)

Из этой информации следует, что диск C смонтирован в директорию /cygdrive/c. Диск Z: (это сетевой диск) смонтирован в директорию /cygdrive/z.

Запись C:/cygwin64 on / означает, что в качестве корневой файловой системы () смонтирована папка C:/cygwin64.

Чтобы увидеть все диски системы, включая сетевые и включая флешки и другие внешние диски выполните команду:

ls -l /cygdrive/

Итак, к любому диску в Windows из Cygwin можно получить доступ через папку /cygdrive/. К примеру, для просмотра файлов и папок на диске C:

ls -l /cygdrive/c

Cygwin/MSYS adapter (winpty.exe)

Prerequisites

You need the following to build winpty:

  • A Cygwin or MSYS installation
  • GNU make
  • A MinGW g++ toolchain capable of compiling C++11 code to build
    and
  • A g++ toolchain targeting Cygwin or MSYS to build

Winpty requires two g++ toolchains as it is split into two parts. The
and binaries interface with the native
Windows command prompt window so they are compiled with the native MinGW
toolchain. The binary interfaces with the MSYS/Cygwin terminal so
it is compiled with the MSYS/Cygwin toolchain.

MinGW appears to be split into two distributions — MinGW (creates 32-bit
binaries) and MinGW-w64 (creates both 32-bit and 64-bit binaries). Either
one is generally acceptable.

Cygwin packages

The default g++ compiler for Cygwin targets Cygwin itself, but Cygwin also
packages MinGW-w64 compilers. As of this writing, the necessary packages are:

  • Either or . Select the
    appropriate compiler for your CPU architecture.

As of this writing (2016-01-23), only the MinGW-w64 compiler is acceptable.
The MinGW compiler (e.g. from the package) is no longer
maintained and is too buggy.

MSYS packages

For the original MSYS, use the tool (MinGW Installation Manager),
and select at least these components:

When running , make sure that is in your
. It will be in the directory.

MSYS2 packages

For MSYS2, use and install at least these packages:

  • or . Select
    the appropriate compiler for your CPU architecture.

MSYS2 provides three start menu shortcuts for starting MSYS2:

  • MinGW-w64 Win32 Shell
  • MinGW-w64 Win64 Shell
  • MSYS2 Shell

To build winpty, use the MinGW-w64 {Win32,Win64} shortcut of the architecture
matching MSYS2. These shortcuts will put the g++ compiler from the
packages into the .

Alternatively, instead of installing or
, install the and
packages. These packages install cross-compilers
into , and then any of the three shortcuts will work.

To run a Windows console program in or Cygwin , prepend
to the command-line:

Интернационализация

До версии 1.7 Cygwin не имел поддержки Unicode и использовал только ANSI-варианты функций Win32; отсутствовала также и поддержка каких-либо кодировок, отличных от родных для Windows и OEM (так, в русскоязычной версии Windows Cygwin работала лишь с CP1251 и CP866, но не KOI8-R, ISO 8859-5, UTF-8 или какими-либо другими.

Начиная с версии 1.7 кодировкой по умолчанию является Unicode в форме UTF-8 и, соответственно, по умолчанию используются региональные настройки (locale в англ.) . При вызове функций Win32 Cygwin осуществляет трансляцию строк в кодировку UTF-16, используемую в системах Windows. Начиная с версии 1.7.2 Cygwin также может извлекать некоторую информацию из реестра Windows в соответствии с установками Language и Territory в региональных настройках.

Другая проблема заключалась в том, что консоль Cygwin (подобно CMD.EXE) использовала кодировку OEM. Для обхода этого ограничения рекомендовалось запускать в Cygwin демоны rshd или sshd и использовать эмулятор терминала с полной поддержкой UTF-8, например PuTTY или MinTTY (входит в комплект Cygwin). Начиная с версии 2.0 в качестве консоли Cygwin штатно использует MinTTY, который работает в кодировке UTF-8, что позволяет выводить текстовую информацию в UTF-8 напрямую. Также терминал осуществляет трансляцию вводимой с клавиатуры информации в UTF-8, в соответствии с используемой национальной раскладкой.

История

Работа над проектом Cygwin была начата в 1995 году Стивом Чемберленом (англ. Steve Chamberlain), программистом Cygnus, заметившим, что Windows NT и Windows 95 используют в качестве формата объектных файлов формат COFF. К тому времени в GNU уже была реализована поддержка архитектуры x86, COFF, а также библиотека языка C newlib; таким образом, по крайней мере теоретически, не представляло затруднений получить из GCC кросс-компилятор, который бы создавал исполняемые файлы Windows. Это оказалось несложным и на практике. Вскоре появился прототип.

Следующим шагом было заставить компилятор работать в Windows, но для этого была необходима эмуляция многих функций Unix: к примеру, должен был работать скрипт GNU configure. Этот скрипт нуждается в оболочке типа bash, которая, в свою очередь, требует наличия стандартных потоков ввода-вывода и системного вызова fork. Windows располагает подобными функциональными возможностями, и библиотека Cygwin лишь транслирует вызовы, исходящие от программ, управляя определёнными видами данных, такими как файловые дескрипторы.

В 1996 году к проекту Cygwin присоединились и другие программисты, так как стало очевидным, что Cygwin сделает возможным использование инструментов Cygnus на системах с Windows (до этого намечалось использовать DJGPP). Этот вариант был особенно привлекательным, ведь кросскомпиляция могла бы производиться в трёх направлениях: можно было использовать мощную станцию Sun для сборки Windows-кросскомпилятора MIPS, что позволяло значительно экономить время. С 1998 года Cygnus предлагает пакет Cygwin в качестве самостоятельного продукта.

MISCELLANEOUS OPTIONS

Xserver(1)

-help

Write a help text listing supported command line options and their description to the console.
-ignoreinput

Ignore keyboard and mouse input. This is usually only used for testing
and debugging purposes.
-logfile filename

Change the server log file from the default of
/var/log/xwin/XWin.n.log
,
where n is the display number of the XWin server, to filename.
-logverbose level

Control the degree of verbosity of the log messages with the integer
parameter level. For level=0 only fatal errors are
reported, for level=1 simple information about
configuration is also given, for level=2 (default)
additional runtime information is recorded
and for level=3 detailed log
information (including trace and debug output) is produced. Bigger
values will yield a still more detailed debug output.
-silent-dup-error

If another instance of XWin with the same display number is found running,
exit silently and don’t display any error message.
-xkblayout layout

-xkbmodel model

-xkboptions option

-xkbrules rule

-xkbvariant variant

These options configure the xkeyboard extension to load
a particular keyboard map as the X server starts. The behavior is similar
to the setxkbmap(1) program.

See the xkeyboard-config(7) manual page for a list of
keyboard configurations.

The keyboard layout data is located at /usr/share/X11/xkb/. Additional information
can be found in the README files there and in the setxkbmap(1) manual page.

For example, in order to load a German layout for a pc105 keyboard, use the options:
-xkblayout de -xkbmodel pc105

Alternatively, you can use the setxkbmap(1) program after XWin is
running.

The default is to select a keyboard configuration matching your current layout as
reported by Windows, if known, or the default X server configuration
if no matching keyboard configuration was found.

Этичный хакинг и тестирование на проникновение, информационная безопасность

Никакого холивара — только факты.

Начну, пожалуй, с самого главного. Уровень тестера на проникновения зависит от его знаний и возможности владеть специализированными инструментами

А в какой среде эти инструменты запущены — совершенно неважно. К примеру, если вы проверяете сайт на SQL-инъекции, то ваше «мастерство» зависит исключительно от умения пользоваться sqlmap или jSQL (или чем-то подобным), а в какой среде вы их запускаете: Linux Mint, Kali Linux, BlackArch или даже Windows — это не суть

Тем не менее, если мы говорим о производительности труда, т. е. о скорости выполнения задач и достижения результатов, то на это среда влияет довольно значительно. Чтобы использовать sqlmap в Windows, нужно скачать и установить правильную версию Python, также скачать sqlmap, и даже если всё делать правильно — работать в командной строке Windows — это мука: отсутствие поддержки автодополнения по клавише TAB, необходимость прописывать полные пути до файлов (или же необходимость устанавливать переменные окружения). Если мы переходим к Linux Mint, то там нужно скачать архив с sqlmap, распаковать и правильно запустить (желательно ещё и правильно установить, чтобы упростить дальнейшие запуски). И в Windows и в Linux Mint вам самим нужно следить за обновлениями программ, которые отсутствуют в репозиториях.

В Kali Linux или BlackArch вы просто набираете в консоли sqlmap с опциями и программа начинает работать для вас. За обновлениями вам следить не нужно — она обновиться сама, как только будет новая версия в репозиториях.

Т.е. видно, насколько всё проще в специализированных дистрибутивах. При этом если вы не умеете пользоваться sqlmap, то никакой дистрибутив, ни с какими крутыми хакерскими обоинами на рабочем столе вам не поможет. Это я и есть моя мысль, что среда никак не влияет на ваши возможности, она только влияет на производительность труда.

Т.е. получается, что специализированный дистрибутив, вроде бы как, всегда лучше? Всё зависит от конкретной ситуации. Например, вы хотите проверить свой сайт на SQL инъекции один раз. При этом вам не нужны все остальные инструменты и вам постоянно досаждают «закидоны» Kali Linux среди которых: проблемы с добавлением программ в автозапуск, отсутствие автостарта служб, которые на «дружественных» дистрибутивах сами запускаются при загрузке системы, постоянный рут и странный репозиторий; то тогда продуктивнее будет использовать тот дистрибутив, к которому вы привыкли, просто установив на него нужные вам программы.

Создатели Kali Linux не рекомендуют её для начинающих пользователей. Тем не менее, начинающие пентестеры столкнуться с большим количеством вопросов, если будут устанавливать программы самостоятельно из исходных кодов. Т.е. если вы изучаете тему пентестинга то, конечно, лучше выбрать специализированный дистрибутив.

Overview

Cygwin/X is a port of the X
Window System to the
Cygwin API layer for the
Microsoft Windows family of operating systems.
Cygwin provides a UNIX-like API, thereby minimizing the
amount of porting required.

Cygwin/X consists of an X server, X libraries, and nearly
all of the standard X clients, such as xterm, xhost, xdpyinfo,
xclock, xeyes, etc. Many more X programs are also
packaged
for Cygwin.
See also the features and
screenshots pages.

Cygwin/X is licensed under a
MIT/X11 style license.
Cygwin is
licensed under a modified GNU General Public License that
specifically allows libcygwin.a to be linked to programs that
are licensed under an
Open Source Definition
compliant license without
such linking requiring that those Open Source programs be
licensed under the GNU General Public License (see the
Cygwin licensing
page for more information). Source code and binaries for
both projects are freely available.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *