Bug 798477 - The switch desktop tool breaks our login environment
The switch desktop tool breaks our login environment
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: switchdesk (Show other bugs)
x86_64 Linux
unspecified Severity low
: rc
: ---
Assigned To: Ngo Than
Desktop QE
Depends On:
  Show dependency treegraph
Reported: 2012-02-28 19:34 EST by damion hancock
Modified: 2013-04-12 16:58 EDT (History)
2 users (show)

See Also:
Fixed In Version: switchdesk-4.0.8-8.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-05-21 10:48:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description damion hancock 2012-02-28 19:34:59 EST
Description of problem:
We set the shell variable 'p' to locate our parts library.  However, when the switch desktop tool is run it drops ~/.Xclient-default that allows a custom desktop environment.   However, it uses 'p' to find a valid path and resets this variable to something like /usr/bin.  This means any application launched from the Redhat menu has an invaild $p setting.  

Version-Release number of selected component (if applicable):

How reproducible:
It happens everytime you use the desktop switch tool

Steps to Reproduce:
1.  Use the deskop switch tool
2.  Log out
3.  Login
4.  Launch an application from the menu that assumes $p is set.
Actual results:
$p is set to /usr/bin

Expected results:
$p should be set to the variable set in the custom login scripts.

Additional info:

The easy way we fix this is by replacing 
exec $p/WM
from the .Xclients-default with
exec -l $SHELL -c "$p/WM"
Comment 2 Ngo Than 2012-04-25 10:54:41 EDT
the variable p which is using in .Xclients-default is not exported, so it cannot overwrite the variable set in in the customscript.

I tried to to reproduce the problem with adding this line "echo p=$p >/tmp/startkde.out" in /usr/bin/starkde", and switchdesk kde before. The variable p is empty which is expected.  

Could you please give more details how i can reproduce this issue?

Comment 4 damion hancock 2012-05-02 12:00:40 EDT
Your test sounds like it should reproduce the error.   I tried to repeat it myself, but it seemed to work.  We have gotten a few patches since I originally posted this.  I also just got a newly configured workstation, so I won't be able to look at this again for a while.

I assumed that the exec command didn't need to export the environment but just replaced the calling shell with the $p/WM argument taking the current shell environment.
Comment 5 Ngo Than 2012-05-14 07:22:37 EDT
The created .Xclients-default script doesn't export any enviroments on unix standard. To export the enviroments you need to set "export XXX". 

I will close this bug as "NOTABUG" in this case.

Note You need to log in before you can comment on or make changes to this bug.