Operating System - Linux
1820475 Members
3263 Online
109624 Solutions
New Discussion юеВ

How to set user's profile in Linux

 
Pham Quoc Trung
Advisor

How to set user's profile in Linux

Hi,

I dont'n know how to set user's profile in Linux when I login Linux Server from a remote Xwindow emulation terminal. I have setup my profile in the .profile of my home. It works only when I telnet to the Linux Server (my user account is using /bin/bash shell). However when I login using Xwindow emulation terminal, it does not run my .profile at all.

I know in AIX, I have to open the file .dtprofile and add the line:

DTSOURCEPROFILE=TRUE

But I cannot find this file in Linux.

Please advice. Thanks
6 REPLIES 6
Stuart Browne
Honored Contributor

Re: How to set user's profile in Linux

Most XTerm applications can be given a flag to say that the session is a login session.

For the standard 'xterm' application, it's the flag '-ls'.

If you are using something else (i.e. gnome-terminal, or the kde equivalent) then the options are different.
One long-haired git at your service...
Steven E. Protter
Exalted Contributor

Re: How to set user's profile in Linux

When I log on at my Linux console, the environment I get appears to have been sourced from the file /home/.bash_profile

You should be able to set any variable's you need right in there.

To set variables for all users /etc/profile

I'm sure I'm missing the gist of this question.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pham Quoc Trung
Advisor

Re: How to set user's profile in Linux

Yes, my Xterm is using the command to activate Xwindow:

/usr/bin/X11/xterm -ls -display my_pc_ip:0.0

How can I ask the shell to read my .profile to setup the environment parameters ?
Jerome Henry
Honored Contributor

Re: How to set user's profile in Linux

Why don't you add it in your .bashrc ?
J
You can lean only on what resists you...
Pham Quoc Trung
Advisor

Re: How to set user's profile in Linux

Great. It works. Thanks a lot.
Jerome Henry
Honored Contributor

Re: How to set user's profile in Linux

Great !
Why not assigning a few points now ?... ;-)
J
You can lean only on what resists you...