[Bug 380761] [NEW] setting screen to start at login via screen-profiles breaks sh -lc

Jordan Jordan.Uggla at gmail.com
Tue May 26 22:50:23 UTC 2009


Public bug reported:

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

** Affects: screen-profiles (Ubuntu)
     Importance: Undecided
         Status: New

-- 
setting screen to start at login via screen-profiles breaks sh -lc
https://bugs.launchpad.net/bugs/380761
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list