Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
midori:faq [2013/08/07 17:14] – add explanation of webkit versions, variations, and naming gue5tmidori:faq [2017/02/21 14:36] – [Security features] alemao
Line 3: Line 3:
 **This document is licensed under the LGPL 2.1.** **This document is licensed under the LGPL 2.1.**
  
-This is a list of frequently asked questions about the Midori Web Browser. Anyone feel free to improve and/ or extend this page, but keep it clean and easy to read for other Xfce users.+This is a list of frequently asked questions about the Midori Web Browser. Anyone should feel free to improve or extend this page, but keep it clean and easy to read for other users.
  
-====== Getting started ======+====== About Midori ======
  
 === What is "Midori" and why should I use it? === === What is "Midori" and why should I use it? ===
-Midori is a Web Browser, that aims to be lightweight and fast. It aligns well with the Xfce philosophy of making the most out of available resources.+Midori is a Web browser that aims to be lightweight and fast. It aligns well with the Xfce philosophy of making the most out of available resources. It has a customizable interface using the GTK+ toolkit.
  
 === How to pronounce Midori and what does the name mean? === === How to pronounce Midori and what does the name mean? ===
Line 17: Line 17:
  
 === On which platforms does Midori run currently? === === On which platforms does Midori run currently? ===
-Midori is basically very portable and should run on all platforms that its dependencies support.+Midori is portable and should run on all platforms that its dependencies support. Releases exist on various Linux distributions, for Windows versions prior to 8.1 (for now), and BSD.
  
 === Under which license is Midori distributed? === === Under which license is Midori distributed? ===
Line 26: Line 26:
 === Why does Google Mail/ Calendar/ Maps, Facebook not work or show mobile version? === === Why does Google Mail/ Calendar/ Maps, Facebook not work or show mobile version? ===
  
-Some websites discriminate against your browser.+Some websites give up if they don't recognize your browser as Chrome, Firefox, IE, etc.
  
-If you have Midori older than 0.3.5, go to Preferences > Network > Identify As, and choose Custom. Paste this into the entry:+You can change the browser name sent to web sites at Preferences > Network > Identify As
  
