LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-06-2008, 04:47 PM   #1
arew264
Member
 
Registered: Jul 2005
Distribution: Arch Linux / Debian Etch (soon) / have tried many others
Posts: 94

Rep: Reputation: 15
Set Environment Variable within VNC Session?


I have tightVNC set up within xinetd so that I can connect and get a KDM login screen, and from there start a KDE session as if I was in front of my box. It all works quite well, but there's no sound.
I've been working with pulseaudio for network sound, and I have it set up to the point that if I can set the environment variable PULSE_SERVER for the KDE session, sound will automagically work.
The problem is that I have to set PULSE_SERVER to the IP address of the VNC client. I have a wrapper script that xinetd calls that prints this IP address wherever I want and then starts tightVNC for me.
How should I set that variable once KDE begins to load? Do I have to put an entries in /home/[user]/.kde/autostart? Is there a better way that would make it apply to all users? Can I just have KDM set it somehow?


UPDATE:
I have found that I need to set the variable in KDM's Xsession file, which actually starts whatever session the user has requested. The problem is that somehow I have to save what I should set it to. I can't have KDM pass my needed value as an argument to Xsession; that would be most convenient.
My next thought would be to have a queue setup in /tmp where I just append IP addresses to the file and remove then from the top when they're used, but that wouldn't work if User A logs in to VNC, User B logs in to VNC and User B enters his username and password first.


UPDATE AGAIN:
The wall I'm hitting is that I can get the remote IP when I start VNC, but VNC just gets connected to KDM and doesn't actually start it, so I can't get the remote IP anywhere within the KDM session.
I can store the remote IP in a file and have KDM retrieve it when it starts a session though, that might work.
Any suggestions?

Last edited by arew264; 01-07-2008 at 04:35 PM. Reason: Update
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot start vnc server because the USER environment variable is not set izac5 Linux - Newbie 4 11-21-2009 08:10 PM
can't set environment variable baosheng Linux - Software 3 04-03-2007 01:53 AM
How to set a value of environment variable? ukrainet Linux - Newbie 1 12-28-2004 04:33 AM
How to set a environment variable in rh? yenonn Linux - Newbie 11 02-21-2003 10:24 PM
how to set CC environment variable mr.moto General 2 12-18-2001 01:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration