LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 02-02-2007, 10:11 AM   #1
hitokiri17
Newbie
 
Registered: Jan 2007
Posts: 13

Rep: Reputation: 0
Question where can I find the ./.profile???


I'm trying to install a POS software in FC6. The first step is installing the program:

#mount /dev/cdrom /mnt
#cd /mnt
#sh install.sh

All is perfectly fine. Then it ask me to activate the product. To do that I have to open the POS program. The instructions says that I have to change the PATH:

PATH=.:/path2.:/path3

But I have to change it in the ./.profile file. Here's my situation. I don't know where this file is. I echoed $PATH to see if I could find that file but couldn't find it.

I searched in the forums and use the following instruction to do it fast:

export PATH=.:/path2.:/path3

But didn't work. It is supposed that after I do that instruction and change xTerm to linux, in the terminal I change to the top-level directory of the POS program and type "syn" to open it. And when I do all of this the terminal sends a message that I have to change de KEYFILE variable. KEYFILE?????? It also gaves me an example:

env KEYFILE=inputfile syn

But env is not recognized as a comand.

Can anyone tell me what am I doing wrong and also tell me where is the ./.profile????
 
Old 02-02-2007, 10:27 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Code:
./.profile
This (./) means the file is in the current, working directory. Given what information you provided, the current working directory would be /mnt.

The leading (.) in the .profile file name means the file is hidden. Use ls -a to see hidden files.

Code:
export PATH=.:/path2.:/path3
Means you just hosed up your environment variable PATH. This variable lists all the directories that are searched for executables. I'll bet you don't have any directories named /path2 and /path3.
 
Old 02-02-2007, 10:30 AM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
./ = present directory
However since you did a cd /mnt it is doubtful it wants you to edit anything there (nor can you if its a CD as its read only).

.profile is a special script file that should be in a user's home directory. During login this file is "sourced" so that it puts things in the user's environment. The .profile you need to change is the one in the home directory for the user that will run the POS software.
You can get to a user's home directory simply by typing cd ~<username>.

env is a shell builtin (for ksh, sh and bash) to show you environment settings.

If "env" isn't working it makes me think you're not running one of the above shells. csh is completely different.

Also were you logged in as root when you did the install? Many installations have to be done by root so as to allow for the creation of things they don't own yet.

Type "ps" and see what it shows you. This should give you lines showing only your processes such as:
PID TTY TIME CMD
15827 pts/1 00:00:00 ksh
16635 pts/1 00:00:00 ps

From the above you can see I was running ksh. You can also check your shell by typing "grep <username> /etc/passwd" where username is the one you're logged in as - this will show you the default shell for that user at the end of the line.

Last edited by MensaWater; 02-02-2007 at 10:32 AM.
 
Old 02-02-2007, 02:21 PM   #4
hitokiri17
Newbie
 
Registered: Jan 2007
Posts: 13

Original Poster
Rep: Reputation: 0
Question .profile

I enteres ls -a but there is no .profile in the home directory. Can I add the executable to one of the folders specified in the PATH variable to run it?
 
Old 02-02-2007, 02:58 PM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Are you running a bash shell? If so then you can add it to .bashrc instead of .profile. (You can create .profile by the way.)
 
Old 02-08-2007, 05:48 AM   #6
sandgroper
Member
 
Registered: Jul 2004
Location: Perth , Western Australia
Distribution: Fedora Core 5 , Mint 9
Posts: 118

Rep: Reputation: 15
Quote:
where can I find the ./.profile???
I'm trying to install a POS software in FC6. The first step is installing the program:

#mount /dev/cdrom /mnt
#cd /mnt
#sh install.sh

All is perfectly fine. Then it ask me to activate the product. To do that I have to open the POS program. The instructions says that I have to change the PATH:

PATH=.:/path2.:/path3

But I have to change it in the ./.profile file. Here's my situation. I don't know where this file is. I echoed $PATH to see if I could find that file but couldn't find it.
The .profile file is used in a unix environment using the Bourne shell , the Linux environment uses the Bash shell ( Bourne Again SHell ) and the .bash_profile file is used to set the user's environment.
Do a ls -a listing for the .bash_profile entry and it should be listed.

As for entering the path variables use :
Code:
PATH=$PATH:$HOME/<anydirectory>
export PATH
To check out the current path settings use :
Code:
echo $PATH  
echo $HOME
To run the .bash_profile to create the new environment , use the command
. .bash_profile
( note the dot before the .bash_profile command )


I will post you the contents of my .bash_profile so that you can get a better understanding of a working .bash_profile.
( I am running FC5 & FC3 )

Code:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

# User specific environment and startup programs
PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME="root"
PS1="[root]$ "
PS2="[root]# "
export USERNAME BASH_ENV PATH PS1 PS2 
clear
uname -osrn
date
echo
 
  


Reply



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
Find Users for advise based on Profile carl0ski LQ Suggestions & Feedback 22 01-26-2007 09:46 AM
where can I find info about VI profile ICO Linux - Newbie 4 08-22-2005 01:33 AM
where do i find a .profile ? (rhelv21) namgor Linux - General 6 07-08-2004 12:48 PM
cannot find local profile Peds222 Linux - Networking 2 09-11-2003 02:03 PM
Where to find .profile or .login? sceadu Linux - Newbie 2 03-21-2003 12:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 06:46 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