Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

$PATH isn't exported properly #5

Open
iakat opened this issue Dec 31, 2015 · 6 comments
Open

$PATH isn't exported properly #5

iakat opened this issue Dec 31, 2015 · 6 comments

Comments

@iakat
Copy link

iakat commented Dec 31, 2015

The normal cygwin mintty terminal has /usr/local/bin:/usr/bin at the start of the PATH variable, which FaTTY doesn't have out of the box (only the Windows paths are on FaTTY).

It can be "fixed" by putting export PATH=/usr/local/bin:/usr/bin:$PATH in the .bashrc file, but this is just a work-around.`

@juho-p
Copy link
Owner

juho-p commented Jan 13, 2016

Does it work correctly for you if you launch fatty with - flag (like fatty.exe -) or are you getting wrong behaviour even with --flag? Putting - at the end starts login-shell.

@iakat
Copy link
Author

iakat commented Mar 11, 2016

I haven't had time to test this, but if that's the case, shouldn't it start the login-shell by default?

@chanibal
Copy link

The - flag helps, but running as login shell should be enabled by default.

Also, if you run fatty.exe from cygwins mintty it carries the environment, so you have to test from Windows Command Prompt or bat file.

@chanibal
Copy link

Adding the - flag to a pinned shortcut in Windows 10 triggers another problem - after you click the shortcut, fatty isn't available by the same button, but creates another window in the taskbar.

So for example when I drag fatty to be the third pinned icon on the the taskbar and press start+3 fatty runs, when I press again another fatty runs while it should have selected the running fatty window. Both cygwin and fatty without modyfing the shortcut work this way.

@chanibal
Copy link

Got annoyed with this and made an ugly fix, copy it to your ~/.profile:

# if not login shell then run login shell
if ! type uname 2>/dev/null >/dev/null; then
    echo "WARNING: non login shell detected. Using fatty? Trying to run properly in login shell..."
    if [[ "$LOGIN_LOOP_PREVENTER" ]]; then
        echo "ERROR: prevented boot loop with login shell?"
    else
        export LOGIN_LOOP_PREVENTER=1
        exec /bin/bash -l
    fi
fi

@juho-p
Copy link
Owner

juho-p commented Apr 15, 2016

@chanibal heh, nice solution... But lets still keep this issue open so it will maybe get fixed properly some time in the future.

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

No branches or pull requests

3 participants