Results 1 to 4 of 4

Thread: Can notify-send use DISPLAY=:0.1 ?

  1. #1
    Join Date
    Jan 2010
    Beans
    3

    Can notify-send use DISPLAY=:0.1 ?

    I use Ubuntu 9.10 for one of my MythTV frontends, which have a plasma screen connected using VGA as display :0.0 and a projector connected using HDMI as display :0.1.

    How do I send notifications using notify-send to the projector? The following doesn't work, i.e. it still displays on the plasma screen:
    Code:
    DISPLAY=:0.1 ; notify-send "This will still display on :0.0"

  2. #2
    Join Date
    Oct 2008
    Beans
    3,509

    Re: Can notify-send use DISPLAY=:0.1 ?

    Try
    Code:
    export DISPLAY=":0.1"; notify-send "This will still display on :0.1"

  3. #3
    Join Date
    Oct 2007
    Location
    Chennai, India
    Beans
    3,786
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Can notify-send use DISPLAY=:0.1 ?

    Quote Originally Posted by Sander.H View Post
    Code:
    DISPLAY=:0.1 ; notify-send "This will still display on :0.0"
    If you put a semicolon, the environment variable will have no effect on the following command; Either do it the "export" way, or remove the semicolon, eg:
    Code:
    DISPLAY=:0.1 notify-send "This will still display on :0.0"
    Cheers,PRShah
    Make your own: Ubuntu, Kubuntu, Xubuntu, Mythbuntu All-in-One Live DVD
    "I never make mistakes; I thought I did, once.. but I was wrong."

  4. #4
    Join Date
    Jan 2010
    Beans
    3

    Re: Can notify-send use DISPLAY=:0.1 ?

    Thanks for both your reply,

    which unfortunately does not work.

    Prshah, I know how you normally have to export your variables, but apparently (some or all?) programs supporting the DISPLAY variable are able to read the parent environment, as you can verify with

    Code:
    DISPLAY=:0.0 ; gedit
    which opens gedit on display :0.0.

    Code:
    DISPLAY=:0.9 ; gedit
    which displays the error message:
    Code:
    Gtk-WARNING **: cannot open display: :0.9
    I have given up using notify-send and instead I'm now using gxmessage which support multiple displays.

Tags for this Thread

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
  •