LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Can i run program in Xwindows enviroment frm giving command to tty ? (https://www.linuxquestions.org/questions/linux-general-1/can-i-run-program-in-xwindows-enviroment-frm-giving-command-to-tty-425643/)

amitsharma_26 03-17-2006 01:04 AM

Can i run program in Xwindows enviroment frm giving command to tty ?
 
Can i run program in XSERVER/Xwindows enviroment from any tty ?

Assuming we have Xwindows environment up & running. So is it possible to run any program to run only in XWINDOWS environment instead of running it on that terminal or as a background process ?

Command on tty1 pops up a terminal window in xwindows & run that command or program ?

jschiwal 03-17-2006 02:09 AM

You could have a command run as an argument to xterm.

From the manpage:
Quote:

-e program [ arguments ... ]
This option specifies the program (and its command line
arguments) to be run in the xterm window. It also sets the
window title and icon name to be the basename of the pro‐
gram being executed if neither -T nor -n are given on the
command line. This must be the last option on the command
line.

amitsharma_26 03-17-2006 06:04 AM

That doesnt work.. I m on CLI.. CTRL+ALT+F1 (tty) & want my command "kcalc" should run Kde calculator on my XWINDOWS interface (CTRL+ALT+F7).

Even if i crontab .. suppose i want to open an instance of kcalc every minute.. it doesnt work.. it sends me a message to my mail stating that
"kcalc: cannot connect to X server"
(Its just for an example purpose, i do not really intent to do that)

I hope you would have got my point.

Can anyone of a bit help to me in this ?
Does GUI scheduler like "XJOB" n others are the only utilies i am left with ?

cs-cam 03-17-2006 07:16 AM

Code:

DISPLAY=:0 xterm
Run that from a tty. It'll set the DISPLAY environment variable to the running X server and then execute the app. The app will look for the display to run on, find the value of $DISPLAY and away we go. Happy endings all round :)

amitsharma_26 03-17-2006 08:41 AM

Quote:

Originally Posted by cs-cam
Code:

DISPLAY=:0 xterm
Run that from a tty. It'll set the DISPLAY environment variable to the running X server and then execute the app. The app will look for the display to run on, find the value of $DISPLAY and away we go. Happy endings all round :)

Thanks a lot.
Its working nw.


All times are GMT -5. The time now is 08:47 PM.