S
S
sw0rl0k2015-11-28 21:44:46
linux
sw0rl0k, 2015-11-28 21:44:46

How to pass image to external screen in linux?

My sister brought a laptop with a broken screen. The top cover with the screen was safely removed, and I was left with a working half of the laptop with hdmi output. The laptop had windows 10 and everything was displayed normally on a TV set connected via hdmi. But I decided, for informational purposes, to install some system on the Linux kernel on a laptop. I tried to install several systems, both debian / ubuntu based and Manjaro based on arch.
The result is always the same: the LiveUSB image loads perfectly, the image is displayed on an external screen (TV), the installation goes fine. But when, after a reboot, I try to boot into the installed system, the picture does not go to the external monitor.
What configs and how should I fix it so that the image is always transmitted only to the external screen?
Linux Mint 17.2 Cinnamon

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikita, 2015-11-28
@Nivalis

I think you should smoke xrandr.

E
Eddy_Em, 2015-11-29
@Eddy_Em

I have a laptop with a broken screen working in the same way in my kitchen.
In order to display the image on the second screen, it is usually enough to press the corresponding button on the laptop keyboard. But in my case, a screen failure caused the kernel to freeze if an image was tried to be displayed on the screen; completely turning off the screen led to the fact that Linux could not even start at all. I had to go for a trick: the laptop lid opens slightly, presses "on", then the lid closes, everything is OK.
I used ssh to configure (fortunately, I still have a computer and a netbook at home). If this is not possible, but when installing something from a flash drive, the Xs work normally, you can immediately configure the work of the Xs correctly before rebooting, since you don’t even need root for this.
In order for the image to be on the monitor when X starts, you need to add the line to ~/.xinitrc
I will give the full contents of my ~/.xinitrc, it will suddenly come in handy:

#!/bin/sh
xrandr --output VGA1 --mode 1920x1080
setxkbmap 'us,ru' -option 'grp:ctrl_shift_toggle,grp_led:scroll,compose:menu'
xmodmap -e "keycode 10 = 0x31, exclam"
xmodmap -e "keycode 49 = grave asciitilde apostrophe asciitilde"

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

exec icewm-session

The first xmodmap fixed the problem with the exclamation point on the soft keyboard (it has been gone for a long time, but I left the line just in case). The second replaces the unnecessary letter Ē with the necessary tilde and apostrophe.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question