Welcome, Guest
Please Login or Register.    Lost Password?

Not able to source unix profile in new application.
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Not able to source unix profile in new application.
#1282
Not able to source unix profile in new application. 11 Years, 6 Months ago Karma: 0
So, I've created a new single-window application that launches a window manager and gives me a full-desktop view of my server when I login. The problem I'm having is that the application doesn't seem to source my id's original .profile. So any environment variables such as PATH, are not set. This is a bit of a problem.

In the XTerm application, it seems to do this as everything works normally there. I'm fairly new to this, so if this is a silly question, I apologize. I did look through the forums and documentation, but found nothing to help me.

If anyone knows how to do this, I'd appreciate it!
Marden
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1284
Re: Not able to source unix profile in new application. 11 Years, 6 Months ago Karma: 2
GO-Global for UNIX makes special efforts to ensure that any ".profile"-type shell scripts are sourced during launch (i.e. the shells that start a session are launched as "login" shells).

However, a quick workaround might be to publish a script that sources your .profile and then launches the window manager. This should ensure that your environment is configured correctly. If it doesn't then it's most likely that the window manager isn't passing along the environment to the programs it's launching.

Troy
troy
Administrator
Posts: 231
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Birthday: 01/14
The administrator has disabled public write access.
 
#1287
Re: Not able to source unix profile in new application. 11 Years, 6 Months ago Karma: 0
I've tried to manually source the profile once I'm in the desktop, and it doesn't seem to work. so,I'm guessing that it's not passing the environment to the programs.

The weird thing is that when I launch the xterm application that is auto-setup during installation, everything works great! When I look at the difference between the two applications in Go-Configure, I can't find any. I guess I'm a little confused here. Could you help out a newbie here? Thanx!
Marden
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1288
Re: Not able to source unix profile in new application. 11 Years, 6 Months ago Karma: 2
GO-Global for UNIX always launches things in a manner designed to source the .profile, so you won't see any settings related to this is GO-Configure. You could try to determine if this is a problem with the window manager by using a different window manager.

You could also try something like:

    [li]Assuming you are publishing /home/me/myapp
    [li]move /home/my/myapp to /home/me/myapp.real
    [li]create a shell script in /home/my/myapp like:

    Code:

    #!/bin/sh
    . ~/.profile
    exec /home/my/myapp.real $*




If this doesn't work, then we'd probably need to see more information to troubleshoot this (like the application you're running, which window manager, the properties of the published item, etc.).

Troy
troy
Administrator
Posts: 231
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Birthday: 01/14
The administrator has disabled public write access.
 
#1289
Re: Not able to source unix profile in new application. 11 Years, 6 Months ago Karma: 0
That worked great! Thanx for the help Troy!
Marden
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: troy, Andyl