Questions tagged [cygwin]

Linux-like environment for Windows making it possible to port software running on POSIX systems (such as Gnu/Linux, BSD, and UNIX systems) to Windows.

Filter by
Sorted by
Tagged with
1
vote
4answers
2k views

Treat “\r” as nothing in “while read -r”

I have this line of code that reads a text file line by line. The text file is sometimes generated by a Windows user, sometimes by a Unix user. Therefore, sometimes I see \r\n at the end of the line ...
2
votes
1answer
916 views

How to find files with a specific pattern in the parent and child directory?

How to find files with a specific pattern in the parent and child directory of my present working directory using a single command ? Filename - test.txt, the file has the pattern nslookup This file ...
1
vote
3answers
344 views

Printing columns using AWK?

I have roughly 7 columns on each line, I want to print two specific columns then the remaining columns after the last specified one, example: awk -F: {' print $2 ":" $6 '} a.txt would print columns ...
4
votes
2answers
1k views

Run an X11 program under Cygwin

How do I set the appropriate DISPLAY environment variable? I try to launch idle in cygwin using the following command: idle ...and I get a display error: _tkinter.TclError: no display name and ...
4
votes
2answers
7k views

Permission issues while doing ssh setup in Cygwin

I'm trying to setup ssh-host in Cygwin and am getting the below error: *** Warning: The permissions on the directory /var are not correct. *** Warning: They must match the regexp d..x..x..[xt] *** ...
0
votes
1answer
121 views

bspwm on cygwin - slow redraw isssue

I have managed to compile bspwm tiling window manager under cygwin 2.10.0(0.325/5/3) (Windows 7), compared to Openbox, LXDE or fwvm the performance is quite bad. Can you please suggest me some ideas ...
0
votes
3answers
2k views

Alternatives for Cygwin

Are there any command-line interface for Microsoft Windows other than cygwin. Currently, I am using cygwin but there are some commands that do not work as they are supposed to work on linux
5
votes
3answers
7k views

SSH: connection reset after idle for some time

When my connection has been idle for some time, the remote host closes the connection. I try to type a new command, it hangs, then closes the connection. How can I keep the ssh connection active for ...
27
votes
6answers
71k views

Cygwin on Windows: Can't open display

I am running Windows 10 on my Surface Pro 3. I installed Cygwin and also added some useful packages (gvim, nedit, emacs, vim, g++). However, when I run gvim, I get "Can't open display". The same thing ...
0
votes
2answers
608 views

How to make my Makefile compatible with Cygwin? (install: invalid user ‘root’)

I have written a very simple Makefile $ cat Makefile install_path=/usr/local/bin script_name_1=encrypt-file-aes256 script_name_2=decrypt-file-aes256 .PHONY: install .PHONY: uninstall install: ...
2
votes
1answer
2k views

Which cygwin package contains ip command?

