chxei

/etc/X11/xinit/xinitrc.d

Sep 3rd, 2022
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.99 KB | None | 0 0
  1. File: 00-start-message-bus.sh
  2.  
  3. #!/usr/bin/sh
  4. # Copyright (C) 2008 Red Hat, Inc.
  5. #
  6. # All rights reserved. This copyrighted material is made available to anyone
  7. # wishing to use, modify, copy, or redistribute it subject to the terms and
  8. # conditions of the GNU General Public License version 2.
  9. #
  10. # You should have received a copy of the GNU General Public License
  11. # along with this program; if not, write to the Free Software
  12. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  13. #
  14. if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
  15. eval `dbus-launch --sh-syntax --exit-with-session`
  16. fi
  17.  
  18. File: 10-qt5-check-opengl2.sh
  19. #!/usr/bin/bash
  20.  
  21. if [ -z "$QT_XCB_FORCE_SOFTWARE_OPENGL" ]; then
  22.  
  23. QT5_CHECK_OPENGL_VERSION=`LANG=C glxinfo 2> /dev/null | grep '^OpenGL version string: ' | head -n 1 | sed -e 's/^OpenGL version string: \([0-9]\).*$/\1/g'` ||:
  24.  
  25. if [ "$QT5_CHECK_OPENGL_VERSION" == "1" ]; then
  26. QT_XCB_FORCE_SOFTWARE_OPENGL=1
  27. export QT_XCB_FORCE_SOFTWARE_OPENGL
  28. fi
  29.  
  30. unset QT5_CHECK_OPENGL_VERSION
  31.  
  32. fi
  33.  
  34. File: 10-qt6-check-opengl2.sh
  35.  
  36. #!/usr/bin/bash
  37.  
  38. if [ -z "$QT_XCB_FORCE_SOFTWARE_OPENGL" ]; then
  39.  
  40. QT6_CHECK_OPENGL_VERSION=`LANG=C glxinfo 2> /dev/null | grep '^OpenGL version string: ' | head -n 1 | sed -e 's/^OpenGL version string: \([0-9]\).*$/\1/g'` ||:
  41.  
  42. if [ "$QT6_CHECK_OPENGL_VERSION" == "1" ]; then
  43. QT_XCB_FORCE_SOFTWARE_OPENGL=1
  44. export QT_XCB_FORCE_SOFTWARE_OPENGL
  45. fi
  46.  
  47. unset QT6_CHECK_OPENGL_VERSION
  48.  
  49. fi
  50.  
  51. File: 50-systemd-user.sh
  52. #!/usr/bin/sh
  53. # SPDX-License-Identifier: LGPL-2.1-or-later
  54. #
  55. # This file is part of systemd.
  56. #
  57. # systemd is free software; you can redistribute it and/or modify it
  58. # under the terms of the GNU Lesser General Public License as published by
  59. # the Free Software Foundation; either version 2.1 of the License, or
  60. # (at your option) any later version.
  61.  
  62. systemctl --user import-environment DISPLAY XAUTHORITY
  63.  
  64. if command -v dbus-update-activation-environment >/dev/null 2>&1; then
  65. dbus-update-activation-environment DISPLAY XAUTHORITY
  66. fi
  67.  
  68. File: 50-xinput.sh
  69.  
  70. #!/usr/bin/bash
  71. # Copyright (C) 1999-2004,2007-2011 Red Hat, Inc. All rights reserved. This
  72. # copyrighted material is made available to anyone wishing to use, modify,
  73. # copy, or redistribute it subject to the terms and conditions of the
  74. # GNU General Public License version 2.
  75. #
  76. # You should have received a copy of the GNU Lesser General Public
  77. # License along with this library; if not, write to the
  78. # Free Software Foundation, Inc., 51 Franklin Street, Fifth
  79. # Floor, Boston, MA 02110-1301 USA
  80. #
  81. # X Input method setup script
  82.  
  83. . /usr/libexec/imsettings-functions
  84.  
  85. CONFIGDIR="${XDG_CONFIG_HOME:-$HOME/.config}/imsettings"
  86. USER_XINPUTRC="$CONFIGDIR/xinputrc"
  87. SYS_XINPUTRC="/etc/X11/xinit//xinputrc"
  88. READ_XINPUTRC="N/A"
  89.  
  90. # Load up the user and system locale settings
  91. oldterm=$TERM
  92. unset TERM
  93. if [ -r /etc/profile.d/lang.sh ]; then
  94. # for Fedora etc
  95. source /etc/profile.d/lang.sh
  96. elif [ -r /etc/default/locale ]; then
  97. # for Debian
  98. source /etc/default/locale
  99. elif [ -r /etc/env.d/02locale ]; then
  100. # for Gentoo
  101. source /etc/env.d/02locale
  102. fi
  103. [ -n "$oldterm" ] && export TERM=$oldterm
  104.  
  105. tmplang=${LC_CTYPE:-${LANG:-"en_US.UTF-8"}}
  106.  
  107. # unset env vars to be safe
  108. unset AUXILIARY_PROGRAM AUXILIARY_ARGS GTK_IM_MODULE ICON IMSETTINGS_IGNORE_ME LONG_DESC NOT_RUN PREFERENCE_PROGRAM PREFERENCE_ARGS QT_IM_MODULE SHORT_DESC XIM XIM_PROGRAM XIM_ARGS XMODIFIERS
  109.  
  110. [ -z "${IMSETTINGS_DISABLE_USER_XINPUTRC-}" ] && IMSETTINGS_DISABLE_USER_XINPUTRC=no
  111. [ -z "${IMSETTINGS_DISABLE_SYS_XINPUTRC-}" ] && IMSETTINGS_DISABLE_SYS_XINPUTRC=no
  112.  
  113. if ! is_desktop_supported; then
  114. IMSETTINGS_DISABLE_SYS_XINPUTRC=yes
  115. fi
  116.  
  117. # migrate old configuration file
  118. [ ! -d $CONFIGDIR ] && mkdir -p $CONFIGDIR || :
  119. [ -f "$HOME/.xinputrc" ] && mv $HOME/.xinputrc $CONFIGDIR/xinputrc
  120. [ -f "$HOME/.xinputrc.bak" ] && mv $HOME/.xinputrc.bak $CONFIGDIR/xinputrc.bak
  121.  
  122. if [ -r "$USER_XINPUTRC" -a "x$IMSETTINGS_DISABLE_USER_XINPUTRC" = "xno" ]; then
  123. source "$USER_XINPUTRC"
  124. READ_XINPUTRC=$USER_XINPUTRC
  125. if [ ! -h "$USER_XINPUTRC" ]; then
  126. SHORT_DESC="User Specific"
  127. fi
  128. elif [ -r "$SYS_XINPUTRC" -a "x$IMSETTINGS_DISABLE_SYS_XINPUTRC" = "xno" ]; then
  129. # FIXME: This hardcoded list has to be gone in the future.
  130. # Locales that normally use input-method for native input
  131. _im_language_list="as bn gu hi ja kn ko mai ml mr ne or pa si ta te th ur vi zh"
  132. _sourced_xinputrc=0
  133. for i in $_im_language_list; do
  134. if echo $tmplang | grep -q -E "^$i"; then
  135. source "$SYS_XINPUTRC"
  136. READ_XINPUTRC=$SYS_XINPUTRC
  137. _sourced_xinputrc=1
  138. break
  139. fi
  140. done
  141. # Locales that usually use X locale compose
  142. # FIXME: which other locales should be included here?
  143. if [ $_sourced_xinputrc -eq 0 ]; then
  144. _xcompose_language_list="am_ET el_GR fi_FI pt_BR ru_RU"
  145. for i in $_xcompose_language_list; do
  146. if echo $tmplang | grep -q -E "^$i"; then
  147. source /etc/X11/xinit/xinput.d//xcompose.conf
  148. READ_XINPUTRC=/etc/X11/xinit/xinput.d//xcompose.conf
  149. _sourced_xinputrc=1
  150. break
  151. fi
  152. done
  153. fi
  154. if [ $_sourced_xinputrc -eq 0 ]; then
  155. # Read none.conf to set up properly for locales not listed the above.
  156. source /etc/X11/xinit/xinput.d//none.conf
  157. READ_XINPUTRC=/etc/X11/xinit/xinput.d//none.conf
  158. fi
  159. fi
  160.  
  161. [ -z "${IMSETTINGS_INTEGRATE_DESKTOP-}" ] && IMSETTINGS_INTEGRATE_DESKTOP=yes
  162. export IMSETTINGS_INTEGRATE_DESKTOP
  163.  
  164. [ -z "$XIM" -a "x$IMSETTINGS_DISABLE_SYS_XINPUTRC" = "xno" ] && XIM=none
  165.  
  166. # start IM via imsettings
  167. IMSETTINGS_MODULE=${SHORT_DESC:-${XIM}}
  168. [ -z "$IMSETTINGS_MODULE" ] && IMSETTINGS_MODULE="none"
  169. export IMSETTINGS_MODULE
  170.  
  171. ##
  172. log_init
  173. setup_gtk_immodule
  174. setup_qt_immodule
  175. setup_xim
  176.  
  177. # NOTE: Please make sure the session bus is established before running this script.
  178. if ! is_dbus_enabled; then
  179. log "***"
  180. log "*** No DBus session hasn't been established yet. giving up to deal with Input Method with imsettings."
  181. log "***"
  182.  
  183. run_xim
  184. elif ! is_imsettings_enabled; then
  185. log "***"
  186. log "*** imsettings is explicitly disabled."
  187. log "***"
  188.  
  189. run_xim
  190. else
  191. # Yes, we are in the dbus session
  192. run_imsettings
  193. fi
  194.  
  195. File: 98vboxadd-xclient.sh
  196.  
  197. #!/usr/bin/sh
  198. ## @file
  199. # Start the Guest Additions X11 Client
  200. #
  201.  
  202. #
  203. # Copyright (C) 2007-2020 Oracle Corporation
  204. #
  205. # This file is part of VirtualBox Open Source Edition (OSE), as
  206. # available from http://www.virtualbox.org. This file is free software;
  207. # you can redistribute it and/or modify it under the terms of the GNU
  208. # General Public License (GPL) as published by the Free Software
  209. # Foundation, in version 2 as it comes in the "COPYING" file of the
  210. # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
  211. # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
  212. #
  213.  
  214. # Sanity check: if non-writeable PID-files are present in the user home
  215. # directory VBoxClient will fail to start.
  216. for i in $HOME/.vboxclient-*.pid; do
  217. test -w $i || rm -f $i
  218. done
  219.  
  220. # Do not start if the kernel module is not present; or if this script is
  221. # triggered by a connection over SSH.
  222. if [ -c /dev/vboxguest -a -z "${SSH_CONNECTION}" ]; then
  223. /usr/bin/VBoxClient --clipboard
  224. /usr/bin/VBoxClient --checkhostversion
  225. /usr/bin/VBoxClient --seamless
  226. /usr/bin/VBoxClient --draganddrop
  227. fi
  228.  
  229. File: localuser.sh
  230.  
  231. #!/usr/bin/sh
  232. # Copyright (C) 2006 Red Hat, Inc. All rights reserved. This
  233. # copyrighted material is made available to anyone wishing to use, modify,
  234. # copy, or redistribute it subject to the terms and conditions of the
  235. # GNU General Public License version 2.
  236. #
  237. # You should have received a copy of the GNU General Public License
  238. # along with this program; if not, write to the Free Software
  239. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  240. #
  241. [ -x /usr/bin/xhost ] && [ -x /usr/bin/id ] &&
  242. xhost +si:localuser:`id -un` >& /dev/null
  243.  
Advertisement
Add Comment
Please, Sign In to add comment