You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 1, 2024. It is now read-only.
When executing a command via lxdock shell -c, it is not providing an environment similar to as if user logged in directly. This is because we are using su -l <user> -s, then passing a file that has #!/bin/sh. This overrides the login environment as we're now in the hands of /bin/sh.
To fix this, we can probably use #!/bin/sh -l, although we might encounter compatibility issues if people's profile are only compatible with bash and equivalent and sh is something like dash.
Also, $SHELL is set to the script that we create, which is problematic for programs that detect $SHELL
The text was updated successfully, but these errors were encountered:
shuhaowu
changed the title
lxdock shell -c does not use login environment
lxdock shell -c does not use login environment and sets incorrect SHELL
May 22, 2018
When executing a command via lxdock shell -c, it is not providing an environment similar to as if user logged in directly. This is because we are using
su -l <user> -s
, then passing a file that has#!/bin/sh
. This overrides the login environment as we're now in the hands of /bin/sh.To fix this, we can probably use
#!/bin/sh -l
, although we might encounter compatibility issues if people's profile are only compatible with bash and equivalent and sh is something like dash.Also, $SHELL is set to the script that we create, which is problematic for programs that detect $SHELL
The text was updated successfully, but these errors were encountered: