People sometimes ask what is the difference between the Saltire (blue and white cross) and the Royal Banner (red lion rampant) and don't seem to believe it when I say that the Royal Banner should only be flown when The King (or Queen) of Scots is present!
Well, here is the official protocol, taken from the Scottish Government website:
The Royal Banner is The Queen’s official banner in Scotland. Flags showing the Banner of the Royal Arms of Scotland (the ‘Lion Rampant’) or the Royal Arms as used in Scotland (the Quartered Arms) are Ensigns of Public Authority, and are therefore only used by The Sovereign or Her Great Officers, such as Lord Lieutenants, when acting in that capacity.
The Royal Banner is usually only hoisted above a Scottish Government building during the period The Queen is present in the building. It is not hoisted when The Queen is only passing in procession. If The Queen is to be present in your building, please contact the Protocol Team, Constitution Directorate, DG Constitution and Corporate Change to make the necessary arrangements.
The flying of the Royal Banner from a non-Government property or garden is not permissible, as it implies that the flag flyer is claiming the Royal Arms as his or her own.