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->AutoStart->Ononlydesktopnotifications
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--modulencid-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?
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:
ncid in GUI mode
ncid in GUI mode also using ncid-alert
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:
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->AutoStart->Ononlydesktopnotifications
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
From the ncid-alert man page:
The notify-send says thix:
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::
If you cat ~/.config/autostart/net.sourceforge.ncid.desktop after
you select on the above menu item, you will see the exec line:
On Tue, May 12, 2020 at 08:26:08PM -0000, Todd Andrews wrote:
--
John
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
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.
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
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
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
Hi Joe,
It's normally handled automatically just by going into:
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:you should see
Type the following to make sure it was installed by the package:
you should see
Re-pasting part of John's earlier steps:
[After you click] on the fillowing ncid menu item:
If you cat ~/.config/autostart/net.sourceforge.ncid.desktop after
you select on the above menu item, you will see the exec line:
Last edit: Todd Andrews 2020-05-14
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:
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.
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 seeAs 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: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 thencid
autostart feature,ncid
crashes with an error:Fix #2
As a temporary fix until we release an updated
ncid
client, you'll need to manually create it:Once you comment out the "Version" line and manually create the autostart directory, you'll be able to do:
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