setting screen to start at login via screen-profiles breaks sh -lc

Bug #380761 reported by Jordan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
Fix Released
Medium
Unassigned
byobu (Ubuntu)
Fix Released
Medium
Unassigned
screen-profiles (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: screen-profiles

The way that screen-profiles sets screen to start automatically at login, by appending "[ -x /usr/bin/screen-launcher ] && /usr/bin/screen-launcher" to the user's .profile, breaks "sh -lc command". The specified command will not be run until the .profile has been sourced causing a screen session to be started with an interactive shell ( the actual command specified will not be run until the user exits the interactive shell and screen exits )

You can test this by running "screen-profiles" and choosing "Install screen by default at login" then running:

sh -lc "echo hello world"

What should happen: sh should print "hello world" then exit

What does happen: An interactive screen session is started and hello world is not printed until you exit this screen session

A possible fix for this would be to only run screen launcher if the shell is an interactive shell. a way to do this that should work in bash, dash, and ksh would be to add this to the .profile:

case $- in
*i*)
[ -x /usr/bin/screen-launcher ] && /usr/bin/screen-launcher ;;
esac

Description: Ubuntu 9.04
Release: 9.04

screen-profiles 1.44-0ubuntu1.1

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

Marking won't fix against screen-profiles. I'll fix this in byobu, though! Thanks for the report.

:-Dustin

Changed in byobu (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Changed in byobu:
importance: Undecided → Medium
status: New → Confirmed
Changed in screen-profiles (Ubuntu):
status: New → Won't Fix
Changed in byobu (Ubuntu):
status: Confirmed → In Progress
Changed in byobu:
status: Confirmed → In Progress
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Fix commited, r479, r480. Will be in 2.6 release.

:-Dustin

Changed in byobu:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package byobu - 2.6-0ubuntu1

---------------
byobu (2.6-0ubuntu1) karmic; urgency=low

  * byobu, debian/postrm, debian/preinst, debian/rules, screen-launcher:
    remove the dpkg diversion on /usr/bin/screen as this has proven
    to be controversial; users will need to call "byobu" to launch
    a byobu-style screen session; LP: #330322
  * bin/network-*: set rate=0 when rate is negative (ie, on startup)
  * bin/temp-*: better support for temperature zones, LP: #380885
  * byobu: If the user is running byobu with some arguments, but has
    not selected their profile yet, don't bother them with profile
    selection at this time, LP: #330322
  * screen-launcher-install: handle non-interactive shells correctly,
    LP: #380761
  * keybindings/common: add keybindings, @=config, R=reload, LP: #380944
  * po/ru.po: added russian translation, thanks Slava, LP: #380977

 -- Dustin Kirkland <email address hidden> Mon, 01 Jun 2009 09:11:22 -0500

Changed in byobu (Ubuntu):
status: In Progress → Fix Released
Changed in byobu:
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.