Browse Source

new upstream release

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@8557 ec354946-7b23-47d6-9f5a-488ba84defc7
Takemikaduchi 10 years ago
parent
commit
d215ecd53c
1 changed files with 24 additions and 29 deletions
  1. 24 29
      c/chromium/chromium-browser-vine.sh

+ 24 - 29
c/chromium/chromium-browser-vine.sh

@@ -9,12 +9,6 @@
 APPNAME=chromium
 LIBDIR=/usr/lib/chromium
 GDB=/usr/bin/gdb
-CHROME_SANDBOX=/usr/lib/chrome_sandbox
-
-# # Let the Chromium aware MeeGo desktop environment.
-# # For system proxy setting integration.
-# GNOME_DESKTOP_SESSION_ID="this-is-deprecated"
-# export GNOME_DESKTOP_SESSION_ID
 
 usage () {
   echo "$APPNAME [-h|--help] [-g|--debug] [options] [URL]"
@@ -52,20 +46,6 @@ while [ $# -gt 0 ]; do
   esac
 done
 
-# # Set plugin search path. Chromium will read mozilla's plugin 
-# # search path. This is for platforms (handset, TV, etc..) where 
-# # plugins are not copied/linked to the standard mozilla plugin
-# # path due to reasons. PDF plugin is in the list though it is
-# # not really supported by chromium on Linux.
-# moz_plugin_path=$(find /usr/java/jre* \
-#                   /usr/lib/flash-plugin \
-#                   /opt/Adobe* /usr/Adobe* \
-#                   -name "libnpjp2.so" -exec dirname {} \; -o \
-#                   -name "libflashplayer.so" -exec dirname {} \; -o \
-#                   -name "nppdf.so" -exec dirname {} \; 2>/dev/null | xargs echo)
-# MOZ_PLUGIN_PATH=$MOZ_PLUGIN_PATH:${moz_plugin_path// /:}
-# export MOZ_PLUGIN_PATH
-
 # Setup the default profile if this is none
 # Set the default theme as GTK+ with system window decoration
 if [ ! -d ~/.config/chromium/Default ]; then
@@ -73,7 +53,7 @@ if [ ! -d ~/.config/chromium/Default ]; then
     cat <<EOF > ~/.config/chromium/Default/Preferences
 {
    "browser": {
-      "custom_chrome_frame": false
+      "custom_chrome_frame": true
    },
    "extensions": {
       "theme": {
@@ -93,7 +73,7 @@ if [ ! -d ~/.config/chromium/Default ]; then
          "use_system": true
       }
    },
-   "homepage": "http://meego.com/",
+   "homepage": "http://vinelinux.org/",
    "homepage_is_newtabpage": false,
    "session": {
       "restore_on_startup": 1
@@ -102,21 +82,36 @@ if [ ! -d ~/.config/chromium/Default ]; then
       "webprefs": {
          "default_fixed_font_size": 13,
          "default_font_size": 16,
-         "fixed_font_family": "Droid Sans Mono",
-         "sansserif_font_family": "Droid Sans",
-         "serif_font_family": "Droid Serif"
+         "fixed_font_family": "monospace",
+         "sansserif_font_family": "sans-serif",
+         "serif_font_family": "serif"
       }
    }
 }
 EOF
-    # # Set the default browser
-    # $LIBDIR/xdg-settings set default-web-browser chromium-browser.desktop
 fi
 
 if [ ! -u $CHROME_SANDBOX ] ; then
- SANDBOX="--no-sandbox"
+   echo "The chrome_sandbox binary does not have the SETUID set.\n"
+   echo "This is most likely caused by the permission state (Secure/Paranoid) of the system. Therefore running Chromium is not possible."
+fi
+
+# Allow users to override command-line options
+# Based on Gentoo's chromium package (and by extension, Debian's)
+if [ -f /etc/default/chromium ]; then
+	. /etc/default/chromium
+fi
+
+# Detect if PepperFlash has been installed
+# If so, automatically enable it
+if [ -f /usr/lib/chromium/PepperFlash/libpepflashplayer.so ]; then
+      PEPPER_FLASH_VERSION=$(grep '"version":' /usr/lib/chromium/PepperFlash/manifest.json| grep -Po '(?<=version": ")(?:\d|\.)*')
+      PEPPERFLASH="--ppapi-flash-path=/usr/lib/chromium/PepperFlash/libpepflashplayer.so --ppapi-flash-version=$PEPPER_FLASH_VERSION"
 fi
 
+# Prefer user defined CHROMIUM_USER_FLAGS (from env) over system
+# default CHROMIUM_FLAGS (from /etc/chromium/default)
+CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-$CHROMIUM_FLAGS}
 
 if [ $want_debug -eq 1 ] ; then
   if [ ! -x $GDB ] ; then
@@ -132,6 +127,6 @@ if [ $want_debug -eq 1 ] ; then
   $GDB "$LIBDIR/$APPNAME" -x $tmpfile
   exit $?
 else
-  exec $LIBDIR/$APPNAME $SANDBOX "--password-store=detect" "--enable-experimental-extension-apis" "--enable-plugins" "--enable-extensions" "--enable-user-scripts" "--enable-printing" "--enable-sync" "--auto-ssl-client-auth" "$@"
+  exec $LIBDIR/$APPNAME $SANDBOX ${CHROMIUM_FLAGS} ${PEPPERFLASH} "--password-store=basic" "--enable-threaded-compositing" "$@"
 fi