How can I set my external monitor as primary monitor?

I’m new to Ubuntu (18.04 btw) and Linux in general, in fact this is my first post on the forum, and at the moment I’m having an exceptionally frustrating problem. For the last couple of months my laptops screen (running windows) has been cracked so I would connect it to a monitor and work away. However, recently, in order to pursue a business endeavour I have switched to Linux. As many of you may know, however, the default setting for an external monitor is to mirror, therefore rendering my monitor useless. I can’t even log in as all I see is a purple background on my monitor and my laptop screen is so badly damaged that nothing is visible. I have tried switching the primary monitor using xrandr but I get the message “can’t open display” whenever I do so. I haven’t set up an X server and XORG is not a recognized command so I must not have X11 installed. Is X11 necessary? Are there any keyboard shortcuts? Am I using xrandr wrong? Of course, it would be easy to fix this problem should I be able to get past the login screen and access settings, but currently, that’s not possible. If there were any tips anybody would have for setting up xrandr or any other command lines I could use in the terminal for Ubuntu to be able to switch my external monitor to my primary monitor so that I could actually use my computer that would be very much appreciated, thanks 👍


Solution 1:

If you are logged in, just right mouse click on "Extended monitor", then

Change Background -> Scroll down until Devices -> Displays -> Display Mode -> Mirror

There you will be able to set the necessary monitor setting.

If you are logged in you can also use the terminal to change the screen. Just open a terminal via keys Ctrl+Alt+t and then print xrandr and run command. This will output the available screen ports, e.g. LVDS-1 is the laptop screen and VGA-1 is the port for external monitor (could be also HDMI-1, ...).

You can mirror the screen with command xrandr --output VGA-1 --same-as LVDS-1. This will mirror between Laptop screen and VGA output. Names and outputs are depending on your system.