Use screen -UDR

Bug #578373 reported by Yucong Sun
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
Fix Released
Wishlist
Dustin Kirkland 
byobu (Ubuntu)
Fix Released
Wishlist
Dustin Kirkland 

Bug Description

We should use screen -UDR as the launching parameters

as noted in the man of screen.

  -D -R Attach here and now. In detail this means: If a session is running, then reattach. If necessary detach and logout remotely first. If
               it was not running create it and notify the user. This is the author's favorite.

Or at least we should mark it as an optional thing or an flag in .byourc since it is hardcoded to screen in launcher now. Also, it is not secure to just default to "share" screens.

Yucong Sun (sunyucong)
visibility: private → public
security vulnerability: yes → no
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hmm, not sure about this one ...

I just tested this, in /usr/bin/byobu-select-session, changing -xRR to -UDR.

I don't think I like the behavior.

Can you test it out a bit and tell me the advantages and disadvantages of changing it this way.

Changed in byobu:
status: New → Incomplete
importance: Undecided → Wishlist
Revision history for this message
Yucong Sun (sunyucong) wrote : Re: [Bug 578373] Re: Use screen -UDR

I am not sure about your use cases.

Current byobu attach to an existing session automatically. and make
it display simultaneously on all clients.

Say I have an server to manage, and I have my wks-home at home and
wks-work at work.

I connect form my wks-work to server, created the byobu session.

Then I left work, at home, I connected from wks-home. I expect to
attach to the existing screen and then disconnect others, but right
now byobu will just continue the old session and still send all my
input to wks-work. This is unnecessary and dangerous, if my wks-work
is compromised , I can't even know whether there's some one already
snooping my screen.

I don't know what your use cases are, but from an system administrator
point, it should works just like consoles, you grab it, others lose
it, they can grab it back, then you lose it.

On Tue, May 11, 2010 at 12:02 AM, Dustin Kirkland
<email address hidden> wrote:
> Hmm, not sure about this one ...
>
> I just tested this, in /usr/bin/byobu-select-session, changing -xRR to
> -UDR.
>
> I don't think I like the behavior.
>
> Can you test it out a bit and tell me the advantages and disadvantages
> of changing it this way.
>
> ** Changed in: byobu
>       Status: New => Incomplete
>
> ** Changed in: byobu
>   Importance: Undecided => Wishlist
>
> --
> Use screen -UDR
> https://bugs.launchpad.net/bugs/578373
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in byobu: Incomplete
>
> Bug description:
> We should use screen -UDR as the launching parameters
>
> as noted in the man of screen.
>
>  -D -R   Attach  here and now. In detail this means: If a session is running, then reattach. If necessary detach and logout remotely first.  If
>               it was not running create it and notify the user. This is the author's favorite.
>
> Or at least we should mark it as an optional thing or an flag in .byourc since it is hardcoded to screen in launcher now. Also, it is not secure to just default to "share" screens.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/byobu/+bug/578373/+subscribe
>

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

Well, my use case involves a bit more sharing than yours, I suppose.

I often use byobu to teach classes, with shared screen sessions, allowing others to connect remotely to it. I also use it to co-administer systems, with a colleague who's on the other side of the world.

Changed in byobu:
status: Incomplete → In Progress
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Okay, so here's what I'll do...

I've added support to byobu-launcher to accept additional arguments and pass them through to byobu and screen.

Thus, you can edit your ~/.profile to do:
`echo $- | grep -qs i` && byobu-launcher -UDR && exit 0

And, of course, when you run byobu from the command line, you can run "byobu -UDR".

I'm hesitant to change the default from -xDD, as the screen sharing is very important to many byobu users, in as much as I can tell.

Changed in byobu:
status: In Progress → Fix Committed
Changed in byobu (Ubuntu):
status: New → Fix Committed
assignee: nobody → Dustin Kirkland (kirkland)
Changed in byobu:
assignee: nobody → Dustin Kirkland (kirkland)
Changed in byobu (Ubuntu):
importance: Undecided → Wishlist
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
byobu (2.75-0ubuntu1) maverick; urgency=low

  * usr/bin/byobu: ensure that .screenrc gets sourced if byobu is run
    with arguments, LP: #580760
  * ec2_cost, ip_address, network, rcs_cost: fix bug when calling ifconfig
    without setting lang to english, LP: #578792
  * byobu-launcher-uninstall: create the directory, in case this script is
    executed before byobu actually runs, LP: #580384
  * usr/bin/byobu-launcher: allow user to add custom screen arguments to
    byobu-launcher (useful in .profile for adding an option like -UDR),
    LP: #578373
 -- Dustin Kirkland <email address hidden> Sat, 15 May 2010 15:32:30 -0400

Changed in byobu (Ubuntu):
status: Fix Committed → Fix Released
Changed in byobu:
status: Fix Committed → Fix Released
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Actually, I'm reconsidering now...

I've decided to give -UDR a try. I'll commit that change now. I'll be interested in feedback, though, if the change is desirable to most people.

Thanks for the bug!

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

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

---------------
byobu (2.76-0ubuntu1) maverick; urgency=low

  [ Dustin Kirkland ]
  * usr/bin/byobu-select-session: default to -UDR, the "author's favorite"
    according to the screen(1) manpage; slightly more secure as it logs out
    other sessions; special handling is needed if the user wants to share
    sessions, LP: #578373; also, droping the -x should fix some resize
    problems, LP: #553085

  [ Jon Bernard ]
  * ec2_cost, rcs_cost: calculate cost from the start of the
    instance, rather than the uptime
 -- Dustin Kirkland <email address hidden> Sat, 15 May 2010 16:52:04 -0400

Changed in byobu (Ubuntu):
status: Fix Committed → Fix Released
Changed in byobu:
status: Fix Committed → Fix Released
Revision history for this message
Jorge E. Gómez (jorgeegomez) wrote :

Please document how to enable back the sharing of screen sessions.

Running byobu-launcher with the parameter "-xRR" in .profile (when Byobu launches by default at login) doesn't seem to work.

Revision history for this message
Jorge E. Gómez (jorgeegomez) wrote :

To answer my own question:

According to your user's shell, edit their .profile (or .bash_profile), add the parameters "-xRR" to the command "byobu-launcher", like this:

`echo $- | grep -qs i` && byobu-launcher -xRR && exit 0

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.