Sometimes you work on Windows as a restricted user, without admin rights. Like many other good software packages, Cygwin can be installed anyway (see the respective FAQ entry).
These are the steps I used:
- Download setup-x86.exe (32bit) or setup-x86_64.exe (64bit).
- Run it with the “
--no-admin” option - During installation select the “wget” package
- Create /usr/local/bin/cygwin-setup.sh (for 32bit omit the “_64”):
#! /bin/sh rm setup-x86_64.exe wget http://cygwin.com/setup-x86_64.exe chmod u+x setup-x86_64.exe run ./setup-x86_64.exe --no-admin
- Make the script executable:
chmod ugo+x /usr/local/bin/cygwin-setup.sh
- Create a copy of the Cygwin terminal shortcut, rename it “Cygwin setup”
- Edit the shortcut target, replace
mintty.exe -i /Cygwin-Terminal.ico -
with
mintty.exe -i /Cygwin-Terminal.ico /bin/bash -l -c 'cygwin-setup.sh'
Whenever you want to run the Cygwin installer to install or remove packages, you can just execute the shortcut or run cygwin-setup.sh from the Cygwin command prompt.
Alternatively, you could also use the pure command-line tool apt-cyg.
with disallowed creation of symlinks the certificates cannot be installed and thus the whole cygwin breaks down :(
Could you please provide more details? I do not remember ever having such a problem.
Late cominging across this but it seems like a great solution! I’m having trouble with the script and shortcut – specifically the wget command. The connection keeps timing out, but when I copy and paste the URL into the web browser on my windows machine there is no issue getting a download dialog to pop up.
The output of the wget command at the terminal is as follows:
$ wget ‘http://cygwin.com/setup-x86_64.exe’
–2018-11-02 17:03:00– http://cygwin.com/setup-x86_64.exe
Resolving cygwin.com (cygwin.com)… 209.132.180.131
Connecting to cygwin.com (cygwin.com)|209.132.180.131|:80… failed: Connection timed out.
Retrying.
–2018-11-02 17:03:22– (try: 2) http://cygwin.com/setup-x86_64.exe
Connecting to cygwin.com (cygwin.com)|209.132.180.131|:80… failed: Connection timed out.
Retrying.
–2018-11-02 17:03:45– (try: 3) http://cygwin.com/setup-x86_64.exe
Connecting to cygwin.com (cygwin.com)|209.132.180.131|:80…
Any assistance you could provide is much appreciated!
Cheers Mike
Maybe a web proxy issue? Can you wget other URLs? This manual page might help: https://www.gnu.org/software/wget/manual/html_node/Proxies.html
Thanks very much for the response. Looks like other URLs are no good either. I’m on a work machine which is through a proxy, so I suspect you are correct. I’ll have a closer look into it!
The flag is actually
--no-admin,that’s two dashesThanks for pointing this out. All the code samples in the comment actually use two dashes. But somehow the WordPress font and/or theme seems to display it as single quote. I just fixed all related comments using “code” xhtml tags.
Yes, that worked great. Thanks!
I’ve tried a couple different versions of your script, and it works fine if I run it from within cygwin. Startup also starts-up just fine if I remove either the ampersand or the nohup from your command line.
But if I leave both, or just have a script with this line:
nohup ./setup-x86_64.exe --no-admin &then, a script window appears briefly, goes away, but cygwin setup doesn’t start.
Any thoughts you have would be appreciated!
More info…
if I add a sleep 5s to the next line, setup-x86_64.exe starts as expected… and then disappears after five seconds.
So it’s as if nohup is being ignored? Any ideas?
Meanwhile, this .cmd file works and exits the batch file. But I’d really like to understand why nohup doesn’t seem to be working as expected?
c:\
cd c:\users\%username%\downloads
rm setup-x86_64.exe
c:\cygwin64\bin\wget http://cygwin.com/setup-x86_64.exe
c:\cygwin64\bin\chmod u+x setup-x86_64.exe
start setup-x86_64.exe --no-admin
The nohup approach works for me so I don’t know what is going wrong for you.
However, I modified my script in the blog post to use the Cygin “run” command.
Can you try if that works for you?
Thanks
Oliver
command prompt is disabled by administrator. What to do now?
Create a shortcut to the cygwin setup executable, edit the “Target” field to include the
--no-adminoptionOr simply use the “Run” text box in the start menu.
See http://cygwin.com/faq.html#faq.setup.noroot
how do I run with the ‘no admin’ option?
Start cmd.exe and run the cygwin setup executable with the
--no-adminoption.Great write-up! Thanks!