Menu

ncid-alert and other things

Joe Henley
2020-04-27
2020-05-18
<< < 1 2 (Page 2 of 2)
  • John L. Chmielewski

    From the ncid-alert man page:

     REQUIREMENTS
        libnotify
        /usr/bin/notify-send
    

    The notify-send says thix:

     notify-send - a program to send desktop notifications
    

    Both ncid and ncid-alert require a running desktop to start.
    They will fail if a desktop is not running.

    This will start ncid-notify without starting the ncid GUI when the
    desltop starts. Click on the fillowing ncid menu item::

     File->Auto Start->On only desktop notifications
    

    If you cat ~/.config/autostart/net.sourceforge.ncid.desktop after
    you select on the above menu item, you will see the exec line:

     Exec=ncid --no-gui --module ncid-alert
    

    On Tue, May 12, 2020 at 08:26:08PM -0000, Todd Andrews wrote:

    John, I probably added to the confusion because I was having Joe test launching ncid in GUI mode for troubleshooting purposes (file permissions, environment variables available). It is looking to me like Joe is just wanting ncid-alert to give notifications; I didn't think his goal was to run ncid as GUI. Joe correct me if I'm wrong?


    ncid-alert and other things


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/ncid/discussion/275236/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

    --
    John

     
    • Joe Henley

      Joe Henley - 2020-05-13

      John,

      I'm not sure if this will help or not....

      When I set this all up, way back when, I noticed there was no ncid-alert.service file. All the other modules had corresponding service files. So I looked over the available modules and concluded ncid-notify was the most similar to ncid-alert. Ncid-notify also had a service file. So I copied the ncid-notify.service file to ncid-alert.service, modified ncid-alert.service "as required," and then enabled it in systemd. It worked OK -- well, maybe....

      So the file which causes the ncid-alert module to be run after login, was not part of your original package. I created it from your other work and, in the process, may have caused alot of this confusion. I'm really sorry if that's the case.

      Joe

       
  • Joe Henley

    Joe Henley - 2020-05-13

    John and Todd,

    Todd's point that I want only for ncid-alert to provide notifications is correct. I do use the ncidd call list, but not often.

    After John's and Todd's comments I did some digging in my kernel and system logs. What I found is that boot, log-in, and mate (gnome) are complete (all items have been started, almost all are complete) before ncid-alert is even started. Please be gentle in your interpretation....I am not terribly experienced in reading/analyzing these logs. It looks to me like systemd is actually getting the timing right -- never thought I'd say that. ;-)

    If I understand you correctly, I should diasable the ncid-alert.service and use an auto-start program (something in /root/.config/autostart?). John's comments were more Windows focused that Linux, but I get his point. Or is a better solution to modify the ncid-alert.service to include the missing environment variables? I think that was Ed's comment.

    Also, a number of the tests Todd has had me do, demonstrate that starting and running mcid-alert.service well after the system has booted, logged-in and mated (pardon the pun) experience the same problem issues. It keeps coming back to the environment being set up (at all), not when it's set up. Disclaimer: You guys really do know alot more about this than I.

    Thoughts?

    Joe

    PS: Guys, thanks for this software and for all your effort and help for me. I do greatly appreciate it.

     
  • Joe Henley

    Joe Henley - 2020-05-13

    Todd,

    OK. What are the steps John uses? FYI, if it matters, there's no "Click on the fillowing ncid menu item:: File->Auto Start->On only desktop notifications"
    that I'm aware of. However, there is a "StartUp Applications" menu where I can set command lines to be run.

    Let's see if it runs on my PC.

    Joe

     
  • Todd Andrews

    Todd Andrews - 2020-05-13

    I have removed most of my posts in order to focus on the "Auto Start" feature added to the ncid client at NCID version 1.9.

    Here is what you should see:

    ncid client

     
  • Joe Henley

    Joe Henley - 2020-05-14

    Hi Todd,

    OK. But where is it? I looked in the .deb package for something like "auto start" and I looked in the man file for a parameter to include, but no luck. Could it have been left out of the Debian/Ubuntu/LinuxMint/et al package?

    Joe

     
    • Todd Andrews

      Todd Andrews - 2020-05-14

      Hi Joe,

      It's normally handled automatically just by going into:

       File->Auto Start->On only desktop notifications
      

      Important note: you'll need to put in place the original (unmodified) /usr/bin/ncid so that it doesn't have the background fix for $::env(HOME).


      Here are steps you can do to verify the installation.

      Change to the directory where you saved ncid-client_1.11-1_all.deb and type the following to make sure it has the needed file:

       $ dpkg -c ncid-client_1.11-1_all.deb|grep desktop
      

      you should see

       -rw-r--r-- root/root 153 2020-01-26 12:20 ./usr/share/applications/net.sourceforge.ncid.desktop
      

      Type the following to make sure it was installed by the package:

       $ ls -l /usr/share/applications/net.*
      

      you should see

       -rw-r--r-- 1 root root 153 Jan 26 12:20 /usr/share/applications/net.sourceforge.ncid.desktop
      

      Re-pasting part of John's earlier steps:

      [After you click] on the fillowing ncid menu item:

       File->Auto Start->On only desktop notifications
      

      If you cat ~/.config/autostart/net.sourceforge.ncid.desktop after
      you select on the above menu item, you will see the exec line:

       Exec=ncid --no-gui --module ncid-alert
      
       

      Last edit: Todd Andrews 2020-05-14
  • John L. Chmielewski

    Joe,

    It is a ncid menu item in GUI mode. Use the File menu to select the Auto Start menu item shown in the above screenshot posted by Todd. Whichever login does this is the login that gets the notification. You do not need to be root:

    ncid
    

    Once you set it, the next time you login, the command line mode of ncid will start with the ncid-alert module. The ncid-alert module will start every time you login.

    There are three ways you can start ncid at login:

    1. ncid in GUI mode
    2. ncid in GUI mode also using ncid-alert
    3. ncid in command line mode using ncid-alert

    It is important to remember that the Auto Start setting will not take place until the next time you login. I would suggest you do not login as root but as yourself.

    I know that you do not want ncid GUI running all the time but if you minimize ncid, it will popup on a call. Minimize is a desktop function.

     
  • Todd Andrews

    Todd Andrews - 2020-05-15

    Hi Joe,

    I redid my Linux Mint setup because I was having weird things work and not work. With a fresh install, I've discovered two problems.

    Issue #1

    If I do cat ~/.xsession-errors, I see

    mate-session[1246]: WARNING: Could not parse desktop file /home/taa/.config/autostart/net.sourceforge.ncid.desktop: Unrecognized desktop file Version '1.1'

    As a result, ncid won't autostart and there's no visible indication of the problem unless you look at ~/.xsession-errors.

    This is a known bug in mate-session-manager. It was reported and fixed only recently (Feb 2020) and the patch hasn't been pushed out yet.

    Fix #1

    To temporarily fix it, edit the file /usr/share/applications/net.sourceforge.ncid.desktop as root and comment out the "Version" line at the top:

    [Desktop Entry]
    #Version=1.1
    Name=NCID client
    Comment=NCID (Network Caller ID) client
    Exec=ncid
    Type=Application
    Icon=ncid
    Categories=Network;X-CallerID;
    

    Issue #2

    The next problem is that the ncid client assumes the autostart directory already exists, but under Linux Mint it doesn't. When you try to activate the ncid autostart feature, ncid crashes with an error:

    BGError: couldn't open "/home/taa/.config/autostart/net.sourceforge.ncid.desktop": no such file or directory
    couldn't open "/home/taa/.config/autostart/net.sourceforge.ncid.desktop": no such file or directory

    Fix #2

    As a temporary fix until we release an updated ncid client, you'll need to manually create it:

    mkdir -p ~/.config/autostart
    

    Once you comment out the "Version" line and manually create the autostart directory, you'll be able to do:

     File->Auto Start->On only desktop notifications
    
     
  • Joe Henley

    Joe Henley - 2020-05-15

    Hi Todd,

    I've gotten dragged away for a bit by "work" stuff, but am catching short windows to keep up. Soon I should be back to full engagement.

    Regarding Mint, yes I have seen those issues. I didn't have the first one because I created the autostart file myself (never saw/used the Auto Start functionvia ncid). The second one is odd; I've seen references to it but never experienced it. When I created the autostart file, the directory was already there for me to put it in. ...odd.

    When I was first setting up/using NCID, I used the autostart file approach -- I was trying to avoid systemd. But I had loads of problems with ncid when I was trying to resume from suspend (S3). Have you seen any of that? That's the prime reason I finally threw out my autostart file and bit the bullet on systemd.

    Back soon.

    Joe

     
<< < 1 2 (Page 2 of 2)

Log in to post a comment.