LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-14-2004, 01:56 PM   #1
jpan
Member
 
Registered: Aug 2004
Distribution: Debian Libranet
Posts: 69

Rep: Reputation: 15
setting environment variable DISPLAY


root@main:~# echo $DISPLAY

root@main:~# xhost +
xhost: unable to open display ""
root@main:~#

it seems that the DISPLAY environment variable on my host PC is empty....but how come that i can still run/display X-window applications
on it??
 
Old 10-14-2004, 04:31 PM   #2
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
export DISPLAY=<machine>:0.0
machine: localhost or where your display lives...

as it seems to be unset on your sys check /etc/security/pam_env.conf and set a default there or in any other environment file like profile, bashrc,...

sl mritch.
 
Old 10-15-2004, 01:21 PM   #3
jpan
Member
 
Registered: Aug 2004
Distribution: Debian Libranet
Posts: 69

Original Poster
Rep: Reputation: 15
what if i don't want to do "xhost +" each time....i want to make it a default initially. then
which file should i modify??



Jimmy
 
Old 10-15-2004, 02:37 PM   #4
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
rather use xauth (see "man xauth") and work aver a ssh if you use it over the net. it's far more secure.
to make it permanent anyway (better use "xhost + <machine-name>") locate your X startup script (usually .xsession in your home directory) and add a line:

xhost + <machine-name> &

if you are in some windowmanager like kde or gnome just make a small script and start it with you wm:

in an xterm do:
$ mkdir scripts; cd scripts
$ echo "#!/bin/sh" > xhost_access.sh
$ echo "xhost + <allowed_machine>" >> xhost_access.sh
$ chmod a+x xhost_access.sh

if yuo're in gnome start the gnome-control-center:
$ gnome-control-center

doubleclick comlex/advanced > sessions (or so..) > tab startprograms (..or so)
now ad the script from your /home/you/scripts/xhost_access.sh here and finito.
http://www.linuxquestions.org/questi...4&goto=newpost

in kde there sure is a quite similar way.

sl mritch.
 
Old 10-15-2004, 06:09 PM   #5
macondo
Senior Member
 
Registered: Jul 2003
Location: Central America
Distribution: Slackwre64-current Devuan
Posts: 1,034

Rep: Reputation: 62
as root:
export XAUTHORITY=/home/your_user_name/.Xauthority
reboot
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem withChanging DISPLAY environment variable to display on someone else's screen wantsri Linux - Networking 1 10-25-2005 11:14 AM
Modifying DISPLAY environment variable on-the-fly ktulu1115 Linux - Software 1 10-07-2005 02:18 PM
setting environment variable kb_ganesh Ubuntu 3 09-10-2005 01:58 PM
Tcl Error no display name and no DISPLAY environment variable thinkgeek Programming 5 07-06-2005 10:24 PM
DISPLAY environment variable danahata Slackware 2 02-26-2004 03:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration