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 -- Kanwar Ranbir Sandhu Linux 2.6.20-1.2925.fc6 i686 GNU/Linux 12:29:45 up 4 days, 3:26, 3 users, load average: 0.12, 0.29, 0.67
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/attachment.bin>
On Tue, 2007-03-27 at 13:04 -0500, Jay Leafey wrote:> 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.Neat: I got the same idea a few minutes after posting my message. But, it didn't appear to work when I logged in with the NX client. Your post, however, got me thinking that maybe it was just the NX client throwing things off. Sure enough, after connecting with Xnest, I got the normal Gnome desktop. Logging in with ssh or telnet gives me the console app. Nice. I wonder now why NX client is behaving differently. I know that first it uses ssh, and then the user logs in over the ssh connection. NX is probably seeing $DISPLAY set as null when the ssh connection is made, and then the console app kicks in which prevents gnome-session from starting. I don't know if that's really what is happening. I'm not sure how to work around it in any case. Thanks for the tip. It helped me realize I hadn't tested with a simple remote X client. Regards, Ranbir -- Kanwar Ranbir Sandhu Linux 2.6.20-1.2925.fc6 i686 GNU/Linux 14:28:20 up 4 days, 5:25, 3 users, load average: 0.17, 0.16, 0.18
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?putty is preferable to telnet. tightvnc can give him a full Gnome desktop on Windows. I discovered that when playing with SUSE. Give said user two accounts:-)> > Regards, > > Ranbir >-- Cheers John -- spambait 1aaaaaaa at coco.merseine.nu Z1aaaaaaa at coco.merseine.nu Please do not reply off-list