Sponsored Content
Top Forums Shell Programming and Scripting Problem setting environment... Post 302349437 by Vi-Curious on Tuesday 1st of September 2009 04:30:25 AM
Old 09-01-2009
Don't use c-shell but have you tried something like
Code:
export DISPLAY=`who -m | awk '{print $6}' | tr -d '()'`

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

setting environment variables ???

Hello, I want to set some environment variables with this script: ip=$@ echo Remote Computer: $ip PERLDB_OPTS="CallKomodo=$ip:9000 RemotePort=$ip:9010 PrintRet=0" export PERLDB_OPTS PERL5LIB=/opt/komodo export PERL5LIB echo PERLDB_OPTS: $PERLDB_OPTS echo PERL5LIB: $PERL5LIB But it... (5 Replies)
Discussion started by: Gargamel
5 Replies

2. Shell Programming and Scripting

Setting up Environment Variables

Hi all, I am trying to set up some variables in a shell script. The variables contain values of various paths needed to run a java module. The problem is the variables dont seem to be setting at all. here is what i am trying to do : JAR_HOME=/home/was5/bdcms/scheduledjobs/lib export... (6 Replies)
Discussion started by: rpandey
6 Replies

3. UNIX for Advanced & Expert Users

sudo environment setting?

Hi, first post. As the nick suggests I'm a Unix noob, but I'm doing everything I can to learn fast...job requirement. These forums have been a huge help so far. I have a server running HP-UX 11.23b with Apache/2.0.59 HP-UX_Apache-based_Web_Server. Apache is not installed in the default... (3 Replies)
Discussion started by: nixnoob
3 Replies

4. Programming

Setting Environment variable..!

Hi, I already have one CPP program which invokes the C program.And the C program contains whole function definitions..!This is a working program..I have to enable the logs in both CPP as well as in the C program ..!So I am reading the enviornmental variable log path from the CPP and doing the... (2 Replies)
Discussion started by: Kattoor
2 Replies

5. UNIX for Dummies Questions & Answers

Setting up your environment

Hi I am new to Solaris and was just given my id and need to setup my environment, what do i need to do to run certain commands without putting in the complete path. How do I create my .profile, I do not see under my login? Any help would be greatly appreciated. (5 Replies)
Discussion started by: sa_ken
5 Replies

6. UNIX for Dummies Questions & Answers

Need help with setting up environment variables

hi all, I would appreciate if some one could explain me the difference between setting up the variables as shown below HOME=${HOME:-"/home/user1"} HOME=/home/user1 (1 Reply)
Discussion started by: SSSB
1 Replies

7. Emergency UNIX and Linux Support

Problem setting environment variables from script

Hi all! I know that environment variables can be set on the .bashrc file, but I need to set them from a sh script. I saw a lot of websites that teach this but it doesn't work for me. #!/bin/sh DEKTOP=$DESKTOP=:/home/rrodrigues/Desktop export DESKTOP if I do echo $DESKTOP returns me... (10 Replies)
Discussion started by: ruben.rodrigues
10 Replies

8. Shell Programming and Scripting

problem with setting environment variable

shell script: #!/bin/csh set VAR=12345 echo $VAR will peacefully give the output 12345 at shell. I need to use C++ to do the same in some part of the code: string str = "12345"; retValue="set var1= "+str; system(retValue1.c_str()); system("echo $var1"); This doesn't create a system... (1 Reply)
Discussion started by: harshvardhan360
1 Replies

9. UNIX for Dummies Questions & Answers

Setting environment variable problem in Ubuntu?

I am trying to install timbl- memory based learner tools in ubuntu. it after unpacking the tar file it brings the following msg No package 'ticcutils' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you... (1 Reply)
Discussion started by: gbdaw
1 Replies

10. Red Hat

Setting up LAMP environment

I wish to setup LAMP environment. Amongst, I have successfully installed Linux 6.1. I am looking fwd to install - Apace Web Server, My Sql Database & PHP environment. Say if I look for MySql, could see downloadable available in rpm format. But this must be copied over to Linux machine. As... (2 Replies)
Discussion started by: videsh77
2 Replies
PRCTL(1)						      General Commands Manual							  PRCTL(1)

NAME
prctl - Process operations SYNOPSIS
prctl [-v] [-h|--help] [--version] <-q|<options....>> [command] where <options> are: --unaligned=[silent|signal|default] --fpemu=[silent|signal|default] DESCRIPTION
prctl allows you to query or control certain process behavior. Supported options are handling of unaligned memory accesses and floating point assistance faults by a process. When a process performs an unaligned memory access, by default the kernel would emulate the unaligned access correctly and log the unaligned access in syslog. This behavior can be changed so the kernel could either emulate the unaligned access correctly without logging an error or send SIGBUS to the process. Similarly when a process encounters a floating point assist fault, kernel would invoke floating point emulator and log the floating point assist fault. This behavior can be changed so the ker- nel could either emulate floating point operation without logging an error or send SIGFPE to the offending process. prctl can optionally be followed by a command. If a command is specified, prctl will exec the command with the processor behavior set to as specified by the options. If a command is not specified, prctl will fork a new shell unless the command only queried the current settings. The shell started by prctl will be as defined by the environment variable SHELL. If environment variable SHELL is not defined, shell in the password entry for the user will be started. If a shell is not found in the password entry, bash will be started. OPTIONS -v Verbose mode. In verbose mode, any new settings are confirmed with a message on stdout. --help Print usage information and exit. --version Print software version and exit. -q Query the current settings for the process options controllable by prctl. --unaligned=[silent|signal|default]] Set unaligned memory access behavior to not log the access (silent), send SIGBUS to the process (signal), or do the default (default). If a value is not specified after "=", current setting is returned. --fpemu=[silent|signal|default]] Set floating point assist fault behavior to not log the faulti (silent), send SIGFPE to the process (signal), or do the default (default). If a value is not specified after "=", current setting is returned. If an option is specified multiple times, the last one takes effect. EXAMPLES
prctl --unaligned=signal starts up a shell (as defined by the environment variable SHELL) and sets up any process running under this shell to be sent SIGBUS upon an unaligned memory access. prctl --unaligned=signal gdb tst starts up a gdb session for the program "tst" with the process set to receive SIGBUS upon unligned memory access. prctl --unaligned= displays the current setting for unaligned memory access handling. prctl --unaligned= gdb tst displays the current setting for unaligned memory access handling and starts up a gdb session for the program "tst". NOTES
prctl works on 2.4.0 and above kernels only. --fpemu= option is specific to IPF (Itanium Processor Family, previously known as IA-64) and is supported on kernels 2.4.11 and above. Other architectures and kernels may return "Invalid argument" error. prctl(2) AUTHOR
Khalid Aziz <khalid_aziz@hp.com> LICENSE
This software is made available under the GNU General Public License (GPL) Version 2. This software comes with NO WARRANTY. Process operations PRCTL(1)
All times are GMT -4. The time now is 07:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy