Results 1 to 9 of 9

Thread: Display notify windows from command line

  1. #1
    Join Date
    Dec 2007
    Location
    Sweden
    Beans
    4
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Display notify windows from command line

    I'm not sure what it's called, but the notify-window that displays information like "It's now safe to remove the removable device ...", "Low diskspace on ..." and so on. (notification-daemon?).

    Is there any way to display a message from the command line? like:

    Code:
    > foobar hello world
    ... to display "hello world" in the notification window.

    I like to write small scripts to monitor things, and a easy way to display messages would be nice.

    I have used xosd_cat (XOSD) before for the same ting, but it's so ugly.

  2. #2
    Join Date
    Jul 2007
    Location
    India
    Beans
    147
    Distro
    Ubuntu

    Re: Display notify windows from command line

    try zenity
    see man zenity

  3. #3
    Join Date
    Dec 2007
    Location
    Sweden
    Beans
    4
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Display notify windows from command line

    Quote Originally Posted by mridkash View Post
    try zenity
    see man zenity
    Code:
    zenity  --notification  --text "foobar"
    could work in some of my scripts, but still I need a window to write text in, zenity --info is not a option, I need something discrete in the corner of the screen.

  4. #4
    Join Date
    Dec 2007
    Location
    Sweden
    Beans
    4
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Talking Re: Display notify windows from command line

    Found it!

    Command:
    Code:
    notify-send
    In package:
    Code:
    sudo apt-get install libnotify-bin

  5. #5
    Join Date
    Feb 2007
    Beans
    143
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Display notify windows from command line

    nice found

  6. #6
    Join Date
    Sep 2008
    Location
    India
    Beans
    77
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Display notify windows from command line

    for kde u can use knotify... just see its man page.

  7. #7
    Join Date
    Jun 2009
    Location
    Guangzhou - China
    Beans
    2
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Display notify windows from command line

    Hi, I have a problem with notify-send.
    I command that notify-send "Click me to close me." -t 0, but my computer display a window instead of notify tips.

    i.e. in my computer the notify-send could not specify the time, or it will display the window instead.

    Attached Images Attached Images

  8. #8
    Join Date
    Feb 2007
    Location
    perdita
    Beans
    1,625
    Distro
    Ubuntu

    Re: Display notify windows from command line

    Strange.

    I'm currently under OpenSUSE 10.3 with KDE 3.

    I copy/pasted your command in my terminal and it displayed a nice notification bubble in the bottom-right corner of my screen.
    I had to click it to close it.

  9. #9
    Join Date
    Nov 2005
    Location
    Omaha, NE, USA
    Beans
    192

    Re: Display notify windows from command line

    Quote Originally Posted by tonychen123 View Post
    Hi, I have a problem with notify-send.
    I command that notify-send "Click me to close me." -t 0, but my computer display a window instead of notify tips.

    i.e. in my computer the notify-send could not specify the time, or it will display the window instead.

    You cannot do this with ubuntu's new notification system. Notification bubbles are only to be displayed for a very short time. If you try to make it clickable or add buttons it will appear as a window because the notification bubbles are not meant for the behavior you want.

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
  •