ltsp: screen session "ssh" not working in precise

Bug #1020113 reported by Rüdiger Kupper
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
LTSP5
Fix Released
Low
Unassigned
ltsp (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

We have "SCREEN_02=ssh" in our lts.conf. It used to work properly, but since update to precise, it fails.

What happens:
- Press ALT+F2
- promt "Username:" is shown on top of the screen
- enter user name, press ENTER
- a message on ssh usage is shown on the screen, indicating that ssh was called with wrong parameters
- after a few seconds, screen is cleared and reads "Username:" again

What should happen:
- Press ALT+F2
- prompt "Username:" is shown on top of the screen
- enter user name, press ENTER
- script prompts password
- script starts ssh session to LTSP server

Note: The usage message seems to indicate that the environment variable "SERVER" is not known to the ssh screen script. Is this variable known when the ssh script ist called?

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: ltsp-client (not installed)
ProcVersionSignature: Ubuntu 3.2.0-26.41-generic 3.2.19
Uname: Linux 3.2.0-26-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
Date: Mon Jul 2 15:53:21 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
SourcePackage: ltsp
UpgradeStatus: Upgraded to precise on 2012-04-28 (65 days ago)

tags: removed: amd64
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Can you try replacing
    "$script_path" "$args"
with
    "$script_path" $args
in line 78 of /opt/ltsp/i386/usr/share/ltsp/screen_session,
then running ltsp-update-image, and finally rebooting your client?

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Better yet, could you try this patch instead?

=== modified file 'client/share/ltsp/screen_session'
--- client/share/ltsp/screen_session 2012-05-14 19:23:51 +0000
+++ client/share/ltsp/screen_session 2012-07-02 21:19:18 +0000
@@ -56,9 +56,9 @@
         eval $(getltscfg-cluster -a -l prompt)
     fi

- read script args <<EOF
-$(eval echo "\$SCREEN_$num")
-EOF
+ set -- $(eval "echo \$SCREEN_$num")
+ script=$1
+ shift

     # Screen scripts in /etc override those in /usr
     unset script_path
@@ -75,7 +75,7 @@
     for script in $(run_parts_list /usr/share/ltsp/screen-session.d/ S); do
         . "$script"
     done
- "$script_path" "$args"
+ "$script_path" "$@"
     for script in $(run_parts_list /usr/share/ltsp/screen-session.d/ K); do
         . "$script"
     done

Changed in ltsp (Ubuntu):
status: New → Invalid
Changed in ltsp:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

Alkis, your patch does the trick! Works like expected, thank you!

Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

This bug is still present in quantal. The above patch works fine, could someone uplpoad ist to {precise,quantal}-updates?

Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

This bug is solved, patch exists and is tested.
What am I to do to get this report into state "Fix commited"?

Revision history for this message
Stéphane Graber (stgraber) wrote :

Someone needs to commit it upstream, upstream needs to make a release, that release needs to get into the Ubuntu development release, then the fix can be pushed to -updates for older releases.

Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

How can I trigger this process?

Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

Please read this as: "I'd like to help, but don't know how to."

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Hi Rüdiger,

the problem with the screen scripts is that some of them are using a single escaped string + eval to pass the parameters to xinit, and some are using "$@", multiple parameters. And xinit has problems if one of the parameters is "--", because it has a special meaning for that. And xfreerdp is also using "--" to separate the plugin parameters, and things start to get confusing (we've had bugs there before).

So personally I was waiting to have some free time to get through all the screen scripts code and fix all similar bugs at once, rather than fixing them individually. It other words the patch above should be fine for all screen scripts, but I'd like to do some tests with difficult command lines like xfreerdp <params> -- --plugin <plugin params> -- --other-plugin <other-plugin-params> before I feel confident enough to push the fix. Of course other devs may get some free time before me and test/commit the fix earlier.

Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

Hello Alkis,

I understand. Thank you for working so thoroughly on the problem.
Please let me know when I can be of any help.

Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

Bug #1175618 reports the same problem for the xdmcp session script. I suggest committing the patch above to the sources.

Revision history for this message
Vagrant Cascadian (vagrantc) wrote :
Changed in ltsp:
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ltsp - 5.5.4-4ubuntu1

---------------
ltsp (5.5.4-4ubuntu1) wily; urgency=medium

  * Merge from Debian. Remaining changes:
   - Use fonts-guru instead of ttf-punjabi-fonts
   - Include the getltscfg-cluster manpage
   - Edubuntu support code in ltsp postinst

 -- Stephane Graber <email address hidden> Mon, 08 Jun 2015 11:33:04 +0200

Changed in ltsp (Ubuntu):
status: Invalid → Fix Released
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Fix released in LTSP 5.5.4.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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