[CentOS] telnet and Gnome logins

Jay Leafey jay.leafey at mindless.com
Tue Mar 27 18:04:52 UTC 2007


Kanwar Ranbir Sandhu wrote:
> Hello,
> 
> I have a thin client user with a regular Gnome desktop that he logs into
> everyday.  He also telnets from a remote site into the same server that
> provides his Gnome desktop.  I know, telnet is insecure, but it's all
> over VPN, so it's a little better.  Also, he's using telnet from Windows
> system.
> 
> Anyway, management wants a console app to be executed when that user
> logs in over telnet.  That's easy enough with a "exec app" line in
> his .bash_profile.  But, that prevents gnome-session from starting when
> he logs into his Gnome desktop.
> 
> Is it possible to do both?  That is, give him his Gnome desktop when he
> logs in from GDM, and the console app when he logs in over telnet?  The
> easiest solution I can think of is installing NX Client on the Windows
> PC and configuring it to execute a script that starts gnome-terminal
> with console app passed to it (gnome-terminal -x app).  freenx is
> already installed and running on the server.
> 
> Are there any other options?
> 
> Regards,
> 
> Ranbir
> 

How about making the console app execution conditional on the presence 
of an X display variable:

     [ -z "${DISPLAY}" ] && exec app

This way, if the display variable is set (i.e. he logged in via the thin 
client or NX) the application does not run, but if he logs in via telnet 
or SSH (without X forwarding) he gets the application.  You might need 
to do some more checking for cron/at jobs too.

Just a thought!
-- 
Jay Leafey - Memphis, TN
jay.leafey at mindless.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4011 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.centos.org/pipermail/centos/attachments/20070327/42bd7d58/smime.bin


More information about the CentOS mailing list