Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting environment variables on commmand line #54

Closed
GoogleCodeExporter opened this issue Jun 4, 2015 · 5 comments
Closed

Setting environment variables on commmand line #54

GoogleCodeExporter opened this issue Jun 4, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

Being able to set environment variables for the child process on the mintty
command line might be useful, because Windows shortcuts don't support them,
e.g.:

  mintty DISPLAY=:0 ssh server

Of course in shell this can be done already by prepending the variable
definition to tmintty, which passes its environment on to the child anyway:

  DISPLAY=:0 mintty ssh server

As a workaround for the shortcut issue one can either set a system-wide
Windows environment variable (hidden away somewhere in the "Computer"
properties), or create a batch file that sets the variable before invoking
mintty and have the shortcut point to that.

Original issue reported on code.google.com by andy.koppe on 13 Feb 2009 at 7:19

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Original comment by andy.koppe on 14 Mar 2009 at 8:51

  • Added labels: Milestone-0.3.7, Priority-Medium
  • Removed labels: Priority-Low

@GoogleCodeExporter
Copy link
Author

Actually, this will do:

mintty sh -c 'DISPLAY=:0 ssh server'

Original comment by andy.koppe on 14 Mar 2009 at 9:34

@GoogleCodeExporter
Copy link
Author

Bash executes the -c command without forking a new process, so there's not much 
point
in MinTTY dabbling in shell functionality. This needs a TIP in the manual 
though.

Original comment by andy.koppe on 15 Mar 2009 at 6:51

  • Added labels: Documentation

@GoogleCodeExporter
Copy link
Author

Added tip in r183.

Original comment by andy.koppe on 16 Mar 2009 at 12:31

  • Changed state: Verified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant