Thursday, September 15, 2011

Using sch-scripts (Classroom Administrator) on a fatclient

sch-scripts was designed to be run on the ltsp server, but can also be run on its thin clients as well.  So, to make it work on fatclients one may use the 'new' ltsp command: ltsp-remoteapps.  But, it needs to be used as a superuser and the ltsp-remoteapps doesn't forward back the authentication prompt i.e. you can't say: ltsp-remoteapps sudo sch-scripts.  Here is the corresponding part of the #edubuntu dialog:

: dgroos: I want to install sch-scripts into the new fat client on which I'm working.
: dgroos: The image is on the server I used last year though I did delete the thin client image.
: dgroos: I already installed the client and am wondering about the server sch-scripts app.
: dgroos: How can I launch it if I can't gain super-user permissions?
: dgroos: (I saw you say on a forum that you can't sudo with fat clients).
: alkisg: dgroos: the sch-scripts client connects to the sch-daemon network service through a server socket in /var/...
: alkisg: A fat client doesn't have access to that socket
: alkisg: So, even if you could sudo, you wouldn't access the sch-daemon, so sch-scripts wouldn't work
: alkisg: So the teacher needs to either sit on the server, or on a thin client
: alkisg: The sch-scripts GUI won't work if it's ran from a fat client
: alkisg: So, the best you can do, is to ssh -X or vnc to the server, and run sch-scripts from there. Or to use a thin client for the teacher. Or something similar.
: dgroos: That was it--I thought you were running it from a fat client but it was from the server...
: alkisg: Or to use remoteapps
: alkisg: Maybe that last is the best option
: dgroos: hmmm remoteapps--I'll look it up.  Thanks!  I'll come back with a question, perhaps
: alkisg: dgroos: markit wants to sponsor an i18n sch-scripts version, we may have a new i18n sch-scripts version soon
: dgroos:  congrats and great and thanks!
: dgroos: alkisg: and, if I can help with the translation en_us let me know, I'd like to help.
: alkisg: dgroos: very nice, I'll tell the other dev doing the i18n to send you the translations for proof-reading
: alkisg: As our english of course are not good enough for main language
: dgroos: also, I could help during the end of Dec with Spanish as I'll be with my Guatemalan-inlaws who could help.
: dgroos: I say again yer English is good very! than mine.
: alkisg: Sounds good too, but it might be better for the first spanish teacher that actually uses the program, to do the translation too
: dgroos: sure.
: alkisg: (translations need maintanance over time, as anything else in the software world)
: dgroos: (as I experienced!  Just let me know)
: dgroos: I've had no luck finding any info on how to use ltsp-remoteapps.  Do I just type: "ltsp-remoteapps sch-scripts"?
: alkisg: You also need some lts.conf setting about remoteapps
: alkisg: Let me find the exact name...
: alkisg: REMOTE_APPS=True
: alkisg: And you'll need to do something about the sudo part
: alkisg: (sudo sch-scripts, might not work with remote apps and need to edit sudoers instead)
: dgroos: In some list-server e-mails Todd O' wrote the following about using fat clients: "I was able to get root access by doing:"
: dgroos: $ sudo chroot /opt/ltsp/amd64 passwd -u root
: dgroos: $ sudo chroot /opt/ltsp/amd64 passwd
: dgroos: and setting the password.
: dgroos: does that relate?
: alkisg: dgroos: the clue here is "you almost never need sudo on fat clients"
: alkisg: Let's start there. WHY do you need sudo?
: dgroos: Quoted from above: "alkisg: (sudo sch-scripts, might not work with remote apps and need to edit sudoers instead)"
: alkisg: On the server
: dgroos: just trying to make sense of that statement...
: alkisg: Ah ok let me explain more
: alkisg: If you were sitting on the server and tried: sudo sch-scripts, what would happen?
: alkisg: You'd get a password prompt
: alkisg: Remoteapps unfortunately won't allow a text-based prompt etc
: alkisg: So you'll need a way around that problem
: alkisg: With sudoers, you can configure certain users or groups to be able to run "sudo sch-scripts" without the need of a password
: alkisg: All this on the server
: alkisg: So, when you try "ltsp-remoteapps sudo sch-scripts", you won't get a password prompt from the server, and it'll just run
: alkisg: Makes a bit more sense now?
: dgroos: got it.  So how might I find a how to about setting this up?
: dgroos:
: alkisg: Let me give you my greek page, I think google translate will be enough...
: dgroos:
: alkisg: http://alkisg.mysch.gr/steki/index.php?topic=3211.0
: dgroos: Thanks!  (of course our district has a filter on that page because of 'proxy avoidance' but I'll find a work around!)
:alkisg: Basically it's this:
:alkisg: sudo VISUAL=gedit visudo
:dgroos: interesting--I put it into google translate and it went through
:alkisg: And in the end of the file:
:alkisg: teacher ALL=NOPASSWD: /usr/sbin/sch-scripts
: alkisg: Haha google rocks
: dgroos: so I can put this line several times: teacher ALL=NOPASSWD: /usr/sbin/sch-scripts  but just using a different name for the different teachers?  Do you think there will be issues if  teachers are using this concurrently?
: alkisg: You can use a group there instead if you prefer, but yeah of course you can put it several times
: alkisg: I think groups need a % in their name (syntax-wise)
: alkisg: The sch-scripts daemon is designed to have as many GUI connections as you like
: alkisg: So not a problem for concurrrent users
: dgroos: I'll put this dialog on my blog for future reference, thanks
: alkisg: So it would be:
: alkisg: %teachers ALL=NOPASSWD: /usr/sbin/sch-scripts

No comments:

Post a Comment