Find the answer to your Linux question:
Results 1 to 2 of 2
Hi guys! I developed a small C++ application with Qt for GUI. It is in /Pjt and I can run from command line using ./Pjt. But whenever I go to ...
  1. #1
    Just Joined! kapmsd's Avatar
    Join Date
    Sep 2009
    Posts
    17

    Can't run my program from tty?

    Hi guys!
    I developed a small C++ application with Qt for GUI.
    It is in /Pjt and I can run from command line using ./Pjt.
    But whenever I go to Ctrl+Alt+F1, it fails to execute saying that
    "Could not execute ./Pjt from tty's.(err:CANNOT CONNECT TO X SERVER)"

    How to solve this?

    Thanks in advance for your inputs.

  2. #2
    Linux User ptkobe's Avatar
    Join Date
    Feb 2008
    Location
    Torres Vedras, PT
    Posts
    274
    Quote Originally Posted by kapmsd View Post
    Hi guys!
    I developed a small C++ application with Qt for GUI.
    It is in /Pjt and I can run from command line using ./Pjt.
    But whenever I go to Ctrl+Alt+F1, it fails to execute saying that
    "Could not execute ./Pjt from tty's.(err:CANNOT CONNECT TO X SERVER)"

    How to solve this?
    Ctrl+Alt+F1, is what I call a virtual terminal (/dev/tty1). It doesn't allow the "graphical environment" your application needs. You can't run graphical applications on a virtual terminal, AFAIK.

    You may want to use the graphical terminal (or what I call pseudo console ) to run your app.

    Sorry if I miss the point
    Regards
    Luis

    PS: Don't really know if the names are correct, but I like to call them something.

Posting Permissions

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