summaryrefslogtreecommitdiffstats
path: root/profile.d
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@mandriva.org>2007-09-11 12:39:51 +0000
committerGuillaume Rousse <guillomovitch@mandriva.org>2007-09-11 12:39:51 +0000
commit25e03a3bb2c7bfbc1f3c177ee71c7f75683ebd9d (patch)
tree9afa5ad3fecc7aca66222da768ba0245ae479d65 /profile.d
downloadsetup-25e03a3bb2c7bfbc1f3c177ee71c7f75683ebd9d.tar
setup-25e03a3bb2c7bfbc1f3c177ee71c7f75683ebd9d.tar.gz
setup-25e03a3bb2c7bfbc1f3c177ee71c7f75683ebd9d.tar.bz2
setup-25e03a3bb2c7bfbc1f3c177ee71c7f75683ebd9d.tar.xz
setup-25e03a3bb2c7bfbc1f3c177ee71c7f75683ebd9d.zip
move everything under trunk directory
Diffstat (limited to 'profile.d')
-rwxr-xr-xprofile.d/xhost.csh11
-rwxr-xr-xprofile.d/xhost.sh9
2 files changed, 20 insertions, 0 deletions
diff --git a/profile.d/xhost.csh b/profile.d/xhost.csh
new file mode 100755
index 0000000..948e617
--- /dev/null
+++ b/profile.d/xhost.csh
@@ -0,0 +1,11 @@
+# Export Xauthority for users not for root.
+
+if ($?DISPLAY) then
+ if (! $?SSH_TTY) then
+ if ( `id -u` >= 14 ) then
+ if (! $?XAUTHORITY) then
+ setenv XAUTHORITY $HOME/.Xauthority
+ endif
+ endif
+ endif
+endif
diff --git a/profile.d/xhost.sh b/profile.d/xhost.sh
new file mode 100755
index 0000000..04bb7ee
--- /dev/null
+++ b/profile.d/xhost.sh
@@ -0,0 +1,9 @@
+# Export Xauthority for users not for root.
+
+if [ ! -z "$DISPLAY" -a -z "$SSH_TTY" ];then
+ if [ "`id -u`" -gt 14 ];then
+ if [ -z $XAUTHORITY ];then
+ export XAUTHORITY=$HOME/.Xauthority
+ fi
+ fi
+fi