Usage of CGI environment variables SERVER_NAME and HTTP_HOST by APEX
Hi,
I have a question about the usage of the CGI environment variables SERVER_NAME/SERVER_PORT and HTTP_HOST by APEX.
When does it use which CGI environment variables when it is generating absolute URLs.
Based on the following thread about the online help (Re: Help does not show content it seems to use SERVER_NAME/SERVER_PORT. At least for the online help.
But based on my own tests some time ago about the flash charting at the following thread (Re: APEX Charts - Error XML Loading falied I investigated that at least flash charting is using HTTP_HOST to generate an absolute URL.
My question now is what is the logical difference between HTTP_HOST and SERVER_NAME and which of the URLs should be used when I want to generate absolute URLs in my application?
I would tend to use HTTP_HOST because it seems to be more logically. I would see SERVER_NAME more as just the name of the web-server, which doesn't have to be the URL the user enters in case a reverse proxy is used.
Thanks
Patrick
My APEX Blog: http://inside-apex.blogspot.com
The ApexLib Framework: http://apexlib.sourceforge.net
The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/
We use HTTP_HOST in most cases from what I can see. You may have also noted that HTTP_HOST may have :<port> appended to the hostname as well.
Scott
Similar Messages
-
Not able to get SSL related CGI Environment Variables?
We are currently using APEX 3.2.0.x, OHS 10.1.3.x, and 11gR1 on linux. The APEX application we've been developing will be accessed via SSL and x509 certificates such that a client certificate is passed from a user's browser to the OHS, the information will be read from the certificate, and if the user's cert information exists in a user table associated with the application, they will have the role they've been assigned as an existing user within the application. Otherwise, the user will be a guest and have a minimum role accessing the application.
We are certainly not guru's when it has come to setting up and configuring SSL and certs, but we have gotten to the point where we have all of the required certs created and installed, and the client cert passes it's information successfully to the OHS to get to the "home" page of the application via the Rewrite statement in the httpd.conf/ssl.conf that points to the appropriate https url. We are now at the point where we need the APEX application page to read the cert information, and this is where we are having problems.
We have created an "On Load - Before Header" process and temporary item on the "home" page to display CGI environment variables to see what we're getting. It's a PLSQL Anonymous block like this:
DECLARE
lUserName VARCHAR2(100);
BEGIN
SELECT NVL(owa_util.get_cgi_env('REMOTE_USER'),'NOT POPULATED') INTO lUserName FROM DUAL;
:P1_REMOTE_USERNAME := lUserName;
END;
We can grab any of the cgi environment variables that are listed in the OHS mod_plsql User's Guide. We cannot seem to be able to get any of the SSL CGI environment variables though. We are adding the SSL variables to the dads.conf via the PlsqlCGIEnvironmentList parameter (ex: PlsqlCGIEnvironmentList SSL_CLIENT_S_DN_CN) and bouncing the OHS as needed. Unfortunately, we have not been successful in getting any of them to show up in the item on the APEX page.
As far as we can tell, we have the SSL/OHS/Certs configured, but may be there is another SSL directive or some other configuration item that we've missed that needs to be set in order for SSL CGI environment variables to be available to the owa_util.get_cgi_env function. If anyone can tell us what we may have missed, it would be appreciated.
thanks
bobHey John,
what we have found that we were not sure of is that we need to use Rewrite rules and conditions in the ssl.conf to grab the ssl cgi environment variables and "put" them into the request header to hold them like this:
RewriteCond %{SSL:SSL_SERVER_S_DN} (.*)
RewriteRule .* - [E=SSLS_DN:%1]
RequestHeader add X-SSL-SERVER-S-DN %{SSLS_DN}e
Then in the dads.conf put the request header reference in there with the plsqlcgienvironmentlist parameter like this:
PlsqlCGIEnvironmentList HTTP_X_SSL_SERVER_S_DN
Restart the OHS, and then grab the HTTP_X_SSL_SERVER_S_DN variable(s) via the owa_util.get_cgi_env in the APEX page to pull the value out with an anonymous block in an On Load - Before Header process like this:
DECLARE
lUserName VARCHAR2(100);
BEGIN
SELECT NVL(owa_util.get_cgi_env('HTTP_X_SSL_SERVER_S_DN'),'NOTHING HERE') INTO lUserName FROM DUAL;
END;
It's the Rewrite rules and putting them into the request header that we were not totally sure about as far as how and where you put the environment variables to make them accessible to the dads.conf with the PlsqlCGIEnvironmentList parameter that in turn makes them accessible to APEX. We're still not 100% sure this is the correct method, but it's working. We don't recall reading in any of the APEX docs, APEX forum threads, or other documentation about needing Rewrite rules and conditions to put the cgi environment variables into the request header to make them accessible to APEX. So, that seems to be our missing piece of the puzzle here.
Anyway, I think we're okay for the moment, and may be this thread will help someone else out in the future. Thanks for your help John, and will give you a helpful plug on the forum for this thread. BTW, I do have your book, so it was nice to see someone as advanced with APEX as yourself reply to the posting.
Thanks
Bob -
How to Specify the environment variable JCE_POLICY_ZIP and restart
Hello All,
I am installing the ABAP SAP NetWeaver 7.01 SR1 ABAP Trial Version.
sapinst.exe installed successfully.
I am installing the sapinstgui.exe but I got the following message:
Program is starting... Please wait!
Path: C:\Users\George\AppData\Local\Temp\sapinst_exe.6220.1246290325
jre\bin\java.exe
For the requested processing mode java policy
files within the used SAP JVM are needed.
Specify the environment variable JCE_POLICY_ZIP and restart.
See also SAP note 1238121.
Exit status of child: 10
JRE is installed in C:\Program Files\Java\j2re1.4.2_19
How do I specify the environment variable JCE_POLICY_ZIP?
Thanks
George
Edited by: George King on Jun 29, 2009 9:01 PMHi everyone,
I had the same problem and found the solution !
I was trying to setup the GUI thanks to sapinstgui.exe from the trial download folder and I got the exact same message,
The problem is not the policies but the installation file.
The installation file for the GUI is located at :
<extract_folder_SAP_trial_version>\GUI\SAP_GUI_FOR_WINDOWS(...)\SAP_GUI_for_windows_(...)_Components.exe
Hope it helps !
Nicolas -
Environment variable PATH and Sql*Plus
Hi all,
i have a problem with sqlplus.
It might seem not to be able to read the path environment variable.
I need to launch some sqls without typing their path (to put the path i should modify morre than 300 shell scripts), e.g.: @script.sql.
My shell scripts are invoked by the database using java.
Inside the shell scripts we have commands like "sqlplus -silent <login> @script.sql [parameters]"
So if sqlplus is not able to read the PATH environment variable, the command hangs waiting for something to do without the chance to close it.(it is silent).
I run RDBMS v8.1.7 on compaq tru64 Unix.
Can someone help me??
Thanks in advance.
Marco - Milan, ItalyWhere do I set SQL*Plus SQLPATH variable??As every other unix environment variable - either in your profile or in your current shell whatever you like
Is this the PATH where SQL*Plus searches for .sql
files??SQL*Plus searches for your files in your current directory, and then the directories you specify with the SQLPATH environment variable.
SQL*Plus searches this colon-separated list of directories in the order they are listed. -
Environment variable JAVA_HOME and ANT
Hi,
I have one parent parent.xml ant file that calls another build.xml files (task <ant>). Each build.xml file uses <javac> but needs to compile with another java version: 1.4 and 5 (defualt in system is JAVA_HOME=java1.4)
I tried this command:
<property environment="env"/>
<ant antfile="build.xml" dir="${my_dir}" target="compile.debug">
<property name="env.JAVA_HOME" value="c:\jdk1.5.0_05"/>
</ant>But it seem it doesn't work. The compilation of project in ${my_dir} directory fails because of using 1.4 java compiler.
Has anybody any idea, plz?how about j2ee.bat?
-
this is really frustrating ive been googling for hours trying to find the solution! any help would be greatly appreciated. I have windows 7 and the newest gen ipod nano
For general advice see Troubleshooting issues with iTunes for Windows updates.
The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
tt2 -
Multiple oracle homes on Windows and the "Path" environment variable
Hi There,
We have a windows 2003 database server that has few databases running oracle 10.2.0.3. We are installing oracle 11.2.0.1 on the box as well, and we were wondering, which binaries should come 1st in the path environment variable? and how does this effect the working oracle environment?
Going to the oracle home selector and swapping the 2 oracle homes around will have the same effect on the windows path variable - which will treat the 1st oracle home to be the default home - are there any general rules reg. multiple oracle homes on a server and the default home?
Should the earlier version of oracle always proceed the newer one (i.e. c:\oracle\product\10.2.0.3\bin;c:\oracle\product\11.2.0.1\bin) or should the newer oracle version comes 1st as newer oracle versions are usually backward compatible?
Your thoughts are highly appreciated.
ThanksThat isn't going to happen.
If you install 11.2 last it will appear in the PATH variable first
If you don't want that you need to Oracle Home Selector utility in the Installer to change it.
Obviously, as usual, all of this is documented.
Sybrand Bakker
Senior Oracle DBA -
Within JBuilder, Reading Environment Variable From a BATCH File
Hi ppl:
Following my scenario without JBuilder. I would like to be able to do the same with JBuilder, so that I can run my application from within.
1. In the DOS window, I run a config.bat file that sets up a whole bunch of environment variables and then calls another script file that sets up another whole bunch to set up environment for a third party API (C++ based).
2. My application uses native methods to call the third party API which uses the environment variables set in step 1.
I know how to set the environment varialbes in JBuilder (Project Parameters, VM). However, I don't know how I can call a batch file that does the same. I don't want to set up the third party variables in JBuilder manually, since the script that sets them up checks on a few things to customize the environment.
I also know how to run a batch file from JBuilder, but that does not set the environment for the application. It seems like the batch file is run in a separate process.
Any ideas?
KamranIt seems like the batch file is run in a separate process.Yes, it is. That's a design feature of Windows. The environment variables that a process creates are available to any subprocess, but when the process ends, the environment variables vanish. That's because they are part of the process, not global variables as you might wish.
So that's why your non-JBuilder scenario works; your C++ program is running in a subprocess of the process that defined the environment variables. And your JBuilder scenario doesn't work because the batch file it runs is in a process whose parent process is Windows, not JBuilder. -
How to set environment variables for Tomcat on mac osx 10.8.5
How do I set up my environment variables - JAVA_HOME and CATALINA_HOME on my iMac running mac osx 10.8.5?
You need to create a setenv.sh script in the tomcat bin directory. The link is an example that you will need adjust- http://www.unidata.ucar.edu/software/thredds/current/tds/tds4.2/tutorial/Getting Started.html
-
Hey,
I am trying to use
cl_gui_frontend_services=>gui_download
and include the windows environment variable %USERPROFILE%
in the path for example:
filename = '%USERPROFILE%/filename.txt'
that only creates a directory called %USERPROFILE% but not the Variable.
Has anybody experienced this ?
Thank your for your help,
kind Regards
Christofyou have to use the following code to get the environment variable value and then use that with gui_download
call method cl_gui_frontend_services=>environment_get_variable
exporting
variable = p_envir_name
changing
value = ls_envir_path
exceptions
cntl_error = 1
error_no_gui = 2
others = 3.
call method cl_gui_cfw=>flush
exceptions
cntl_system_error = 1
cntl_error = 2
others = 3. -
Add firewall rule with custom environment variable in program path
Hi,
We want to create a firewall rule for a program which is placed in folder which changes sometimes. I know you can add a firewall with the ProgramFiles environment variable like this:
netsh advfirewall firewall add rule name="Test Firewall rule" dir=in program="%%ProgramFiles%%\Test\Test.exe" action=allow security=notrequired
The environment variable ProgramFiles isn't expanded and if the Program Files folder is different on a system the rule still works.
We try to use this with a custom environment variable which we set a system environment variable with this command:
SETX SomeFolder "D:\Some Folder\Apr 2015" /M
If we use the command below to add the firewall rule in a batch file the environment variable SomeFolder is expanded correctly and the program path is added as a static path.
netsh advfirewall firewall add rule name="Some Firewall Rule" dir=in program="%SomeFolder%\AFile.exe" action=allow security=notrequired
Because the folder changes sometimes we want to change the environment variable SomeFolder and not remove the old firewall rule and create a new one. We want to add the environment variable SomeFolder to the program path as a (dynamic) environment variable
and not as the expanded path at the moment when the rule is added. If we use this command:
netsh advfirewall firewall add rule name="Some Firewall Rule" dir=in program="%%SomeFolder%%\AFile.exe" action=allow security=notrequired
We get the error:
Windows Firewall with Advanced Security
An error occurred while adding the rule.
Error: The parameter is incorrect
Status: The application name could not be resolved
OK
Why can't we use %%SOMEFOLDER%% like we can use %%PROGRAMFILES%%? The same error is shown when we try to add the firewall rule through the management console 'Windows Firewall with Advanced Security'
W. SpuHi,
Based on my plenty of test with this problem, it seems like there is no better method to achieve your requirement. To add new policy to firewall, it would be better using general cmdlet. The path parameter like %%SomeFolder%% do have problem in add firewall
policy cmdlet.
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
Extract Environment Variable from System Variables
Hi,
I want to define a custom environment variable manually and from my code I want to retrieve the value for that system variable which I have created.
Steps:
Manual Actions
1. Right Click "My Computer" >> Properties >> Advanced System Settings >> Advanced >> Environment Variables
Here I have 2 options. User Variables and System Variables.
In either of these I have to declare a variable - "Test Region" and its value as "Test1"
Now, when I run my c# program I have to get "Test1" as output when I provide "Test Region" as parameter.
Please provide me the code for this.Dear Cheong,
It is working perfect now, when I restarted the PC.
But the problem is each time when I change the Value of the environment variable, I need to restart the PC to make it effective.
Is there any solution for this?
Your support is much appreciated. -
Environment variable RFC_NO_TRFC_CLEANUP
This concerns RFC's being submitted by an external system. There is an OSS note 480089 that refers to setting the environment variable to 1. Where is this environment variable set and what does it do if I set it to 1? My guess is that it is set in the SAPRFC.INI file but I can't find any documentation to know this for sure.
Hello,
Check these parameters
dbms_type=mss
MSSQL_DBNAME=
MSSQL_SCHEMA=
MSSQL_SERVER=
please be sure you have set this
as note 128126
for user SAPServiceEDP
regards,
John Feely -
Different Environment Variable in OS and Solman
Hi dear experts,
I have a weird question here. I set the environment variable in the OS as blew:
smsp:smpadm 52> echo $PATH
/sybase/SMP/ASE-15_0/jobscheduler/bin:/sybase/SMP/ASE-15_0/bin:/sybase/SMP/ASE-15_0/install:/sybase/SMP/DBISQL/bin:/sybase/SMP/OCS-15_0/bin:/usr/sap/SMP/DVEBMGS00/exe/sapjvm_4/bin:/home/smpadm/bin:/usr/sap/SMP/hdbclient:/sapdb/programs/bin:/sapdb/clients/SMP/bin:/sapdb/clients/SMP/pgm:/sapdb/programs/pgm:/sapdb/programs:/sapdb/programs/lib:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/sap/SMP/SYS/exe/uc/linuxx86_64:/usr/sap/SMP/SYS/exe/run:/home/smpadm:.
But in solman, I run the same command in RSBDCOS0, get this:
echo $PATH
/usr/sap/SMP/DVEBMGS00/exe:/sybase/SMP/ASE-15_0/jobscheduler/bin:/sybase/SMP/ASE-15_0/bin:/sybase/SMP/ASE-15_0/install:/sybase/SMP/DBISQL/bin:/sybase/SMP/OCS-15_0/bin:/usr/sap/SMP/DVEBMGS00/exe/sapjvm_4/bin:/home/smpadm/bin:/usr/local/bin:/bin:/usr/bin:/u
It's same as what I found in program by debugging. And that's the reason why I failed to install MaxDB.
I have restarted solman, but the issue persisted. Can you give me any advices? Thank you.
Regards,
Pany PanHi Gaurav,
There is only bash.bashrc exists, I have never did anything to this file before. As below:
# /etc/bash.bashrc for SuSE Linux
# PLEASE DO NOT CHANGE /etc/bash.bashrc There are chances that your changes
# will be lost during system upgrades. Instead use /etc/bash.bashrc.local
# for your local settings, favourite global aliases, VISUAL and EDITOR
# variables, etc ...
# Check which shell is reading this file
if test -z "$is" ; then
if test -f /proc/mounts ; then
if ! is=$(readlink /proc/$$/exe 2>/dev/null) ; then
case "$0" in
*pcksh) is=ksh ;;
*) is=sh ;;
esac
fi
case "$is" in
*/bash) is=bash
case "$0" in
sh|-sh|*/sh)
is=sh ;;
esac ;;
*/ash) is=ash ;;
*/dash) is=ash ;;
*/ksh) is=ksh ;;
*/ksh93) is=ksh ;;
*/pdksh) is=ksh ;;
*/*pcksh) is=ksh ;;
*/zsh) is=zsh ;;
*/*) is=sh ;;
esac
# `r' in $- occurs *after* system files are parsed
for a in $SHELL ; do
case "$a" in
*/r*sh)
readonly restricted=true ;;
-r*|-[!-]r*|-[!-][!-]r*)
readonly restricted=true ;;
--restricted)
readonly restricted=true ;;
esac
done
unset a
else
is=sh
fi
fi
# Call common progams from /bin or /usr/bin only
path ()
if test -x /usr/bin/$1 ; then
${1+"/usr/bin/$@"}
elif test -x /bin/$1 ; then
${1+"/bin/$@"}
fi
# ksh/ash sometimes do not know
test -z "$UID" && readonly UID=`path id -ur 2> /dev/null`
test -z "$EUID" && readonly EUID=`path id -u 2> /dev/null`
# Colored file listings
if test -x /usr/bin/dircolors ; then
# set up the color-ls environment variables:
if test -f $HOME/.dir_colors ; then
eval "`/usr/bin/dircolors -b $HOME/.dir_colors`"
elif test -f /etc/DIR_COLORS ; then
eval "`/usr/bin/dircolors -b /etc/DIR_COLORS`"
fi
fi
# ls color option depends on the terminal
# If LS_COLORS is set but empty, the terminal has no colors.
if test "${LS_COLORS+empty}" = "${LS_COLORS:+empty}" ; then
LS_OPTIONS=--color=tty
else
LS_OPTIONS=--color=none
fi
if test "$UID" = 0 ; then
LS_OPTIONS="-A -N $LS_OPTIONS -T 0"
else
LS_OPTIONS="-N $LS_OPTIONS -T 0"
fi
# Avoid trouble with Emacs shell mode
if test "$EMACS" = "t" ; then
LS_OPTIONS='-N --color=none -T 0';
path tset -I -Q
path stty cooked pass8 dec nl -echo
fi
export LS_OPTIONS
# Set prompt and aliases to something useful for an interactive shell
case "$-" in
*i*)
# Some useful functions
if test -z "$restricted" ; then
startx () {
test -x /usr/bin/startx || {
echo "No startx installed" 1>&2
return 1;
/usr/bin/startx ${1+"$@"} 2>&1 | tee $HOME/.xsession-errors
remount () { /bin/mount -o remount,${1+"$@"} ; }
fi
# Set prompt to something useful
case "$is" in
bash)
# Append history list instead of override
shopt -s histappend
# All commands of root will have a time stamp
if test "$UID" -eq 0 ; then
HISTTIMEFORMAT=${HISTTIMEFORMAT:-"%F %H:%M:%S "}
fi
# Force a reset of the readline library
unset TERMCAP
# Returns short path (last two directories)
spwd () {
( IFS=/
set $PWD
if test $# -le 3 ; then
echo "$PWD"
else
eval echo \"..\${$(($#-1))}/\${$#}\"
fi ) ; }
# Set xterm prompt with short path (last 18 characters)
ppwd () {
local _t="$1" _w _x _u="$USER" _h="$HOST"
test -n "$_t" || return
test "${_t#tty}" = $_t && _t=pts/$_t
test -O /dev/$_t || return
_w="$(dirs +0)"
_x=$((${#_w}-18))
test ${#_w} -le 18 || _w="...${_w#$(printf "%.*s" $_x "$_w")}"
printf "\e]2;%s@%s:%s\007\e]1;%s\007" "$_u" "$_h" "$_w" "$_h" > /dev/$_t
# If set: do not follow sym links
# set -P
# Other prompting for root
_t=""
if test "$UID" -eq 0 ; then
_u="\h"
_p=" #"
else
_u="\u@\h"
_p=">"
if test \( "$TERM" = "xterm" -o "${TERM#screen}" != "$TERM" \) \
-a -z "$EMACS" -a -z "$MC_SID" -a -n "$DISPLAY" \
-a ! -r $HOME/.bash.expert
then
_t="\$(ppwd \l)"
fi
if test -n "$restricted" ; then
_t=""
fi
fi
case "$(declare -p PS1 2> /dev/null)" in
*-x*PS1=*)
# With full path on prompt
PS1="${_t}${_u}:\w${_p} "
# # With short path on prompt
# PS1="${_t}${_u}:\$(spwd)${_p} "
# # With physical path even if reached over sym link
# PS1="${_t}${_u}:\$(pwd -P)${_p} "
esac
# Colored root prompt (see bugzilla #144620)
if test "$UID" -eq 0 -a -t ; then
_bred="$(path tput bold 2> /dev/null; path tput setaf 1 2> /dev/null)"
_sgr0="$(path tput sgr0 2> /dev/null)"
PS1="\[$_bred\]$PS1\[$_sgr0\]"
unset _bred _sgr0
fi
unset _u _p _t
ash)
cd () {
local ret
command cd "$@"
ret=$?
PWD=$(pwd)
if test "$UID" = 0 ; then
PS1="${HOST}:${PWD} # "
else
PS1="${USER}@${HOST}:${PWD}> "
fi
return $ret
cd .
ksh)
# Some users of the ksh are not common with the usage of PS1.
# This variable should not be exported, because normally only
# interactive shells set this variable by default to ``$ ''.
if test "${PS1-\$ }" = '$ ' ; then
if test "$UID" = 0 ; then
PS1="${HOST}:"'${PWD}'" # "
else
PS1="${USER}@${HOST}:"'${PWD}'"> "
fi
fi
zsh)
# setopt chaselinks
if test "$UID" = 0; then
PS1='%n@%m:%~ # '
else
PS1='%n@%m:%~> '
fi
# PS1='\u:\w> '
PS1='\h:\w> '
esac
PS2='> '
if test "$is" = "ash" ; then
# The ash shell does not have an alias builtin in
# therefore we use functions here. This is a seperate
# file because other shells may run into trouble
# if they parse this even if they do not expand.
test -s /etc/profile.d/alias.ash && . /etc/profile.d/alias.ash
else
unalias ls 2>/dev/null
case "$is" in
bash) alias ls='ls $LS_OPTIONS' ;;
zsh) alias ls='\ls $=LS_OPTIONS' ;;
*) alias ls='/bin/ls $LS_OPTIONS' ;;
esac
alias dir='ls -l'
alias ll='ls -l'
alias la='ls -la'
alias l='ls -alF'
alias ls-l='ls -l'
# Set some generic aliases
alias o='less'
alias ..='cd ..'
alias ...='cd ../..'
alias cd..='cd ..'
if test "$is" != "ksh" ; then
alias -- +='pushd .'
alias -- -='popd'
fi
alias rd=rmdir
alias md='mkdir -p'
if test "$is" = "bash" -a ! -x /bin/which -a ! -x /usr/bin/which ; then
# Other shells use the which command in path (e.g. ash) or
# their own builtin for the which command (e.g. ksh and zsh).
_which () {
local file=$(type -p ${1+"$@"} 2>/dev/null)
if test -n "$file" -a -x "$file"; then
echo "$file"
return 0
fi
hash -r
type -P ${1+"$@"}
alias which=_which
fi
alias rehash='hash -r'
alias you='if test "$EUID" = 0 ; then /sbin/yast2 online_update ; else su - -c "/sbin/yast2 online_update" ; fi'
if test "$is" != "ksh" ; then
alias beep='echo -en "\007"'
else
alias beep='echo -en "\x07"'
fi
alias unmount='echo "Error: Try the command: umount" 1>&2; false'
test -s $HOME/.alias && . $HOME/.alias
fi
# Expert mode: if we find $HOME/.bash.expert we skip our settings
# used for interactive completion and read in the expert file.
if test "$is" = "bash" -a -r $HOME/.bash.expert ; then
. $HOME/.bash.expert
elif test "$is" = "bash" ; then
# Complete builtin of the bash 2.0 and higher
case "$BASH_VERSION" in
[2-9].*)
if test -e $HOME/.bash_completion ; then
. $HOME/.bash_completion
elif test -e /etc/bash_completion ; then
. /etc/bash_completion
elif test -s /etc/profile.d/complete.bash ; then
. /etc/profile.d/complete.bash
fi
for s in /etc/bash_completion.d/*.sh ; do
test -r $s && . $s
done
if test -f /etc/bash_command_not_found ; then
. /etc/bash_command_not_found
fi
esac
fi
# Do not save dupes and lines starting by space in the bash history file
HISTCONTROL=ignoreboth
if test "$is" = "ksh" ; then
# Use a ksh specific history file and enable
# emacs line editor
: ${HISTFILE=$HOME/.kshrc_history}
: ${VISUAL=emacs}
case $(set -o) in
*multiline*) set -o multiline
esac
fi
# command not found handler in zsh version
if test "$is" = "zsh" ; then
if test -f /etc/zsh_command_not_found ; then
. /etc/zsh_command_not_found
fi
fi
esac
# Just in case the user excutes a command with ssh
if test -n "$SSH_CONNECTION" -a -z "$PROFILEREAD" ; then
_SOURCED_FOR_SSH=true
. /etc/profile > /dev/null 2>&1
unset _SOURCED_FOR_SSH
fi
# And now let us see if there is e.g. a local bash.bashrc
# (for options defined by your sysadmin, not SuSE Linux)
case "$is" in
bash) test -s /etc/bash.bashrc.local && . /etc/bash.bashrc.local ;;
ksh) test -s /etc/ksh.kshrc.local && . /etc/ksh.kshrc.local ;;
zsh) test -s /etc/zsh.zshrc.local && . /etc/zsh.zshrc.local ;;
ash) test -s /etc/ash.ashrc.local && . /etc/ash.ashrc.local
esac
test -s /etc/sh.shrc.local && . /etc/sh.shrc.local
if test -n "$restricted" -a -z "$PROFILEREAD" ; then
PATH=/usr/lib/restricted/bin
export PATH
fi
# End of /etc/bash.bashrc -
Open module for managing property file and environment variables
Looking for an open module for managing property files and environment variables (like CLASSPATH) set in a shell script. For handeling properties (preserving comments, supporting includes, appending new entries, and more) I have looked at SuperProperties from openadaptor but find certain functionality lacking. As for interfacing with common shell scripts/files containing setting for CLASSPATH, JAVA_HOME, other system/application variables another type of object editor is needed. Maybe JFIG?
Any ideas are greatly welcomed.You seem wright, you hit a brick wall here with Air to find the location
of the command console on windows...
So in fact I never build an exe tool, but this little problem was a nice
case to test it and I tried it.:
I downloaded monodevelop
-GTK# for .NET 2.12.10*
-MonoDevelop 2.4.2*
from http://monodevelop.com/Download
created a console project and had an exe in 5 minutes !
You can download the findconsole tool and the projectfiles here:
http://greencollective.nl/temp/dump/findconsole_monoproject.zip
findconsole.exe will reveal the path/location of cmd.exe on a windows system.
Cheers,
Latcho
Maybe you are looking for
-
Hi, I've got an a64400 + discrete graphic, i have got some glitches with my setup and i didn't find a way to stop this. A video of the glitches: http://youtu.be/ykNpmVOvNv0 Things maybe related: i've got a 0 size iommu aperture (cfr dmesg), dunno how
-
Yesterday I received a new mac mini (actually, a refurbished one that was originally released in July, sold from Apple). It downloaded a bunch of stuff when I did the software update, including an EFI Firmware update for the mac mini. As far as I ca
-
USB not connecting properly 8800
I can no longer connect using USB to Blackberry Desktop Manager. Although the Device Connected (PIN) is showing correctly I can no longer synchronise or backup/restore etc. The 8800 is charging through the USB OK too. Tried different PCs and differen
-
ACS 4.2 authentication using multiple external databases
Hi there. We currently use ACS 4.2 for authentication of corporate users who are accessing the network in 2 different ways: 1) VPN client (via ASA5510) 2) Wireless (EAP-PEAP) For all users who currently access the network via either of the above 2 me
-
Wireless WPA2-Enterprise + 802.1x (EAP-PEAP/MSCHAPv2) config
Hello, We're in the process of moving all of our wireless from WPA-PSK to WPA2-Enterprise with 802.1x EAP-MSCHAPv2 (PEAP). All workstations are Windows 7 with the 2SP3 IR2 client. What we'd like is for the 802.1x SSO functionality to work so users do