screen manpage has misleading bash example (patch incl)

Bug #1986839 reported by Tired Sysadmin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
screen (Ubuntu)
Fix Released
Low
Axel Beckert

Bug Description

The screen(1) page in version 4.09.00 describes the 'shell' command/option ending with

   [...] If the command begins with a '-' character, the shell
   will be started as a login-shell. Typical shells do only
   minimal initialization when not started as a login-shell.
   E.g. Bash will not read your ~/.bashrc unless it is a login-shell.

This is incorrect and misleading. According to the bash(1) page, it only looks for ~/.bash_profile (and similar files) for a login shell, but looks for ~/.bashrc when "an interactive shell that is not a login shell is started".

Obviously minor priority, but should be trivial to fix since it's just an example filename.

--- screen-4.9.0/doc/screen.1.orig 2022-08-17 16:15:50.692428551 +0000
+++ screen-4.9.0/doc/screen.1 2022-08-17 16:16:26.455895679 +0000
@@ -3308,7 +3308,7 @@
 execute the program specified in $SHELL.
 If the command begins with a '\-' character, the shell will be started as a
 login-shell. Typical shells do only minimal initialization when not started as a login-shell.
-E.g. Bash will not read your \*Q~/.bashrc\*U unless it is a login-shell.
+E.g. Bash will not read your \*Q~/.bash_profile\*U unless it is a login-shell.
 .RE
 .TP
 .B "shelltitle \fItitle\fP"

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: screen 4.9.0-1
ProcVersionSignature: User Name 5.15.0-1017.21-aws 5.15.39
Uname: Linux 5.15.0-1017-aws x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Wed Aug 17 16:07:30 2022
Ec2AMI: ami-02306cf196ee482f9
Ec2AMIManifest: (unknown)
Ec2AvailabilityZone: us-east-2b
Ec2InstanceType: t2.micro
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: screen
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Tired Sysadmin (wearyofallthiscrap) wrote :
Revision history for this message
Paride Legovini (paride) wrote :

Hello and thanks for this bug report. I agree with your conclusions and your patch, however given that the bug is very minor and that the screen package in Ubuntu is currently a sync from Debian I think the right thing to do is to fix the manpage in Debian or (even better) upstream. I believe the screen project lives here:

  https://savannah.gnu.org/projects/screen/

could you resubmit this bug report (and your patch) there, and link it from here? As an alternative, could you file a bug against the Debian screen package? See:

  https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=screen;dist=unstable

Thanks!

Changed in screen (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Axel Beckert (xtaran) wrote :

Confirmed. If that weird logic of bash makes you a headache, have a look at the matrix at https://web.archive.org/web/20210925033649/https://tanguy.ortolo.eu/blog/article25/shrc

Paride: Will apply that patch in Debian soon and close this Ubuntu bug report with it.

Tired: I'd be happy if you would file an upstream report at https://savannah.gnu.org/bugs/?group=screen&func=additem anyways. Thanks in advance!

Changed in screen (Ubuntu):
status: Triaged → Confirmed
assignee: nobody → Axel Beckert (xtaran)
Axel Beckert (xtaran)
Changed in screen (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Axel Beckert (xtaran) wrote :

Fix committed as https://salsa.debian.org/debian/screen/-/commit/f275b121234e44137b5e34c333afb61d8b16cb1a

I also fixed the same issue in screen's texinfo file.

Changed in screen (Ubuntu):
status: In Progress → Fix Committed
tags: added: patch patch-accepted-debian
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package screen - 4.9.0-2

---------------
screen (4.9.0-2) unstable; urgency=medium

  * Add patch to fix bash example in man page. (LP: #1986839) Thanks to
    Tired Sysadmin on Launchpad for the bug report and initial patch!
  * Bracketize lintian overrides.
  * Add lintian overrides for binary files in utf8encodings/.
  * Declare compliance with Debian Policy 4.6.1. (No changes needed.)

 -- Axel Beckert <email address hidden> Wed, 24 Aug 2022 03:45:18 +0200

Changed in screen (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.