Bug 1539856 - Interactive shells start up with less command
Summary: Interactive shells start up with less command
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: environment-modules
Version: 28
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1546450
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-29 18:18 UTC by Kevin Donovan
Modified: 2018-02-26 10:05 UTC (History)
12 users (show)

Fixed In Version: environment-modules-4.1.1-1.fc28
Clone Of:
Environment:
Last Closed: 2018-02-26 10:05:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Kevin Donovan 2018-01-29 18:18:27 UTC
Description of problem:  When I start an interactive shell (bash, sh, csh, etc.), it starts up with the less command.  To start doing anything, I need to enter 'q' to terminate less.

I found where it happens, namely in the sh and bash files in /usr/share/Modules/init/, specifically where they execute the command
eval `${_mlre}/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl sh autoinit`

I have commented this out in my version, which necessitated a couple of other fixes, and all seems well now.


Version-Release number of selected component (if applicable):
not sure.  started happening in last week.

How reproducible:  Always happens.


Steps to Reproduce:
1. I think you need to log into a windowing system.  Can be plasma or gnome, X Windows or Wayland.
2. Start up a terminal.  The problem appears.  Type 'q' to get out of less, and then start a new shell, either with bash, sh, csh, etc.  The new shell shows the same problem.  Enter 'q' to get out of less in the new shell.
3.

Actual results:  Described above.


Expected results:  The shell should start up with a command prompt, not in the less command.


Additional info:  THe bug report localizes the cause.

Comment 1 Kamil Dudka 2018-01-29 18:26:56 UTC
This could hardly be a bug of bash itself.

(In reply to Kevin Donovan from comment #0)
> I found where it happens, namely in the sh and bash files in
> /usr/share/Modules/init/, specifically where they execute the command
> eval `${_mlre}/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl sh
> autoinit`
> 
> I have commented this out in my version, which necessitated a couple of
> other fixes, and all seems well now.

/usr/share/Modules/libexec/modulecmd.tcl belongs to environment-modules, to
which I am switching the component of this bug for further investigation...

Comment 2 stan 2018-02-01 02:17:12 UTC
I downgraded to the previous version of environment-modules in rawhide (from koji), and the problem went away.

Comment 3 ivzave 2018-02-04 10:47:04 UTC
Workaround is adding following line to .bashrc:

export MODULES_PAGER=

Comment 4 stan 2018-02-04 18:31:41 UTC
Does the workaround stop the automatic paging of output from journalctl and systemctl?  It's easy enough to just add a pipe to less for those, but it is convenient to have it done automatically.

Comment 5 ivzave 2018-02-04 21:20:12 UTC
Paging of output from journalctl and systemctl wasn't disabled for me with this workaround.

Comment 6 stan 2018-02-04 21:33:24 UTC
Thanks!  I'll give it a try.

Comment 7 stan 2018-02-04 21:42:38 UTC
Ok, that worked fine.

Comment 8 Xavier Delaruelle 2018-02-15 19:41:34 UTC
Next bugfix release (v4.1.1) should fix this issue.

Comment 9 Fedora End Of Life 2018-02-20 15:34:35 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 10 Xavier Delaruelle 2018-02-24 08:35:35 UTC
This ticket could be closed as version 4.1.1 is available in rawhide and ready for f28.


Note You need to log in before you can comment on or make changes to this bug.