On 9/9/05, DenisG <[EMAIL PROTECTED]> wrote: > Thanks Umberto > > What I want is choose the default printer for the machine, not for the user. > I imagine I can do this with 'lpoptions -d the_good_printer', but where > can I put it? In a RC script with RCFILE_01 in lts.conf? Somebody ever > tried that? > > DenisG
I never tried that, but I think the RCFILE_01 since when printing the user is already on the server and using it's environment. What you shoul modify is the Xsession script that launches the IceWM session and write a $HOME/.lpoptions file when the user is logged in based on his/her $DISPLAY variable (which containts the name of the client machine), or use the XDM to run an additional script - for instance GDM has support for PreSession/PostSession scripts (just make a script and put it in the /etc/gdm/PostSession/ directory and it will be executed after the user logs in). the script could be something like: [ - /etc/gdm/PreSession/cups - ] #!/bin/bash client_ip=`echo $DISPLAY | cut -d: -f 1` if [ "x$ip" == "x" ] ; then # this is a local client exit fi case "$client_ip" in 'client11' | 'client12' | 'client1x' ) echo "Default printer1" > $HOME/.lpoptions ;; 'client21' | 'client22' | 'client2x' ) echo "Default printer2 > $HOME/.lpoptions ;; *) # default printer for everyone else ? set it up if desired ;; esac [ - end script ] -- mitu ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _____________________________________________________________________ Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: https://lists.sourceforge.net/lists/listinfo/ltsp-discuss For additional LTSP help, try #ltsp channel on irc.freenode.net