24

Is there any way to specify which monitor the console is displayed on in Linux?

Details:
I have a 3 monitor setup with 2 video cards. When I boot the computer, the BIOS displays on the PCI graphics card (which has a small monitor). When starting Linux, the console is displayed on the same monitor. Is there a way to have the console output on a different monitor? I'm using the vesafb framebuffer.

I don't see a way in my BIOS to change the default video card.

quack quixote
  • 43,504
Tim
  • 1,613

3 Answers3

10

I think the option we're looking for here is fbcon=map:n where n is the number assigned to the fb device for the desired video output.

Documentation/fb/fbcon.txt explains it and also mentions con2fbmap as the utility for changing it at runtime.

random
  • 15,201
Alan Curry
  • 3,774
3

As for changing what console runs on what monitor (frame buffer @ /dev/fbx), you can download this small, eighty line C program that allows you to specify such things.

wget https://raw.githubusercontent.com/kunguz/pi3b/master/con2fb.c
gcc con2fb.c -o con2fb.out

After you have downloaded and compiled that, it's simplest usage is sudo ./con2fb.out /dev/fb[frame buffer number, starting at 0] /dev/tty[console number, starting at 1].

This will "lock" the specified terminal to the specified monitor (frame buffer), so when you try and and switch to a terminal that's been assigned to a monitor, it will give focus to that terminal instead of switching it on the current display.

Remember though, frame buffer != physical monitor. Each monitor which you want to have a seperate tty on must be plugged into a seperate graphics card (so seperate frame buffers).

Also you can crash the kernel if you're not careful, so watch out you don't try and trick the program! ;)

-3

I believe this will depend on the window manager you are using. For example Enlightenment has the ability to remember window position.

Fluxbox also supports the saving of window positions and states.

I don't believe GNOME can do this out of the box since they believe that it should be up to the application developer to write code that can remember its last state.

So having this functionality depends on:

  1. The version of linux you are running
  2. The window manager you are using
  3. If you are willing to try switching your window manager to one of these
  4. And it depends on if these window managers are supported by your favorite flavor of linux.
harrymc
  • 498,455
gruntled
  • 295