PDA

View Full Version : [ubuntu] Can't run my program from tty?



kapmsd
May 14th, 2010, 06:06 AM
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.

cariboo907
May 14th, 2010, 09:21 PM
Put the program in /user/local/bin, make sure it is owned by root and executable, then press Alt-F2 and type the program name.

mhgsys
May 14th, 2010, 09:23 PM
Well ; you could run it from tty;

(Maybe comes in handy when running it from ssh as well)

be sure to

export DISPLAY=:0

edit: and run the command you want to run afterwards ;....