Thanks for the suggestions. As fgconsole doesn't always actually return a console number under X, I've taken a somewhat different approach involving just checking whether the output of fgconsole is in [1-6]. I know this isn't perfect, but since running setupcon is just a nice-to-have I think it's good enough.
Thanks for the suggestions. As fgconsole doesn't always actually return a console number under X, I've taken a somewhat different approach involving just checking whether the output of fgconsole is in [1-6]. I know this isn't perfect, but since running setupcon is just a nice-to-have I think it's good enough.