I need the ip command in cygwin. I discovered that it's part of the iproutes2 package. But cygwin doesn't have that package?? I what cygwin package can I find ip command? (I need to find the gateway,...
0
votes
1answer
271 views

LFTP adds “;type=i” to remote file name

I'm using LFTP version 4.7.8 under cygwin. It automatically adds ";type=i" (or ";type=a" if I do put -a) to remote file name. What's more, mv command does not work : mv: Operation not supported: 501 ...
1
vote
1answer
546 views

compiling i3 under cygwin - cannot find libiconv library

I am trying to compile i3 version 4.14.1 under Cygwin 2.884 (Windows 7). I have installed needed libiconv library via Cygwin setup but while running ./configure I get this error: configure: error: in ...
0
votes
0answers
54 views

Enabling vim undo history in Cygwin

I have an install of Cygwin on a Windows 10 machine. I am trying to enable undo history in vim so that it is remembered between vim instances. At the moment everything is forgotten after closing the ...
3
votes
4answers
5k views

How to Cygwin Xwin -query an Ubuntu 11.10 Xserver?

I am running Cygwin 1.7 on Win7 Pro x64, and I can query my Ubuntu 10.04 LTS server just fine. XWin.exe -clipboard -once -rootless -nodecoration -notrayicon -query $IP_ADDRESS I recently installed ...
4
votes
2answers
523 views

Non-ascii in Cygwin bash command line causes error

I'm calling bash from cmd.exe like this c:\cygwin\bin\bash --login -c "echo ф" and get on Cygwin 2.8.0 /usr/bin/bash: echo ф: command not found It treats the parameter as part of the command name. ...
4
votes
2answers
18k views

Curl JSON encoded in UTF-8

Important note: I'm using Cygwin I retrieve JSON from a file that I alter before sending it to a server using curl. By now everything is ok except one thing, when the server receive the JSON, every ...
2
votes
1answer
267 views

Why `env` does not find my executable?

I'm trying to use shebang with /usr/bin/env form to execute my script under custom interpret. This is how my file looks: $ cat test.rb #!/usr/bin/env winruby print "Input someting: " puts "Got: #{...
23
votes
3answers
110k views

How to exit file reading mode (in `less`) in Linux terminal?

I have just installed Cygwin, and I have displayed a file's contents using the less command. Now I am unable to exit that in order to type other commands: I want to exit this mode to type some other ...
22
votes
10answers
64k views

Best way to use a shell with Cygwin in Windows 7 [closed]

I installed Cygwin, to be disappointed that bash by default runs within "cmd.exe". I googled around and found Console2. It's not a particularly well-designed application, as doing adjustments is ...
0
votes
1answer
215 views

Exact String match works for grep 2.6.3 but not for grep 3.0

I am facing an issue on my windows machine with Cygwin in it. On one of my machine grep exact string match using $ works: $ ipconfig /all | grep -A 1 'My Ethernet Server Adapter B52-2$' ...
0
votes
1answer
902 views

Replacing getopts.pl with Getopt::Std [closed]

I am using Cygwin version 2.10.0 with perl 5.26.0. I need to change getopts.pl to Getopt::Std but what to do with &Getopts('F:f:'); line then? #! /usr/bin/perl require "getopts.pl" ; # Perl ...
0
votes
4answers
847 views

sed remove digits from end of stirng

remove digits from end of string, example input: example123 example321 example0123 expected output: example example example I tried the below which didn't work: sed 's/[0-9]\+$//' <in.txt >...
-2
votes
1answer
69 views

viewing actual file size of folder

I know that the command du -csbh will show you the actual file size of a directory. This will be displayed as: 241 MB which is fine. If I look in windows 10 at the properties of the same folder. The ...
0
votes
2answers
910 views

CygWin: MD5 sum did not match, exiting

cyg-get install lzop gave: MD5 sum did not match, exiting I tried: cyg-get update rm /setup/http%3a%2f%2fmirrors.kernel.org%2fsourceware%2fcygwin/release/lzop/lzop-1.03-1.tar.bz2 That did not help....
0
votes
2answers
701 views

How do I avoid make to generate and install man pages?

Context: I'm compiling OpenLDAP on Windows inside CygWin. As I'm not interested in man pages (and possibly other documentation, I'm focused on getting the compilation done), since I can get them ...
1
vote
1answer
266 views

Emacs key problem

I am using Cygwin to connect to an Ubuntu installation, and for some reasons my Ctrlh for the help has been remapped to CtrlDel. When I actually type Ctrlc,h I get the error: No operation mapped ...
1
vote
1answer
80 views

Escaping single quote [closed]

I had to wipe my drive and reinstall windows, which also required reinstalling cygwin. In my new install, ls -l "*\'*" returns ls: cannot access '*\'\''*': No such file or directory For years up ...
3
votes
1answer
2k views

Store command output in variable when command includes pipes

How do I store the output of a command in a variable? Here is what I am doing but nothing is being stored. It seems that pipes are the issue, but I don't know how to proceed debugging. This works as ...
8
votes
3answers
6k views

Is dpkg available for Cygwin?

I don't use Windows all that often, but I've found my self in a position where I'm stuck in front of one quite a bit temporarily. So I've been investigating Cygwin. My question is dpkg available for ...
0
votes
2answers
138 views

Can't install to Cygwin's MinGW sysroot (it's protected)

I have built a library with this command: $ ../configure '--host=x86_64-w64-mingw32' --prefix=/usr/x86_64-w64-mingw32/sys-root/mingw && make && make install Installation fails ...
4
votes
1answer
1k views

Xrandr doesn't scale screen under Cygwin/X and Xming

The preamble: I have a very specific remote X client, that needs fixed resolution. 1280x1024, to say. And my notebook has 1440x900. And Windows aboard. So, the idea is to scale the output of the ...
1
vote
1answer
446 views

Git functions requiring SSH broken on Cygwin

On Cygwin, running git clone git@..., git pull or git push, where the remote is an SSH repository address, fails. Below is output of running git clone: Cloning into 'iko-app-rocket'... fatal: cannot ...
0
votes
2answers
9k views

Connecting from Cygwin to local linux machine using SSH?

I'm fairly new to Linux, I tried to look for an answer for this question online and was unable to find one or was simply confused with the jargon and didn't know if this was exactly what I wanted. ...
2
votes
3answers
11k views

Using cygwin and rsync — “password file must not be other-accessible”

I've finally got an old computer of mine running as a backup server with Ubuntu 11.10. I'm planning on using it to backup my Windows 7 machine weekly using rsync. I've got cygwin installed, and rsync ...
4
votes
4answers
2k views

Grep keep (output) entire .txt file if one line contains string

I know that grep -rhI "# Active" > out.txt will output any line containing # Active within the searched directory but I want the entire .txt file contents, so example example.txt Line1 Line2 ...
2
votes
1answer
179 views

How to pass pseudo-file to child program?

I am using Cygwin - no, don't close yet - and I am having trouble with the <() syntax. A program refuses to accept the file descriptor that I am passing it, but other programs will accept it fine. ...
0
votes
0answers
410 views

In cygwin Python script print with sleep not printing output

I am using cygwin to run a python script which use a while loop and time.sleep() to display an output. If I exclude time.sleep() from inside of loop, cygwin terminal display the output as expected. ...
0
votes
1answer
201 views

math.h was not found at compile time: Hydra (Cygwin)

I`m using Hydra with Cygwin. Can anyone help me with this error? When I using -x option, this error is shown: [ERROR] -x option is not available as math.h was not found at compile time my Cygwin ...
10
votes
3answers
20k views

Using mintty as default terminal on Cygwin and default shell as bash

There is already one answered the question at Best way to use a shell with Cygwin in Windows 7. That is to start Cygwin with C:\cygwin\bin\mintty.exe - With that $SHELL = /bin/sh How can I launch ...
6
votes
2answers
11k views

XOR a file against a key

How is it possible, from bash or standard linux command-line tools, to XOR a file against a key? Something like: cat my1GBfile | xor my1MB.key > my1GBfile.encrypted Off-topic: I know the ...
0
votes
1answer
475 views

tmux-resurrect is not restoring my running commands

I'm using the tmux-resurrect plugin to recreate tmux sessions after tmux is shutdown. It mostly works but it is not restoring running commands. I've tried with vim, less, man and tail, all supported, ...
1
vote
2answers
2k views

setting Cygwin's $HOME to Windows profile directory

Are there any drawbacks to having Cygwin and Windows share the same $HOME directory, in this case the Windows profile directory?
0
votes
2answers
55 views

Returning only the contents before and after a line number with different matching words

I am using cygwin. I have known line# in my hand. Script should look for the first occurrence of the string mono above a specified line number and look for the first occurrence of the string /mono ...
1
vote
2answers
154 views

Why does bash.exe run twice when using --login?

When running cygwin, the shortcut I have uses the following: C:\cygwin\bin\bash.exe --login -i What is unclear to me is why bash.exe executes twice. I see two processes running in task manager. If I ...
0
votes
1answer
649 views

Windows/Cygwin/Python: Resolution depends on manual entry or shell script?

I'm getting a different screen resolution (in a Python script) depending on whether I type commands into Cygwin manually or run them using a shell script, and I can't understand why. I'm running ...
0
votes
1answer
802 views

Kernel Development on windows platform

I have installed windows 10 on my system.I have also installed cygwin on my system.I want to start learning kernel development.Is there any way to install, make and build kernel using cygwin on ...
0
votes
0answers
356 views

Openssl on Git Bash fails with error when Heredoc is used

I have a script that is generating ssl certificates for me. The screen used to work fine on my computer before and I did not change the script since I used it last time. Today I ran the script and ...
4
votes
2answers
223 views

Search for a specific file and change to its directory

What's the best way to go to a directory that contains a specific file? (Assuming we are starting at the root of where we wish to search). I'm using Cygwin. SOLUTION: My final solution was to put ...
0
votes
1answer
1k views

/usr/bin/gnuplot.exe: error while loading shared libraries: cyggd-2.dll: cannot open shared object file

I am trying to run Octave under Windows and to run graphics plotting routine under it. It requires Cygwin and X/Cygwin. When I trying to run any plotting routine, the following error appears: /usr/...

1 2
3
4 5
7