-Mozilla/5.0 (X11; Linux) AppleWebKit/531.2+ Midori/0.+Either choose a predefined user-agent or choose Custom and find a suitable string in [[http://useragentstring.com/pages/useragentstring.php|a list]].
- +
-If this doesn't do the trick, try choosing Safari or Firefox.+
  
 Many other websites use similar means of detecting the browser. Many other websites use similar means of detecting the browser.
  
-Ideally Google would follow [[http://code.google.com/p/doctype/wiki/ArticleGoogleChromeCompatFAQ#UserAgent_Detection|their own recommendation]] at some point.+Google [[http://web.archive.org/web/20100625211333/http://code.google.com/p/doctype/wiki/ArticleGoogleChromeCompatFAQ|previously recommended]] the superior practice for website creators of checking which features are present rather than browser name/version, but has since weakened this stance with their browser's growing market share.
  
 === There are missing icons/ warnings === === There are missing icons/ warnings ===
-The set of themed icons Midori can use is very limited. For instance icons for a new tab or the throbber are not guaranteed to be available. To fix this, install a Freedesktop.org spec compliant icon theme, such as Elementary, Faenza, Buuf or GNOME.+Midori uses a wide variety of icons which may not be present in all themes. For instance icons for a new tab, to represent scripts, or the throbber may not available. To fix this, install a Freedesktop.org spec compliant icon theme, such as Elementary, Faenza, Buuf or GNOME. 
 + 
 +if you need to set a custom path for these to be "searched in" (Kiosks and embedded devices for example): 
 + 
 +XDG_DATA_HOME=/path/to/location   
 + 
 +will add an extra path for the icons/... directory 
 + 
 +In addition, GTK3 may remove icons from menus. This may be changed by placing <code>gtk-menu-images=true</code> in the file ~/.config/gtk-3.0/settings.ini
  
 === Tweaking Midori on the Gtk level === === Tweaking Midori on the Gtk level ===
Line 56: Line 62:
 Enable changing hotkeys while hovering menu items: Enable changing hotkeys while hovering menu items:
 <code>gtk-can-change-accels = 1</code> <code>gtk-can-change-accels = 1</code>
 +
 +=== Making the current tab more visible ===
 +
 +To make the current tab more visible in Midori, when running Elementary edit the file /usr/share/themes/elementary/gtk-3.0/gtk-widgets.css around line 1620:
 +
 +<code>.notebook tab .active-page GtkLabel {
 +font-weight: Bold;</code>
 +
 +Note that this will also affect tabs on Files, Scratch and other apps. The change is presumably applicable to other GTK+3 based themes but it wasn't tested.
  
 === Disable middle click pasting === === Disable middle click pasting ===
Line 72: Line 87:
  
 export XDG_CACHE_HOME=/dev/shm export XDG_CACHE_HOME=/dev/shm
- 
 ===== Security features ===== ===== Security features =====
  
Line 88: Line 102:
  
 No key store is available or it's incorrectly setup. By default GNOME keyring can do this. Under Xfce it is recommended to enable "GNOME services" under "Session and Startup settings". To make sure, that the output of "gnome-keyring --startup" is correctly sent to the environment, you can add "export `gnome-keyring-daemon --start`" to .xinitrc. No key store is available or it's incorrectly setup. By default GNOME keyring can do this. Under Xfce it is recommended to enable "GNOME services" under "Session and Startup settings". To make sure, that the output of "gnome-keyring --startup" is correctly sent to the environment, you can add "export `gnome-keyring-daemon --start`" to .xinitrc.
 +
 +In order to solve it, follow the steps:\\ 
 +1- make sure that gnome-keyring-pkcs11.so exists in your machine, the location can be found with:\\ 
 +$ sudo find / -name gnome-keyring-pkcs11.so
 +
 +Depending on the architecture it can be under /usr/lib/x86_64-linux-gnu/pkcs11 or /usr/lib/i386-linux-gnu/pkcs11\\ 
 +
 +If you don't find them, you must install it:\\ 
 +
 +**64bit machine: **\\ 
 +$ sudo apt-get install libp11-kit-gnome-keyring
 +
 +**32bit machine: **\\ 
 +$ sudo apt-get install libp11-kit-gnome-keyring:i386
 +
 +After that the file should be in the expected place. 
 +
 +2- Now **CLOSE** Midori.
 +
 +3- After it is totally closed, run:
 +
 +**64bit machine: **\\ 
 +$ modutil -add gnome-keyring -libfile ./lib/x86_64-linux-gnu/pkcs11/gnome-keyring-pkcs11.so  -mechanisms RSA:DSA -dbdir ~/.config/midori/
 +
 +**32bit machine: **\\ 
 +$ modutil -add gnome-keyring -libfile ./lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so  -mechanisms RSA:DSA -dbdir ~/.config/midori/
  
 == A testcase for self-signed certificates == == A testcase for self-signed certificates ==
Line 113: Line 153:
  
 <code bash> <code bash>
-sudo apt-get install flashplugin-installer nspluginwrapper +sudo apt-get install nspluginwrapper 
-sudo nspluginwrapper -/usr/lib/flashplugin-installer/libflashplayer.so +# On Debian/ Ubuntu on other systems http://get.adobe.com/de/flashplayer/ 
-nspluginwrapper -v -a -n -i+sudo apt-get install flashplugin-installer 
 +# cd into the folder where the plugin was installed 
 +nspluginwrapper -v -a -n -i libflashplayer.so
 </code> </code>
  
Line 133: Line 175:
  
 === Scroll with middle mouse button/ pan-scrolling === === Scroll with middle mouse button/ pan-scrolling ===
 +
 +Windows-style middle-click behavior is 
  
 http://ubuntuforums.org/showthread.php?t=478418 http://ubuntuforums.org/showthread.php?t=478418
Line 139: Line 183:
 Upstream Bug: https://bugs.webkit.org/show_bug.cgi?id=50561 Upstream Bug: https://bugs.webkit.org/show_bug.cgi?id=50561
  
-=== HTML5 Video doesn't play ===+=== HTML5 Video/ Audio doesn't play ===
  
-You need to have GStreamer plugins installed which implement the codecs.+[[#midori_architecture|Midori uses GStreamer]] for HTML5 audio and video support. Codecs, which handle particular formats of audio or video, are provided by GStreamer plugins which may need to be installed separately. Midori may be built with GTK+2 or GTK+3 (visit about:version to check), which correspond to GStreamer versions of 0.10 or 1.0 respectively.
  
-  - You need gstreamer0.10-pulse if you're using PulseAudio. +  - You need gstreamer(0.10/1.0)-pulse if you're using PulseAudio. 
-  - You may need gstreamer0.10-alsa for ALSA, depending on your distribution. +  - You may need gstreamer(0.10/1.0)-alsa for ALSA, depending on your distribution. 
-  - You need plugins for Theora, gstreamer0.10-base and MPEG-4 incluing aac (e.g. gst-plugins-faad), gstreamer0.10-bad. For WebM, you'll need plugins for vorbis (-base), matroska (-good), and vp8 (-bad). Have a look at http://www.gstreamer.net/documentation/plugins.html for details.+  - You need plugins for Theora, gstreamer(0.10/1.0)-base and MPEG-4 incluing aac (e.g. gst-plugins-faad), gstreamer(0.10/1.0)-bad. For WebM, you'll need plugins for vorbis (-base), matroska (-good), and vp8 (-bad). Have a look at http://www.gstreamer.net/documentation/plugins.html for details.
   - For Youtube or Vimeo, you need WebKitGTK+ 1.1.20 or newer.   - For Youtube or Vimeo, you need WebKitGTK+ 1.1.20 or newer.
   - You can [[http://ie.microsoft.com/testdrive/Graphics/VideoFormatSupport/Default.html|test your installed codecs here]]..   - You can [[http://ie.microsoft.com/testdrive/Graphics/VideoFormatSupport/Default.html|test your installed codecs here]]..
-  - Since Midori 0.3.5 you can look at "about:versionto see which video codecs you have installed.+  - You can look at about:version to see which video codecs you have installed.
  
 === Java doesn't work, applets don't show up === === Java doesn't work, applets don't show up ===
Line 438: Line 482:
 By default the right mouse button initiates gestures. By default the right mouse button initiates gestures.
  
-You can change the button using a hidden option:+You can change the button (for example, to the middle mouse button) using a hidden option:
  
-  - Create a text file ~/.config/midori/extensions/libmouse-gestures.so/config .+  - Create a text file ~/.config/midori/extensions/libmouse-gestures.so/**config** .
   - Type the following in there:   - Type the following in there:
  
Line 446: Line 490:
     button=2     button=2
  
-As of Midori 0.5.0 individual gestures can be configured freely, consult "midori --help-execute" for a list of available left-hand actions:+As of Midori 0.5.0 individual gestures can be configured freely in the file ~/.config/midori/extensions/libmouse-gestures.so/**gestures** . 
 +Consult "midori --help-execute" for a list of available actions, which are placed on the left of the equals sign. On the right goes a sequence of directions, (W)est, (E)east, (N)orth, (S)outh, (S)outh(W)est, etc., with a semicolon (;) after each, as shown below:
  
     [gestures]     [gestures]
Line 452: Line 497:
     TabPrevious=SW;     TabPrevious=SW;
     TabNext=SE;     TabNext=SE;
- 
-Separated by ; the right-hand values are cardinal directions, (W)est, (E)east, (N)orth, (S)outh. You can also combine eg. WE for West East. 
  
 Additionally, there are programs allowing mouse gestures system-wide, for example [[http://easystroke.wiki.sourceforge.net/|EasyStroke]]. Additionally, there are programs allowing mouse gestures system-wide, for example [[http://easystroke.wiki.sourceforge.net/|EasyStroke]].
Line 506: Line 549:
 Customize as needed: Customize as needed:
  
-<code>a[href]:hover {+<code css>a[href]:hover {
             text-decoration: none !important;             text-decoration: none !important;
         }         }
Line 521: Line 564:
         }</code>         }</code>
  
-===== Understanding WebKit Version Numbers =====+=== Tweaking fonts via CSS ===
  
-WebKit is the core of the Midori browser and often shows up in bug reports. Because WebKit is a complex piece of software and compatible with various libraries, its version numbers and naming schemes are not always clear to end-usersRead on and be enlightened:+If changing system-wide font settings isn't bringing the desired results or rendering should be tweaked only for websites CSS can be an alternative. Add the following to **~/.local/share/midori/styles**, then restart Midori and make sure that it is enabled Tools → Userstyles. 
 + 
 +Customize as needed: 
 + 
 +<code css>* { 
 +    font-smooth:always; 
 +    -webkit-font-smoothing: antialiased; 
 +    text-rendering: optimizeLegibility 
 +}</code> 
 + 
 +====== Midori Architecture ====== 
 + 
 +Midori stands on the shoulders of three giants in particular: the software libraries [[http://www.gtk.org/|GTK+]], [[http://webkitgtk.org/|WebKitGTK+]], and [[https://developer.gnome.org/libsoup/|libsoup]]. GTK+ provides the buttons, windows and menus, WebKitGTK+ draws and controls web pages, and libsoup downloads those pages. 
 + 
 +WebKitGTK+ itself uses two other important libraries: [[https://www.webkit.org/projects/javascript/index.html|JavaScriptCore]], a WebKit project which runs scripts on web pages; and [[http://gstreamer.freedesktop.org/|GStreamer]], which plays HTML5 video and audio. 
 +===== WebKit Version Numbers ===== 
 + 
 +WebKit is the core of the Midori browserand it determines how web pages are rendered. Because WebKit is a complex piece of software and compatible with various libraries, its version numbers and naming schemes can at times be confusing.
  
 WebKit itself is a library which works in many environments, such as Windows, OS X, and various Linux DE. There are different "ports", one of which corresponds to each of these environments, and each of which is slightly different in bugs and features at any given time. The WebKit port used by Midori (because Midori is built with GTK+) is WebKitGTK+. WebKit itself is a library which works in many environments, such as Windows, OS X, and various Linux DE. There are different "ports", one of which corresponds to each of these environments, and each of which is slightly different in bugs and features at any given time. The WebKit port used by Midori (because Midori is built with GTK+) is WebKitGTK+.
Line 531: Line 591:
 WebKit has a "new API layer ... designed from the ground up to support a split process model"--so pages can crash without the entire browser crashing. This layer is called WebKit2, and for WebKitGTK+ it requires building against GTK+3, producing a library file called libwebkit2gtk-3.0.so. WebKit has a "new API layer ... designed from the ground up to support a split process model"--so pages can crash without the entire browser crashing. This layer is called WebKit2, and for WebKitGTK+ it requires building against GTK+3, producing a library file called libwebkit2gtk-3.0.so.
  
-The version of WebKitGTK+ is only interesting from the standpoint of which API features were available and which bugs were present in that particular release; it's best checked by visiting about:version.+To find out the version of WebKitGTK+ your build of Midori is using, visit about:version.
  
 === Version Number Interactions === === Version Number Interactions ===
  
-WebKit2 can be built even with quite old WebKit versions, though Midori's WebKit2 support requires version 2.0.0 or newer of WebKit. Current versions of WebKitGTK+ continues to support GTK+2 and GTK+3 (the latter since 1.4.x or so). As stated above, the WebKit2 API layer is only available with GTK+3.+The WebKit2 API layer is available from fairly old WebKit versions through the presentbut Midori's WebKit2 support requires version 2.0.0 or newer of WebKitGTK+. Current versions of WebKitGTK+ continue to support GTK+2 and GTK+3 (the latter since 1.4.x or so). As stated above, the WebKit2 API layer is only available with GTK+3.
  
 Midori's support for WebKit2 is still provisional, and likely unsuitable for real-world daily usage; much work is being done in this area so that Midori can use WebKit2 by default at some point in the future. Midori's support for WebKit2 is still provisional, and likely unsuitable for real-world daily usage; much work is being done in this area so that Midori can use WebKit2 by default at some point in the future.
 +
 +====== Midori and mediaHerald ======
 +
 +
 +mediaHerald is a dbus service (/org/midori/mediaHeraldallow) users to connect to dbus and check the titme and url of the video that midori plays in **YOUTUBE**, **VIMEO** or **DAILYMOTION**, the extension which does the work is called webmedia-now-playing.
 +
 +If you want to get the video title and the uri is easy more than easy :-) .
 +<code bash>
 +#!/bin/sh
 +
 +eval $(dbus-send --session --print-reply --dest=org.midori.mediaHerald /org/midori/mediaHerald org.freedesktop.DBus.Properties.GetAll string:"org.midori.mediaHerald" | awk '
 +    /string  *"VideoTitle/{
 +        while (1) {
 +            getline line
 +            if (line ~ /string "/)
 +                sub(/.*string /, "TITLE=", line)
 +                print line
 +                break
 +            }
 +        }
 +        /string  *"VideoUri/{
 +        while (1) {
 +            getline line
 +            if (line ~ /string "/)
 +                sub(/.*string /, "URI=", line)
 +                print line
 +                break
 +            }
 +        }
 +    ')
 +echo "Midori is now playing: $TITLE ,the uri is: $URI"
 +</code>