Re: how to make sshd start a shell other than bash when I log in?
On 2017-04-06 20:08, L A Walsh wrote: > Andrew Schulman wrote: >> But when I log into that same host by sshd, bash starts... > Have you tried changing your shell > (chsh if it is on your system, otherwise edit /etc/passwd > and change the shell for your username). > andrews:x:1001:545:A.S.:/home/andrews:/bin/fish > You will need to make sure the shell is listed > in the allowed shells file (/etc/shells). > Not sure what would be best if you don't > have a /etc/passwd... (I might add one, but > someone else may know a better way). Under ssh(1) ENVIRONMENT: "Additionally, ssh reads ~/.ssh/environment, and adds lines of the format “VARNAME=value” to the environment if the file exists and users are allowed to change their environment. For more information, see the PermitUserEnvironment option in sshd_config(5)." which says: "PermitUserEnvironment Specifies whether ~/.ssh/environment and environment= options in ~/.ssh/authorized_keys are processed by sshd(8). The default is no." In sshd(8) under AUTHORIZED_KEYS FILE FORMAT: "environment="NAME=value" Specifies that the string is to be added to the environment when logging in using this key. Environment variables set this way override other default environment values. Multiple options of this type are permitted. Environment processing is disabled by default and is controlled via the PermitUserEnvironment option." Set /etc/sshd_config PermitUserEnvironment=yes then try adding in ~/.ssh/authorized_keys on the same line before your remote host key: environment="SHELL=/bin/fish" followed by a space before the key type, or add to ~/.ssh/environment so it will apply to all remote host connections: SHELL=/bin/fish and ensure those files have only user rw permissions as usual with ssh. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
[ANNOUNCEMENT] Various Python 2 and 3 modules
The following packages have been uploaded to the Cygwin distribution: * python2-asn1crypto-0.22.0-1 * python2-attrs-16.3.0-1 * python2-boto-2.46.1-1 * python2-dropbox-6.5.0-1 * python2-html5lib-0.9-1 * python2-pyasn1-modules-0.0.8-1 * python2-rdflib-4.2.2-1 * python2-reportlab-3.4.0-1 * python2-rsa-3.4.2-1 * python2-service_identity-16.0.0-1 * python2-twisted-16.4.1-1 * python2-webencodings-0.5.1-1 * python3-asn1crypto-0.22.0-1 * python3-attrs-16.3.0-1 * python3-boto-2.46.1-1 * python3-dropbox-6.5.0-1 * python3-html5lib-0.9-1 * python3-pyasn1-modules-0.0.8-1 * python3-rdflib-4.2.2-1 * python3-reportlab-3.4.0-1 * python3-rsa-3.4.2-1 * python3-service_identity-16.0.0-1 * python3-twisted-16.4.1-1 * python3-webencodings-0.5.1-1 This is an update of more Python modules, and the addition of some new dependencies. -- Yaakov -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: how to make sshd start a shell other than bash when I log in?
Andrew Schulman wrote: But when I log into that same host by sshd, bash starts... Have you tried changing your shell (chsh if it is on your system, otherwise edit /etc/passwd and change the shell for your username). andrews:x:1001:545:A.S.:/home/andrews:/bin/fish ^^^ You will need to make sure the shell is listed in the allowed shells file (/etc/shells). Not sure what would be best if you don't have a /etc/passwd... (I might add one, but someone else may know a better way). -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
how to make sshd start a shell other than bash when I log in?
My regular shell is fish. To make local terminals run fish instead of bash when I start them, I set SHELL=/usr/bin/fish in my desktop environment. This works fine: I start MinTTY, and fish starts. But when I log into that same host by sshd, bash starts, not fish (since sshd doesn't have access to my desktop environment variables). How can I configure either my ssh client or the ssh server to start fish instead of bash? On a Linux host, sshd will start the user's default shell, as recorded in /etc/passwd and set by chsh. But in Cygwin we don't have those. On the client I know I could run e.g. ssh host /usr/bin/fish --login but I don't want to have to do that every time, and there doesn't seem to be a way to set it in ssh_config. Thanks, Andrew -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Can I change default mount options
Greetings, Pan Ruochen! > Hi Andrey Repin, >> >> No, why? Your mount options choice is very sane, IMO. >> > I just dislike cygwin treats every file as executable. This is a core Windows behavior, nothing Cygwin can do about it, not it should. In Windows, any file is, potentially, executable, in one way or another. > Comparing mount options of msys2 against cygwin, msys2 has an extra noacl > option. So I guess noacl may turn off this cygwin `feature`. No need to guess, when there's a clear documented explanation of every option. > And I also wish > this turning-off apply to the usb disk but I am unable to forecast what is > the disk letter for that usb-disk. That is basically why I wonder the > "default" mount options. It could. -- With best regards, Andrey Repin Thursday, April 6, 2017 22:51:51 Sorry for my terrible english... -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Can I change default mount options
Am 05.04.2017 um 16:07 schrieb Pan Ruochen: Hi Andrey Repin, No, why? Your mount options choice is very sane, IMO. I just dislike cygwin treats every file as executable. It doesn't --- not when the files' ACLs are set up correctly, anyway. Nor is futzing with mount options the right solution to that issue. You'll have to adjust the ACLs instead. Comparing mount options of msys2 against cygwin, msys2 has an extra noacl option. So I guess noacl may turn off this cygwin `feature`. That guess is ultimately wrong. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Settings from lang.sh causing garbled output in dialog when run from cmd.exe
On 6. 4. 2017 16:22, Matt D. wrote: > On 4/6/2017 5:47 AM, David Macek wrote: >> Try calling `/proc/cygdrive/c/windows/system32/chcp.com 65001` before >> running `dialog ...`. Does that help? > > It does not. I tried setting the code page to 65001 in cmd and/or after > loading bash as a login shell. Neither solution worked. > > This is very easily reproducible for me just by loading cmd, 'bash --login' > and then running the dialog sample I provided. Thanks for the response. Re-posting back to the mailing list. -- David Macek smime.p7s Description: S/MIME Cryptographic Signature
[ANNOUNCEMENT] meson 0.39.1-1
The following packages have been uploaded to the Cygwin distribution: * meson-0.39.1-1 Meson is an open source build system meant to be extremely fast. It generates files for various backends including Ninja, Visual Studio, and Xcode. Meson does not generate Makefiles, relying solely on Ninja for Linux and Unix support. This meson has been patched to teach it about Cygwin. noarch: 3781bf764d71a1e7033278c86d7377c91ecb1a680aadcd6122d86f115daf2ab936e92ade8b9b21942ae55a1ab6b6cf22f8f7c31036f0323aceb48f6fe24eace3 *meson-0.39.1-1-src.tar.xz 80e9d44b06ec6a8a563183a1b4f33b07c12c783d7d5b0009a491cd011c9a25ad83555b4d670f0632f0875f7a71775430ca4b8eb89ae75f6ecec286fc45e568bb *meson-0.39.1-1.tar.xz -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
[ANNOUNCEMENT] ninja 1.7.2-1
The following packages have been uploaded to the Cygwin distribution: * ninja-1.7.2-1 Ninja is a small build system with a focus on speed. It is designed to have its input files generated by a higher-level build system, and it is designed to run builds as fast as possible. Ninja generators include CMake and Meson. x86: ca6ccb2e293114549d7f988f0b7998a6d29bdaf9a4e0c4f79a92e4b2acf653913a1670af43bd4e5c379a94df330dd31936a0b66ad954fbe5d002b657d8fd63eb *ninja-1.7.2-1-src.tar.xz b8789d62225c9f62491ca907168fcb488d17157f771c64a0e585452abacc43304fb2ba519aecddaf546fbf302f0992e0d8c101633a5e5541e3b78c939dd7aeca *ninja-1.7.2-1.tar.xz 45b7d9a554577ac4793bf5add6330216fd476080f1d3db85d559d660fc8497916e17bc727523261e7d3cb7fcac794fc0830e9bdabaf38e11bafababf06ed220f *ninja-debuginfo-1.7.2-1.tar.xz x86_64: b8af9652cef7212c418fe7a488cc84d4b8c5d73918c701b718be54a5982d07a0570092017ea2f1b010ff7941292cd3c94e451d6a2f57737a112c71663114375b *ninja-1.7.2-1-src.tar.xz 51525ff94b56648d7c3a7064e81cfc5593b3c0943bc3759106a915ae417584840c96a803c72f3ca7ff6151c4f25d6861667e0f5ec22af26649e99f8fd0bbc14f *ninja-1.7.2-1.tar.xz b0418af0967c0c817a64d0746694bebff62058efa1d59274b7ae90b4db1b85408fda1752d9703ef73121a971393bf16ab2efcae16e2f22e751580d54c5b8c574 *ninja-debuginfo-1.7.2-1.tar.xz -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Settings from lang.sh causing garbled output in dialog when run from cmd.exe
On 6. 4. 2017 11:39, Matt D. wrote: > Why am I getting garbled output with this line present? Try calling `/proc/cygdrive/c/windows/system32/chcp.com 65001` before running `dialog ...`. Does that help? -- David Macek smime.p7s Description: S/MIME Cryptographic Signature
Settings from lang.sh causing garbled output in dialog when run from cmd.exe
If I invoke a login shell from a Windows command prompt and run a dialog: dialog --no-cancel --inputbox "test" 0 0 "" I get garbled output. I do not have this issue when running from mintty. See the following image examples: http://imgur.com/a/Y4mEC http://imgur.com/a/7akZQ If I remove this line from /etc/profile.d/lang.sh: test -z "${_LC_ALL_SET_:-${LC_CTYPE:-$LANG}}" && export LANG=$(/usr/bin/locale -uU) Then the problem goes away. Why am I getting garbled output with this line present? Matt D. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple