Am Die, 2002-04-16 um 08.11 schrieb Martin Oehler:
Hi!
Was habe ich zu tun, um die Umgebungsvariable REMOTEHOST von meinem System belegen zu lassen?
Ich möchte in einem Skript die DISPLAY-Variable setzen, muß aber irgendwie rausfinden, vor welchem host der Benutzer sitzt.
Die Distri ist eine SuSE 7.3...
Schonmal vielen Dank für Eure Hilfe! Martin
Hallo, suchst du etwas wie dieses: WHOAMI="`/usr/bin/who am i`" _DISPLAY="`expr "$WHOAMI" : '.*(\([^\.][^\.]*\).*)'`:0.0" if [ "${_DISPLAY}" != ":0:0.0" -a "${_DISPLAY}" != " :0.0" -a \ "${_DISPLAY}" != ":0.0" ];+++ then export DISPLAY="${_DISPLAY}"; fi unset WHOAMI _DISPLAY -- mfg alex ------------------------------------------------------------------------ I am chaos. I am the substance from which your artists and scientists build rhythms. I am the spirit with which your children and clowns laugh in happy anarchy. I am chaos. I am alive, and tell you that you are free