This file is indexed.

/usr/share/laptop-mode-tools/modules/video-out is in laptop-mode-tools 1.60-1ubuntu1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#! /bin/sh
# 
# Laptop mode tools module: selectively disable video outputs
#

do_xrandr () {
  	w -hs | while read -r USER TTY DISPLAY REMAINDER; do	
	  	if [ "${DISPLAY#:}" != "$DISPLAY" ] ; then
	  		# It's an X display.
		  	if su $USER -c "xrandr --output $1 --$2" | grep -q display ; then
				log "VERBOSE" "Unable to set video output $1 to $2."
			else 
				log "VERBOSE" "Set video output $1 to $2"
			fi
		fi
        done
}

if [ x$CONTROL_VIDEO_OUTPUTS = x1 ] ; then
	if [ $ON_AC -eq 1 ]; then
		if [ "$ACTIVATE" -eq 1 ]; then
			DISABLE_VIDEO_OUTPUTS="$LM_AC_DISABLE_VIDEO_OUTPUTS"
		else
			DISABLE_VIDEO_OUTPUTS="$NOLM_AC_DISABLE_VIDEO_OUTPUTS"
		fi
	else
		DISABLE_VIDEO_OUTPUTS="$BATT_DISABLE_VIDEO_OUTPUTS"
	fi

	if [ -f /var/run/laptop-mode-tools/disabled-video-outputs ] ; then
		cat /var/run/laptop-mode-tools/disabled-video-outputs |
			while read VIDEO_OUTPUT REMAINDER ; do
				do_xrandr $VIDEO_OUTPUT auto
			done
	fi
			
	rm -f /var/run/laptop-mode-tools/disabled-video-outputs
	
	for VIDEO_OUTPUT in $DISABLE_VIDEO_OUTPUTS ; do
		echo $VIDEO_OUTPUT >> /var/run/laptop-mode-tools/disabled-video-outputs
		
		do_xrandr $VIDEO_OUTPUT off
	done
else
	log "VERBOSE" "video-out module is disabled."
fi