Results 1 to 7 of 7

Thread: ssh into linux box and run application on other login...

  1. #1
    cat /dev/null streetster's Avatar
    Join Date
    Jul 2003
    Location
    London
    Posts
    4,138
    Thanks
    119
    Thanked
    100 times in 82 posts
    • streetster's system
      • Motherboard:
      • Asus P7P55D-E
      • CPU:
      • Intel i5 750 2.67 @ 4.0Ghz
      • Memory:
      • 4GB Corsair XMS DDR3
      • Storage:
      • 2x1TB Drives [RAID0]
      • Graphics card(s):
      • 2xSapphire HD 4870 512MB CrossFireX
      • PSU:
      • Corsair HX520W
      • Case:
      • Coolermaster Black Widow
      • Operating System:
      • Windows 7 x64
      • Monitor(s):
      • DELL U2311
      • Internet:
      • Virgin 50Mb

    ssh into linux box and run application on other login...

    Hi guys,

    I dont think this is possible but wanted to check - google isn't throwing up anything useful.

    I've got Ubuntu running on my HTPC, I can ssh in from my laptop to do various odds and sods... but I was wondering - is there anything I can type such that I can start a program running in the X session that is already logged in locally?

    OR, is there any way to login to a particular session that's already running?

    The reason for this is pure laziness - if I want to (re)start XBMC I have to get up and use the keyboard/mouse that's plugged into the HTPC... and if i'm ssh'd into the HTPC anyway it'd be nice if I could just do 'xbmc > /dev/tty7' and it load up xbmc.

    And yes. I am just as lazy as that makes me sound

  2. #2
    <<== UT3 Player spoon_'s Avatar
    Join Date
    Nov 2008
    Location
    London
    Posts
    2,071
    Thanks
    113
    Thanked
    139 times in 131 posts

    Re: ssh into linux box and run application on other login...

    Surely you just need to SSH to your Linux box as the same user under which the xmbc is running?

  3. #3
    Gentoo Ricer
    Join Date
    Jan 2005
    Location
    Galway
    Posts
    11,048
    Thanks
    1,016
    Thanked
    944 times in 704 posts
    • aidanjt's system
      • Motherboard:
      • Asus Strix Z370-G
      • CPU:
      • Intel i7-8700K
      • Memory:
      • 2x8GB Corsiar LPX 3000C15
      • Storage:
      • 500GB Samsung 960 EVO
      • Graphics card(s):
      • EVGA GTX 970 SC ACX 2.0
      • PSU:
      • EVGA G3 750W
      • Case:
      • Fractal Design Define C Mini
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • Asus MG279Q
      • Internet:
      • 240mbps Virgin Cable

    Re: ssh into linux box and run application on other login...

    Does XBMC not reinitialise when it receives the hangup signal (killall -HUP xbmc)?
    Quote Originally Posted by Agent View Post
    ...every time Creative bring out a new card range their advertising makes it sound like they have discovered a way to insert a thousand Chuck Norris super dwarfs in your ears...

  4. #4
    cat /dev/null streetster's Avatar
    Join Date
    Jul 2003
    Location
    London
    Posts
    4,138
    Thanks
    119
    Thanked
    100 times in 82 posts
    • streetster's system
      • Motherboard:
      • Asus P7P55D-E
      • CPU:
      • Intel i5 750 2.67 @ 4.0Ghz
      • Memory:
      • 4GB Corsair XMS DDR3
      • Storage:
      • 2x1TB Drives [RAID0]
      • Graphics card(s):
      • 2xSapphire HD 4870 512MB CrossFireX
      • PSU:
      • Corsair HX520W
      • Case:
      • Coolermaster Black Widow
      • Operating System:
      • Windows 7 x64
      • Monitor(s):
      • DELL U2311
      • Internet:
      • Virgin 50Mb

    Re: ssh into linux box and run application on other login...

    Quote Originally Posted by spoon_ View Post
    Surely you just need to SSH to your Linux box as the same user under which the xmbc is running?
    that just tries to start xbmc in my putty session.


    Does XBMC not reinitialise when it receives the hangup signal (killall -HUP xbmc)?
    If XBMC isnt running then this won't work. Also if I wanted to do:

    exit xbmc
    sudo make install
    start xbmc

    that wont give me enough time to do the middle step.

    Cheers for the suggestions though guys!

  5. #5
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS

    Re: ssh into linux box and run application on other login...

    Short version is "yes"

    Long answer is "yes, but it's complicated"

    X apps can output to any X server they have permission to connect to - that's how you can run apps on a remote server but view them locally. The variable which controls this is called DISPLAY, and the first x server on a local machine is :0. So "DISPLAY=:0 xlogo" does the same as "xlogo", in a local desktop Linux session. You can also tinker with this a little, e.g. 0.0 and 0.1 for multiple monitors of a multi-monitor rig.

    So to run an X app on someone else's X session, you need only set DISPLAY... except for security reasons, this will fail. The remote X server needs to be configured to allow random apps to display on it, due to the severe security repercussions. The "xhost" command will help with this.

  6. #6
    mush-mushroom b0redom's Avatar
    Join Date
    Oct 2005
    Location
    Middlesex
    Posts
    3,438
    Thanks
    174
    Thanked
    362 times in 279 posts
    • b0redom's system
      • Motherboard:
      • Some iMac thingy
      • CPU:
      • 3.4Ghz Quad Core i7
      • Memory:
      • 24GB
      • Storage:
      • 3TB Fusion Drive
      • Graphics card(s):
      • nViidia GTX 680MX
      • PSU:
      • Some iMac thingy
      • Case:
      • Late 2012 pointlessly thin iMac enclosure
      • Operating System:
      • OSX 10.8 / Win 7 Pro
      • Monitor(s):
      • Dell 2713H
      • Internet:
      • Be+

    Re: ssh into linux box and run application on other login...

    You're overcomplicating things. Why not just install a VNC server.

  7. #7
    member your a womble pumpman's Avatar
    Join Date
    Sep 2004
    Posts
    684
    Thanks
    25
    Thanked
    37 times in 13 posts

    Re: ssh into linux box and run application on other login...

    im a noob but im using gnome rdp to remote connect to machines and gwakeonlan to switch the pcs on if they are switched off, all from the comfort of my couch

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 9
    Last Post: 14-01-2008, 01:43 AM
  2. Replies: 9
    Last Post: 09-01-2007, 09:58 PM
  3. Whither Linux?
    By Nick in forum Question Time
    Replies: 49
    Last Post: 11-11-2005, 06:06 PM
  4. run box problems
    By rough_neck in forum Software
    Replies: 3
    Last Post: 04-11-2004, 04:22 PM
  5. Running a linux router box?
    By Steve in forum Software
    Replies: 5
    Last Post: 22-11-2003, 11:14 PM

Posting Permissions

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