And how safe does it have to be? I mean - the most logical approach is to use something volatile, but that will mean emitting minute amounts of gas. Will it be used in a well ventilated place, where the odor doesn't matter, or in a closed room, where the smell will be not acceptable? Some substances can be harmful when left inside, but it wouldn't be a concern in the open. For example, if you were able to find a way of forming ammonium carbonate (which is a white powder) with addition of some small amount of a binder (no idea if doable or practical) you could in theory get something that will slowly sublime, but it will probably stink of ammonia.
Not that I have any ideas or suggestions, but clarifying these details may help others come with some propositions.