Spotify: Invalid Option: -session

I am receiving the above message when logging into KDE, i suspect because Spotify is auto starting when i start up my system taking a look around google i have found this post which is what i suspect is happening

https://community.spotify.com/t5/Desktop-Linux-Windows-Web-Player/Bugreport-Linux-quot-invalid-option-session-quot/td-p/839589

The posters solution does not seem to work, however this was posted in 2014 has anyone come across this and perhaps can help me with a solution?

It is obviously not an urgent issue if i say ok i can launch spotify fine.

Spotify version 0.9.17.8

Barry

I have been testing some different workarounds as i note that if i issue the command

pkill -f spotify

from the console then immediately reboot the machine the message does not occur on next login. So with this in mind, i created a script in etc/rc.d/rc6.d/k99spotify_kill , however, this did not seem to work. I am a little old school so thinking systemd may need to be modified, i attempted to enable #KillUserProcesses=no in the logind.conf file in /etc/systemd you may have guessed already that failed also. Finally, you used to be able to place shutdown script in .kde so i tried that in .kde4 none of which has worked so far i will keep trying.

Barry

So i believe i have found a workaround that has suppressed the message i simply went into KDE application menu → settings → system settings selected startup/shutdown → desktop sessions and in the section labelled on login you will note
Applications to be excluded from sessions: i simply placed the word “spotify” without quotes, this seems to have stopped the session errors on login.

Barry