[K12OSN] Need help with next version of Fl_TeacherTool

Eric Harrison eharrison at mail.mesd.k12.or.us
Tue Dec 20 05:46:53 UTC 2005

On Mon, 19 Dec 2005, Robert Arkiletian wrote:

> I have found that when I launch an app for my students with Fl_TT
> (using "run") the app seems as though it's been run by the person
> running Fl_TT. For example, if I run xterm for a student. The xterm
> starts on the students comp but pwd says it's in the home dir of the
> user (actually $LOGNAME) who is running Fl_TT (the teacher). So if I
> become root with "su -", then the xterm starts in /root for the
> student.
> Thankfully the student has no permissions in this dir so they can't
> even ls but I would prefer them to start with xterm in their own home.
> Also the problem is not specific to xterm.
> Fl_TT basically uses the following line to run an xterm for user johnsmith.
> #export DISPLAY=ws252.ltsp:0.0 && su johnsmith -c 'xterm &'
> Is there any modification I could use to fix this problem??? Any help
> much appreciated.

    # export DISPLAY=ws252.ltsp:0.0 && su -l johnsmith -c 'xterm &'

The "-l" makes it a login shell for the user, which should chdir
to their home directory, etc:

    # su eharrison -c  pwd

    # su eharrison -l -c  pwd

By default "su" nukes environment varibles. The $DISPLAY varible
seems to survive, but it might be better to set the $DISPLAY as
part of the su command:

    # su johnsmith -l -c "export DISPLAY=ws252.ltsp:0.0; xterm &"


More information about the K12OSN mailing list