Autoload recent project at startup

Hi,

once KiCad always loaded the most recent project, when KiCad was started. Somehow my installation has dropped this feature.
Can anyone tell me, if there is anywhere a setting, to enable this again?

Greets, Karl

Which KiCad version? :slight_smile:

(EDIT: sorry, this was in 5_1 category, I rarely read that part of the pageā€¦)

What platform? I know that on Linux the most recent project file paths are stored in ~/.config/kicad/kicad as file1 ā€¦ file9. Maybe this list got corrupted?

But OS matters

Under Kubuntu the file is /home/youruser/.config/kicad/kicad

The last file kicad keeps information about the last 10 opened projects. Maybe that file got corrupted

Sorry, I was writing when your message arrived!

Great minds think alike. On the other hand, someone else countered with: Fools seldom differ. :wink:

1 Like

The file looks okay. The entries under File -> Open Recent also are okay.

Iā€™m running the PPA from Reynaud on Linux Mint 20.0 (aka Ubuntu EDIT: 20.04) with
export KICAD_CONFIG_HOME=~/.config/kicad5 to not collide with the KiCad 4 installation.

The only problem is, that the most recent project is not loaded on KiCad startup. I have to click every time File -> Open Recent -> ...

Thereā€™s another entry KicadFrameMostRecentlyUsedPath. What is the value of that?

KicadFramePos_x=0
KicadFramePos_y=22
KicadFrameSize_x=1920
KicadFrameSize_y=1053
KicadFrameMaximized=1
KicadFramePerspective=layout2|name=MainToolbar;caption=;state=139644;dir=1;layer=6;row=0;pos=0;prop=100000;bestw=273;besth=36;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|name=ProjectTree;caption=;state=508;dir=4;layer=3;row=0;pos=0;prop=100000;bestw=432;besth=-1;minw=150;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|name=Launcher;caption=;state=139644;dir=1;layer=1;row=0;pos=0;prop=100000;bestw=525;besth=70;minw=525;minh=70;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|name=MsgPanel;caption=;state=131452;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=94;besth=33;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|dock_size(1,6,0)=36|dock_size(4,3,0)=432|dock_size(1,1,0)=70|dock_size(5,0,0)=94|
KicadFrameMostRecentlyUsedPath=/home/karl/git/bachelor-arbeit/kicad/adc-shield/
LeftWinWidth=432
file1=/home/karl/git/bachelor-arbeit/kicad/adc-shield/adc-shield.pro
file2=
file3=
file4=
file5=
file6=
file7=
file8=
file9=

ĀÆ\(惄)/ĀÆ ā€¦

Iā€™m just wondering how you avoided collision between the K4 and K5 packages. Wouldnā€™t they use the same paths, e.g. /usr/bin/kicad?

With KiCad 4 I use the AppImage, and with KiCad5 the PPA.

Just to make it clear, the file content above is no solution to the problem. Is still doesnā€™t startup the most recent project automatically.

Your history list has only one entry. What if you switch to another project, or create one, does the history list expand? This experiment is to check if the history list is being rewritten.

Iā€™ve deleted the other entries for privacy reasons. It builds up properly.

@Seth_h Has Seth any ideas, what triggers the auto load of the most recent project?

Greets, Karl

Hereā€™s an observation. When I run kicad from the command line without any arguments, I get autoload of the current project. When I run it with an argument of the pathname of a project file, it opens that project. Any other argument, even -h or --help will just open kicad with no project, and no warning on standard error. I suppose this wasnā€™t a consideration since Kicad runs in environments where there isnā€™t a controlling console.

Are you somehow running kicad with extra arguments? How are you launching kicad, from the GUI launcher or a shell window? Does the launcher add extra arguments? You can also run ā€œps xā€ to see what argument, if any, kicad was called with.

2 Likes

Cool, I can reproduce that behavior.

This is my launcher script:
#!/bin/bash
export KICAD_CONFIG_HOME=~/.config/kicad5

# Installed KiCad V5.1.5 from the PPA

# Missing autoload recent project, but can handle "open file with kicad from file manager nemo"
# kicad_ppa "$1"

# autoload recent project is working
kicad_ppa

KiCad with an empty argument also doesnā€™t autoload the recent projectā€¦
I think, Iā€™ve to tweak the scritpt!

Thank you very much!

1 Like

Ah, if you want to pass arguments and not end up creating an argument of the emtpy string if $1 is not present, do:

kicad_ppa "$@"

Iā€™ve written about it here: https://green-possum-today.blogspot.com/2016/07/is-shell-idiom.html

3 Likes

That is definitely a bug, we should ignore empty strings. Can you open an issue on GitLab about it please.

I reckon the bug is that if you do:

kicad foo

it says nothing and silently continues with no project. Some day someone will type

kicad project.pro

or the equivalent by clicking on project.pro where a file suffix association is in effect and there is some permission problem opening project.pro but nothing is reported.

Thank you very much @kenyapcomau
Iā€™ve reported it here: https://gitlab.com/kicad/code/kicad/-/issues/5055