Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: What is the equivalent of setenv in OPENSUSE bash shell?

  1. #1

    Default What is the equivalent of setenv in OPENSUSE bash shell?




    4 hours (11:36 PM)


    Hi,

    I try to set environment variable for a software. On internet, I find this suggestion:


    setenv XILINXD_LICENSE_FILE /opt/Xilinx/Xilinx.lic


    After some web google, I know that setevn is for csh. I use bash in OPENSUSE. I try export. It echos:

    linux-kx35:/opt/Xilinx # export XILINXD_LICENSE_FILE /opt/Xilinx/Xilinx.lic
    bash: export: `/opt/Xilinx/Xilinx.lic': not a valid identifier



    Could you tell me how to set that in bash, OPENSUSE, 12.3, KDE?

    Thanks,

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,658
    Blog Entries
    15

    Default Re: What is the equivalent of setenv in OPENSUSE bash shell?

    Quote Originally Posted by freerjw View Post



    4 hours (11:36 PM)


    Hi,

    I try to set environment variable for a software. On internet, I find this suggestion:


    setenv XILINXD_LICENSE_FILE /opt/Xilinx/Xilinx.lic


    After some web google, I know that setevn is for csh. I use bash in OPENSUSE. I try export. It echos:

    linux-kx35:/opt/Xilinx # export XILINXD_LICENSE_FILE /opt/Xilinx/Xilinx.lic
    bash: export: `/opt/Xilinx/Xilinx.lic': not a valid identifier



    Could you tell me how to set that in bash, OPENSUSE, 12.3, KDE?

    Thanks,
    Hi
    Like this;
    Code:
    export XILINXD_LICENSE_FILE="/opt/Xilinx/Xilinx.lic"
    
    then check;
    
    echo $XILINXD_LICENSE_FILE
    /opt/Xilinx/Xilinx.lic
    You can add the export command to your ~/.bashrc file so when you login it is set.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,700

    Default Re: What is the equivalent of setenv in OPENSUSE bash shell?

    export varname=value

  4. #4

    Default Re: What is the equivalent of setenv in OPENSUSE bash shell?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Like this;
    Code:
    export XILINXD_LICENSE_FILE="/opt/Xilinx/Xilinx.lic"
    
    then check;
    
    echo $XILINXD_LICENSE_FILE
    /opt/Xilinx/Xilinx.lic
    You can add the export command to your ~/.bashrc file so when you login it is set.
    Thank you. Last time, I added one line to ~/.bashrc. I added: "source settings32.sh" to ~/.bashrc. It went wrong (now I think that I did not give the right path for it to find the .lic file). Then, I commented that line. The catastrophe was OPENSUSE 12.3 booted, stayed my bash shell (but in purple color, not the regular black bash shell). No response to keystroke at all. The whole /home cannot be accessed. It halted there, no response to any key.


    Could you tell me that I should work on this file (~/.bashrc) at what path in bash shell window? I don't know whether it cares or not, but I do know it may be even worse than a kernel crash for an inappropriate editing on that file.



    Both vi or Kwrite can do the editing?

  5. #5
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,700

    Default Re: What is the equivalent of setenv in OPENSUSE bash shell?

    Text editor is a text editor GUI or command line

    Do you have auto login set up? You can turn it off in command line yast-system config edit - desktoop-displaymanager-autologin

    What ever you put in that script went into a loop I guess

    try another user

  6. #6

    Default Re: What is the equivalent of setenv in OPENSUSE bash shell?

    Quote Originally Posted by freerjw View Post
    Thank you. Last time, I added one line to ~/.bashrc. I added: "source settings32.sh" to ~/.bashrc. It went wrong (now I think that I did not give the right path for it to find the .lic file). Then, I commented that line. The catastrophe was OPENSUSE 12.3 booted, stayed my bash shell (but in purple color, not the regular black bash shell). No response to keystroke at all. The whole /home cannot be accessed. It halted there, no response to any key.


    Could you tell me that I should work on this file (~/.bashrc) at what path in bash shell window? I don't know whether it cares or not, but I do know it may be even worse than a kernel crash for an inappropriate editing on that file.



    Both vi or Kwrite can do the editing?
    I am curious where ~/.bashrc is? What meaning of '~', '~/', or '~/.'?

    Thanks.

  7. #7

    Default Re: What is the equivalent of setenv in OPENSUSE bash shell?

    Quote Originally Posted by gogalthorp View Post
    Text editor is a text editor GUI or command line

    Do you have auto login set up? You can turn it off in command line yast-system config edit - desktoop-displaymanager-autologin

    What ever you put in that script went into a loop I guess

    try another user
    Yes, I had auto login set up.

    The PC had only one user/account. To avoid that happens, it is better to set up multiple user accounts? Thanks,

  8. #8
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,700

    Default Re: What is the equivalent of setenv in OPENSUSE bash shell?

    ~/ is short hand you can use for your home ditrectory

    ./ force current directory useful if executing a script in the current directory that may have a similarly named file in the path

    ../ is up one directory ../../ is up 2

    so ~/bashrc is the bash configuration file in your home directory

  9. #9
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,700

    Default Re: What is the equivalent of setenv in OPENSUSE bash shell?

    oops missed typed

    ~/.bashrc

    the period in front of file name makes it a hidden file

  10. #10
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,700

    Default Re: What is the equivalent of setenv in OPENSUSE bash shell?

    I think it is better to login you don't have to have multiple accounts but if you have multiple users yes it is better to have an account for each

    Makes it easier to recover from little problem like you had since yo can go to a terminal from the login window press ctrl-alt-F1

    Also make the system a little more secure from some random person turning it on

    Note if someone knows what they are doing and has physical possession only encryption will keep them out

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •