Causes errors when removing screen-profiles or sharing .screenrc across hosts

Bug #323756 reported by Loïc Minier
6
Affects Status Importance Assigned to Milestone
screen (Ubuntu)
Fix Released
High
Dustin Kirkland 
screen-profiles (Ubuntu)
Fix Released
High
Dustin Kirkland 

Bug Description

Binary package hint: screen-profiles

Hi,

I keep my .screenrc in sync between multiple hosts; when I first got screen-profiles automatically via an update, it automatically changed my .screenrc to source .screenrc-profiles; this was transparent on this host, but causes a message on other hosts where screen-profiles wasn't installed.

Secondly, when removing screen-profiles, .screenrc-profiles was left in place as a dangling symlink; so now I get an error when starting screens.

I think screen-profile integration should be reworked. One way could be to extend the screenrc config format to check for a file's existence before source-ing it, or adding some dynamic logic to it. Another way would be to flip the implementation around so that the screen binary (which is a shell script when screen-profile is installed) would default to ~/.screenrc-profiles instead of ~/.screenrc and ~/.screenrc-profiles would source a profile and then ~/.screenrc.

I think this should be handled before people start upgrading to jaunty and hence get screen-profiles installed by default.

Bye,

Loïc Minier (lool)
Changed in screen-profiles:
milestone: none → ubuntu-9.04-beta
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Thanks for the bug report, Loic. You raise a couple of important issues.

I would like to patch screen itself to handle missing source'd files more gracefully, perhaps as you say by checking for its existence before sourcing it. I'm going to add a task for 'screen' to this bug for this item.

We could go the other route, with having the /usr/bin/screen shell script call a -c "$HOME/.screenrc-profiles", I suppose, but I think that's going to be considerably more difficult from a maintenance perspective.

Either way, I agree, this should be fixed ASAP, well before beta.

:-Dustin

Changed in screen-profiles:
assignee: nobody → kirkland
importance: Undecided → High
status: New → Triaged
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hi Loic-

The attached patch to screen itself will lower the high-priority, always-shown file-not-found message to a debug message.

Independently of your bug, I've been thinking this would be a nice, trivial improvement to screen's behavior. I can upload this tomorrow, but I thought I'd let you take a look at it first, and see if it addresses your concerns.

:-Dustin

Changed in screen:
assignee: nobody → kirkland
importance: Undecided → High
milestone: none → ubuntu-9.04-beta
status: New → In Progress
Revision history for this message
Loïc Minier (lool) wrote :

Does your patch affect commands typed interactively? Say if I type Ctrl-a :source foo, will it still output an error message?

I'm not sure I understand why it's hard to change the /usr/bin/screen script; you mean it would be hard to convert existing installs?

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 323756] Re: Causes errors when removing screen-profiles or sharing .screenrc across hosts

On Sun, Feb 1, 2009 at 11:35 PM, Loïc Minier <email address hidden> wrote:
> I'm not sure I understand why it's hard to change the /usr/bin/screen
> script; you mean it would be hard to convert existing installs?

Yes, exactly the latter. It's very easy to fix the screen wrapper
script to use -c.

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Fix committed to bzr, I'm holding off uploading this at the moment due to Alpha4 freeze. Please let me know if you want this uploaded in time for Alpha4, Loic (by changing the milestone accordingly).

:-Dustin

Changed in screen:
status: In Progress → Fix Committed
Changed in screen-profiles:
status: Triaged → Fix Committed
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Talked to slangasek, this is worth uploading for alpha4. Promoting the milestone to alpha4, and uploading now.

:-Dustin

Changed in screen-profiles:
milestone: ubuntu-9.04-beta → jaunty-alpha-4
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package screen-profiles - 1.19-0ubuntu1

---------------
screen-profiles (1.19-0ubuntu1) jaunty; urgency=low

  * screen: wrapper script should add a -c arg, and specify your chosen
    profile, and ensure that .screenrc at least exists, prevent recursion
    from happening to upgrading users by pruning source of ~/.screenrc-profile
    from ~/.screenrc, LP: #323756
  * screen-launcher-install: test executability of screen-launcher; install to
    .profile unconditionally, and only .bash_profile and .bash_login if they
    exist; sanitize the environment; LP: #319691, LP: #321869
  * screen-launcher-uninstall: test writability of file to prune; prune from
    .profile, .bash_profile, and .bash_login
  * screen-profiles-helper: update auto-launch-on-login detection accordingly
  * windows/common: start counting at 1, add a window for watching /etc/motd
  * profiles/profile.skel, profiles/*: source the user's local ~/.screenrc
    as a last step (allowing for overrides)
  * select-screen-profile: don't mess with the user's ~/.screenrc file here;
    only set up the ~/.screenrc-profile symlink

 -- Dustin Kirkland <email address hidden> Tue, 03 Feb 2009 10:24:28 +0100

Changed in screen-profiles:
status: Fix Committed → Fix Released
Revision history for this message
Loïc Minier (lool) wrote :

Thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package screen - 4.0.3-11ubuntu3

---------------
screen (4.0.3-11ubuntu3) jaunty; urgency=low

  * debian/patches/56-source-file-not-found-warning.dpatch: When sourcing a
    file in a screenrc which is not found, fail more gracefully by not
    interrupting normal operation; instead, print a debug message. LP: #323756
  * debian/patches/57-screen-invoked-with-a-command.dpatch: Cherry pick from
    upstream source; fixes LP: #311443

 -- Dustin Kirkland <email address hidden> Wed, 04 Feb 2009 14:19:09 +0100

Changed in screen:
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.