Recent from talks
Nothing was collected or created yet.
Surf (web browser)
View on Wikipedia
| surf | |
|---|---|
surf does not include graphical control elements | |
| Original author | Christoph Lohmann |
| Developers | Christoph Lohmann, Enno Boland, Troels Henriksen, et al. |
| Initial release | 10 September 2009 |
| Stable release | 2.1[1] |
| Written in | C |
| Engine | WebKitGTK |
| Operating system | Unix-like |
| Type | Minimalist web browser |
| License | MIT |
| Website | surf |
| Repository | |
surf is a minimalist web browser developed by suckless.org. The user interface does not include any graphical control elements; it is controlled via keyboard shortcuts or external tools, which may manipulate its behavior by setting its window's properties.
Features
[edit]surf is intentionally limited in its set of features. The only graphical elements the browser has are the page view itself and, optionally, the scrollbars. The main functionality of the browser is implemented in third-party WebKitGTK library, and the rest of the program only provides a window and a set of XProperties to control its behavior. While surf supports cookies, it does not include some other common features of web browsers such as tabbed browsing, bookmarks or ad filtering, though all can be implemented with patches, scripts, or external programs, with instructions available in surf's homepage. Instead of an address bar, the _SURF_URI XProperty has to be set to user-requested uniform resource locator (URL) for the browser to follow it. By default, surf's configuration includes a keyboard shortcut for calling the dmenu program to prompt the user for a URL.[2][3][4][5]
Most configuration of surf is performed by editing its configuration header file in its source code, and then (re)compiling it. Some settings can be changed without recompiling, via command-line arguments or hotkeys.[2][4]
See also
[edit]- Uzbl (discontinued)
- xombrero (discontinued)
- qutebrowser
References
[edit]- ^ "surf".
- ^ a b Kopta, Martin (16 June 2014), "Surf: minimalistický prohlížeč podle pravidel Suckless" [Surf: minimalist browser from Suckless project], Root.cz (in Czech), retrieved 13 July 2014
- ^ Vervloesem, Koen (14 December 2011), "Xxxterm: Surfing like a Vim pro", LWN.net, Comparison, retrieved 13 July 2014
- ^ a b Zobnin, Eugeniy (July 2012), "Всё гениальное просто: переходим на софт проекта suckless.org" [Everything great is simple: transitioning to software from suckless.org], Xakep (in Russian), vol. 7, no. 162, pp. 106–109
- ^ Perrin, Chad (6 June 2011), "If you thought Uzbl was a minimal WebKit browser, you should see surf", TechRepublic, archived from the original on 14 June 2014, retrieved 13 July 2014
External links
[edit]Surf (web browser)
View on GrokipediaHistory
Initial development
Surf was initially developed in 2009 by Christoph Lohmann as a project under the suckless.org community, with the goal of creating a web browser that exemplified the group's emphasis on minimalism, simplicity, and adherence to Unix philosophy principles such as doing one thing well and avoiding unnecessary complexity.[5] The browser was conceived as a lightweight tool for advanced users, particularly those employing tiling window managers, by leveraging existing technologies to minimize custom code and reduce resource usage while providing essential browsing functionality.[1] Early work focused on integrating the WebKit rendering engine with the GTK+ toolkit to enable basic website display and link navigation, without graphical user interface elements like toolbars or menus that could introduce bloat.[4] This approach allowed surf to support the XEmbed protocol from the outset, facilitating its embedding into other applications and seamless operation within dynamic window management environments.[1] Development discussions on the suckless mailing list in mid-2009 highlighted initial efforts to build and package surf for distributions like Arch Linux, indicating active prototyping and community involvement by July of that year.[6] The first version of surf was released on September 10, 2009, introducing its core keyboard-driven interface and configuration via source code edits, which aligned with suckless practices of favoring compile-time customization over runtime options.[7] Contributors such as Enno Boland and Troels Henriksen joined subsequent efforts, but Lohmann led the foundational implementation, ensuring the browser remained under 10,000 lines of code to maintain clarity and ease of maintenance.[5] This initial phase established surf's reputation as a "suckless" alternative to feature-heavy browsers, prioritizing conceptual efficiency over exhaustive feature sets.Major releases and updates
Surf's initial development culminated in its first release, version 0.1, on September 10, 2009, providing basic web rendering and navigation capabilities using WebKit/GTK+. Subsequent early updates followed rapidly, with version 0.2 released on October 17, 2009, introducing initial stability improvements, and version 0.3 on December 3, 2009, enhancing link handling and embedding support via the XEmbed protocol.[8][9] Throughout the 2010s, surf evolved primarily through incremental git commits rather than frequent numbered releases, emphasizing minimalism and keyboard-driven interaction. A key milestone occurred in 2014–2015, when the project underwent a rewrite to adopt WebKit2/GTK+, replacing the older WebKit1 backend for better security, performance, and modern web standards compliance; a legacy WebKit1 branch remains available for compatibility.[8][10] Notable feature additions included WebGL support in September 2017, enabling hardware-accelerated graphics rendering, and ephemeral mode in October 2018, which disables disk writes for enhanced privacy without persistent storage.[8] The most recent stable release, version 2.1, was tagged on May 8, 2021, incorporating refined configuration options and bug fixes for WebKit2 integration.[3][8] Post-release development has remained active, with updates such as a dark mode toggle in April 2022 for improved low-light usability, compatibility with WebKit 4.1 in November 2023 to support contemporary web technologies, PDF rendering capabilities in September 2024 via built-in viewers, and PDF-JS-viewer configuration enhancements in April 2025 for JavaScript-based document handling.[8] These changes reflect surf's ongoing focus on lightweight maintenance and targeted enhancements, distributed via git snapshots rather than periodic tarballs.[1]Design principles
Minimalist philosophy
Surf, as a product of the suckless.org project, adheres strictly to the suckless philosophy, which emphasizes simplicity, clarity, and frugality in software design to serve advanced users who prioritize efficiency over superficial features. This approach critiques bloated, feature-heavy software prevalent in mainstream browsers, arguing that excessive complexity leads to unreliability and maintenance challenges; instead, suckless advocates for minimal codebases where "the more code lines you have removed, the more progress you have made."[5] In surf's case, this manifests as a deliberate rejection of non-essential elements, resulting in a browser with under 10,000 lines of code that focuses solely on core web rendering and navigation, leveraging WebKit2/GTK+ for backend efficiency without adding proprietary or redundant layers.[1] The minimalist ethos in surf prioritizes a distraction-free browsing experience, exemplified by the absence of tabs, toolbars, or graphical menus, which forces users to rely on keyboard shortcuts for all interactions—such as Ctrl+G for URL entry. This design choice aligns with suckless tenets by targeting experienced users familiar with tiling window managers like dwm, where multiple browser instances can handle separate pages, enhancing focus and reducing cognitive overhead.[1] By embedding surf via the XEmbed protocol, it integrates seamlessly into minimal desktop environments, embodying frugality in resource use—typically consuming far less memory and CPU than feature-rich alternatives like Firefox or Chrome during basic tasks.[1] This philosophy extends to configuration, where surf's defaults are intentionally sparse, encouraging users to apply patches only for necessary extensions rather than bloating the core; for instance, adblocking or download management are handled externally via scripts or tools like dmenu, preserving the browser's purity.[5] Such restraint ensures high customizability without compromising the underlying simplicity, positioning surf as a philosophical counterpoint to the "web bloat" criticized by suckless, where corporate-driven feature creep undermines usability and performance.[11]Keyboard-centric interaction
Surf's keyboard-centric interaction stems from its core design philosophy, which prioritizes simplicity and efficiency by eliminating graphical controls such as toolbars, buttons, and menus. Instead, all primary operations—ranging from navigation and scrolling to toggling features—are handled through keyboard shortcuts, enabling users to browse without a mouse and minimizing visual clutter. This approach aligns with the suckless.org ethos of creating lightweight software that empowers users through direct, low-overhead input methods.[1][12] The default keybindings, configurable via theconfig.h file, rely on the Control key (defined as MODKEY with GDK_CONTROL_MASK) combined with letters or other modifiers like Shift for actions. For instance, Ctrl+g opens a prompt for entering a new URL, while Ctrl+h and Ctrl+l navigate backward and forward in history, respectively. Scrolling is facilitated by percentage-based increments: Ctrl+j and Ctrl+k adjust vertical position by 10%, with larger jumps via Ctrl+Space (down 50%) and Ctrl+b (up 50%); horizontal scrolling uses Ctrl+i (right 10%) and Ctrl+u (left 10%).[13][14]
Zooming and content manipulation are similarly keyboard-driven. Users can zoom in with Ctrl+Shift+k or Ctrl++, zoom out with Ctrl+Shift+j or Ctrl+-, and reset to default with Ctrl+Shift+q. Text selection and clipboard operations include Ctrl+p to copy the current URL to the clipboard and Ctrl+y to paste from it. Search functionality is activated via Ctrl+f or Ctrl+/ to spawn a find prompt, with Ctrl+n and Ctrl+Shift+n to navigate to the next or previous match.[13]
A range of toggles for browser features further underscores the keyboard focus. F11 enters fullscreen mode, Ctrl+Shift+o opens the web inspector, and Esc or Ctrl+c stops page loading. Other options include Ctrl+Shift+c for caret browsing (enabling keyboard text navigation), Ctrl+Shift+g to toggle geolocation permissions, Ctrl+Shift+s for JavaScript, Ctrl+Shift+i for image loading, and Ctrl+Shift+b for scrollbars. Additional toggles cover cookie policy (Ctrl+Shift+a), strict TLS (Ctrl+Shift+t), stylesheet disabling (Ctrl+Shift+m), and dark mode (Ctrl+Shift+d). These bindings allow comprehensive control over rendering and privacy settings without interrupting workflow.[13]
For enhanced usability, surf supports external patches and scripts that extend keyboard interaction, such as link hinting, which overlays labels on clickable elements for quick selection via single keystrokes. The browser's integration with tools like dmenu for URL prompts or tabbed for multi-instance management further reinforces keyboard efficiency, as users can bind these to custom shortcuts in their environment. This modular extensibility ensures that surf remains adaptable for power users while maintaining its core keyboard-first paradigm.[15][12]
| Category | Keybinding | Action |
|---|---|---|
| Navigation | Ctrl+g | Enter new URL |
Ctrl+h | Go back | |
Ctrl+l | Go forward | |
Ctrl+r | Reload | |
Ctrl+Shift+r | Reload (bypass cache) | |
| Scrolling | Ctrl+j | Scroll down 10% |
Ctrl+k | Scroll up 10% | |
Ctrl+Space | Scroll down 50% | |
Ctrl+b | Scroll up 50% | |
Ctrl+i | Scroll right 10% | |
Ctrl+u | Scroll left 10% | |
| Zooming | Ctrl+Shift+k or Ctrl++ | Zoom in |
Ctrl+Shift+j or Ctrl+- | Zoom out | |
Ctrl+Shift+q | Reset zoom | |
| Search & Find | Ctrl+f or Ctrl+/ | Find prompt |
Ctrl+n | Find next | |
Ctrl+Shift+n | Find previous | |
| Clipboard | Ctrl+p | Copy URL |
Ctrl+y | Paste | |
| Toggles | F11 | Fullscreen |
Esc or Ctrl+c | Stop loading | |
Ctrl+Shift+a | Toggle cookies | |
Ctrl+Shift+b | Toggle scrollbars | |
Ctrl+Shift+c | Toggle caret browsing | |
Ctrl+Shift+d | Toggle dark mode | |
Ctrl+Shift+g | Toggle geolocation | |
Ctrl+Shift+i | Toggle images | |
Ctrl+Shift+m | Toggle stylesheet | |
Ctrl+Shift+o | Toggle inspector | |
Ctrl+Shift+s | Toggle JavaScript | |
Ctrl+Shift+t | Toggle strict TLS | |
| Other | Ctrl+Shift+p | |
Ctrl+t | Show certificate |
Features
Core browsing capabilities
Surf is a minimalist web browser that leverages the WebKit2/GTK+ rendering engine to display web pages and render modern web standards, including HTML5, CSS3, and JavaScript, enabling compatibility with contemporary websites. Surf's development version, as of 2025, includes support for viewing PDF files natively, added in 2024, enhancing its rendering of document formats beyond standard web content.[1][16][17] It supports basic navigation by following hyperlinks through mouse clicks or keyboard-driven commands, without any graphical user interface elements such as address bars, toolbars, or menus.[1] Core functionality emphasizes direct interaction with rendered content, allowing users to load pages via command-line arguments or keyboard shortcuts, while relying on external tools like dmenu for URL input.[4] Navigation and page management are handled entirely through keyboard shortcuts, promoting a keyboard-centric workflow. Key commands include Ctrl+h to go back in history, Ctrl+l to go forward, Ctrl+g to open a URL input prompt (requiring dmenu), and Ctrl+p to load a URI from the primary selection (clipboard).[4] Page reloading is achieved with Ctrl+r (from cache) or Ctrl+Shift+r (bypassing cache), and loading can be stopped with the Escape key.[4] The browser supports the XEmbed protocol, allowing it to be embedded within other applications for seamless integration.[1][16] Scrolling and viewing adjustments are also shortcut-based, with Ctrl+j to scroll down, Ctrl+k to scroll up, Ctrl+Space to scroll down one page, Ctrl+b to scroll up one page, Ctrl+u to scroll left, and Ctrl+i to scroll right.[4] Text searching uses Ctrl+f or Ctrl+/ to open the search bar, Ctrl+n for the next result, and Ctrl+Shift+n for the previous.[4] Zooming capabilities include Ctrl-+ or Ctrl+Shift+k to zoom in, Ctrl+- or Ctrl+Shift+j to zoom out, and Ctrl+Shift+q to reset to normal zoom.[4] Additional utilities encompass Ctrl+y to copy the current URI, Ctrl+t to display the TLS certificate, and F11 to toggle fullscreen mode.[4] While surf provides these foundational browsing tools, it intentionally omits advanced features like built-in tab management or download handling, directing users to external programs or patches for extensions.[1] This design ensures lightweight operation, with the browser focusing solely on rendering and basic traversal without persistent state beyond the current session.[16]Built-in limitations and workarounds
Surf, adhering to its minimalist design, intentionally omits many conventional browser features to reduce complexity and resource usage, relying instead on user configuration, external tools, and community patches for enhancements.[1][16] A primary limitation is the absence of native tabbed browsing, restricting users to single-page sessions per instance. This design choice promotes focused navigation but hinders multitasking on complex sites. The recommended workaround involves integrating the sucklesstabbed tool, which embeds multiple surf instances as tabs; for example, launching tabbed -c surf -e allows tab management while closing the container upon the last tab's exit.[1][16]
Surf lacks built-in bookmarking, history tracking, and an integrated search bar, requiring manual URI entry via keyboard shortcuts like Ctrl+G. Community patches address these gaps: the "simple bookmarking" patch adds dmenu-based bookmark addition and retrieval using Ctrl+M, storing entries in ~/.surf/bookmarks. Similarly, external scripts like bmarks provide bookmarking with tagging and URL autocompletion, obviating the need for certain patches. For history, a dedicated patch logs URIs to a file for later review.[18][19][9]
Downloads are not handled natively, defaulting to external utilities like wget or curl invoked via configuration-defined commands in config.h. Patches such as "built-in downloading" integrate direct support, eliminating external dependencies, while "download with console display" adds progress visualization. Users can customize download paths and tools during recompilation to suit preferences.[20][21]
Rendering inconsistencies, such as fuzzy fonts on sites like GitHub, arise from WebKitGTK dependencies and can degrade readability. Workarounds include installing alternative font packages like gnu-free-fonts or editing ~/.config/fontconfig/fonts.conf to blacklist problematic fonts, ensuring crisp display without altering surf's core. Additionally, surf's development has seen no stable releases since 2021, prompting users to adopt the git version (surf-git) for bug fixes, WebKit updates, and new features.[16]
Plugin support is minimal and prone to WebKit bugs, such as crashes on sites requiring extensions for media or ads. Disabling plugins via the -p flag or enableplugins = FALSE in config.h stabilizes performance, with users turning to external proxies or userscripts for advanced functionality. These limitations underscore surf's philosophy: core browsing via WebKit2/GTK+ with extensibility through patches and scripts, fostering a lightweight yet customizable experience for keyboard-centric users.[1][16]
Technical implementation
Rendering engine and dependencies
Surf employs the WebKit2 rendering engine, a modern, multi-process architecture designed for secure and efficient web content rendering, integrated via the WebKit2GTK library to ensure compatibility with the GTK+ toolkit.[1] This choice aligns with surf's minimalist ethos by leveraging WebKit2's robust support for contemporary web standards, including HTML5, CSS3, and JavaScript execution, while minimizing the browser's native codebase.[8] WebKit2GTK specifically provides a GObject-based API that allows surf to embed web views directly into GTK+ applications, handling tasks such as page navigation, scripting, and media playback without additional UI layers. The primary dependency is the WebKitGTK API version 4.1 (provided by WebKitGTK 2.38 and later releases), which encapsulates the core rendering components, including the layout engine (based on KHTML heritage but evolved for performance) and the JavaScriptCore engine for dynamic content processing. Developers recommend compiling a custom WebKit2GTK build to address potential distribution-specific packaging issues, ensuring optimal integration and avoiding bloat from unnecessary features.[1] Supporting this, GTK+ 3.0 is required for windowing, event handling, and embedding the WebKit2 web view, providing the foundational graphical interface that surf extends minimally. Additional runtime dependencies include GCR-3 for secure credential storage and management, particularly useful for handling authentication in web sessions; Gio-2.0 for asynchronous I/O operations like file downloads and network requests; and GLib's GThread-2.0 for multi-threading support to prevent UI blocking during intensive rendering tasks. For display output on X11-based systems, the X11 library is essential, enabling surf's lightweight window management without relying on heavier compositors. The web extension module, built as a shared object (webext-surf.so), further depends on WebKit2GTK's web extension APIs to inject custom scripts and handle browser-specific behaviors, such as download management and URI schemes. These dependencies collectively ensure surf remains lean—typically under 10 MB in binary size—while delivering full-featured browsing capabilities.[1]Configuration and customization
Surf, adhering to the suckless software philosophy, is primarily configured by editing theconfig.h header file, which is generated by copying the provided config.def.h template, followed by recompiling and reinstalling the browser.[13] This approach allows users to define default WebKit settings, file paths, key bindings, and site-specific behaviors at compile time.[13] For instance, directories for styles, certificates, cache, and cookies can be set via variables like styledir (default: "~/.surf/styles/"), certdir (default: "~/.surf/certificates/"), cachedir (default: "~/.surf/cache/"), and cookiefile (default: "~/.surf/cookies.txt").[13]
A wide array of WebKit parameters can be toggled or adjusted in the parameters array within config.h, enabling control over features such as JavaScript (JavaScript: 1), image loading (LoadImages: 1), disk caching (DiskCache: 1), geolocation (Geolocation: 0), and zoom level (ZoomLevel: 1.0). As of April 2025, additional options include PDF-JS viewer support for handling PDF content.[13][22] Site-specific overrides are supported through arrays like uriparams, which apply regex-matched parameter changes (e.g., disabling JavaScript on suckless.org), and styles, which load custom CSS files based on URL patterns (e.g., "default.css" for all sites).[13] Custom certificates can similarly be mapped via the certs array for specific domains.[13] Keyboard shortcuts are defined in the keys array using modifier-key-function mappings, such as MODKEY + 'g' to prompt for a new URI, while mouse actions are configurable in the buttons array, like middle-click on links to open in a new window.[13]
Runtime adjustments are available through command-line options, as detailed in the surf(1) manual, allowing overrides without recompilation.[4] Examples include -s to disable JavaScript, -i to disable images, -z 1.5 to set zoom level, -u "Custom Agent" for user agent strings, and -c /path/to/cookies.txt for cookie files.[4] Environment variables like SURF_USERAGENT and http_proxy also influence startup behavior, setting the user agent or HTTP proxy if defined.[4] Cookie policies can be specified via -a (e.g., "@Aa" to accept all but deny third-party cookies).[4]
For extended customization beyond built-in options, users apply patches—diff files that modify the source code—to add features like tabbed browsing, download managers, or ad blocking.[23] The official patches repository includes options such as the Proxy Config patch, which adds proxy mode settings (e.g., CustomProxy with a URL or NoProxy) directly to config.h.[24] Other notable patches enable user stylesheets, vertical tabs, or integration with external tools like tabbed for multi-window management, all requiring application via patch commands before recompilation.[23] This modular patching system fosters community-driven enhancements while maintaining the browser's minimal core.[23]
