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

sessions: failsafe session is now accessible via separate launcher icon #1028

Merged
merged 1 commit into from Apr 7, 2019

Conversation

@xeffyr
Copy link
Member

xeffyr commented Feb 11, 2019

Enables additional launcher icon that causes to be a failsafe session to be started instead of default.
This PR also makes session auto-closeable on exit coded 0 and 130. Any other exit codes should be handled by user on it's own in order to avoid messages about "Press enter".

Old "failsafe" session button left untouched since it may be useful in some cases to start system shell instead of Termux's one.

Also enables session autoclosing so no more "annoying" messages
about "process completed - press enter". There autoclosing will be
performed on exit codes '0' and '130'.

On Android TV devices old behaviour will be used - auto close enabled for all
sessions when amount of running sessions >1.
@xeffyr

This comment has been minimized.

Copy link
Member Author

xeffyr commented Feb 25, 2019

@fornwall I also made auto-closing for only "0" and "130" exit codes as we discussed on Gitter.

@fornwall fornwall merged commit fe41cd4 into termux:master Apr 7, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@xeffyr xeffyr deleted the xeffyr:failsafe-session branch Apr 7, 2019
@eladts

This comment has been minimized.

Copy link

eladts commented Apr 14, 2019

I don't like the solution of another launcher icon, it just creates clutter IMHO. Is there a reason why this functionality cannot be achieved using app shortcuts? Is there a way (without rooting) to remove the extra icon from the launcher?

@xeffyr

This comment has been minimized.

Copy link
Member Author

xeffyr commented Apr 14, 2019

Is there a reason why this functionality cannot be achieved using app shortcuts?

Not all launchers support shortcuts. Especially on older Android versions.

Is there a way (without rooting) to remove the extra icon from the launcher?

Check launcher settings if it allows to hide icon.


Generally, this solution is final and should be fine for average user, i.e. should work on all ROMs and launchers.
Other variants that make environment recovery really hard will not be implemented.

@xeffyr

This comment has been minimized.

Copy link
Member Author

xeffyr commented Apr 14, 2019

btw, there always will be tradeoff for issues regarding "[Process completed - press Enter]" which will not be accepted by some users.

Decide what you want:

  • Ability to retrieve files from $HOME in case of environment failure while having auto-closeable sessions.

  • Or have to completely reinstall application with erasing all files (which may not be backed up) in $HOME due to denial-of-service condition because of shell failure ?

@eladts

This comment has been minimized.

Copy link

eladts commented Apr 14, 2019

Thanks @xeffyr for the quick response! Unfortunately my launcher (stock launcher on Moto X4) does not support app hiding and I don't want to switch launchers for this reason alone. I would appreciate if there is an option to hide the extra launcher icon from within Termux, which as far as I understand the only way this can be done without rooting or switching to another launcher.

@termux termux deleted a comment from xrisk Apr 15, 2019
@termux termux locked as resolved and limited conversation to collaborators Apr 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.