LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-23-2007, 12:33 AM   #1
mpyusko
Member
 
Registered: Oct 2003
Location: Rochester, NY, USA
Distribution: Salckware ver 10.1 - 14.1, Debian too.
Posts: 432
Blog Entries: 1

Rep: Reputation: 41
Run a command on another terminal.


Here's the setup:

I ssh into another machine.
I login and a user (not root)
I run startx
When I logout, x closes

I want it to stay open.

For now, I was able to:

ssh into another machine.
Login as root
run kdm
but kdm requires a username and password
(I know I can do automatic logins, but that isn't and option for what I wat to do)

What I'd like to do is execute a command from pts/1 and have it run from tty1.
Ultimately I'd like to run a command from the console and have it wind up on :0 (ie, KDE is up and running and I want to open krfb from the remote console.) Now if I were on the machine locally, I could open konsole, execute krfb, and it would open in the GUI.

Is this even possible?

Last edited by mpyusko; 06-23-2007 at 12:35 AM.
 
Old 06-23-2007, 02:16 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You can run "ssh -X user@host"
Then enter "krfb". The program will come up on your local display even though it is running on the remote machine.

Alternately, you could start a GUI program on the remote machine anyway, so you don't need to share the desktop.
 
Old 06-23-2007, 02:21 AM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
You could start screen, and fire up X from there ...


Cheers,
Tink
 
Old 06-23-2007, 03:44 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
A lot depends on what security settings you have on your network. The traditional methods of having X sessions displayed remotely (i.e DISPLAY=yourhostip:0.0" ) may not work unless you relax the security settings.

Here is a quick & easy ssh based experiment you can try.
On the local machine instead of logging into GDM locally, switch to a virtual terminal. Let's say vt/1.
Now fire up a bare bones X screen on vt/8.
xinit -- '1:0'

Now you will have a blank X screen with xshell running.
In the xshell run:
ssh -X yourusername@remotehost gnome-session &

This will fire up the gnome desktop on the remote machine but have it displayed locally.
The sshd server will handle xauth cookies for you over the ssh tunnel. Of course you can't close xshell or the tunnel will collapse unless you detach xshell or use screen.

----

If it is just a program that you want to run on the remote host but have it display locally, you could run ssh from the application launcher.
ssh -X user@host /opt/kde/bin/konqueror
will launch konqueror. You won't have a konsole that you need to close.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
run command in new gnome-terminal checkchan Linux - General 10 08-29-2012 03:55 AM
Run command on a different terminal jantman Linux - General 3 06-07-2006 01:32 PM
Is there a terminal command that I can run that will........... ludwig W Linux - Networking 20 11-28-2005 03:59 PM
Run user command on Terminal startup coolfrog Linux - General 4 09-26-2004 09:08 AM
start terminal & run command automatically peeples Linux - General 2 09-08-2003 02:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration