Find the answer to your Linux question:
Results 1 to 3 of 3
I get this error message when I want to run some of my software in linux. Application initialization failed: this isn't a Tk applicationcouldn't connect to display "localhost.localdomain:59535 I can ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2011
    Posts
    2

    Application initialization failed: this isn't a Tk applicationcouldn't


    I get this error message when I want to run some of my software in linux.

    Application initialization failed: this isn't a Tk applicationcouldn't connect to display "localhost.localdomain:59535

    I can run xclock and wish with no problems, but somehow it doesn't allow my software to run tk.



    I was thinking somehow it might be related to my xserver. When I do startx OR Xorf -configure, I get

    xauth: file $HOMEi/.serverauth.5225 does not exist

    Fatal server error:
    Server is already active for display 0
    If this server is no longer running, remove /tmp/.X0-lock
    and start again.

    Originally, I had things working on Centos before my boot partition was destroyed and I had to re-install. Didn't think their would be issues between Centos and Fedora. Can anyone help me with this issue. Thanks.

  2. #2
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    649
    Quote Originally Posted by CannotConfig View Post
    I get this error message when I want to run some of my software in linux.

    Application initialization failed: this isn't a Tk applicationcouldn't connect to display "localhost.localdomain:59535

    I can run xclock and wish with no problems, but somehow it doesn't allow my software to run tk.



    I was thinking somehow it might be related to my xserver. When I do startx OR Xorf -configure, I get

    xauth: file $HOMEi/.serverauth.5225 does not exist

    Fatal server error:
    Server is already active for display 0
    If this server is no longer running, remove /tmp/.X0-lock
    and start again.

    Originally, I had things working on Centos before my boot partition was destroyed and I had to re-install. Didn't think their would be issues between Centos and Fedora. Can anyone help me with this issue. Thanks.
    The "tk" interpreter is wish. If you are attempting to run it as a script, this might be whar is still needed. I did TCL/TK stuff back in the 90s.

    Code:
    #!/bin/sh
    # the "sh" will not see this comment line that continues as a comment but "wish" will... \
    exec wish "$0" "$@"
    #this is code that is written in TK at this point and below... such as:
    button .b -text "Push Me" -command {tk_messageBox -message  "hello, world"}
    pack .b
    Note: The only character after the "\" is the enter key (i.e. newline).

    So the critical lines are:
    Code:
    #!/bin/bash
    # \
    exec wish "$0" "$@"
    at the start of the executable script file. I would add the comment text to the line so in 6 months from now and you look at the code you will remember that the TCL/TK comments can be continued unlike sh/bash/zsh/korn.

  3. #3
    Just Joined!
    Join Date
    Dec 2011
    Posts
    2
    this is not a wish problem. actually, I find that I can run wish without problem as well as some other tk applications. I was thinking it was related to my xserver. I'm not sure where this localdomain.localhost:5225 is coming from and how to fix it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •