terminal bell - Unix

This is a discussion on terminal bell - Unix ; why i can't hear terminal bell when take Ctrl + g root # runlevel 53 root # C+g #anything wasn't heared. root # cat terminal_bell.c #include #include #include #include #include #include #include #include #define ERROR -1 void main() { int ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: terminal bell

  1. terminal bell

    why i can't hear terminal bell when take Ctrl + g

    root # runlevel
    53
    root # C+g
    #anything wasn't heared.

    root # cat terminal_bell.c
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include

    #define ERROR -1

    void main()
    {
    int i;
    int fd;
    int beep = (125 << 16) + 1591; /* This is the default beep. */


    /* To be used as the fd in ioctl(). */
    if ((fd = open("/dev/console", O_NOCTTY)) == ERROR) {
    perror("open");
    exit(ERROR);
    }

    printf("w00w00!\n\n");

    for (i = 0; i <= 25; i++) {
    if ((ioctl(fd, KDMKTONE, beep)) == ERROR) {
    perror("ioctl");
    close(fd);
    exit(ERROR);
    }

    beep += 50;
    usleep(150000);
    }

    /* Turn off the tone now. */
    if ((ioctl(fd, KDMKTONE, 0)) == ERROR) {
    perror("ioctl");
    close(fd);
    exit(ERROR);
    }

    close(fd);
    }

    root # ./terminal_bell
    w00w00!

    #nothing is headed.
    root #


    how can i do to bell in terminal???

  2. Re: terminal bell

    On Wed, 22 Oct 2008 21:45:16 -0700, Xend wrote:

    > why i can't hear terminal bell when take Ctrl + g


    Perhaps it isn't wired up?

    Personally I have a very low value (<50 ohm) pot in series with mine and
    a knob on the outside of the case so that I can turn it down (or almost
    off) when it gets annoying. I put it there when I had to bring by
    desktop machine into the lab.

    Alternative answer: are you using a real terminal or an xterm? Many
    xterms have settings to intercept BELs and perhaps display them in some
    way, such as the status bar.

    Alternative answer: I don't know what all your ioctl stuff is, but I can
    get a beep by running:

    echo -e '\07'

  3. Re: terminal bell

    In <29526dfe-53d3-4f69-a426-00ed180c377d@v22g2000pro.googlegroups.com> Xend writes:

    > why i can't hear terminal bell when take Ctrl + g


    Are your speakers on?
    Is your sound turned down?
    Do you have your shell set to disable the bell, or flash the screen instead
    of beeping?
    Is your kernel compiled to remove the bell entirely?

    --
    John Gordon A is for Amy, who fell down the stairs
    gordon@panix.com B is for Basil, assaulted by bears
    -- Edward Gorey, "The Gashlycrumb Tinies"


  4. Re: terminal bell

    On Oct 23, 10:51*pm, John Gordon wrote:
    > In <29526dfe-53d3-4f69-a426-00ed180c3...@v22g2000pro.googlegroups.com> Xend writes:
    >
    > > why i can't hear terminal bell when take Ctrl + g

    >
    > Are your speakers on?
    > Is your sound turned down?
    > Do you have your shell set to disable the bell, or flash the screen instead
    > * of beeping?
    > Is your kernel compiled to remove the bell entirely?
    >
    > --
    > John Gordon * * * * * * * * * A is for Amy, who fell down the stairs
    > gor...@panix.com * * * * * * *B is for Basil, assaulted by bears
    > * * * * * * * * * * * * * * * * -- EdwardGorey, "The Gashlycrumb Tinies"


    i cant heard music in terminal. but i can't get terminal bell. i never
    edit the /etc/profile from install OS.

  5. Re: terminal bell

    Xend wrote:

    > i cant heard music in terminal. but i can't get terminal bell. i never
    > edit the /etc/profile from install OS.


    What type of terminal are you using?

    Mark.

    --
    Mark Hobley
    Linux User: #370818 http://markhobley.yi.org/


+ Reply to Thread