This file is indexed.

/usr/bin/primusrun is in primus 0~20131127-2.

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
47
48
49
50
51
52
#!/bin/bash

# Readback-display synchronization method
# 0: no sync, 1: D lags behind one frame, 2: fully synced
# export PRIMUS_SYNC=${PRIMUS_SYNC:-0}

# Verbosity level
# 0: only errors, 1: warnings (default), 2: profiling
# export PRIMUS_VERBOSE=${PRIMUS_VERBOSE:-1}

# Secondary display
# export PRIMUS_DISPLAY=${PRIMUS_DISPLAY:-:8}

# "Accelerating" libGL
# $LIB will be interpreted by the dynamic linker
# if (which dpkg-vendor >/dev/null && dpkg-vendor --derives-from Ubuntu) || \
#     [ -e /etc/dpkg/origins/ubuntu ]; then
#     # Ubuntu
#     export PRIMUS_libGLa=${PRIMUS_libGLa:-'/usr/$LIB/mesa/libGL.so.1'}
# else
#     # Debian
#     export PRIMUS_libGLa=${PRIMUS_libGLa:-'/usr/$LIB/libGL.so.1'}
# fi

# "Displaying" libGL
# if (which dpkg-vendor >/dev/null && dpkg-vendor --derives-from Ubuntu) || \
#     [ -e /etc/dpkg/origins/ubuntu ]; then
#     # Ubuntu
#     export PRIMUS_libGLa=${PRIMUS_libGLa:-'/usr/$LIB/mesa/libGL.so.1'}
# else
#     # Debian
#     export PRIMUS_libGLa=${PRIMUS_libGLa:-'/usr/$LIB/libGL.so.1'}
# fi 

# Directory containing primus libGL
PRIMUS_libGL=${PRIMUS_libGL:-'/usr/$LIB/primus'}

# On some distributions, e.g. on Gentoo, libnvidia-tls.so is not available
# in default search paths.  Add its path manually after the primus library
bblibs=$(echo -ne 'Q LibraryPath\0' | \
  socat - UNIX-CONNECT:/var/run/bumblebee.socket | sed 's/^Value: \(.*\)/\1/')

PRIMUS_libGL=${PRIMUS_libGL}${bblibs:+:$bblibs}

# Mesa drivers need a few symbols to be visible
# export PRIMUS_LOAD_GLOBAL=${PRIMUS_LOAD_GLOBAL:-'libglapi.so.0'}

# Need functions from primus libGL to take precedence
export LD_LIBRARY_PATH=${PRIMUS_libGL}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}

# And go!
exec "$@"