Results 1 to 4 of 4

Thread: "Pop-up" message via SSH

  1. #1
    Join Date
    Feb 2008
    Beans
    13

    Thumbs down "Pop-up" message via SSH

    Hi,

    On our home network all the PCs are running Ubuntu, including my dad's.
    Is there any way when he is on his computer that I can log-in via SSH console and display on his desktop an unmissable, mean-spirited message in order to upset him (just a bit)?

    Thank you!

  2. #2
    Join Date
    Oct 2005
    Location
    Al Ain
    Beans
    8,620

    Re: "Pop-up" message via SSH

    It is a bit late for a halloween message.

    https://encrypted.google.com/search?q=x+message&ie=utf-8&oe=utf-8&aq=t&rls={moz:distributionID}:{moz:locale}:{mo zfficial}&client=firefox

  3. #3
    Join Date
    May 2010
    Location
    uk
    Beans
    9,349
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: "Pop-up" message via SSH

    Hi

    Also, i think gdialog or one of its variants would work. (Please correct me if i am wrong, i've never tried it).

    Be nice though.

    Kind regards

  4. #4
    Join Date
    Aug 2010
    Beans
    206

    Re: "Pop-up" message via SSH

    Here's a script I wrote to do just that! You'll need root access though:

    Code:
    #!/bin/bash
    ## gwall, short for "graphical wall," will write a wall message (given
    ## as standard input) to each remote ssh user's terminal as usual, but
    ## will also cause a GUI popup to appear on the monitor of the physical 
    ## ssh server, if there is one.
    ## Written by Steven H. Keys
    ## Last Updated: 2010-08-31
    
    ## Take standard input
    read message
    ## Write to all command-line terminals
    echo $message | sudo wall
    ## Export the DISPLAY variable to enable server monitor access
    export DISPLAY=:0.0
    ## Write the message to the popup window.
    sudo zenity --info --text="$message"
    Enjoy!

    EDIT: I should mention for newer users, you have to give this thing some input, so the syntax I recommend and use is: echo "Put your popup message here." | gwall (after having put gwall in one of your bins and making it executable.)
    Last edited by steevven1; November 2nd, 2010 at 08:40 PM.

Bookmarks

Posting Permissions

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