Topic
  • 9 replies
  • Latest Post - ‏2015-01-28T06:19:18Z by waruna_chandimal
SystemAdmin
SystemAdmin
5837 Posts

Pinned topic UBUNTU 6.06 - Installing DB2 Express C - The DISPLAY variable is not set properly

‏2006-12-29T13:39:39Z |
I am trying to run db2setup and got this message:

"The DISPLAY variable is not set propterly. Ensure that the DISPLAY variabler is set
"properly and that permissions are set properly to open windows on the display specified,
"then rerun the command.

The DISPLAY variable is:

localhost:0.0

Any help appreciated

Jorge
Updated on 2012-11-29T15:25:18Z at 2012-11-29T15:25:18Z by SystemAdmin
  • ocgstyles
    ocgstyles
    472 Posts

    Re: UBUNTU 6.06 - Installing DB2 Express C - The DISPLAY variable is not set properly

    ‏2006-12-29T14:07:13Z  
    Hi Jorge,

    I have it installed on SuSE 10.1. My DISPLAY variable is set to code:0.0[/code]. Same as your, except without the hostname. Give that a try.

    • Keith
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: UBUNTU 6.06 - Installing DB2 Express C - The DISPLAY variable is not set properly

    ‏2006-12-29T14:15:28Z  
    • ocgstyles
    • ‏2006-12-29T14:07:13Z
    Hi Jorge,

    I have it installed on SuSE 10.1. My DISPLAY variable is set to code:0.0[/code]. Same as your, except without the hostname. Give that a try.

    • Keith
    Hi Keith

    Thanks for the hint, but that is how it was originally and doesn't work either.

    I tried:

    :0.0
    :0.
    localhost:0.0
    localhost:0.
    127.0.0.1:0.0
    127.0.0.1:0.

    No luck in any case...
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: UBUNTU 6.06 - Installing DB2 Express C - The DISPLAY variable is not set properly

    ‏2006-12-29T15:51:22Z  
    Hi Keith

    Thanks for the hint, but that is how it was originally and doesn't work either.

    I tried:

    :0.0
    :0.
    localhost:0.0
    localhost:0.
    127.0.0.1:0.0
    127.0.0.1:0.

    No luck in any case...

    Hi,

    If you are using remote client, make sure the remote client is able to connect to server display using the xhost command.

    Another possibility is not to use su if you are running it as db2inst1. Try login in as db2inst1 itself.

    Let me know if it works.
  • dmcbride
    dmcbride
    33 Posts

    Re: UBUNTU 6.06 - Installing DB2 Express C - The DISPLAY variable is not set properly

    ‏2006-12-29T16:00:04Z  
    First test is always to run some other X program to see if you have your X configuration working. For example, try "xterm". If that doesn't work, then you'll need to get that working before db2setup will work.

    Most likely, you became root using "su -" - which generally does not preserve xauth authentication. You can either learn how xauth works (see the xauth man page), or you can bypass it altogether with the less secure "xhost +localhost" command (as yourself - not root). This means that anyone logged into the local box, even from remote, will be able to launch X programs and the X server will allow it. Which, if you're behind a firewall and no one else can access your box, is the same security anyway. However, if a malicious person got into your box, they'd be able to launch a keylogger to read your passwords and the like. That's why xauth is generally preferred now - but the old host-based method is still available when it makes sense.
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: UBUNTU 6.06 - Installing DB2 Express C - The DISPLAY variable is not set properly

    ‏2006-12-29T16:03:57Z  
    Thanks to all.

    I solved the problem (but I still do not know what the problem is :) )

    If you do

    sudo -i

    and then try to run db2setup from there you got the error.

    if you do

    sudo ./db2setup

    then it works without problem

    Stay tuned for new errors :)

    Jorge
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: UBUNTU 6.06 - Installing DB2 Express C - The DISPLAY variable is not set properly

    ‏2010-07-28T05:56:31Z  
    I faced the same issue in UBUNTU 8.04 LTS while installing DB2 Express C 9.7, it was throwing error "The DISPLAY variable is not set propterly. Ensure that the DISPLAY variabler is set properly and that permissions are set properly to open windows on the display specified, then rerun the command.". However, the install went thru fine after I changed the SHELL to ksh (the default was bash) and reran the db2setup again.
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: UBUNTU 6.06 - Installing DB2 Express C - The DISPLAY variable is not set properly

    ‏2012-11-29T15:15:16Z  
    OS: Centos 6
    DB2 version: 9.5 32-bit for Linux, UNIX and Windows
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: UBUNTU 6.06 - Installing DB2 Express C - The DISPLAY variable is not set properly

    ‏2012-11-29T15:25:18Z  
    OS: Centos 6
    DB2 version: 9.5 32-bit for Linux, UNIX and Windows
    add next string into /etc/profile or ~/.profile

    
    DISPLAY=
    "`who -m | cut -f2 -d'(' | cut -f1 -d')'`:0.0"
    

    SOURCE: http://www.unix.com/ubuntu/84763-configure-display-variable-db2.html
  • waruna_chandimal
    waruna_chandimal
    1 Post

    Re: UBUNTU 6.06 - Installing DB2 Express C - The DISPLAY variable is not set properly

    ‏2015-01-28T06:19:18Z  

    I faced the same issue in Cent Os 6.5 while running db2setup. I could solve this problem by installing "X Window System"

    yum groupinstall "X Window System"