Recently I am testing KiCad v.5.99 and have problem with opening the kicad files from the command line.
KiCad simply ignores the filename specified on the command line and opens the latest open project (kicad-nightly) or empty file (pcbnew-nightly and eeschema-nightly ).
Here’s how you check if a program is receiving the correct command line parameters in Linux:
Find the pid of the program that is running. Usually people do
ps -e | grep program
but another way is:
pidof program
Now that you have the pid, do
od -bc /proc/pid/cmdline
because NULs separate the arguments. For example I did this on a process called qmgr and I got:
$ od -bc /proc/32340/cmdline
0000000 161 155 147 162 000 055 154 000 055 164 000 146 151 146 157 000
q m g r \0 - l \0 - t \0 f i f o \0
0000020 055 165 000
- u \0
0000023
Things that could happen include the program receiving a truncated filename because your filename had whitespace, and there was an intervening shell script that didn’t handle the arguments correctly. Unfortunately KiCad programs don’t print a diagnostic when they cannot open the file but silently open the last opened file.
Are you using another Linux distribution?
I think this is a bug in the packaging for your Linux distribution, and should be reported on gitlab, so it can also be fixed for others using that same distribution.