X and starting programs from command line
Greetings, Many years ago I did a project for a client. The had an application that ran in X, I can remeber how I fired it it up. I do remeber it was a one or two line in a script. What I do rember was something like this: X & xterm --display 0: any tips on what I ca do? TIA -- -- Chadley Wilson Production Line Superintendant Pinnacle Micro Manufacturers of Proline Computers ==================================== Exercise freedom, Use LINUX =====================================
On Mon, 12 Sep 2005 04:20 pm, Chadley Wilson wrote:
For starting an application that ran in X, I can remember it was a one or two line in a script.
X & xterm --display 0:
For remote X connections, messing with xhost and display is not secure and SSH does it better/faster/more-securely anyway. Start from an X enabled box, any Linux for preference, or Windows and cygwin if work environment dictates you must. Don't telnet, use SSH! When you want to use X get SSH to tunnel it for you. Either explicitly each time: ssh -X host.domain Or if you do it a lot go to /etc/ssh/ssh_config and enable ssh forwarding for the list of hosts you trust (control) Host *.mydomain trusted.somewhere.else ForwardX11 yes Host * ForwardX11 no The security implication (as I understand it) is that a compromised remote server could log your keystrokes through the X connection, hence the need for trust. Once you have a terminal session at the remote box you should be able to see the $DISPLAY variable: echo $DISPLAY It should be: localhost:10:0 The 10 might be 11 or 12 if you have logged on multiple times. It denotes the SSH remote dummy X server, ie the outboard end of the pipe connected to your local X screen/keyboard/mouse. Try it: xclock (should display a clock on your local desktop) Try doing some remote systems admin: sux <root password> yast2 & (should give you a YaST Control Centre) Work well? good, now go back to your command line console and edit /etc/ssh/sshd_config to ban root logins. To activate this change: /etc/init.d/sshd reload The sshd will re-read /etc/ssh/sshd_config without loosing you your session. Note that using "su" instead of "sux" will loose you your X connection. Using "sudo" should keep your X connection. -- Michael James michael.james@csiro.au System Administrator voice: 02 6246 5040 CSIRO Bioinformatics Facility fax: 02 6246 5166 No matter how much you pay for software, you always get less than you hoped. Unless you pay nothing, then you get more.
Chadley Wilson wrote:
Greetings,
Many years ago I did a project for a client. The had an application that ran in X, I can remeber how I fired it it up. I do remeber it was a one or two line in a script.
What I do rember was something like this:
X & xterm --display 0:
any tips on what I ca do?
Normally, you can just give the command and the app runs. However, your comments lead me to suspect you're trying to do that remotely, via telnet commands. If so, use ssh and you don't have to worry about the display stuff. Ssh supports X forwarding.
participants (3)
-
Chadley Wilson
-
James Knott
-
Michael James