LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   just saying - hi [ how to set path in solaris permanently ] (https://www.linuxquestions.org/questions/solaris-opensolaris-20/just-saying-hi-%5B-how-to-set-path-in-solaris-permanently-%5D-502662/)

madivad 03-21-2008 08:09 PM

oh, isn't this pretty? :-)
Code:

dave@solaris:~$ cat /etc/release
                  OpenSolaris Developer Preview 2 snv_79b X86

                        _        _    _        _ _               
          _ __ _ _ ___ (_)___ __| |_  (_)_ _  __| (_)__ _ _ _  __ _
          | '_ \ '_/ _ \| / -_) _|  _| | | ' \/ _` | / _` | ' \/ _` |
          | .__/_| \___// \___\__|\__| |_|_||_\__,_|_\__,_|_||_\__,_|
          |_|        |__/

ok, the problem has been found/solved. jlliagre, you were beaten by only a margin.

I admit the answer was found by posting in the opensolaris forums (I joined for this question alone <G>).

The problem is with the gnome terminal, if I use xterm, all the path options are correct (and overflowing with duplicates from the various places I have set it and now need to clean up).

then, using your latest suggestion of looking in .bashrc reveals the problem:
Code:

dave@solaris:~$ cat .bashrc
#
# Simple profile places /usr/gnu/bin at front,
# adds /usr/X11/bin, /usr/sbin and /sbin to the end.
#
# Use less(1) as the default pager for the man(1) command.
#
export PATH=/usr/gnu/bin:/usr/bin:/usr/X11/bin:/usr/sbin:/sbin
export MANPATH=/usr/gnu/share/man:/usr/share/man:/usr/X11/share/man
export PAGER="/usr/bin/less -ins"

#
# Define default prompt to <username>@<hostname>:<path><"($|#) ">
# and print '#' for user "root" and '$' for normal users.
#
PS1='${LOGNAME}@$(hostname):$(
    [[ "$LOGNAME" = "root" ]] && printf "${PWD/${HOME}/~}# " ||
    printf "${PWD/${HOME}/~}\$ ")'
dave@solaris:~$

edit: The OpenSolarus forum where I realised the problem was with terminal
http://www.opensolaris.org/jive/thre...55297&tstart=0

shashi_hlb 02-02-2009 06:23 AM

Solaris set the calsspath permanently
 
Quote:

Originally Posted by jlliagre (Post 3096436)
Can you post the content of /etc/release to clarify ?
Did you look at the bash files ?
~/.bashrc
/etc/bash.bashrc

Hi i am shashi from india, how to create the .profile in solaris 10
It is not there in /etc/profile or ${HOME}/.profile.

Best Regards,
Shashi

jlliagre 02-02-2009 02:59 PM

Welcome to LinuxQuestions.

Next time, please start a new thread instead of using an existing one which isn't particularly related.

There must be a /etc/profile on you Solaris 10 installation. This file is part of the OS.

If there is no $HOME/.profile, feel free to create one with a text editor.

pk315 12-05-2011 09:19 PM

!! good
 
:) this is very useful.

mosini 08-29-2014 01:05 AM

The solution
 
Dear All,
My OS is Oracle Solaris 10.
I did solve this by doing following steps:
1.login with root user
2.goto /usr/default
Code:

-bash-3.2$ cd /usr/default
3.enter this command: vi login
4.Then add following text in the login file,
As you know for inserting text, you need to press i character where u need to insert text.
I press i after this line: #PATH=/usr/bin:/usr/sfw/bin
Code:

# PATH sets the initial shell PATH variable
#
#PATH=/usr/bin:/usr/sfw/bin
(press i) and enter your path, my path was as following
PATH=/usr/bin:/usr/sbin:/usr/sfw/bin

5.after entering the above mentioned text press ESC and
the enter colon : and then press w! and finished.
6.for exiting press SHIFT+z+z
7.for seeing the result enter exit command to exit from root user.

jlliagre 08-29-2014 03:23 AM

Hi mosini,

welcome to LQ and thanks for this posting.

Beware however that this thread is quite old and the original question was already answered eight years ago.


All times are GMT -5. The time now is 06:59 PM.