Bug 798477

Summary: The switch desktop tool breaks our login environment
Product: Red Hat Enterprise Linux 5 Reporter: damion hancock <damion.c.hancock>
Component: switchdeskAssignee: Than Ngo <than>
Status: CLOSED NOTABUG QA Contact: Desktop QE <desktop-qa-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 5.7CC: pknirsch, vbenes
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: switchdesk-4.0.8-8.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-21 14:48:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description damion hancock 2012-02-29 00:34:59 UTC
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 Than Ngo 2012-04-25 14:54:41 UTC
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?

thanks

Comment 4 damion hancock 2012-05-02 16:00:40 UTC
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 Than Ngo 2012-05-14 11:22:37 UTC
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.