https://wiki.archlinux.org/api.php?action=feedcontributions&user=Varlogtim&feedformat=atomArchWiki - User contributions [en]2024-03-28T20:48:42ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Syslinux&diff=483000Syslinux2017-07-26T23:58:01Z<p>Varlogtim: /* Examples */ Clarity on relative paths</p>
<hr />
<div>[[Category:Boot loaders]]<br />
[[es:Syslinux]]<br />
[[fr:Syslinux]]<br />
[[it:Syslinux]]<br />
[[ja:Syslinux]]<br />
[[ru:Syslinux]]<br />
[[tr:Syslinux]]<br />
[[zh-hans:Syslinux]]<br />
{{Related articles start}}<br />
{{Related|Arch boot process}}<br />
{{Related|Boot loaders}}<br />
{{Related articles end}}<br />
<br />
[[Wikipedia:SYSLINUX|Syslinux]] is a collection of boot loaders capable of booting from drives, CDs, and over the network via [[PXE]]. Some of the supported [[file systems]] are [[Wikipedia:File Allocation Table|FAT]], [[Wikipedia:ext2|ext2]], [[ext3]], [[ext4]], and uncompressed single-device [[Btrfs]].<br />
<br />
{{Warning|1=As of Syslinux 6.03, some of the features of the supported file systems are not supported by the bootloader; for example, the "64bit" feature of ext4 (boot) volumes. See [http://www.syslinux.org/wiki/index.php/Filesystem] for more information.}}<br />
<br />
{{Note|Syslinux, by itself, cannot access files from partitions other than its own. See [[#Chainloading]] on how to work around this.}}<br />
<br />
== BIOS Systems ==<br />
<br />
=== Boot process overview ===<br />
<br />
# '''Stage 1 : Part 1''' - '''Load MBR''' - At boot, the BIOS loads the 440 byte [[MBR]] boot code at the start of the disk ({{ic|/usr/lib/syslinux/bios/mbr.bin}} or {{ic|/usr/lib/syslinux/bios/gptmbr.bin}}). <br />
# '''Stage 1 : Part 2''' - '''Search active partition'''. The '''Stage 1 MBR boot code''' looks for the partition that is marked as active (boot flag in MBR disks). Let us assume this is the {{ic|/boot}} partition, for example.<br />
# '''Stage 2 : Part 1''' - '''Execute volume boot record''' - The '''Stage 1 MBR boot code''' executes the Volume Boot Record (VBR) of the {{ic|/boot}} partition. In the case of Syslinux, the VBR boot code is the starting sector of {{ic|/boot/syslinux/ldlinux.sys}} which is created by the {{ic|extlinux --install}} command. Note that {{ic|ldlinux.sys}} is not the same as {{ic|ldlinux.c32}}.<br />
# '''Stage 2 : Part 2''' - '''Execute {{ic|/boot/syslinux/ldlinux.sys}}''' - The VBR will load the rest of {{ic|/boot/syslinux/ldlinux.sys}}. The sector location of {{ic|/boot/syslinux/ldlinux.sys}} should not change, otherwise syslinux will not boot. {{Note|In the case of [[Btrfs]], the above method will not work since files move around resulting in changing of the sector location of {{ic|ldlinux.sys}}. Therefore, in Btrfs the entire {{ic|ldlinux.sys}} code is embedded in the space following the VBR and is not installed at {{ic|/boot/syslinux/ldlinux.sys}} unlike the case of other filesystems.}}<br />
# '''Stage 3''' - '''Load {{ic|/boot/syslinux/ldlinux.c32}}''' - The {{ic|/boot/syslinux/ldlinux.sys}} will load the {{ic|/boot/syslinux/ldlinux.c32}} (core module) that contains the rest of the '''core''' part of syslinux that could not be fit into {{ic|ldlinux.sys}} (due to file-size constraints). The {{ic|ldlinux.c32}} file should be present in every Syslinux installation and should match the version of {{ic|ldlinux.sys}} installed in the partition. Otherwise Syslinux will fail to boot. See http://bugzilla.syslinux.org/show_bug.cgi?id=7 for more info.<br />
# '''Stage 4''' - '''Search and Load configuration file''' - Once Syslinux is fully loaded, it looks for {{ic|/boot/syslinux/syslinux.cfg}} (or {{ic|/boot/syslinux/extlinux.conf}} in some cases) and loads it if it is found. If no configuration file is found, you will be dropped to a Syslinux {{ic|boot:}} prompt. This step and the rest of '''non-core''' parts of Syslinux ({{ic|/boot/syslinux/*.c32}} modules, excluding {{ic|lib*.c32}} and {{ic|ldlinux.c32}}) require {{ic|/boot/syslinux/lib*.c32}} (library) modules to be present (http://www.syslinux.org/wiki/index.php/Common_Problems#ELF). The {{ic|lib*.c32}} library modules and non-core {{ic|*.c32}} modules should match the version of {{ic|ldlinux.sys}} installed in the partition.<br />
<br />
=== Installation on BIOS ===<br />
<br />
[[Install]] the {{Pkg|syslinux}} package.<br />
<br />
{{Note|<br />
* {{Pkg|gptfdisk}} is required for [[wikipedia:GUID_Partition_Table|GPT]] support using the automated script.<br />
* If your boot partition is FAT, you will also need {{Pkg|mtools}}.<br />
}}<br />
<br />
Installing the package is not the same as installing the bootloader. After installing the relevant package(s), the bootloader code itself needs to be installed (to the adequate area, usually the VBR) so to be able to boot the system; the following sections provide alternative instructions depending on the characteristics of your particular system.<br />
<br />
==== Automatic Install ====<br />
<br />
{{Note|The {{ic|syslinux-install_update}} script is Arch specific, and is not provided/supported by Syslinux upstream. Please direct any bug reports specific to the script to the Arch Bug Tracker and not upstream.<br />
}}<br />
<br />
* After executing the {{ic|syslinux-install_update}} script, do not forget to edit {{ic|/boot/syslinux/syslinux.cfg}} by following [[#Configuration]] and [[#Kernel parameters]].<br />
<br />
{{Warning|The {{ic|syslinux-install_update}} script sets a default root partition that possibly will not match your particular system. It is important to point Syslinux to the correct root partition by editing {{ic|/boot/syslinux/syslinux.cfg}}, or the OS will fail to boot. See [[#Kernel parameters]].}}<br />
<br />
The {{ic|syslinux-install_update}} script will install Syslinux, copy {{ic|*.c32}} modules to {{ic|/boot/syslinux}}, set the boot flag and install the boot code in the MBR. It can handle [[MBR]] and [[GPT]] disks along with software RAID:<br />
<br />
If you use a separate boot partition, make sure that it is mounted. Check with {{ic|lsblk}}; if you do not see a {{ic|/boot}} mountpoint, mount it before you go any further.<br />
<br />
* Run {{ic|syslinux-install_update}} with flags: {{ic|-i}} (install the files), {{ic|-a}} (mark the partition ''active'' with the ''boot'' flag), {{ic|-m}} (install the ''MBR'' boot code): {{bc|# syslinux-install_update -i -a -m}} If this command fails with ''Syslinux BIOS install failed'', the problem is likely that the {{ic|extlinux}} binary could not find the partition containing {{ic|/boot}}: <br />
<br />
{{hc|# extlinux --install /boot/syslinux/|<br />
extlinux: cannot find device for path /boot/syslinux<br />
extlinux: cannot open device (null)<br />
}} <br />
<br />
This can happen, for example, when upgrading from [[LILO]] which, while booting a current custom kernel, turned a kernel command line parameter of say {{ic|1=root=/dev/sda1}} into its numeric equivalent {{ic|1=root=801}}, as evidenced by {{ic|/proc/cmdline}} and the output of the {{ic|mount}} command. Remedy the situation by either continuing with the manual install described below while specifying {{ic|1=--device=/dev/sda1}} to {{ic|extlinux}}, or simply by first rebooting into a stock Arch Linux kernel; its use of an initramfs avoids the problem.<br />
<br />
{{Note|<br />
* If you rebooted your system now, you would get a Syslinux prompt. To automatically boot your system or get a boot menu, you need to create (edit) the configuration file.<br />
* If you are on another root directory (e.g. from an install disk) install SYSLINUX by directing to the chroot:<br />
# syslinux-install_update -i -a -m -c /mnt/<br />
}}<br />
<br />
* Now is the time to edit {{ic|/boot/syslinux/syslinux.cfg}} by following [[#Configuration]] and [[#Kernel parameters]].<br />
<br />
==== Manual install ====<br />
<br />
{{Note|<br />
* If you are unsure of which partition table you are using (MBR or GPT), you can check using the following command<br />
# blkid -s PTTYPE -o value /dev/sda<br />
gpt<br />
<br />
* If you are trying to rescue an installed system with a live CD, be sure to [[chroot]] into it before executing these commands. If you do not chroot first, you must prepend all file paths (not {{ic|/dev/}} paths) with the mount point.<br />
}}<br />
<br />
Your boot partition, on which you plan to install Syslinux, must contain a FAT, ext2, ext3, ext4, or Btrfs file system. You should install it on a mounted directory—not a {{ic|/dev/sdXY}} device. You do not have to install it on the root directory of a file system, e.g., with device {{ic|/dev/sda1}} mounted on {{ic|/boot}}. You can install Syslinux in the {{ic|syslinux}} directory:<br />
<br />
# mkdir /boot/syslinux<br />
# cp /usr/lib/syslinux/bios/*.c32 /boot/syslinux/ ## copy ALL the *.c32 files from /usr/lib/syslinux/bios/, DO NOT SYMLINK<br />
# extlinux --install /boot/syslinux/<br />
<br />
After this, proceed to install the Syslinux boot code ({{ic|mbr.bin}} or {{ic|gptmbr.bin}}) to the Master Boot Record 440-byte boot code region (not to be confused with MBR aka msdos partition table) of the disk, as described in the next sections, respectively.<br />
<br />
{{Note|For a partitionless install, there is no need to install the Syslinux boot code to the MBR. You could skip below and jump to [[#Configuration]]. See [https://unix.stackexchange.com/questions/103501/boot-partiotionless-disk-with-syslinux].}}<br />
<br />
===== MBR partition table =====<br />
<br />
See the main article: [[Master Boot Record]].<br />
<br />
Next, you need to mark your boot partition as "active" in your partition table. Applications capable of doing this include {{ic|fdisk}}, {{ic|cfdisk}}, {{ic|sfdisk}}, {{ic|parted/gparted}} ("boot" flag). It should look like this:<br />
{{hc|# fdisk -l /dev/sda|<br />
[...]<br />
Device Boot Start End Blocks Id System<br />
/dev/sda1 * 2048 104447 51200 83 Linux<br />
/dev/sda2 104448 625142447 312519000 83 Linux<br />
}}<br />
<br />
Install the MBR:<br />
# dd bs=440 count=1 if=/usr/lib/syslinux/bios/mbr.bin of=/dev/sda<br />
<br />
An alternative MBR which Syslinux provides is: {{ic|altmbr.bin}}. This MBR does ''not'' scan for bootable partitions; instead, the last byte of the MBR is set to a value indicating which partition to boot from. Here is an example of how {{ic|altmbr.bin}} can be copied into position:<br />
# printf '\x5' | cat /usr/lib/syslinux/bios/altmbr.bin - | dd bs=440 count=1 iflag=fullblock of=/dev/sda<br />
<br />
In this case, a single byte of value 5 (hexadecimal) is appended to the contents of {{ic|altmbr.bin}} and the resulting 440 bytes are written to the MBR on device {{ic|sda}}. Syslinux was installed on the first logical partition ({{ic|/dev/sda5}}) of the disk.<br />
<br />
===== GUID partition table =====<br />
<br />
See the main article: [[GUID Partition Table]].<br />
<br />
Bit 2 of the attributes ("legacy_boot" attribute) needs to be set for the {{ic|/boot}} partition:.<br />
# sgdisk /dev/sda --attributes=1:set:2<br />
<br />
This would toggle the attribute ''legacy BIOS bootable'' on partition 1. To check:<br />
{{hc|<nowiki># sgdisk /dev/sda --attributes=1:show</nowiki>|<br />
1:2:1 (legacy BIOS bootable)<br />
}}<br />
<br />
Install the MBR:<br />
# dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/bios/gptmbr.bin of=/dev/sda<br />
<br />
If this does not work, you can also try:<br />
# syslinux-install_update -i -m<br />
<br />
== UEFI Systems ==<br />
<br />
{{Note|<br />
* {{ic|efi64}} denotes x86_64 UEFI systems, for IA32 (32-bit) EFI replace {{ic|efi64}} with {{ic|efi32}} in the below commands.<br />
<br />
* For Syslinux, the kernel and initramfs files need to be in the [[EFI System Partition]] (aka ESP), as Syslinux does not (currently) have the ability to access files outside its own partition (i.e. outside ESP in this case). For this reason, it is recommended to mount ESP at {{ic|/boot}}.<br />
<br />
* The automatic install script {{ic|/usr/bin/syslinux-install_update}} does not support UEFI install.<br />
<br />
* The configuration syntax of {{ic|syslinux.cfg}} for UEFI is same as that of BIOS.<br />
}}<br />
<br />
=== Limitations of UEFI Syslinux ===<br />
<br />
* UEFI Syslinux application {{ic|syslinux.efi}} cannot be signed by {{ic|sbsign}} (from sbsigntool) for UEFI Secure Boot. Bug report: [http://bugzilla.syslinux.org/show_bug.cgi?id=8]<br />
* Using TAB to edit kernel parameters in UEFI Syslinux menu might lead to garbaged display (text on top of one another). Bug report: [http://bugzilla.syslinux.org/show_bug.cgi?id=9]<br />
* UEFI Syslinux does not support chainloading other EFI applications like {{ic|UEFI Shell}} or {{ic|Windows Boot Manager}}. Enhancement request: [http://bugzilla.syslinux.org/show_bug.cgi?id=17]<br />
* In some cases, UEFI Syslinux might not boot in some Virtual Machines like QEMU/OVMF or VirtualBox or some VMware products/versions and in some UEFI emulation environments like DUET. A Syslinux contributor has confirmed no such issues present on VMware Workstation 10.0.2 and Syslinux-6.02 or later. Bug reports: [http://bugzilla.syslinux.org/show_bug.cgi?id=21], [http://bugzilla.syslinux.org/show_bug.cgi?id=23] and [http://bugzilla.syslinux.org/show_bug.cgi?id=72]<br />
* Memdisk is not available for UEFI. Enhancement request: [http://bugzilla.syslinux.org/show_bug.cgi?id=30]<br />
<br />
=== Installation on UEFI ===<br />
<br />
{{Note|In the commands related to UEFI, {{ic|''esp''}} denotes the mountpoint of the [[EFI System Partition]] aka ESP.}}<br />
<br />
* Install the {{Pkg|syslinux}} and {{Pkg|efibootmgr}} packages from the [[official repositories]]. Then setup Syslinux in the ESP as follows:<br />
<br />
* Copy Syslinux files to ESP:<br />
<br />
# mkdir -p ''esp''/EFI/syslinux<br />
# cp -r /usr/lib/syslinux/efi64/* ''esp''/EFI/syslinux/<br />
<br />
* Setup boot entry for Syslinux using [[Unified Extensible Firmware Interface#efibootmgr|efibootmgr]]:<br />
<br />
# efibootmgr -c -d /dev/sdX -p Y -l /EFI/syslinux/syslinux.efi -L "Syslinux"<br />
<br />
where {{ic|/dev/sdXY}} is the partition containing the bootloader.<br />
<br />
* Create or edit {{ic|''esp''/EFI/syslinux/syslinux.cfg}} by following [[#Configuration]].<br />
<br />
{{Note|The config file for UEFI is {{ic|''esp''/EFI/syslinux/syslinux.cfg}}, not {{ic|/boot/syslinux/syslinux.cfg}}. Files in {{ic|/boot/syslinux/}} are BIOS specific and not related to UEFI Syslinux.}}<br />
<br />
{{Note|When booted in BIOS mode, {{Pkg|efibootmgr}} will not be able to set EFI nvram entry for {{ic|/efi/syslinux/syslinux.efi}}. To work around, place resources at the default EFI location: {{ic|''esp''/EFI/syslinux/* -> ''esp''/EFI/BOOT/*}} and {{ic|''esp''/EFI/syslinux/syslinux.efi -> ''esp''/EFI/BOOT/bootx64.efi}}<br />
}}<br />
<br />
== Configuration ==<br />
<br />
The Syslinux configuration file, {{ic|syslinux.cfg}}, should be created in the same directory where you installed Syslinux. In our case, {{ic|/boot/syslinux/}} for BIOS systems and {{ic|''esp''/EFI/syslinux/}} for UEFI systems.<br />
<br />
The bootloader will look for either {{ic|syslinux.cfg}} (preferred) or {{ic|extlinux.conf}}<br />
<br />
{{Tip|<br />
* Instead of {{ic|LINUX}}, the keyword {{ic|KERNEL}} can also be used. {{ic|KERNEL}} tries to detect the type of the file, while {{ic|LINUX}} always expects a Linux kernel. <br />
* {{ic|TIMEOUT}} value is in units of '''0.1 seconds'''.<br />
}}<br />
<br />
=== Examples ===<br />
<br />
{{Note|<br />
* Any configuration file found in the examples needs to be edited to set the proper kernel parameters. See section [[#Kernel parameters]].<br />
* Please, pay close attention to the paths. The examples may not be suitable for your installation, especially when using UEFI. MBR paths are relative to /boot/syslinux, UEFI paths are relative to /boot/EFI/syslinux.<br />
}}<br />
<br />
==== Boot prompt ====<br />
This is a simple configuration file that will show a {{ic|boot:}} prompt and will automatically boot after 5 seconds. If you want to boot directly without seeing a prompt, set {{ic|PROMPT}} to {{ic|0}}.<br />
<br />
Configuration:<br />
{{hc|/boot/syslinux/syslinux.cfg|<nowiki><br />
PROMPT 1<br />
TIMEOUT 50<br />
DEFAULT arch<br />
<br />
LABEL arch<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux.img<br />
<br />
LABEL archfallback<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux-fallback.img</nowiki><br />
}}<br />
<br />
==== Text boot menu ====<br />
<br />
Syslinux also allows you to use a boot menu. To use it, copy the {{ic|menu}} module to your Syslinux directory:<br />
# cp /usr/lib/syslinux/bios/menu.c32 /boot/syslinux/<br />
<br />
Copying additional {{ic|lib*.c32}} library modules might be needed too.<br />
<br />
Configuration:<br />
{{hc|/boot/syslinux/syslinux.cfg|<nowiki><br />
UI menu.c32<br />
PROMPT 0<br />
<br />
MENU TITLE Boot Menu<br />
TIMEOUT 50<br />
DEFAULT arch<br />
<br />
LABEL arch<br />
MENU LABEL Arch Linux<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux.img<br />
<br />
LABEL archfallback<br />
MENU LABEL Arch Linux Fallback<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux-fallback.img</nowiki><br />
}}<br />
<br />
For more details about the menu system, see [http://www.syslinux.org/wiki/index.php/Menu the Syslinux wiki].<br />
<br />
==== Graphical boot menu ====<br />
<br />
Syslinux also allows you to use a graphical boot menu. To use it, copy the {{ic|vesamenu}} COM32 module to your Syslinux folder:<br />
# cp /usr/lib/syslinux/bios/vesamenu.c32 /boot/syslinux/<br />
<br />
Copying additional {{ic|lib*.c32}} library modules might be needed too.<br />
<br />
{{Note| If you are using [[UEFI]], make sure to copy from {{ic|/usr/lib/syslinux/efi64/}} ({{ic|efi32}} for i686 systems), otherwise you will be presented with a black screen. In that case, boot from a live medium and use [[chroot]] to make the appropriate changes.}}<br />
<br />
This configuration uses the same menu design as the Arch Install CD, its config can be found at [https://projects.archlinux.org/archiso.git/tree/configs/releng/syslinux projects.archlinux.org]. The [https://projects.archlinux.org/archiso.git/plain/configs/releng/syslinux/splash.png Arch Linux background image] can be downloaded from there, too. Copy the image to {{ic|/boot/syslinux/splash.png}}.<br />
<br />
Configuration:<br />
{{hc|/boot/syslinux/syslinux.cfg|<nowiki><br />
UI vesamenu.c32<br />
DEFAULT arch<br />
PROMPT 0<br />
MENU TITLE Boot Menu<br />
MENU BACKGROUND splash.png<br />
TIMEOUT 50<br />
<br />
MENU WIDTH 78<br />
MENU MARGIN 4<br />
MENU ROWS 5<br />
MENU VSHIFT 10<br />
MENU TIMEOUTROW 13<br />
MENU TABMSGROW 11<br />
MENU CMDLINEROW 11<br />
MENU HELPMSGROW 16<br />
MENU HELPMSGENDROW 29<br />
<br />
# Refer to http://www.syslinux.org/wiki/index.php/Comboot/menu.c32<br />
<br />
MENU COLOR border 30;44 #40ffffff #a0000000 std<br />
MENU COLOR title 1;36;44 #9033ccff #a0000000 std<br />
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all<br />
MENU COLOR unsel 37;44 #50ffffff #a0000000 std<br />
MENU COLOR help 37;40 #c0ffffff #a0000000 std<br />
MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std<br />
MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std<br />
MENU COLOR msg07 37;40 #90ffffff #a0000000 std<br />
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std<br />
<br />
<br />
LABEL arch<br />
MENU LABEL Arch Linux<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux.img<br />
<br />
<br />
LABEL archfallback<br />
MENU LABEL Arch Linux Fallback<br />
LINUX ../vmlinuz-linux<br />
APPEND root=/dev/sda2 rw<br />
INITRD ../initramfs-linux-fallback.img</nowiki><br />
}}<br />
<br />
Since Syslinux 3.84, {{ic|vesamenu.c32}} supports the {{ic|MENU RESOLUTION $WIDTH $HEIGHT}} directive.<br />
To use it, insert {{ic|MENU RESOLUTION 1440 900}} into your config for a 1440x900 resolution.<br />
However, the background picture has to have exactly the right resolution, as Syslinux will otherwise refuse to load the menu.<br />
<br />
To center the menu and adjust resolution, use {{ic|MENU RESOLUTION}}, {{ic|MENU HSHIFT $N}} and {{ic|MENU VSHIFT $N}} where {{ic|$N}} is a positive number. The default values are both {{ic|0}} which is the upper-left hand corner of your monitor. Conversely, a negative number starts from the opposite end of the screen (e.g. {{ic|VHSHIFT -4}} would be 4 rows from the bottom of the screen).<br />
<br />
To move the menu to the center, add or edit these values:<br />
<br />
{{hc|/boot/syslinux/syslinux.cfg|<nowiki><br />
MENU RESOLUTION 800 600 # or whatever your screen resolution is<br />
MENU WIDTH 78 # width of the menu also required to bring the menu box to size<br />
MENU VSHIFT 10 # moves menu down<br />
MENU HSHIFT 10 # moves menu right<br />
</nowiki><br />
}}<br />
<br />
VESA standards are commonly a maximum of 25 rows and 80 columns, so going higher than those values might move the menu off the screen, potentially requiring editing from a rescue CD.<br />
<br />
=== Kernel parameters ===<br />
<br />
The [[kernel parameters]] are set by using the {{ic|APPEND}} directive in {{ic|syslinux.cfg}}: <br />
for each {{ic|LABEL}} entry, a maximum of one [http://www.syslinux.org/wiki/index.php/Config#APPEND APPEND] line is accepted (i.e. spanning multiple lines is not valid).<br />
<br />
It is recommended to make the following changes for the "fallback" entry as well.<br />
<br />
'''In the simplest case''', the partition name in the {{ic|root}} parameter needs to be replaced. Change {{ic|/dev/sda2}} to point to the correct root partition.<br />
<br />
APPEND root=/dev/sda2<br />
<br />
'''If you want to use [[UUID]]''' for [[persistent block device naming]] change the {{ic|APPEND}} line as follows, substituting {{ic|1234}} with the {{ic|UUID}} of your root partition:<br />
<br />
APPEND root=UUID=''1234'' rw<br />
<br />
'''If you use encryption''' [[LUKS]] change the {{ic|APPEND}} line to use your encrypted volume:<br />
<br />
APPEND root=/dev/mapper/''group''-''name'' cryptdevice=/dev/sda2:''name'' rw<br />
<br />
'''If you are using software''' [[Wikipedia:RAID|RAID]] using [http://neil.brown.name/blog/mdadm mdadm], change the {{ic|APPEND}} line to accommodate your RAID arrays. As an example the following accommodates three RAID 1 arrays and sets the appropriate one as root:<br />
<br />
APPEND root=/dev/md1 rw md=0,/dev/sda2,/dev/sdb2 md=1,/dev/sda3,/dev/sdb3 md=2,/dev/sda4,/dev/sdb4<br />
<br />
If booting from a software raid partition fails using the kernel device node method above an alternative, a more reliable, way is to use partition labels:<br />
<br />
APPEND root=LABEL=THEROOTPARTITIONLABEL rw<br />
<br />
'''If booting a [[btrfs]] subvolume''', amend the {{ic|APPEND}} line with {{ic|rootflags<nowiki>=</nowiki>subvol<nowiki>=</nowiki><root subvolume>}}. For example, where {{ic|/dev/sda2}} has been mounted as a btrfs subvolume called 'ROOT' (e.g. {{ic|mount -o noatime,subvol<nowiki>=</nowiki>ROOT /dev/sda2 /mnt}}), then the {{ic|APPEND}} line would need to be modified as follows:<br />
APPEND root=/dev/sda2 rw rootflags=subvol=ROOT<br />
<br />
A failure to do so will otherwise result in the following error message: {{ic|ERROR: Root device mounted successfully, but /sbin/init does not exist.}}<br />
<br />
=== Auto boot ===<br />
<br />
If you do not want to see the Syslinux menu at all, use the [[#Boot prompt]], and set {{ic|PROMPT}} to {{ic|0}} and comment out any {{ic|UI}} menu entries. Setting the {{ic|TIMEOUT}} variable to {{ic|0}} might also be a good idea. Make sure there is a {{ic|DEFAULT}} set in your {{ic|syslinux.cfg}}. Holding either {{ic|Shift}} or {{ic|Alt}}, or setting either {{ic|Caps Lock}} or {{ic|Scroll Lock}}, during boot will allow for options other than default to be used.<br />
See the [http://www.syslinux.org/wiki/index.php/Directives/special_keys upstream wiki] for additional alternatives.<br />
<br />
=== Security ===<br />
<br />
Syslinux has two levels of bootloader security: a menu master password, and a per-menu-item password. In {{ic|syslinux.cfg}}, use<br />
{{bc|<br />
MENU MASTER PASSWD passwd <br />
}}<br />
to set a master bootloader password, and<br />
{{bc|<br />
MENU PASSWD passwd <br />
}}<br />
within a {{ic|LABEL}} block to password-protect individual boot items.<br />
<br />
The passwd can be either a cleartext password or hashed: [http://www.syslinux.org/wiki/index.php/Comboot/menu.c32 see official documentation].<br />
<br />
=== Chainloading ===<br />
<br />
{{Note|Syslinux BIOS cannot directly chainload files located on other partitions; however, {{ic|chain.c32}} can boot a partition boot sector (VBR).}}<br />
<br />
If you want to chainload other operating systems (such as Windows) or boot loaders, copy the {{ic|chain.c32}} module to the Syslinux directory (additional {{ic|lib*.c32}} library modules might be needed too; for details, see the instructions in the previous section). Then create a section in the configuration file:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
...<br />
LABEL windows<br />
MENU LABEL Windows<br />
COM32 chain.c32<br />
APPEND hd0 3<br />
...<br />
}}<br />
<br />
{{ic|hd0 3}} is the third partition on the first BIOS drive - drives are counted from zero, but partitions are counted from one. <br />
<br />
{{note|For Windows, this skips the system's own boot manager ({{ic|bootmgr}}), which is required for a few important updates ([http://support.microsoft.com/kb/2883200 eg.]) to complete. In such cases it may be advisable to temporarily set the MBR boot flag to the Windows partition (eg. with [[GParted]]), let the update finish installing, and then reset the flag to the Syslinux partition (eg. with Windows's own [http://www.online-tech-tips.com/computer-tips/set-active-partition-vista-xp DiskPart]).}}<br />
<br />
If you are unsure about which drive your BIOS thinks is "first", you can instead use the MBR identifier, or if you are using GPT, the filesystem labels. To use the MBR identifier, run the command<br />
{{hc|# fdisk -l /dev/sdb|<nowiki><br />
Disk /dev/sdb: 128.0 GB, 128035676160 bytes <br />
255 heads, 63 sectors/track, 15566 cylinders, total 250069680 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk identifier: 0xf00f1fd3<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sdb1 2048 4196351 2097152 7 HPFS/NTFS/exFAT<br />
/dev/sdb2 4196352 250066943 122935296 7 HPFS/NTFS/exFAT</nowiki><br />
}}<br />
<br />
replacing {{ic|/dev/sdb}} with the drive you wish to chainload. Using the hexadecimal number under Disk identifier: {{ic|0xf00f1fd3}} in this case, the syntax in {{ic|syslinux.cfg}} is<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
...<br />
LABEL windows<br />
MENU LABEL Windows<br />
COM32 chain.c32<br />
APPEND mbr:0xf00f1fd3<br />
...<br />
}}<br />
<br />
For more details about chainloading, see [http://www.syslinux.org/wiki/index.php/Comboot/chain.c32 the Syslinux wiki].<br />
<br />
If you have [[GRUB]] installed on the same partition, you can chainload it by using: <br />
{{hc|/boot/syslinux/syslinux.cfg|<nowiki><br />
...<br />
LABEL grub2<br />
MENU LABEL Grub2<br />
COM32 chain.c32<br />
append file=../grub/boot.img<br />
...</nowiki><br />
}}<br />
Alternatively, it is also possible to load [[GRUB]] as a linux kernel by prepending {{ic|lnxboot.img}} to {{ic|core.img}}. The file {{ic|lnxboot.img}} is part of {{ic|core/grub}} and can be found in {{ic|/usr/lib/grub/i386-pc}}.<br />
{{hc|/boot/syslinux/syslinux.cfg|<nowiki><br />
...<br />
LABEL grub2lnx<br />
MENU LABEL Grub2 (lnxboot)<br />
LINUX ../grub/i386-pc/lnxboot.img<br />
INITRD ../grub/i386-pc/core.img<br />
...</nowiki><br />
}}<br />
This may be required for booting from ISO images.<br />
<br />
=== Chainloading other Linux systems ===<br />
{{Accuracy|Among other inaccuracies... 1_ There is no obligation to install yet another boot loader if you already have one related to the other partition/OS (e.g. GRUB2 installed in the MBR or in the VBR of the partition being chainloaded to). 2_ Syslinux (in any of its derivatives) is never "installed to the MBR", so mentioning the MBR in this section without any explanation of what it is being meant or how to do it in practical terms is just adding confusion. 3_ Typos and misspelling. 4_No need to explain (yet again) how to install some (other) bootloader to some (other) partition / OS; just how to chainload from Syslinux to that other partition / bootloader / OS.}}<br />
Chainloading another bootloader such as Windows' is pretty obvious, as there is a definite bootloader to chain to. But with Syslinux, it is only able to load files residing on the same partition as the configuration file. Thus, if you have another version of Linux on a separate partition, without a shared {{ic|/boot}}, it becomes ''necessary'' to employ EXTLINUX rather than the other OS's default bootloader (eg. GRUB2). Essentially, EXTLINUX can be installed on the partition superblock/[[wikipedia:Volume_boot_record|VBR]] and be called as a ''separate bootloader'' right from the MBR installed by Syslinux. EXTLINUX is part of The Syslinux Project and is included with the {{Pkg|syslinux}} package.<br />
<br />
The following instructions assume you have Syslinux installed already. These instructions will also assume that the typical Arch Linux configuration path of {{ic|/boot/syslinux}} is being used and the chainloaded system's {{ic|/}} is on {{ic|/dev/sda3}}. <br />
<br />
From a booted Linux (likely the partition that Syslinux is set up to boot), mount the other system's root partition to your desired mount point. In this example this will be {{ic|/mnt}}. Also, if a separate {{ic|/boot}} partition is used on the second operating system, that will also need to be mounted. The example assumes this is {{ic|/dev/sda2}}.<br />
# mount /dev/sda3 /mnt<br />
# mount /dev/sda2 /mnt/boot (only necessary for separate /boot)<br />
Install EXTLINUX to the partition VBR, and copy necessary {{ic|*.c32}} files<br />
# extlinux -i /mnt/boot/syslinux/ (first create the directory if necessary)<br />
# cp /usr/lib/syslinux/bios/*.c32 /mnt/boot/syslinux<br />
<br />
Create {{ic|/mnt/boot/syslinux/syslinux.cfg}}. You can use the other Linux's bootloader menu file for reference. Below is an example:<br />
{{hc|/mnt/boot/syslinux/syslinux.cfg '''on /dev/sda3'''|<nowiki><br />
timeout 10<br />
<br />
ui menu.c32<br />
<br />
label OtherLinux<br />
linux /boot/vmlinuz-linux<br />
initrd /boot/initramfs-linux.img<br />
append root=/dev/sda3 rw quiet<br />
<br />
label MAIN<br />
com32 chain.c32<br />
append hd0 0</nowiki><br />
}}<br />
<br />
And then add an entry to your main syslinux.cfg <br />
{{hc|/boot/syslinux/syslinux.cfg|<nowiki><br />
label OtherLinux<br />
com32 chain.c32<br />
append hd0 3</nowiki><br />
}}<br />
<br />
taken from [[User:Djgera|Djgera's user wiki page]].<br />
<br />
Note that the other Linux entry in {{ic|<other-OS>/boot/syslinux/syslinux.cfg}} will need to be edited each time you update this OS's kernel unless it has symlinks to its latest kernel and initrd in '''/'''. Since we are booting the kernel directly and not chainloading the other-OS's default bootloader.<br />
<br />
=== Using memtest ===<br />
<br />
Install {{Pkg|memtest86+}} from the [[official repositories]].<br />
<br />
Use this {{ic|LABEL}} section to launch [[Wikipedia:Memtest86|memtest]]:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
...<br />
LABEL memtest<br />
MENU LABEL Memtest86+<br />
LINUX ../memtest86+/memtest.bin<br />
...<br />
}}<br />
''<br />
{{Note|If you are using PXELINUX, change the name from ''memtest.bin'' to ''memtest'' since PXELINUX treats the file with .bin extension as a boot sector and loads only 2KB of it.}}<br />
<br />
=== HDT ===<br />
<br />
[http://hdt-project.org/ HDT (Hardware Detection Tool)] displays hardware information. Like before, the {{ic|.c32}} file has to be copied from {{ic|/boot/syslinux/}}. Additional {{ic|lib*.c32}} library modules might be needed too.<br />
For PCI info, copy {{ic|/usr/share/hwdata/pci.ids}} to {{ic|/boot/syslinux/pci.ids}} and add the following to your configuration file:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
LABEL hdt<br />
MENU LABEL Hardware Info<br />
COM32 hdt.c32<br />
}}<br />
<br />
=== Reboot and power off ===<br />
<br />
{{Note|As of Syslinux 6.03, {{ic|poweroff.c32}} only works with APM and not with ACPI. For a possible solution, see [http://www.syslinux.org/archives/2012-March/017661.html this thread] .}}<br />
<br />
Use the following sections to reboot or power off your machine:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
LABEL reboot<br />
MENU LABEL Reboot<br />
COM32 reboot.c32<br />
<br />
LABEL poweroff<br />
MENU LABEL Power Off<br />
COM32 poweroff.c32<br />
}}<br />
<br />
=== Clear menu ===<br />
<br />
To clear the screen when exiting the menu, add the following line:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
MENU CLEAR<br />
}}<br />
<br />
=== Keyboard layout ===<br />
<br />
If you often have to edit your boot command with diverse parameters in the Syslinux boot prompt, then you might want to remap your keyboard layout. This allows you to enter "=", "/" and other characters easily on a non-US keyboard.<br />
<br />
{{note|keytab-lilo is a perl script invoking the "loadkeys" program.}}<br />
<br />
To create a compatible keymap (e.g. a german one) run:<br />
# keytab-lilo /usr/share/kbd/keymaps/i386/qwerty/us.map.gz /usr/share/kbd/keymaps/i386/qwertz/de.map.gz > /boot/syslinux/de.ktl<br />
<br />
Now edit {{ic|syslinux.cfg}} and add:<br />
<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
KBDMAP de.ktl<br />
}}<br />
<br />
See the [http://www.syslinux.org/wiki/index.php/Directives/kbdmap Syslinux wiki] for more details.<br />
<br />
=== Hiding the menu ===<br />
<br />
Use the option:<br />
{{hc|/boot/syslinux/syslinux.cfg|<br />
MENU HIDDEN<br />
}}<br />
to hide the menu while displaying only the timeout. Press any key to bring up the menu.<br />
<br />
=== Pxelinux ===<br />
<br />
{{Note|For UEFI, Syslinux uses the same binary for disk booting and network booting. Loading files from TFTP or other network protocols will require network booting Syslinux. }}<br />
<br />
[[Syslinux|PXELINUX]] is provided by the {{Pkg|syslinux}} package.<br />
<br />
For BIOS clients, copy the {{ic|<nowiki>{l,}pxelinux.0</nowiki>}} bootloader to the boot directory of the client. For version 5.00 and newer, also copy {{ic|ldlinux.c32}} from the same package:<br />
<br />
# cp /usr/lib/syslinux/bios/pxelinux.0 "''TFTP_root''/boot"<br />
# cp /usr/lib/syslinux/bios/ldlinux.c32 "''TFTP_root''/boot"<br />
# mkdir "''TFTP_root''/boot/pxelinux.cfg"<br />
<br />
We also created the {{ic|pxelinux.cfg}} directory, which is where PXELINUX searches for configuration files by default. Because we do not want to discriminate between different host MACs, we then create the {{ic|default}} configuration.<br />
<br />
{{hc|''TFTP_root''/boot/pxelinux.cfg/default|<nowiki><br />
default linux<br />
<br />
label linux<br />
kernel vmlinuz-linux<br />
append initrd=initramfs-linux.img quiet ip=:::::eth0:dhcp nfsroot=10.0.0.1:/arch<br />
</nowiki>}}<br />
<br />
Or if you are using NBD, use the following append line:<br />
<br />
{{bc|<nowiki>append ro initrd=initramfs-linux.img ip=:::::eth0:dhcp nbd_host=10.0.0.1 nbd_name=arch root=/dev/nbd0</nowiki>}}<br />
<br />
{{Note|You will need to change {{ic|nbd_host}} and/or {{ic|nfsroot}}, respectively, to match your network configuration (the address of the NFS/NBD server)}}<br />
<br />
PXELINUX uses the same configuration syntax as SYSLINUX; refer to the upstream documentation for more information.<br />
<br />
The kernel and initramfs will be transferred via TFTP, so the paths to those are going to be relative to the TFTP root. Otherwise, the root filesystem is going to be the NFS mount itself, so those are relative to the root of the NFS server.<br />
<br />
To actually load PXELINUX, replace {{ic|filename "/grub/i386-pc/core.0";}} in {{ic|/etc/dhcpd.conf}} with {{ic|filename "/pxelinux.0"}} (or with {{ic|filename "/lpxelinux.0"}}).<br />
<br />
=== Booting ISO9660 image files with memdisk ===<br />
<br />
Syslinux supports booting from ISO images directly using the [http://www.syslinux.org/wiki/index.php/MEMDISK memdisk] module, see [[Multiboot USB drive#Using Syslinux and memdisk]] for examples.<br />
<br />
=== Serial console ===<br />
<br />
{{Merge|Working with the serial console|General page about topic not specific to Syslinux, already provides examples for GRUB.}}<br />
<br />
To enable Serial Console add the {{ic|SERIAL port [baudrate]}} to the top of {{ic|syslinux.cfg}} file. "port" is a number (0 for {{ic|/dev/ttyS0}}), if "baudrate" is omitted, the baud rate default is 9600 bps. The serial parameters are hardcoded to 8 bits, no parity and 1 stop bit.[http://www.syslinux.org/wiki/index.php/SYSLINUX#SERIAL_port_.5Bbaudrate_.5Bflowcontrol.5D.5D]<br />
<br />
{{hc|syslinux.cfg|<br />
SERIAL 0 115200<br />
}}<br />
<br />
Enable Serial Console in the kernel at boot by adding {{ic|1=console=tty0 console=ttyS0,115200n8}} to the {{ic|APPEND}} option.[http://www.mjmwired.net/kernel/Documentation/kernel-parameters.txt#681]<br />
<br />
{{hc|syslinux.cfg|2=<br />
APPEND root=UUID=126ca36d-c853-4f3a-9f46-cdd49d034ce4 rw console=tty0 console=ttyS0,115200n8<br />
}}<br />
<br />
How to do this with GRUB: [[Working with the serial console#GRUB2 and systemd]]<br />
<br />
== Troubleshooting ==<br />
<br />
=== Failed to load ldlinux ===<br />
<br />
An error message such as "Failed to load ldlinux.c32" during the initial boot can be triggered by many diverse reasons.<br />
One potential reason could be a change in file system tools or in a file system structure, depending on its own version.<br />
For instance, newer ext4 file systems might be created with its "64bit" feature enabled by default (whereas its "64bit" feature is only set manually, not by default, in older versions of mke2fs).<br />
This is just one example; file systems other than ext4 could also be affected by changes in their own structures and/or respective tools, thus also affecting bootloaders' behavior.<br />
<br />
{{Warning|1=As of Syslinux 6.03, some of the features of the supported file systems are not supported by the bootloader; for example, the "64bit" feature of ext4 (boot) volumes. See [http://www.syslinux.org/wiki/index.php/Filesystem] for more information.}}<br />
<br />
{{Note|1=There is no direct and unique correspondence between a message such as {{ic|Failed to load ldlinux.c32}} and a problem related to the file system:<br />
* Other alternative symptoms, instead of this message, could also indicate a problem related to the file system.<br />
* The message does not necessarily mean that the problem is related to the file system; there are other possible reasons for this type of messages.}}<br />
<br />
See also [http://www.syslinux.org/wiki/index.php/Common_Problems#Failed_to_load_ldlinux] (the whole page might be relevant for troubleshooting too).<br />
<br />
=== Using the Syslinux prompt===<br />
<br />
You can type in the {{ic|LABEL}} name of the entry that you want to boot (as per your {{ic|syslinux.cfg}}). If you used the example configurations, just type:<br />
boot: arch<br />
<br />
If you get an error that the configuration file could not be loaded, you can pass your needed boot parameters, e.g.:<br />
boot: ../vmlinuz-linux root=/dev/sda2 rw initrd=../initramfs-linux.img<br />
<br />
If you do not have access to {{ic|boot:}} in [[Ramdisk|ramfs]], and therefore temporarily unable to boot the kernel again,<br />
:1. Create a temporary directory, in order to mount your root partition (if it does not exist already):<br />
# mkdir -p /new_root<br />
:2. Mount {{ic|/}} under {{ic|/new_root}} (in case {{ic|/boot/}} is on the same partition, otherwise you will need to mount them both):<br />
{{Note|Busybox cannot mount {{ic|/boot}} if it is on its own ext2 partition.}}<br />
# mount /dev/sd[a-z][1-9] /new_root<br />
<br />
:3. Use {{ic|vim}} and edit {{ic|syslinux.cfg}} again to suit your needs and save file.<br />
:4. Reboot.<br />
<br />
=== Fsck fails on root partition ===<br />
<br />
In the case of a badly corrupted root partition (in which the journal is damaged), in the ramfs emergency shell, mount the root file system:<br />
<br />
# mount /dev/''root partition'' /new_root<br />
And grab the tune2fs binary from the root partition (it is not included in Syslinux):<br />
# cp /new_root/sbin/tune2fs /sbin/<br />
<br />
Follow the instructions at [[Fsck#ext2fs_:_no_external_journal|ext2fs: no external journal]] to create a new journal for the root partition.<br />
<br />
=== No Default or UI found on some computers ===<br />
<br />
Certain motherboard manufacturers have less compatibility for booting from USB devices than others. While an ext4 formatted USB drive may boot on a more recent computer, some computers may hang if the boot partition containing the ''kernel'' and ''initrd'' are not on a FAT16 partition. To prevent an older machine from loading {{ic|ldlinux}} and failing to read {{ic|syslinux.cfg}}, use {{ic|cfdisk}} to create a FAT16 partition (<=2GB) and format using {{Pkg|dosfstools}}:<br />
# mkfs.msdos -F 16 /dev/sda1<br />
<br />
then install and configure Syslinux.<br />
<br />
=== Missing operating system ===<br />
<br />
* Check that you have installed {{ic|gptmbr.bin}} for GPT and {{ic|mbr.bin}} for msdos partition table. A "Missing operating system" message comes from {{ic|mbr.bin}} while {{ic|gptmbr.bin}} would show a "Missing OS" message.<br />
<br />
* Check whether the partition that contains {{ic|/boot}} has the "boot" flag enabled.<br />
<br />
* Check whether the first partition at the boot device starts at sector 1 rather than sector 63 or 2048. Check this with {{ic|fdisk -l}}. If it starts at sector 1, you can move the partition(s) with {{ic|gparted}} from a rescue disk. Or, if you have a separate boot partition, you can back up {{ic|/boot}} with <br />
# cp -a /boot /boot.bak<br />
and then boot up with the Arch install disk. Next, use {{ic|cfdisk}} to delete the {{ic|/boot}} partition, and recreate it. This time it should begin at the proper sector, '''63'''. Now mount your partitions and {{ic|chroot}} into your mounted system, as described in the beginners guide. Restore {{ic|/boot}} with the command<br />
# cp -a /boot.bak/* /boot<br />
Check if {{ic|/etc/fstab}} is correct, run:<br />
# syslinux-install_update -iam<br />
and reboot.<br />
<br />
You will also get this error if you are trying to boot from a md [[RAID]] 1 array and created the array with a too new version of the metadata that Syslinux does not understand. As of August 2013 by default mdadm will create an array with version 1.2 metadata, but Syslinux does not understand metadata newer than 1.0. If this is the case you will need to recreate your [[RAID]] array using the {{ic|1=--metadata=1.0}} flag to mdadm.<br />
<br />
=== Windows boots up, ignoring Syslinux ===<br />
<br />
'''Solution:''' Make sure the partition that contains {{ic|/boot}} has the boot flag enabled. Also, make sure the boot flag is not enabled on the Windows partition. See the installation section above.<br />
<br />
The MBR that comes with Syslinux looks for the first active partition that has the boot flag set. The Windows partition was likely found first and had the boot flag set. If you wanted, you could use the MBR that Windows or MS-DOS {{ic|fdisk}} provides.<br />
<br />
=== Menu entries do nothing ===<br />
<br />
You select a menu entry and it does nothing, it just ''"refreshes"'' the menu. This usually means that you have an error in your {{ic|syslinux.cfg}} file. Hit {{ic|Tab}} to edit your boot parameters. Alternatively, press {{ic|Esc}} and type in the {{ic|LABEL}} of your boot entry (e.g. ''arch''). Another cause could be that you do not have a kernel installed. Find a way to access your file system (through live CD, etc) and make sure that {{ic|/mount/vmlinuz-linux}} exists and does not have a size of 0. If this is the case, [[Kernel_Panics#Option_2:_Reinstall_kernel|reinstall your kernel]].<br />
<br />
=== Cannot remove ldlinux.sys ===<br />
<br />
The {{ic|ldlinux.sys}} file has the immutable attribute set, which prevents it from being deleted or overwritten. This is because the sector location of the file must not change or else Syslinux has to be reinstalled. To remove it, run:<br />
# chattr -i /boot/syslinux/ldlinux.sys<br />
# rm /boot/syslinux/ldlinux.sys<br />
<br />
=== White block in upper left corner when using vesamenu ===<br />
<br />
Problem:<br />
''As of linux-3.0, the modesetting driver tries to keep the current contents of the screen after changing the resolution (at least it does so with my Intel, when having Syslinux in text mode). It seems that this goes wrong when combined with the vesamenu module in Syslinux (the white block is actually an attempt to keep the Syslinux menu, but the driver fails to capture the picture from vesa graphics mode).''<br />
<br />
If you have a custom resolution and a {{ic|vesamenu}} with early modesetting, try to append the following in {{ic|syslinux.cfg}} to remove the white block and continue in graphics mode:<br />
APPEND root=/dev/sda6 rw 5 '''vga=current''' quiet splash<br />
<br />
=== Chainloading Windows does not work, when it is installed on another drive ===<br />
<br />
If Windows is installed on a different drive than Arch and you have trouble chainloading it, try the following configuration:<br />
<br />
LABEL Windows<br />
MENU LABEL Windows<br />
COM32 chain.c32<br />
APPEND mbr:0xdfc1ba9e swap<br />
<br />
Replace the mbr code with the one your Windows drive has (details [[#Chainloading|above]]), and append {{ic|swap}} to the options.<br />
<br />
=== Read bootloader log ===<br />
<br />
In some cases (e.g. bootloader unable to boot kernel) it is highly desirable to get more information from the boot process. ''Syslinux'' prints error messages to screen but the boot menu quickly overwrites the text. To avoid losing the log information, disable {{ic|UI menu}} in {{ic|syslinux.cfg}} and use the default "command-line" prompt. It means:<br />
<br />
* avoid the UI directive<br />
* avoid ONTIMEOUT<br />
* avoid ONERROR<br />
* avoid MENU CLEAR<br />
* use a higher TIMEOUT<br />
* use PROMPT 1<br />
* use DEFAULT <problematic_label><br />
<br />
To get more detailed debug log, [[ABS|recompile]] the {{Pkg|syslinux}} package with additional CFLAGS:<br />
<br />
-DDEBUG_STDIO=1 -DCORE_DEBUG=1<br />
<br />
=== Btrfs compression ===<br />
<br />
Booting from btrfs with compression is not supported.[http://www.syslinux.org/wiki/index.php/Syslinux_4_Changelog#Changes_in_4.02]<br />
This error will show:<br />
btrfs: found compressed data, cannot continue!<br />
invalid or corrupt kernel image.<br />
<br />
=== Btrfs multi-device ===<br />
<br />
Booting from multiple-device btrfs is not supported.[http://repo.or.cz/syslinux.git/blob/HEAD:/extlinux/main.c] (As of 7/21/2016 line 1246 in validate_device_btrfs() in main.c)<br />
This head-scratching error will show (assuming you're installing on sda1):<br />
/boot/syslinux is device /dev/sda1<br />
extlinux: path /boot/syslinux doesn't match device /dev/sda1<br />
<br />
== See also ==<br />
<br />
* [http://www.syslinux.org Official website]<br />
* [http://www.josephn.net/scrapbook/pxelinux_stuff PXELinux configuration]<br />
* [http://blog.jak.me/2013/01/03/creating-a-multiboot-usb-stick-using-syslinux/ Multiboot USB using Syslinux]{{Dead link|2015|05|15}}</div>Varlogtimhttps://wiki.archlinux.org/index.php?title=Browser_plugins&diff=354069Browser plugins2014-12-29T07:29:07Z<p>Varlogtim: /* Other */</p>
<hr />
<div>[[Category:Web Browser]]<br />
[[de:Browser Plugins]]<br />
[[es:Browser Plugins]]<br />
[[fr:Plugins navigateur]]<br />
[[ja:Browser Plugins]]<br />
[[tr:Web tarayıcı eklentileri]]<br />
[[zh-CN:Browser Plugins]]<br />
{{Related articles start}}<br />
{{Related|Opera}}<br />
{{Related|Firefox}}<br />
{{Related|Chromium}}<br />
{{Related articles end}}<br />
<br />
There are two types of browser plugins, based on the plugin API they <br />
use:<br />
*Netscape plugin API (NPAPI): these plugins work in [[Firefox]], [[Opera]] and most other browsers ('''not''' in [[Chromium]]).<br />
*Pepper plugin API (PPAPI): these plugins work only in [[Chromium]] and Chrome.<br />
<br />
Most plugins on this page are NPAPI-only, unless noted otherwise.<br />
<br />
== Flash Player ==<br />
<br />
=== Shumway ===<br />
<br />
[http://mozilla.github.io/shumway/ Shumway] is an HTML5 technology experiment that explores building a faithful and efficient renderer for the SWF file format without native code assistance. As of 2013-01-01, the plugin may be installed directly from [http://mozilla.github.io/shumway/ Mozilla's github.io site]. According to the [https://github.com/mozilla/shumway/wiki Shumway wiki], "Integration with Firefox is a possibility if the experiment proves successful." <br />
<br />
Shumway is also embedded in Firefox Nightly/Aurora builds.<br />
<br />
=== Gnash ===<br />
<br />
See also [[Wikipedia:Gnash]].<br />
<br />
[http://www.gnu.org/software/gnash/ GNU Gnash] is a free (libre) alternative to Adobe Flash Player. It is available both as a standalone player for desktop computers and embedded devices, as well as a browser plugin, and supports the SWF format up to version 7 (with versions 8 and 9 under development) and about 80% of ActionScript 2.0.<br />
<br />
There are multiple packages available in the [[AUR]]: {{AUR|gnash}}, {{AUR|gnash-kde4}}, {{AUR|gnash-git}}.<br />
<br />
{{Note|If you find that Gnash does not work properly right out of the box, then you may also need to [[pacman|install]] {{Pkg|gstreamer0.10-ffmpeg}} from the [[official repositories]].}}<br />
<br />
=== Lightspark ===<br />
<br />
[http://lightspark.github.com/ Lightspark] is another attempt to provide a free alternative to Adobe Flash aimed at supporting newer Flash formats. Lightspark has the ability to fall back on Gnash for old content, which enables users to install both and enjoy wider coverage. Although it is still very much in development, it supports some [https://github.com/lightspark/lightspark/wiki/Site-Support popular sites]. <br />
<br />
Lightspark can be [[pacman|installed]] with the package {{AUR|lightspark}} or {{AUR|lightspark-git}}, available in the [[AUR]].<br />
<br />
=== Adobe Flash Player ===<br />
<br />
==== Installation ====<br />
<br />
The package you will need to install depends on the browser you use.<br />
<br />
* The NPAPI version can be [[pacman|installed]] with the {{Pkg|flashplugin}} package from the official repositories. This plugin was [https://blogs.adobe.com/flashplayer/2012/02/adobe-and-google-partnering-for-flash-player-on-linux.html discontinued by Adobe] and is stuck at version 11.2; although, Adobe will provide security updates for another 5 years (i.e. 2017).<br />
<br />
* The PPAPI version is shipped with Google Chrome. If you are using Chromium or any other browser using the PPAPI interface, see [[Chromium#Flash Player plugin]] for more information.<br />
<br />
{{Note|Some Flash apps may require {{AUR|ttf-ms-fonts}} from the [[AUR]] in order to properly render text.}}<br />
<br />
==== Configuration ====<br />
<br />
To change the preferences (privacy settings, resource usage, etc.) of Flash Player, right click on any embedded Flash content and choose ''Settings'' from the menu, or go to the [http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html Adobe website]. There, a Flash animation will give you access to your local settings.<br />
<br />
You can also use the Flash settings file {{ic|/etc/adobe/mms.cfg}}.<br />
<br />
{{Warning|Flash hardware acceleration could be still unstable. See [https://forums.adobe.com/thread/911321]}}<br />
<br />
To enable [[VDPAU]], uncomment the following line:<br />
<br />
EnableLinuxHWVideoDecode=1<br />
<br />
A more detailed example configuration:<br />
<br />
{{hc|/etc/adobe/mms.cfg|2=<br />
AVHardwareDisable = 0<br />
FullScreenDisable = 0<br />
LocalFileReadDisable = 1<br />
FileDownloadDisable = 1<br />
FileUploadDisable = 1<br />
LocalStorageLimit = 1<br />
ThirdPartyStorage = 1<br />
AssetCacheSize = 10<br />
AutoUpdateDisable = 1<br />
LegacyDomainMatching = 0<br />
LocalFileLegacyAction = 0<br />
AllowUserLocalTrust = 0<br />
# DisableSockets = 1 <br />
OverrideGPUValidation = 1<br />
DisableDeviceFontEnumeration = 1 #Prevent sites to identify you by snooping the installed fonts<br />
}}<br />
<br />
You can also refer to the [http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-plugins/adobe-flash/files/mms.cfg mms.cfg from Gentoo], which is extensively commented.<br />
<br />
==== Disable the "Press ESC to exit full screen mode" message ====<br />
{{Note|This only works for the NPAPI plugin.}}<br />
For a way to disable this message see [http://ubuntuforums.org/showthread.php?t=1839293 this ubuntuforums.org post].<br />
<br />
Backup {{ic|libflashplayer.so}}:<br />
# cp /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/mozilla/plugins/libflashplayer.so.backup <br />
<br />
Make a copy of it in your home directory:<br />
# cp /usr/lib/mozilla/plugins/libflashplayer.so ~/<br />
<br />
Install {{Pkg|wine}} from the official repositories.<br />
<br />
Download {{ic|Flash Fullscreen Patcher.zip}} from [http://forum.videohelp.com/threads/304807-How-to-remove-annoying-Press-Esc-to-message-in-Flash-Video this page], extract and execute with {{ic|wine}}:<br />
<br />
$ wget https://www.dropbox.com/s/ssrlsnx1csdyc8p/Flash%20Fullscreen%20Patcher%20v3.00%20%2B%20Source.zip<br />
$ unzip Flash\ Fullscreen\ Patcher\ v3.00\ +\ Source.zip Flash\ Fullscreen\ Patcher.exe<br />
$ wine Flash\ Fullscreen\ Patcher.exe<br />
<br />
Patch {{ic|libflashplayer.so}} (the one from your home directory) using the GUI.<br />
Copy the patched Flash Player back to the plugins directory:<br />
# cp ~/libflashplayer.so /usr/lib/mozilla/plugins/<br />
<br />
==== Multiple monitor full-screen fix ====<br />
<br />
{{Note|<br />
* This only works for the NPAPI plugin.<br />
* There is also a package {{AUR|flashplugin-focusfix}} in the [[AUR]] that includes this fix.<br />
}}<br />
<br />
: ''sourced from this post on [http://www.webupd8.org/2012/10/ubuntu-multi-monitor-tweaks-full-screen.html webupd8]''<br />
<br />
When using a multiple monitor setup, or swapping between virtual desktops, it is possible to lose focus on a fullscreen flash window. In such a case, the adobe flash-plugin will automatically exit full-screen mode. This may not be to your liking.<br />
<br />
Unfortunately, this behavior is hard coded into the binary. In order to change this behavior it is necessary to alter the binary.<br />
<br />
First you will need a hex editor, such as {{Pkg|ghex}}.<br />
<br />
Then, you will need to alter the adobe flash-plugin binary, which is commonly located at {{ic|/lib/mozilla/plugins/libflashplayer.so}}. It is prudent of course to first backup the file, in case you want to revert the behavior or make a mistake while editing.<br />
<br />
# cp /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/mozilla/plugins/libflashplayer.so.backup <br />
<br />
Then open the binary in the hex editor with '''root privileges''':<br />
<br />
# ghex /usr/lib/mozilla/plugins/libflashplayer.so<br />
<br />
Using the hex editor find the string {{ic|_NET_ACTIVE_WINDOW}}. In ghex the readable string is on the right hand side of the window, and the hex is on the left, you are trying to locate the readable string. It should be easy to find using a search function.<br />
<br />
Upon finding {{ic|_NET_ACTIVE_WINDOW}} rewrite the line, but '''do not''' change the length of the line, for example {{ic|_NET_ACTIVE_WINDOW}} becomes {{ic|_XET_ACTIVE_WINDOW}}.<br />
<br />
Save the binary, and restart any processes using the plugin (as this will crash any instance of the plugin in use.)<br />
<br />
==== Fullscreen fix for GNOME 3 ====<br />
<br />
If you have problems with Flash's fullscreen-mode (video freezes but audio keeps playing), then it is probably because the fullscreen flash window is displayed ''behind'' the browser window. This is a [https://bugzilla.gnome.org/show_bug.cgi?id=722743 known upstream bug in mutter]. You can easily fix this by using [[Wikipedia:Devil's Pie (software)|devilspie]]:<br />
<br />
Install {{Pkg|devilspie}} from the official repositories.<br />
<br />
Create the {{ic|~/.devilspie}} directory:<br />
<br />
# mkdir ~/.devilspie<br />
<br />
Now you have to create a config file for each browser you use (see below)<br />
<br />
Finally, add devilspie to your list of startup items by adding the following file to {{ic|~/.config/autostart}}<br />
{{hc|~/.config/autostart/devilspie.desktop|2=<br />
[Desktop Entry]<br />
Name=devilspie<br />
Exec=devilspie<br />
Hidden=false<br />
NoDisplay=false<br />
X-GNOME-Autostart-enabled=true<br />
}}<br />
<br />
===== Firefox =====<br />
<br />
{{hc|~/.devilspie/flash-fullscreen-firefox.ds|2=<br />
(if<br />
(is (application_name) "plugin-container")<br />
(begin<br />
(focus)<br />
)<br />
)<br />
}}<br />
<br />
===== Chrome / Chromium =====<br />
<br />
{{hc|~/.devilspie/flash-fullscreen-chrome.ds|2=<br />
(if<br />
(is (application_name) "exe")<br />
(begin<br />
(focus)<br />
)<br />
)<br />
}}<br />
<br />
===== Epiphany / GNOME Web =====<br />
<br />
{{hc|~/.devilspie/flash-fullscreen-epiphany.ds|2=<br />
(if<br />
(is (application_name) "WebKitPluginProcess")<br />
(begin<br />
(focus)<br />
)<br />
)<br />
}}<br />
<br />
=== Video players workarounds ===<br />
<br />
==== Open-with Firefox extension ====<br />
<br />
# Install [https://addons.mozilla.org/en-US/firefox/addon/open-with/ Open-with] add-on.<br />
# Open {{ic|about:openwith}}, select ''Add...''<br />
# In the dialog select a video streaming capable player (e.g. [[mpv|/usr/bin/mpv]]).<br />
# (Optional step) Add needed arguments to the player (e.g. you may want {{ic|--force-window --ytdl}} for ''mpv'')<br />
# (Optional step) Choose how to display the dialogs using the left panel.<br />
# Right click on links or visit pages containing videos. If the site is supported, the player will open as expected.<br />
<br />
The same procedure can be used to associate video downloaders such as ''youtube-dl''.<br />
<br />
== PDF viewer ==<br />
<br />
=== PDF.js ===<br />
<br />
[https://mozillalabs.com/en-US/pdfjs/ PDF.js] is a PDF renderer created by Mozilla and built using HTML5 technologies.<br />
<br />
For [[Firefox]] it is available as a [https://addons.mozilla.org/en-US/firefox/addon/pdfjs/ plugin], which is included in [[Firefox]] since version 19.<br />
<br />
For [[Chromium]] and Google Chrome there is an experimental extension in the [https://chrome.google.com/webstore/detail/pdf-viewer/oemmndcbldboiebfnladdacbdfmadadm Chrome web store] or alternatively it can be built from the source of [https://github.com/mozilla/pdf.js Pdf.js].<br />
<br />
=== External PDF viewers ===<br />
<br />
To use an external PDF viewer you need [[#MozPlugger]] or [[#kpartsplugin]].<br />
<br />
If you want to use MozPlugger with Evince, for example, you have to find the lines containing {{ic|pdf}} in the {{ic|/etc/mozpluggerrc}} file and modify the corresponding line after {{ic|GV()}} as below:<br />
repeat noisy swallow(evince) fill: evince "$file"<br />
(replace {{ic|evince}} with something else if it is not your viewer of choice).<br />
<br />
If this is not enough, you may need to change 2 values in {{ic|about:config}}:<br />
* Change {{ic|pdfjs.disabled}}'s value to ''true'';<br />
* Change {{ic|plugin.disable_full_page_plugin_for_types}}'s value to an empty value.<br />
<br />
Restart and it should work like a charm!<br />
<br />
=== Adobe Reader ===<br />
<br />
Due to licensing restrictions, Adobe Reader cannot be distributed from any of the official Arch Linux repositories. There are versions available in the [[AUR]]. Please note that no matter how many votes it receives, Adobe Reader will never be included in the [[official repositories]].<br />
<br />
Also, there are [https://aur.archlinux.org/packages.php?O=0&K=acroread-&do_Search=Go localizations] available in many languages.<br />
<br />
==== 32-bit ====<br />
<br />
Adobe Acrobat Reader is only available as a 32-bit binary. It can be installed with the {{AUR|acroread}} package, available in the [[AUR]].<br />
<br />
This package installs the Acrobat Reader application as well as the Firefox plugin. Note that hardware-assisted rendering is unavailable under Linux (at least using a Geforce 8600GTS with driver version 185.18.14).<br />
<br />
==== 64-bit ====<br />
<br />
There is yet to be an official 64-bit version of Adobe Reader.<br />
<br />
To use it in a 64-bit environment, you can:<br />
* Follow [[Install bundled 32-bit system in Arch64|this guide]] originally posted in the forums. It involves creating a chrooted environment that could be reused for other 32-bit only applications.<br />
<br />
* Install {{AUR|acroread}} (with all its 32-bit dependencies) from [[AUR]]. Be advised that the [[Firefox]] plugin cannot be used ''directly'' with this binary -- it will not load in the 64-bit browser. To load it install the {{Pkg|nspluginwrapper}} package from the official [[Multilib|[multilib]]] repository and run:<br />
$ nspluginwrapper -v -a -i<br />
as a normal user. This checks the plugin directory and links the plugins as needed.<br />
<br />
== Citrix ==<br />
<br />
See [[Citrix]].<br />
<br />
== Java (IcedTea) ==<br />
<br />
{{Note|Java [https://www.java.com/en/download/faq/chrome.xml does not work on Chromium], since they've disabled all NPAPI pluggins. Install another browser to use any Java plugin.}}<br />
<br />
To enable [[Java]] support in your browser, you have two options: the open-source [[Wikipedia:OpenJDK|OpenJDK]] (recommended) or Oracle's proprietary version. For details about why OpenJDK is recommended see [https://mailman.archlinux.org/pipermail/arch-general/2011-August/021671.html this].<br />
<br />
To use OpenJDK, you have to install the [http://icedtea.classpath.org/wiki/Main_Page IcedTea] browser plugin, {{Pkg|icedtea-web}}.<br />
<br />
If you want to use Oracle's JRE, install the {{AUR|jre}} (or {{AUR|jre6}}) package, available in the [[AUR]].<br />
<br />
See [[Java#OpenJDK]] for additional details and references.<br />
<br />
{{Note|If you experience any problems with the Java plugin (e.g. it is not recognized by the browser), you can try this [[Flash#Plugins_are_installed_but_not_working|solution]].}}<br />
<br />
== Pipelight ==<br />
<br />
See [[Pipelight]].<br />
<br />
== Multimedia playback ==<br />
<br />
Many browsers support the [[GStreamer]] framework to play multimedia inside HTML5 {{ic|<audio>}} and {{ic|<video>}} elements. Check the optional dependencies of the browser package (or {{Pkg|webkitgtk}}/{{Pkg|webkitgtk2}} if using a webkit-based browser) to see which version of GStreamer is supported: this can be either {{ic|gst-*}} for the current version, or {{ic|gstreamer0.10-*}} for the legacy version. See [[GStreamer#Installation]] for the description of each plugin.<br />
<br />
=== Other plugins ===<br />
<br />
* {{App|Gecko Media Player|Mozilla browser plugin to handle media on websites, using MPlayer.|https://sites.google.com/site/kdekorte2/gecko-mediaplayer|{{Pkg|gecko-mediaplayer}}}}<br />
* {{App|Totem Plugin|Browser plugin based on the [[Wikipedia:Totem (software)|Totem]] media player for [[Gnome]] which uses [[Gstreamer]].|http://projects.gnome.org/totem/|{{Pkg|totem}}}}<br />
* {{App|Rosa Media Player Plugin|Qt-based browser plugin also based on MPlayer.|https://abf.rosalinux.ru/uxteam/ROSA_Media_Player|{{AUR|rosa-media-player-plugin}}}}<br />
* {{App|VLC Plugin|NPAPI-based plugin that uses VLC technologies.|http://git.videolan.org/?p&#61;npapi-vlc.git;a&#61;summary|{{AUR|npapi-vlc-git}}}}<br />
<br />
== Other ==<br />
=== Keyboard Navigation ===<br />
[http://5digits.org/pentadactyl/ Pentadactyl] - Vim Shortcuts, Follow Hints, script almost any aspect of the look and feel of your browser. Use the web like a command line.<br />
=== MozPlugger ===<br />
<br />
MozPlugger can be installed with the {{AUR|mozplugger}} package.<br />
<br />
[http://mozplugger.mozdev.org/ MozPlugger] is a Mozilla plugin which can show many types of multimedia inside your browser. To accomplish this, it uses external programs such as MPlayer, xine, Evince, OpenOffice, TiMidity, etc. To modify or add applications to be used by MozPlugger just modify the {{ic|/etc/mozpluggerrc}} file.<br />
<br />
For example, MozPlugger uses OpenOffice by default to open {{ic|doc}} files. To change it to use LibreOffice instead, look for the OpenOffice section:<br />
{{hc|/etc/mozpluggerrc|<br />
...<br />
### OpenOffice<br />
define([OO],[swallow(VCLSalFrame) fill: ooffice2.0 -nologo -norestore -view $1 "$file"<br />
swallow(VCLSalFrame) fill: ooffice -nologo -norestore -view $1 "$file"<br />
swallow(VCLSalFrame) fill: soffice -nologo $1 "$file"])<br />
...<br />
}}<br />
and add LibreOffice at the beginning of the list:<br />
{{hc|/etc/mozpluggerrc|<br />
...<br />
### LibreOffice/OpenOffice<br />
define([OO],[swallow(VCLSalFrame) fill: libreoffice --nologo --norestore --view $1 "$file"<br />
swallow(VCLSalFrame) fill: ooffice2.0 -nologo -norestore -view $1 "$file"<br />
swallow(VCLSalFrame) fill: ooffice -nologo -norestore -view $1 "$file"<br />
swallow(VCLSalFrame) fill: soffice -nologo $1 "$file"])<br />
...<br />
}}<br />
{{Note|Be sure to also choose LibreOffice as your preferred application to open {{ic|doc}} files.}}<br />
<br />
As another simple example, if you want to open {{ic|cpp}} files with your favorite text editor (we will use Kate) to get syntax highlighting, just add a new section to your {{ic|mozpluggerrc}} file:<br />
{{hc|/etc/mozpluggerrc|<br />
text/x-c++:cpp:C++ Source File<br />
text/x-c++:hpp:C++ Header File<br />
repeat noisy swallow(kate) fill: kate -b "$file"<br />
}}<br />
<br />
To change the default of MPlayer so that [[mpv]] is used instead, change the appropriate lines such that:<br />
{{hc|1=/etc/mozpluggerrc|2=<br />
...<br />
### MPlayer<br />
<br />
#define(MP_CMD,[mplayer -really-quiet -nojoystick -nofs -zoom -vo xv,x11 -ao esd,alsa,oss,arts,null -osdlevel 0 $1 </dev/null])<br />
define(MP_CMD,[mpv -really-quiet $1 </dev/null])<br />
<br />
#define(MP_EMBED,[embed noisy ignore_errors: MP_CMD(-xy $width -wid $window $1)])<br />
define(MP_EMBED,[embed noisy ignore_errors: MP_CMD(--autofit=$width -wid $window $1)])<br />
<br />
#define(MP_NOEMBED,[noembed noisy ignore_errors maxaspect swallow(MPlayer): MP_CMD($1)])<br />
define(MP_NOEMBED,[noembed noisy ignore_errors maxaspect swallow(mpv): MP_CMD($1)])<br />
<br />
...<br />
<br />
#define(MP_AUDIO,[mplayer -quiet -nojoystick $1 </dev/null])<br />
define(MP_AUDIO,[mpv -really-quiet $1 </dev/null])<br />
<br />
#define(MP_AUDIO_STREAM,[controls stream noisy ignore_errors: mplayer -quiet -nojoystick $1 "$file" </dev/null])<br />
define(MP_AUDIO_STREAM,[controls stream noisy ignore_errors: mpv -really-quiet $1 "$file" </dev/null])<br />
...<br />
}}<br />
<br />
For a more complete list of MozPlugger options see [http://www.linuxmanpages.com/man7/mozplugger.7.php this page].<br />
<br />
=== kpartsplugin ===<br />
<br />
[http://www.unix-ag.uni-kl.de/~fischer/kpartsplugin/ The KParts plugin] is a plugin that uses KDE's KPart technology to embed different file viewers in the browser, such as Okular (for PDF), Ark (for different archives), Calligra Words (for ODF), etc. It cannot use applications that are not based on the KPart technology.<br />
<br />
The KParts plugin can be installed with the package {{Pkg|kpartsplugin}}, available in the official repositories.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Flash Player: no sound ===<br />
<br />
Flash Player outputs its sound only through the default [[Advanced Linux Sound Architecture|ALSA]] device, which is number '''0'''. If you have multiple sound devices (a very common example is having a sound card and HDMI output in the video card), then your preferred device may have a different number.<br />
<br />
For a list of available devices with their respective numbers, run:<br />
{{hc|$ aplay -l|<br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 1: DX [Xonar DX], device 0: Multichannel [Multichannel]<br />
Subdevices: 0/1<br />
Subdevice #0: subdevice #0<br />
card 1: DX [Xonar DX], device 1: Digital [Digital]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
}}<br />
In this case, the HDMI output is {{ic|card 0}} and the sound card is {{ic|card 1}}. To make your sound card the default for ALSA, create the file {{ic|.asoundrc}} in your home directory, with the following content:<br />
{{hc|~/.asoundrc|<br />
pcm.!default {<br />
type hw<br />
card 1<br />
}<br />
<br />
ctl.!default {<br />
type hw<br />
card 1<br />
}<br />
}}<br />
<br />
=== Flash Player: blocking sound for other applications or delayed playback ===<br />
<br />
If sound is delayed within Flash videos or Flash stops sound from any other application, then make sure you do not have {{ic|snd_pcm_oss}} module loaded:<br />
$ lsmod | grep snd_pcm_oss<br />
You can unload it:<br />
# rmmod snd_pcm_oss<br />
and restart the browser to see if it helps.<br />
<br />
=== Flash Player: performance ===<br />
<br />
Adobe's Flash plugin has some serious performance issues, especially when CPU frequency scaling is used. There seems to be a policy not to use the whole CPU workload, so the frequency scaling governor does not clock the CPU any higher. To work around this issue, see [[CPU frequency scaling#Switching threshold]]<br />
<br />
=== Flash Player: low webcam resolution ===<br />
<br />
If your webcam has low resolution in Flash (the image looks very pixelated) you can try starting your browser with this:<br />
$ LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so [broswer]<br />
<br />
=== Flash Player: black bars in full screen playback on multi-headed setups ===<br />
<br />
The Flash plugin has a known bug where the full screen mode does not really work when you have a multi-monitor setup. Apparently, it incorrectly determines the full screen resolution, so the full screen Flash Player fills the correct monitor but gets scaled as if the monitor had the resolution of the total display area.<br />
<br />
To fix this, you can use the "hack" described [http://al.robotfuzz.com/content/workaround-fullscreen-flash-linux-multiheaded-desktops here]. Simply download the source from the link given on the page, and follow the instructions in the README.<br />
<br />
{{Tip|The hack is available in the [[AUR]] and can be installed with the {{AUR|fullscreenhack}} package.}}<br />
<br />
{{Note|While the author mentions using NVDIA's TwinView, the hack should work for any multi-monitor setup.}}<br />
<br />
=== Flash Player: blue tint on videos with NVIDIA ===<br />
<br />
An issue with {{Pkg|flashplugin}} versions 11.2.202.228-1 and 11.2.202.233-1 causes it to send the U/V panes in the incorrect order resulting in a blue tint on certain videos. Version 0.5 of {{Pkg|libvdpau}} includes a workaround to fix this, see the [http://lists.x.org/archives/xorg-announce/2012-September/002066.html official announcement].<br />
<br />
=== Flash Player: leaking overlay with NVIDIA ===<br />
<br />
This bug is due to the incorrect color key being used by the {{Pkg|flashplugin}} version 11.2.202.228-1 (see [http://www.nvnews.net/vbulletin/showpost.php?p=2514210&postcount=102 this post] on the NVIDIA forums) and causes the Flash content to "leak" into other pages or solid black backgrounds. To avoid this issue simply export {{ic|1=VDPAU_NVIDIA_NO_OVERLAY=1}} within either your shell profile (e.g. {{ic|~/.bash_profile}} or {{ic|~/.zprofile}}) or {{ic|~/.xinitrc}}<br />
<br />
=== Flash Player: videos not working on older systems ===<br />
<br />
If you have Adobe Flash installed on an older system and you start playing a video which simply turns black with nothing happening, it is most likely that your CPU does not support SSE2. You can simply check this by looking at your CPU flags with this command:<br />
$ grep sse2 /proc/cpuinfo<br />
<br />
If no results are returned, then you need to install an older version of Flash (for example 10.3, or 11.1). Older versions possibly will have vulnerabilities. You should then consider sandboxing Firefox using {{AUR|sandfox}}, available in the [[AUR]]. See the [https://igurublog.wordpress.com/downloads/script-sandfox/ sandfox homepage] for usage information.<br />
<br />
Older versions of Flash are available here:<br />
https://www.adobe.com/products/flashplayer/distribution3.html<br />
You need to copy {{ic|libflashplayer.so}} to the folder {{ic|/usr/lib/mozilla/plugins/}}<br />
<br />
Older {{Pkg|flashplugin}} packages can be downloaded from the [[AUR]] e.g. {{AUR|flashplugin-10}}.<br />
<br />
The most recent package without SSE2 is {{ic|flashplugin-11.1.102.63-1-i686.pkg.tar.xz}}. If you use the packaged version, you have to add {{ic|IgnorePkg &#61; flashplugin}} to {{ic|/etc/pacman.conf}}.<br />
<br />
=== Plugins are installed but not working ===<br />
<br />
A common problem is that the plugin path is unset. This typically occurs on a new install, when the user has not re-logged in before running Firefox after the installation. Test if the path is unset:<br />
echo $MOZ_PLUGIN_PATH<br />
If unset, then either re-login, or source {{ic|/etc/profile.d/mozilla-common.sh}} and start Firefox from the same shell:<br />
source /etc/profile.d/mozilla-common.sh && firefox<br />
<br />
=== Gecko Media Player will not play Apple trailers ===<br />
<br />
If Apple Trailers appear to start to play and then fail, try setting the user agent for your browser to:<br />
QuickTime/7.6.2 (qtver=7.6.2;os=Windows NT 5.1Service Pack 3)</div>Varlogtimhttps://wiki.archlinux.org/index.php?title=Surf&diff=354067Surf2014-12-29T07:16:22Z<p>Varlogtim: /* See also */</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Web Browser]]<br />
[http://surf.suckless.org/ surf] is a simple web browser based on WebKit/GTK+. It is able to display websites and follow links. It supports the XEmbed protocol which makes it possible to embed it in another application. Furthermore, one can point surf to another URI by setting its XProperties.<br />
<br />
==Installation==<br />
{{Pkg|surf}} can be [[pacman|installed]] from the [[official repositories]]. There is also {{AUR|surf-git}} and {{AUR|surf-xdg-config-hg}} in the [[AUR]].<br />
<br />
Optional:<br />
* {{Pkg|dmenu}} for URL-bar<br />
<br />
==Configuration==<br />
surf is configured through its {{ic|config.h}} file. A sample {{ic|config.def.h}} file is included with the source and should be instructive.<br />
<br />
As with other packages such as [[dwm]], consider using the Arch Build System ([[ABS]]) and maintaining your own [[PKGBUILD]] with sources and md5sums for your own configuration and source files.<br />
<br />
==Extended usage==<br />
===Patches & additional features===<br />
There are many user-created [http://surf.suckless.org/patches/ patches] available from the offical site that greatly extend the functionality of surf. Patches can be applied to both the source {{ic|surf.c}} file and the {{ic|config.h}} file:<br />
$ cd src/surf-[version]/<br />
$ patch -p1 < path/to/patch.diff<br />
<br />
===Tabbed browsing===<br />
The {{Pkg|tabbed}} program can be used with surf to create a simple tabbed browsing experience.<br />
<br />
A basic set-up:<br />
$ tabbed surf -e<br />
<br />
Note that to achieve a similar effect to Firefox or Chromium where upon closing the last tab, the browswer exits, use instead:<br />
$ tabbed -c surf -e<br />
<br />
See the man page for tabbed for more details and possibilities.<br />
<br />
==See also==<br />
* [http://surf.suckless.org/ surf's official website]<br />
* [[dmenu]] - Simple application launcher from the developers of dwm<br />
* [https://bbs.archlinux.org/viewtopic.php?id=167804/ Hacking surf thread]<br />
==Other Keyboard Navigation Enabled Browsers==<br />
* [[Firefox]] - with the following extension: [http://5digits.org/pentadactyl/ Pentadactyl]<br />
* [[Jumanji]]<br />
* [[Vimprobable]]<br />
* [[Luakit]]<br />
* [[Uzbl]]<br />
* [[Dwb]]</div>Varlogtimhttps://wiki.archlinux.org/index.php?title=Dwb&diff=354066Dwb2014-12-29T07:15:45Z<p>Varlogtim: /* Improved Ability to Display Websites */</p>
<hr />
<div>{{DISPLAYTITLE:dwb}}<br />
[[Category:Web Browser]]<br />
[[de:dwb]]<br />
[[fr:dwb]]<br />
[http://portix.bitbucket.org/dwb/ dwb] is an extremely fast, lightweight and flexible web browser using the webkit engine. It is customizable through its web interface and fully usable with keyboard shortcuts.<br />
<br />
{{Note|As of October 2014 dwb is [https://bitbucket.org/portix/dwb/pull-request/22/several-cleanups-to-increase-portability/diff#comment-3217936 unmaintained].}}<br />
<br />
== Installation ==<br />
<br />
The {{Pkg|dwb}} package can be found in the [[official repositories]] and can be installed with [[pacman]]. There are also other versions in the [[AUR]]: {{AUR|dwb-git}}, {{AUR|dwb-gtk3}}, and {{AUR|dwb-gtk3-git}}.<br />
<br />
== Basic usage ==<br />
<br />
Starting from a fresh configuration, use {{ic|Sk}} to open the ''Keys'' page. As you can see from there, most bindings are borrowed from [[Vim]] and [[Emacs]].<br />
<br />
Use {{ic|:}} to access the command prompt. You can use {{ic|Tab}} to auto-complete.<br />
<br />
Read the man page for more details and enable the {{ic|auto-completion}} option in the settings to help you learn the bindings.<br />
<br />
$ man dwb<br />
<br />
=== dwb-specific ===<br />
<br />
o = enter url<br />
O = enter url in new tab<br />
f = spawn hints. Use arrow keys to browse the hints while displaying their URI, or use the hint letters.<br />
F = spawn hints in new tab<br />
;b = spawn hints in new background tab<br />
;r = follow multiple background links rapidly<br />
H = back<br />
L = forward<br />
J = go to next tab<br />
K = go to previous tab<br />
'n'+T = goto 'n' tab<br />
d = close tab<br />
u = undo close tab<br />
ctrl+s = stop<br />
r = reload<br />
R = reload ignoring cache<br />
gi = go to the first input field, doesn't enter input mode, use 'i' for that, so 'gi'+'i'<br />
ctrl+e = open editable field in external editor. Useful for forums and wikis.<br />
;d = download via hints<br />
M = save bookmark (bookmarks are saved in ~/.config/dwb/default/bookmarks)<br />
xb = show/hide status bar<br />
gf = toggle source view<br />
+ = zoom_in<br />
- = zoom_out<br />
= = reset to 100%<br />
<br />
=== vim-like ===<br />
<br />
i = toggle_insert_mode (Esc works to go back to normal mode much like Vim)<br />
Esc = back to normal mode (ctrl+n works too)<br />
j = scroll down<br />
k = scroll up<br />
h = scroll left<br />
l = scroll right<br />
gg = go to top<br />
G = go to bottom<br />
/ = find in page<br />
n = repeat find forward<br />
ZZ = save session and exit<br />
<br />
=== Notes ===<br />
<br />
Press {{ic|v}} to switch to caret browsing, then press {{ic|space}} to toggle between caret and visual mode. Press {{ic|Esc}} one or two times to go back to normal mode. While in caret browsing, you can use the arrow keys to browse the different parts of the page. Hold {{ic|Shift}} to select text. Press {{ic|Enter}} to follow links.<br />
<br />
== Configuration ==<br />
<br />
The configuration files are stored in {{ic|$XDG_CONFIG_HOME/dwb/}} (usually {{ic| ~/.config/dwb/}}) and can be easily accessed through the web interface. Type {{ic|Ss}} to open the ''Settings'' page.<br />
<br />
=== Search engines ===<br />
<br />
Open your favorite search engine, type {{ic|gs}} to select the web page's first input field, and then enter a keyword associated with it. <br />
<br />
Now you can use the keyword in the URI prompt to search directly on the corresponding website. Typing queries directly in the address bar will search with the default search engine, which is the first entry in {{ic|$XDG_CONFIG_HOME/dwb/searchengines}}.<br />
<br />
You can also add more by editing the configuration files. This may help for tricky sites like rfc-editor.org.<br />
<br />
{{hc|.config/dwb/settings|2=<br />
searchengine-submit-pattern=XXX<br />
}}<br />
<br />
{{hc|.config/dwb/searchengines|<nowiki><br />
sp https://startpage.com/do/search?q=XXX<br />
wp https://en.wikipedia.org/w/index.php?search=XXX&title=Special:Search<br />
aw https://wiki.archlinux.org/index.php?title=Special:Search&search=XXX<br />
rfc http://www.rfc-editor.org/search/rfc_search_detail.php?rfc=&title=XXX<br />
</nowiki>}}<br />
<br />
=== keys ===<br />
Standard keybinds can be edited by executing {{ic|:open dwb:keys}} (opening dwb:keys as a webpage). Settings are saved as soon as a value is changed and the element loses focus or the return key is pressed. This is reported in the status bar. Combinations of keys are separated with a space. Some less vim-like keys could be defined by:<br />
<br />
{{hc|dwb:keys|<nowiki><br />
history_back Go back Mod1 @Left@<br />
history_forward Go forward Mod1 @Right@<br />
</nowiki>}}<br />
<br />
This same format is used below for custom keybinds.<br />
<br />
=== Custom keybinds ===<br />
<br />
You can create custom key bindings by editing file {{ic|custom_keys}} in the profile directory. This is<br />
{{ic|~/.config/dwb/default}} by default. All keysyms which do not emit (multi)byte characters, must be enclosed in {{ic|@}}. One keybind can execute multiple ''dwb'' commands. These commands execute in same order as they are defined in bind, and must be separated by {{ic|;;}} separator. If the keybind's chord is already bound by ''dwb'', it might be ignored (behaviour is not consistent). In such case one can try to check, whether there is collison with binds defined in {{ic|~/.config/dwb/keys}} and try to unbind the chord there (eg set it to nothing). Any running ''dwb'' instance will owerwrite {{ic|keys}} file on exit, so remember to do your modifications while ''dwb'' is not runing or use default ''dwb'' interface ({{ic|Sk}}).<br />
<br />
{{hc|~/.config/dwb/default/custom_keys|<nowiki><br />
Control w :close_tab<br />
Control @Page_Up@ :focus_prev<br />
Control @Page_Down@ :focus_next<br />
</nowiki>}}<br />
<br />
== Extensions ==<br />
<br />
''dwb'' features an extension manager as a separate executable, ''dwbem''. To list all officially available extensions, use:<br />
<br />
{{hc|dwbem -a|<br />
Available extensions: Mainstream equivalent:<br />
- adblock_subscriptions Adblock<br />
- autoquvi Video DownloadHelper<br />
- contenthandler (Handle requests based on MIME type, filename extension or URI scheme)<br />
- downloadhandler (Handle downloads based on mimetype or filename extension, useful if 'download-no-confirm' is set)<br />
- formfiller LastPass, Lazarus (Save form data and fill forms with previously saved data, also with gpg-support)<br />
- googlebookmarks GBookmarks, GMarks (Add bookmarks to google bookmarks with a shortcut)<br />
- googledocs Open with Google Docs, Google Docs Viewer<br />
- grabscrolling (Adobe Acrobat style grab and drag mouse scrolling)<br />
- multimarks (Bookmark multiple urls to a single quickmark)<br />
- navtools Opera Fast Forward, IE 10 Flip Ahead<br />
- perdomainsettings (Change webkit-settings automatically on domain or url basis)<br />
- pwdhash PwdHash<br />
- requestpolicy RequestPolicy, Disconnect, Ghostery<br />
- simplyread Readability, Clearly<br />
- speeddial Speed Dial<br />
- supergenpass (Generate domain-based passwords; compatible with the bookmarklet supergenpass but with additional options)<br />
- unique_tabs (Remove duplicate tabs or avoid duplicate tabs by autoswitching to tabs with same url)<br />
- userscripts GreaseMonkey/Stylish<br />
- whitelistshortcuts (Whitelist webkit settings for certain domains with a shortcut)<br />
}}<br />
<br />
For more details, use {{ic|dwbem -I <extension>}} and read the [http://portix.bitbucket.org/dwb/resources/dwb.1.html dwb] and [http://portix.bitbucket.org/dwb/resources/dwbem.1.html dwbem] man pages. To get more details on all available extensions use {{ic|<nowiki>for i in $(dwbem -a | awk '/-/ {print $NF}'); do dwbem -I $i; done</nowiki>}}.<br />
<br />
Below is a list of popular extensions (or add-ons) for which ''dwb'' has a built-in alternative:<br />
<br />
* NoScript/Flashblock: ''dwb'' blocks flash by default and can block javascript.<br />
* Omnibar: just like Chrome, ''dwb'''s address gives quick access to search, history, and bookmarks.<br />
* Download Statusbar: ''dwb'''s displays downloads in a neat status bar by default.<br />
* IE Tab: ''dwb'' can open a page in any external browser with a simple userscript.<br />
* Session Manager: ''dwb'' uses its built-in session manager by default.<br />
* Private browsing: add {{ic|xpp:toggle enable-private-browsing}} to {{ic|custom_keys}} to toggle privacy mode by typing {{ic|xpp}}.<br />
<br />
=== Adblock ===<br />
<br />
''dwb'' features an Adblock extension. Install it with<br />
<br />
$ dwbem -i adblock_subscriptions<br />
<br />
Restart ''dwb'', enable adblocker with {{ic|:set adblocker true}}, use the ''adblock_subscribe'' command and choose your favorite filter (avoid using more than one filter to prevent duplicate entries that make the adblocker much slower). After that you also need to make the changes active with the ''adblock_update'' command.<br />
<br />
== Userscripts ==<br />
<br />
''dwb'' can execute .js or .sh scripts put in {{ic|~/.config/dwb/userscripts/}}. Make sure they are executable:<br />
chmod +x ~/.config/dwb/userscripts/myscript.js<br />
<br />
Below are some example scripts, see ''dwb'' [http://portix.bitbucket.org/dwb/snippets/snippets.html userscripts snippets] for more:<br />
<br />
=== defer-loading ===<br />
<br />
Prevents tabs from last session to load all at once at startup.<br />
{{hc|~/.config/dwb/userscripts/defer-loading.js|<nowiki><br />
//!javascript<br />
if (settings.loadOnFocus === false) {<br />
execute('local_set load-on-focus true');<br />
}<br />
Signal.connect('navigation', function(webview) {<br />
if (webview == tabs.current) {<br />
execute('local_set load-on-focus false');<br />
this.disconnect();<br />
}<br />
});</nowiki>}}<br />
<br />
=== fast-forward ===<br />
<br />
Opera features a neat key binding which allows users to load to next/previous logical page. This is very useful for forum threads, documentation, and articles spread over several pages.<br />
<br />
This feature can be implemented with a simple javascript function and bound to custom keys {{ic|<nowiki>}</nowiki>}} and {{ic|{}}:<br />
<br />
{{hc|~/.config/dwb/default/custom_keys|<nowiki><br />
}:exja (function(){var e=document.querySelector("[rel='next']");if(e){location=e.href;}else{var f=document.getElementsByTagName("a");var i=f.length;while((e=f[--i])){if(e.text.search(/(\bnext\b|^>$|^(>>|»)$|^(>|»)|(>|»)$|\bmore\b)/i)>-1){location=e.href; break;}} location.href=location.href.replace(/(\d+)([^\/\d]*)$/, function(a,b,c){return ++b+c})}})();<br />
{:exja (function(){var e=document.querySelector("[rel='prev']");if(e){location=e.href;}else{var f=document.getElementsByTagName("a");var i=f.length;while((e=f[--i])){if(e.text.search(/(\b(prev|previous)\b|^<$|^(<<|«)$|^(<|«)|(<|«)$)/i)>-1){location=e.href;break;}} location.href=location.href.replace(/(\d+)([^\/\d]*)$/, function(a,b,c){return --b+c})}})();<br />
</nowiki>}}<br />
<br />
Alternatively, the {{ic|navtools}} extension provides the same functionality and more, such as going up one directory, or loading the root URI.<br />
<br />
=== open-firefox ===<br />
Opens current page in Firefox with {{ic|xf}} (uses {{Pkg|firefox}} and {{Pkg|libnotify}}).<br />
{{hc|~/.config/dwb/userscripts/open-firefox.sh|<nowiki><br />
#!/bin/bash<br />
# dwb: xf<br />
firefox $DWB_URI &<br />
notify-send -u low "Firefox opening $DWB_URI" #optional notification<br />
</nowiki>}}<br />
<br />
=== startup-noautoreload ===<br />
<br />
Prevents previously-opened tabs from reloading all at once after a restart.<br />
{{hc|~/.config/dwb/userscripts/startup-noautoreload.js|<nowiki><br />
//!javascript<br />
// prevents previously-opened tabs from reloading all at once after a restart.<br />
execute("set load-on-focus true");<br />
<br />
var sigId = Signal.connect("navigation", function(wv) {<br />
if (wv == tabs.current)<br />
{<br />
execute("set load-on-focus false");<br />
Signal.disconnect(sigId);<br />
}<br />
});</nowiki>}}<br />
<br />
=== toggle-stylesheet ===<br />
<br />
Toggles between 2 global stylesheets with {{ic|xg}}.<br />
{{hc|~/.config/dwb/userscripts/toggle-stylesheet.sh|<nowiki><br />
#!/bin/bash<br />
# dwb:xg<br />
<br />
CURRENT_STYLESHEET="$(dwbremote get setting user-stylesheet-uri)"<br />
<br />
STYLESHEET_1="file://$HOME/.config/dwb/stylesheets/foo.css"<br />
STYLESHEET_2="file://$HOME/.config/dwb/stylesheets/bar.css"<br />
<br />
if [[ "${CURRENT_STYLESHEET}" = ${STYLESHEET_1} ]]; then<br />
dwbremote :local_set user-stylesheet-uri "$STYLESHEET_2"<br />
else <br />
dwbremote :local_set user-stylesheet-uri "$STYLESHEET_1"<br />
fi</nowiki>}}<br />
<br />
=== youtube-player ===<br />
<br />
Opens YouTube videos with MPlayer (uses {{Pkg|mplayer}} and {{Pkg|youtube-dl}}).<br />
{{hc|~/.config/dwb/userscripts/youtube-mplayer.js|<nowiki><br />
//!javascript <br />
// opens YouTube videos with mplayer.<br />
var regex = new RegExp("http(.*)://www.youtube.com/watch\\?(.*&)*v=.*");<br />
<br />
Signal.connect("navigation", function (wv, frame, request) {<br />
if (wv.mainFrame == frame && regex.test(request.uri)) <br />
system.spawn("sh -c 'mplayer \"$(youtube-dl -g " + request.uri + ")\"'");<br />
return false;<br />
});</nowiki>}}<br />
<br />
=== rocker gestures ===<br />
<br />
Enables Opera-like rocker gestures for navigating the history. Disable the context menu in the settings first.<br />
{{hc|~/.config/dwb/userscripts/rocker.js|<nowiki><br />
//!javascript<br />
var LMB = 1, MMB=2, RMB = 3, UNKNOWN = 10, DOWN = 11, UP = 12;<br />
<br />
var buttonStates = [UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN];<br />
var bp = new Signal("onButtonPress", function(wv, result, ev) {<br />
var mouseButton = ev.button;<br />
<br />
buttonStates[mouseButton] = DOWN;<br />
<br />
if (mouseButton == LMB && buttonStates[RMB] == DOWN) {<br />
execute("history_back");<br />
} else if (mouseButton == RMB && buttonStates[LMB] == DOWN) {<br />
execute("history_forward");<br />
}<br />
});<br />
var br = new Signal("onButtonRelease", function(wv, result, ev) {<br />
buttonStates[ev.button] = UP;<br />
});<br />
<br />
bp.connect();<br />
br.connect();</nowiki>}}<br />
<br />
== Stylesheet ==<br />
<br />
a global stylesheet can be defined in the Settings, under {{ic|user-stylesheet-uri}} (i.e. {{ic|file:///home/tux/.config/dwb/stylesheet.css}})<br />
<br />
If you browse with the status bar hidden and are annoyed by the the link previews that appear while hovering over links with the mouse, add this to the stylesheet: {{ic|#dwb_hover_element { display:none!important; }}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Search engines search for ''undefined'' ===<br />
<br />
If you are always searching for ''undefined'' even with the {{ic|searchengine-submit-pattern}} option set, then you should edit {{ic|$XDG_CONFIG_HOME/dwb/searchengines}} and adapt the URIs to match your {{ic|searchengine-submit-pattern}}.<br />
<br />
=== Fuzzy font in Github ===<br />
<br />
Install {{Pkg|ttf-freefont}} or add this in your {{ic|~/.config/fontconfig/fonts.conf}} inside the fontconfig-tags:<br />
<br />
<selectfont><br />
<rejectfont><br />
<pattern><br />
<patelt name="family"><br />
<string>Clean</string><br />
</patelt><br />
</pattern><br />
</rejectfont><br />
</selectfont><br />
<br />
If above solution doesn't help try to remove {{ic|xorg-fonts-75dpi}} and {{ic|xorg-fonts-100dpi}} packages.<br />
<br />
== dwb-git ==<br />
<br />
{{AUR|dwb-git}} offers many improvements over the stable version. Most the most notable of which are listed below.<br />
<br />
=== Plugin Support ===<br />
<br />
Browser Plugins can be enabled and disabled through the new [dwb:plugins dwb:plugins] settings page. Other [[Browser plugins]] may be supported as well, but these two alone will make your dwb experience much more enjoyable.<br />
<br />
==== Flash Support ====<br />
<br />
{{AUR|dwb-git}} has built in support for the {{Pkg|flashplugin}}. Dwb should auto-detect and enabled the plugin after it is installed. Alternatively, you can install {{Aur|gnash-gtk}} and it will be detected as well.<br />
<br />
==== Java Support ====<br />
<br />
{{AUR|dwb-git}} has built in support for the {{Pkg|icedtea-web}}. Dwb should auto-detect and enable the plugin after it is installed.<br />
<br />
=== Improved Ability to Display Websites ===<br />
<br />
If you are having problems with they layout of websites not loading correctly then give {{AUR|dwb-git}} a shot.<br />
<br />
==Other Keyboard Navigation Enabled Browsers==<br />
* [[Firefox]] - with the following extension: [http://5digits.org/pentadactyl/ Pentadactyl]<br />
* [[Jumanji]]<br />
* [[Vimprobable]]<br />
* [[Luakit]]<br />
* [[Surf]]<br />
* [[Uzbl]]</div>Varlogtimhttps://wiki.archlinux.org/index.php?title=Luakit&diff=354065Luakit2014-12-29T07:14:15Z<p>Varlogtim: /* Other Keyboard Navigation Enabled Browsers */</p>
<hr />
<div>[[Category:Web Browser]]<br />
[[tr:Luakit]]<br />
[http://mason-larobina.github.io/luakit/ Luakit] is an extremely fast, lightweight and flexible web browser using the webkit engine.<br />
It is customizable through lua scripts and fully usable with keyboard shortcuts.<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] {{Pkg|luakit}} from [[official repositories]].<br />
<br />
To use the latest development version, install {{AUR|luakit-git}} available from the [[AUR]].<br />
<br />
With the Unix philosophy in mind, Luakit is entirely customizable through its configuration files.<br />
Those files are written in the Lua scripting language, thus allowing virtually unlimited features.<br />
<br />
First, copy the configuration files to:<br />
<br />
$ cp -r /etc/xdg/luakit ~/.config<br />
<br />
Now you can edit any of these files to make your browser fits your needs. Even if you do not know much about Lua, the configuration is simple and well commented enough to make it straightforward.<br />
<br />
== Basic usage ==<br />
<br />
{{note|Most of the shortcuts are viewable and customizable from {{ic|~/.config/luakit/binds.lua}}.}}<br />
<br />
Press {{ic|:}} to access the command prompt. You can do nearly everything from there.<br />
Use {{ic|Tab}} to autocomplete commands.<br />
<br />
Use the {{ic|:help}} command to get information on the available keyboard shortcuts and what they do. (To see how the action for a particular keyboard shortcut is implemented in Lua, click anywhere in its help text.)<br />
<br />
To quit, use the {{ic|:quit}} command, or press {{ic|Shift+z}} followed by {{ic|Shift+q}}.<br />
You can also close the browser while remembering the session (i.e. restoring the tabs) by using the {{ic|:writequit}} command instead, or pressing {{ic|Shift+z}} twice.<br />
<br />
=== Browsing ===<br />
<br />
* Press {{ic|o}} to open a prompt with the {{ic|:open}} command and enter the URI you want. Press {{ic|Shift+o}} to edit the current URI.<br />
* If it is not a recognized URI, Luakit will use the default search engine specified in {{ic|~/.config/luakit/globals.lua}}.<br />
* Specify which search engine to use by prefixing the entry with the appropriate keywork (e.g. {{ic|:open google foobar}} will search ''foobar'' on Google).<br />
* Use common shortcuts to navigate. For [[emacs]] and [[vim]] ''aficionados'', some of their regular shortcuts are provided. You can use the mouse as well.<br />
* Use {{ic|f}} to display the index of all visible links. Enter the appropriate number or a part of the string to open the link.<br />
* Use {{ic|Shift+f}} instead to open link in a new tab.<br />
* Press {{ic|Ctrl+t}} to open a new tab, {{ic|Ctrl+w}} to close it. Press {{ic|t}} to prompt for an URI to be opened in a new tab, and {{ic|Shift+t}} to edit the current URI in a new tab.<br />
* Press {{ic|w}} to prompt for an URI to be opened in a new window, and {{ic|Shift+w}} to edit the current URI in a new window.<br />
* Switch from one tab to another by pressing {{ic|g}} followed by {{ic|t}} or {{ic|Shift+t}}, or use {{ic|Ctrl+PageUp}} and {{ic|Ctrl+PageDown}}.<br />
* You can switch to a specific tab with {{ic|Alt+''number''}}.<br />
* Use {{ic|Shift+h}} to go back in the browser history.<br />
* Use {{ic|Shift+l}} to go forward in the browser history.<br />
* Reorder the tabs with {{ic|<}} and {{ic|>}}.<br />
* Reload the page with {{ic|r}}, stop the loading with {{ic|Ctrl+c}}.<br />
* Re-open last closed tab with {{ic|u}}.<br />
* Open downloads page by pressing {{ic|g}} followed by {{ic|d}} (or {{ic|Shift+d}} for a new tab).<br />
* Copy URI to primary selection with {{ic|y}}.<br />
* View page source code with {{ic|:viewsource}}. Return to normal view with {{ic|:viewsource!}}.<br />
* View image source by pressing {{ic|;}} followed by {{ic|i}} (or {{ic|Shift+i}} for new tab).<br />
* Inspect elements with {{ic|:inspect}}. Repeat to open in a new window. Disable inspector with {{ic|:inspect!}}.<br />
<br />
=== Input fields ===<br />
<br />
Many webpages have editable elements like dropdown lists, checkboxes, text fields and so on. While they work perfectly with the mouse, you may encounter some troubles using the ''follow'' commands.<br />
In such a case, pressing the arrow keys may help.<br />
Alternatively, the {{ic|g}} {{ic|i}} shortcut can be used to focus input.<br />
<br />
=== Bookmarks ===<br />
<br />
If enabled (default configuration), bookmarks can be used from within Luakit.<br />
<br />
* The {{ic|:bookmarks}} command opens the bookmarks page. (Shortcut: {{ic|g}} followed by {{ic|b}}, or {{ic|Shift+b}} for a new tab).<br />
* The {{ic|:bookmark [''URI'' [''tags'']]}} command adds the URI specified (or the current tab's URI, if omitted) to the bookmarks by specified tags. Starting from version 2012-09-13-r1, bookmarks page will be opened (new tab) in new bookmark editing mode before saving. (Shortcut: {{ic|Shift+b}}).<br />
<br />
== Configuration ==<br />
<br />
=== Homepage ===<br />
<br />
Set your homepage as follows:<br />
<br />
{{hc|~/.config/luakit/globals.lua|2=<br />
globals = {<br />
homepage = "www.example.com",<br />
...<br />
}<br />
}}<br />
<br />
=== Custom search engines ===<br />
<br />
To search with the default search engine, press {{ic|o}} and type the phrases. To search with a different engine, type it's name after {{ic|o}} and then the phrases.<br />
<br />
You can virtually add any search engine you want. Make a search on the website you want and copy paste the URI to the Luakit configuration by replacing the searched terms with an {{ic|%s}}. Example:<br />
<br />
{{hc|~/.config/luakit/globals.lua|2=<br />
search_engines = {<br />
aur = "<nowiki>https://aur.archlinux.org/packages.php?O=0&K=%s&do_Search=Go</nowiki>",<br />
aw = "<nowiki>https://wiki.archlinux.org/index.php/Special:Search?fulltext=Search&search=%s</nowiki>",<br />
googleseceng = "<nowiki>https://www.google.com/search?name=f&hl=en&q=%s</nowiki>",<br />
...<br />
}<br />
}}<br />
<br />
The variable is used as a keyword for the {{ic|:open}} command in Luakit.<br />
<br />
Set the defaut search engine by using this same keyword:<br />
<br />
{{hc|~/.config/luakit/globals.lua|2=<br />
search_engines.default = search_engines.aur<br />
}}<br />
<br />
=== Download location ===<br />
<br />
To specify download location:<br />
<br />
{{hc|~/.config/luakit/rc.lua|2=<br />
-- Add download support<br />
require "downloads"<br />
require "downloads_chrome"<br />
<br />
-- Set download location<br />
downloads.default_dir = os.getenv("HOME") .. "/downloads"<br />
downloads.add_signal("download-location", function (uri, file)<br />
if not file or file == "" then<br />
file = (string.match(uri, "/([^/]+)$")<br />
or string.match(uri, "^%w+://(.+)")<br />
or string.gsub(uri, "/", "_")<br />
or "untitled")<br />
end<br />
return downloads.default_dir .. "/" .. file<br />
end)<br />
}}<br />
<br />
=== Adblock ===<br />
<br />
There are several plugins available out there.<br />
<br />
To configure the Adblock plugin [https://github.com/mason-larobina/luakit/wiki/AdBlock-Lua-module featured on the official website]:<br />
<br />
* Put the {{ic|adblock.lua}} and {{ic|adblock_chrome.lua}} files in {{ic|~/.config/luakit}}.<br />
* Edit {{ic|~/.config/rc.lua}} and add the following in the section labelled ''Optional user script loading'':<br />
<br />
{{hc|~/.config/rc.lua|<br />
<nowiki>----------------------------------<br />
-- Optional user script loading --<br />
----------------------------------</nowiki><br />
<br />
require "adblock"<br />
require "adblock_chrome"<br />
...<br />
}}<br />
<br />
* Fetch an adblock-compatible list, like [https://easylist-downloads.adblockplus.org/easylist.txt Easylist], and save it to {{ic|~/.local/share/luakit}}.<br />
* Restart Luakit to load the extension.<br />
* Use {{ic|:adblock-list-enable ''number''}} command within Luakit to turn Adblock's list(s) you downloaded on Adblock itself becomes enabled on startup.<br />
Full info on enabled lists and AdBlock state can be found using {{ic|:adblock}} or {{ic|g}} {{ic|Shift+a}} at {{ic|luakit://adblock/}} internal page, if the {{ic|adblock_chrome}} module is enabled, which is not a mandatory part.<br />
<br />
{{Note|For Adblock to run in '''normal''' mode, {{ic|easylist.txt}} and any others must be placed in {{ic|~/.local/share/luakit/adblock}}}}<br />
<br />
AdBlock for Luakit plugin is also available as a part of [https://github.com/mason-larobina/luakit-plugins/ Luakit Plugins] project.<br />
<br />
=== Bookmarks management ===<br />
<br />
==== Sync ====<br />
<br />
Starting from version 2012.09.13, Luakit bookmarks are stored in an SQLite database: {{ic|~/.local/share/luakit/bookmarks.db}}.<br />
<br />
You can put a symbolic link in place of the default file to store your bookmarks anywhere on your machine.<br />
This way if your are using a cloud sync application like Dropbox, you can keep your bookmarks synchronized between your different computers.<br />
<br />
==== Converting plain text bookmarks to SQLite format ====<br />
<br />
Bookmarks were stored in a simple plain text file: {{ic|~/.local/share/luakit/bookmarks}}. Each line is a bookmark. It is composed of 2 fields, the ''link'' and the ''group'' which are separated by a ''tab'' character.<br />
<br />
{{Warning|If spaces are inserted instead of tabulation character, the link will not be properly bookmarked.}}<br />
<br />
{{Note|Groups and links are alphabetically sorted, so there is no need to do it manually.}}<br />
<br />
To use bookmarks with the latest Luakit release, the file must be converted.<br />
A sample Lua script will do that:<br />
<br />
{{hc|bookmarks_plain_to_sqlite.lua|<nowiki><br />
local usage = [[Usage: luakit -c bookmarks_plain_to_sqlite.lua [bookmark plaintext path] [bookmark db path]<br />
]]<br />
<br />
local old_db_path, new_db_path = unpack(uris)<br />
<br />
if not old_db_path or not new_db_path then<br />
io.stdout:write(usage)<br />
luakit.quit(1)<br />
end<br />
<br />
-- One-pass file read into 'data' var.<br />
old_db = assert(io.open(old_db_path, "r"))<br />
local data = old_db:read("*all")<br />
assert(old_db:close())<br />
<br />
-- Init new_db, otherwise sqlite queries will fail.<br />
new_db = sqlite3{ filename = new_db_path }<br />
new_db:exec("CREATE TABLE IF NOT EXISTS bookmarks (id INTEGER PRIMARY KEY, uri TEXT NOT NULL, title TEXT NOT NULL, desc TEXT NOT NULL, tags TEXT NOT NULL, created INTEGER, modified INTEGER )")<br />
<br />
-- Fill<br />
local url,tag<br />
<br />
for line in data:gmatch("[^\n]*\n?") do<br />
<br />
if string.len(line) > 1 then<br />
<br />
print ("["..line.."]")<br />
<br />
-- Get url and tag (if present) from first line.<br />
_, _, url, tag = string.find(line, "([^\n\t]+)\t*([^\n]*)\n?")<br />
<br />
-- Optional yet convenient output.<br />
io.write(url)<br />
io.write("\t")<br />
io.write(tag)<br />
io.write("\n")<br />
<br />
-- DB insertion. Nothing will be overwritten. If URL and/or tag already exists, then a double is created.<br />
new_db:exec("INSERT INTO bookmarks VALUES (NULL, ?, ?, ?, ?, ?, ?)", <br />
{<br />
url, "", "", tag or "",<br />
os.time(), os.time()<br />
})<br />
end<br />
end<br />
<br />
print("Import finished.")<br />
print("\nVacuuming database...")<br />
new_db:exec "VACUUM"<br />
print("Vacuum done.")<br />
<br />
luakit.quit(0)<br />
</nowiki>}}<br />
<br />
As stated at beginning of the script, it must be ran with Luakit:<br />
<br />
$ luakit -c bookmarks_plain_to_sqlite.lua ''path/to/plaintext/bookmark'' ''path/to/db''<br />
<br />
The old plaintext bookmarks will be left unchanged. If the DB bookmarks do not exist, the file will be created. If it exists, do not worry, none of the previous bookmarks will be touched. However, this behaviour implies that you might get some doubles.<br />
<br />
==== Import from Firefox ====<br />
<br />
{{Note|This works only for Luakit versions before 2012.03.25! For newer version, you can first run this script, then convert the generted plain text bookmarks to the SQLite format as described at [[#Converting plain text bookmarks to SQLite format]].}}<br />
<br />
To import bookmarks from Firefox, first they must be exported to an HTML file using its bookmarks manager. After that the XML file can be converted to a Luakit format.<br />
<br />
The following one-line awk command will do that:<br />
<br />
{{bc|<nowiki><br />
$ cat bookmarks.html | awk '<br />
{gsub(/\"/," ")}<br />
/<\/H3>/{FS=">";gsub(/</,">");og=g;g=$(NF-2);FS=" "}<br />
/<DL>/{x++;if(x>= 3)gl[x-3]=g}<br />
/<\/DL>/{x--;if(x==2)g=og"2"}<br />
/HREF/{gsub(/</," ");gsub(/>/," ");if(g!=""){if(og!=g){printf "\n";og=g};printf "%s\t",$4;if(x>=3){for(i=0;i<=x-4;i++){printf "%s-",gl[i]}printf "%s\n",gl[x-3]}else{printf "\n"}}}'<br />
</nowiki>}}<br />
<br />
The more readable version of the script:<br />
<br />
{{hc|ff2lk.awk|<nowiki><br />
# Notes: 'folders' for Firefox bookmarks mean 'groups' for Luakit.<br />
<br />
# Put spaces where it is needed to delimit words properly.<br />
{gsub(/\"/," ")}<br />
<br />
# Since the folder name may have spaces, delimiter must be ">" here.<br />
/<\/H3>/ {<br />
FS=">"<br />
gsub(/</,">")<br />
oldgroup=group<br />
group=$(NF-2)<br />
FS=" "<br />
}<br />
<br />
# Each time a <DL> is encountered, it means we step into a subfolder.<br />
# 'count' is the depth level.<br />
# Base level starts at 2 (Firefox fault).<br />
# 'groupline' is an array of all parent folders.<br />
/<DL>/ {<br />
count++<br />
if ( count >= 3 )<br />
groupline[count-3]=group<br />
}<br />
<br />
# On </DL>, we step out.<br />
# If if return to the base level (i.e. not in a folder), then we give 'group' a fake name different<br />
# from 'oldgroup' to make sure a line will be skipped (see below).<br />
/<\/DL>/ {<br />
count--<br />
if( count == 2 )<br />
group=oldgroup"ROOT"<br />
}<br />
<br />
# The bookmark name.<br />
# If oldgroup is different than group, (i.e. folder changed) then we skip a line.<br />
# If we are in a folder, then we print the group name, i.e. all parents plus the current folder<br />
# separated by an hyphen.<br />
/HREF/ {<br />
gsub(/</," ")<br />
gsub(/>/," ")<br />
if (group != "")<br />
{<br />
if(oldgroup != group)<br />
{<br />
printf "\n"<br />
oldgroup=group<br />
}<br />
printf "%s\t",$4<br />
if ( count >= 3 )<br />
{<br />
for ( i=0 ; i <= count-4 ; i++ )<br />
{printf "%s-" , groupline[i]}<br />
printf "%s" , groupline[count-3]<br />
}<br />
printf "\n"<br />
}<br />
}</nowiki><br />
}}<br />
<br />
Run it with<br />
<br />
$ awk -f ff2lk.awk bookmarks.html >> bookmarks<br />
<br />
==== Export bookmarks ====<br />
<br />
The following script let you export Luakit bookmarks from its SQLite format to a plain text file. The resulting file may be suitable for other web browsers, or may be easily parsed by import scripts.<br />
<br />
{{hc|bookmarks_sqlite_to_plain.lua|<nowiki><br />
-- USER CONFIG<br />
<br />
local sep = " "<br />
<br />
-- END OF USER CONFIG<br />
<br />
local usage = [[Usage: luakit -c bookmarks_sqlite_to_plain.lua [bookmark db path] [bookmark plain path]<br />
<br />
DB scheme is<br />
<br />
bookmarks (<br />
id INTEGER PRIMARY KEY,<br />
uri TEXT NOT NULL,<br />
title TEXT NOT NULL,<br />
desc TEXT NOT NULL,<br />
tags TEXT NOT NULL,<br />
created INTEGER,<br />
modified INTEGER<br />
);<br />
]]<br />
<br />
local old_db_path, new_db_path = unpack(uris)<br />
<br />
if not old_db_path or not new_db_path then<br />
io.stdout:write(usage)<br />
luakit.quit(1)<br />
end<br />
<br />
-- One-pass file read into 'data' var.<br />
new_db = assert(io.open(new_db_path, "w"))<br />
<br />
-- Open old_db<br />
old_db = sqlite3{ filename = old_db_path }<br />
<br />
-- Load all db values to a string variable.<br />
local rows = old_db:exec [[ SELECT * FROM bookmarks ]]<br />
<br />
-- Iterate over all entries.<br />
-- Note: it could be faster to use one single concatenation for all entries, but<br />
-- it would be much more code and not so flexible. It is desirable to focus on<br />
-- clarity. After all, only a few hundred lines are handled.<br />
for _, b in ipairs(rows) do<br />
<br />
-- Change %q for %s to remove double quotes if needed.<br />
-- You can toggle the desired fields with comments.<br />
local outputstr = <br />
string.format("%q%s", b.uri or "", sep) .. <br />
string.format("%q%s", b.title or "", sep) ..<br />
string.format("%q%s", b.desc or "", sep) ..<br />
string.format("%q%s- ", b.tags or "", sep) ..<br />
((b.created or "" ) .. sep) ..<br />
((b.modified or "" ) .. sep) ..<br />
"\n"<br />
<br />
-- Write entry to file.<br />
new_db:write(outputstr)<br />
end<br />
<br />
<br />
print("Export done.")<br />
<br />
assert(new_db:close())<br />
<br />
luakit.quit(0)</nowiki><br />
}}<br />
<br />
As stated at beginning of the script, it must be ran with Luakit:<br />
<br />
$ luakit -c bookmarks_plain_to_sqlite.lua ''path/to/plaintext/bookmarks'' ''path/to/database''<br />
<br />
=== Tor ===<br />
<br />
Once [[Tor]] has been setup, simply run:<br />
<br />
$ torify luakit<br />
<br />
{{warning|To be sure of anonymity, you also need to change settings within Luakit, such as disabling Flash and changing the useragent string.}}<br />
<br />
=== Custom CSS ===<br />
<br />
Place the CSS file in the {{ic|styles}} subdirectory of Luakit data directory (create if does not exist). For example this will set monospace font for text input areas:<br />
<br />
{{hc|~/.local/share/luakit/styles/custom.css|<br />
input,textarea,select {<br />
font-family: DejaVu Sans Mono,Consolas,Monaco,Lucida Console,Liberation Mono,Bitstream Vera Sans Mono,Courier New, monospace;<br />
}<br />
}}<br />
<br />
And in {{ic|globals.lua}} assign the variable {{ic|user_stylesheet_uri}} to that file's location:<br />
<br />
{{hc|~/.config/luakit/globals.lua|2=<br />
domain_props = {<br />
["all"] = {<br />
...<br />
user_stylesheet_uri = "file://" .. luakit.data_dir .. "/styles/custom.css",<br />
...<br />
},<br />
...<br />
}<br />
}}<br />
<br />
== See also ==<br />
<br />
* [http://mason-larobina.github.com/luakit/ Home page]<br />
* [http://shariebeth.com/computers/luakitcheatsheet.txt Cheatsheet]<br />
<br />
==Other Keyboard Navigation Enabled Browsers==<br />
* [[Firefox]] - with the following extension: [http://5digits.org/pentadactyl/ Pentadactyl]<br />
* [[Jumanji]]<br />
* [[Vimprobable]]<br />
* [[Uzbl]]<br />
* [[Surf]]<br />
* [[Dwb]]</div>Varlogtimhttps://wiki.archlinux.org/index.php?title=Vimprobable&diff=354064Vimprobable2014-12-29T07:13:52Z<p>Varlogtim: /* Other Keyboard Navigation Enabled Browsers */</p>
<hr />
<div>{{DISPLAYTITLE:Vimprobable}}<br />
[[Category:Web Browser]]<br />
[http://www.vimprobable.org/ Vimprobable] is a WWW browser that behaves like the Vimperator plugin available for Mozilla [[Firefox]]. It is based on the WebKit engine (using GTK bindings). It is a fork of the currently abandoned vimpression.<br />
<br />
==Install==<br />
There are two versions of Vimprobable in the [[AUR]]: {{AUR|vimprobable-git}} and {{AUR|vimprobable2-git}}. Now that Vimprobable2 is at version 1.0, it is considered the primary branch; development of Vimprobable1 will still recieve bugfixes, but active development will be restricted to Vimprobable2. <br />
<br />
The first version can only be customised by editing {{ic|config.h}} before compilation. It is pretty stable and very usable. Version 2, while also stable, is under more active development - it aims at allowing more customisation, for example through {{ic|:set}} and {{ic|:map}} commands.<br />
<br />
==Configuration==<br />
Both versions require you to make customizations in the {{ic|config.h}} file before recompiling with<br />
$ makepkg -fi<br />
<br />
Additionally, Vimprobable2 will look for a configuration file called {{ic|$XDG_CONFIG_HOME/vimprobable/vimprobablerc}} that has a number of options that can be configured without any need to recompile. You will need to create this file yourself.<br />
<br />
A basic vimprobablerc might contain the following options:<br />
set homepage=https://bbs.archlinux.org/<br />
set scrollbars=false<br />
set fontsize=12<br />
set monofontsize=10<br />
set monofont="Droid Sans Mono Slashed"<br />
<br />
More details on configuring Vimprobable2 can be found in the rc man page<br />
man vimprobablerc<br />
<br />
Within the source directory, you will find two other files that can be customized, {{ic|config.h}} and {{ic|keymap.h}}. As one would expect, the first contains general configuration options, such as appearance and the second allows you to set your own keybindings. Any changes to either of these files require that Vimprobable2 be recompiled before they take effect. <br />
<br />
{{Tip|As per the post install instructions, you will need to copy these files from the source directory to customize them.}}<br />
<br />
Details for the default keybindings and options can be found in the man page<br />
man vimprobable<br />
<br />
==Tips==<br />
Setting a more generic user agent will make accessing some websites more straightforward. In {{ic|$XDG_CONFIG_HOME/vimprobable/vimprobablerc}} add a useragent for a browser that the site will find more acceptable, for example:<br />
set useragent="Vimprobable2 (X11; U; Unix; en-US) AppleWebKit/531.2+ Compatible (Safari)"<br />
<br />
You can find a list of useragents here: http://www.useragentstring.com/pages/useragentstring.php<br />
<br />
You can specify additional search engines in Vimprobable2's {{ic|config.h}} like so<br />
<br />
static Searchengine searchengines[] = {<br />
{ "b", "http://blekko.com/?q=%s" },<br />
{ "d", "http://duckduckgo.com/?q=%s" },<br />
{ "g", "http://www.google.com/search?hl=en&source=hp&ie=ISO-8859-l&q=%s" },<br />
{ "a", "https://wiki.archlinux.org/index.php?title=Special%%3ASearch&search=%s&go=Go" },<br />
{ "w", "https://secure.wikimedia.org/wikipedia/en/w/index.php?title=Special%%3ASearch&search=%s&go=Go" },<br />
}<br />
<br />
If you are running Vimprobable in [http://tools.suckless.org/tabbed tabbed], you can direct other applications to open webpages and have them captured in {{ic|tabbed}} by starting Vimprobable with an {{ic|xid}}:<br />
$(tabbed -d >/tmp/tabbed.xid); vimprobable2 -e $(</tmp/tabbed.xid)<br />
and then directing the other applications to use that {{ic|xid}} to launch Vimprobable:<br />
exec vimprobable2 -e $(</tmp/tabbed.xid) "$1"<br />
<br />
With this script you can create a tabbed session if there is not alredy a window with tabbed, and then launch Vimprobable within it.<br />
{{bc|<nowiki><br />
#!/usr/bin/env bash<br />
[[ -z $((xprop -id $(</tmp/tabbed.xid)) 2>/dev/null) ]] && tabbed -d > /tmp/tabbed.xid <br />
exec vimprobable2 -e $(</tmp/tabbed.xid) $( [[ "$1" ]] && echo "$1") &<br />
</nowiki>}}<br />
<br />
==Resources==<br />
* [http://www.vimprobable.org/ Vimprobable] website<br />
* [http://tools.suckless.org/tabbed tabbed] a suckless program for managing tabs<br />
* [http://vimeo.com/53829053 A screencast] introduction to Vimprobable<br />
<br />
==Other Keyboard Navigation Enabled Browsers==<br />
* [[Firefox]] - with the following extension: [http://5digits.org/pentadactyl/ Pentadactyl]<br />
* [[Jumanji]]<br />
* [[Uzbl]]<br />
* [[Luakit]]<br />
* [[Surf]]<br />
* [[Dwb]]</div>Varlogtimhttps://wiki.archlinux.org/index.php?title=Jumanji&diff=354063Jumanji2014-12-29T07:13:27Z<p>Varlogtim: /* Other Keyboard Navigation Enabled Browsers */</p>
<hr />
<div>[[Category:Web Browser]]<br />
[http://pwmt.org/projects/jumanji/ jumanji] is a web browser that provides a minimalistic and space saving interface as well as an easy usage that mainly focuses on keyboard interaction like ''vimperator'' does.<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] one of ''jumanji'' variants from the [[AUR]]:<br />
* {{AUR|jumanji}} - Stable release.<br />
* {{AUR|jumanji-git}} - Development release.<br />
<br />
== Configuration ==<br />
<br />
=== config.h ===<br />
<br />
To modify config.h:<br />
* get jumanji-git PKGBUILD from AUR<br />
* {{ic|makepkg}}<br />
* {{ic|git --git-dir src/jumanji/ init}}<br />
* change src/jumanji/config.def.h<br />
* {{ic|makepkg -e}}<br />
<br />
=== rc file configuration ===<br />
<br />
jumanji allows for a lot of user configuration either by modifying the config.def.h file or through a rc file located at {{ic|~/.config/jumanji/jumanjirc}}. you can set searchengines, homepages, custom stylesheets, user scripts, proxy. Change the default download directory and much more. A sample configuration file below shows how to customize jumanji.<br />
# jumanji configuration<br />
# search engines<br />
searchengine ggl http://www.google.com/search?q=%s<br />
searchengine wiki http://en.wikipedia.org/w/index.php?search=%s<br />
# browser settings<br />
set homepage http://www.google.com/ig<br />
set auto_save 60<br />
set single_instance false<br />
# Use privoxy for adblocking<br />
set proxy localhost:8118 <br />
# look n feel<br />
set font monospace normal 9<br />
set stylesheet file:///home/inxs/.config/jumanji/style.css <br />
# follow hints<br />
script ~/.config/jumanji/scripts/hinting.js<br />
# downloads<br />
set download_dir ~/downloads/<br />
set download_command urxvt -e sh -c "wget --load-cookies ~/.config/jumanji/cookies '%s' -O '%s'";<br />
# keybindings<br />
map <C-,> nav_history previous<br />
map <C-.> nav_history next<br />
bmap ^DD$ quit<br />
<br />
{{Note| Latest version seems to use "proxy localhost:8118" instead of "''set'' proxy localhost:8118".}}<br />
<br />
== Commands ==<br />
<br />
Below are some basic commands that can be used with jumanji <br />
<br />
=== Look and feel ===<br />
<br />
C-m = Toggle status bar<br />
C-n = Toggle tab bar<br />
<br />
=== Page navigation ===<br />
<br />
o = enter url to open in same tab<br />
t = enter url to open in new tab<br />
j = scroll down<br />
k = scroll up<br />
h = scroll left<br />
l = scroll right<br />
C-d = scroll down (half the screen)<br />
C-u = scroll up (half the screen)<br />
space = page down<br />
gg = beginning<br />
G = end<br />
C-o = back<br />
C-i = forward<br />
:stop = stop<br />
r = reload<br />
<br />
=== Zooming ===<br />
<br />
zI = zoom_in<br />
zO = zoom_out<br />
z0 = zoom to original size<br />
<br />
=== Searching ===<br />
<br />
/ = search %s<br />
? = search reverse %s<br />
:open = start a search with your search engine %s (the first one in your jumanjirc is used)<br />
<br />
=== Bookmarks and history ===<br />
<br />
:bmark = insert bookmark (bookmarks are saved in ~/.config/jumanji/bookmarks)<br />
o <tab> = show bookmarks and history to open in same tab<br />
t <tab> = show bookmarks and history to open in new tab<br />
<br />
=== Link following ===<br />
<br />
f = spawn numbers next to each hyperlink. Type the number after typing f to follow the link in the same tab [http://www.pwmt.org/jumanji/faq/]<br />
F = spawn numbers next to each hyperlink. Type the number after typing F to follow the link in a new tab<br />
gh = Go to homepage in the same tab<br />
gH = open homepage in a new tab<br />
gf, C-s = view source<br />
gF = view source in a new tab<br />
<br />
=== Tabs ===<br />
<br />
gt or C-Tab or S-k = go to next tab<br />
gT or C-S-Tab or S-j = go to previous tab<br />
xgt = go to tab number x, where x is any number 0-9<br />
C-w = close tab<br />
<br />
=== Exit ===<br />
<br />
ZZ = exit<br />
C-q = exit<br />
<br />
== See also ==<br />
<br />
* [https://bbs.archlinux.org/viewtopic.php?id=100505 Old, closed forum thread]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=115119 The current forum thread]<br />
<br />
==Other Keyboard Navigation Enabled Browsers==<br />
* [[Firefox]] - with the following extension: [http://5digits.org/pentadactyl/ Pentadactyl]<br />
* [[Vimprobable]]<br />
* [[Uzbl]]<br />
* [[Luakit]]<br />
* [[Surf]]<br />
* [[Dwb]]</div>Varlogtimhttps://wiki.archlinux.org/index.php?title=Uzbl&diff=354062Uzbl2014-12-29T07:13:08Z<p>Varlogtim: /* Other Keyboard Navigation Enabled Browsers */</p>
<hr />
<div>[[Category:Web Browser]]<br />
[http://www.uzbl.org/ Uzbl] is a lightweight browser based on '''uzbl-core'''. '''Uzbl''' adheres to the UNIX philosophy of "Write programs that do one thing and do it well". The uzbl-browser package includes uzbl-core, uzbl-browser and uzbl-event-manager. Most users will want to use '''uzbl-browser''' or '''uzbl-tabbed''' as they provide the fullest set of tools for browsing. Uzbl-browser allows for a single page per window (with as many windows as you want), while uzbl-tabbed provides a wrapper for uzbl-browser and implements basic tabs with multiple pages per window.<br />
<br />
==Installation==<br />
<br />
[[pacman|Install]] {{Pkg|uzbl-browser}} or {{Pkg|uzbl-tabbed}} available in the [[official repositories]].<br />
<br />
==Plugins==<br />
<br />
Uzbl can make use of outside [[browser plugins]] like Flash and Java. Installing these packages will enable their use in uzbl-browser and uzbl-tabbed.<br />
<br />
==Commands==<br />
<br />
One of the biggest advantages of using Uzbl is that nearly everything can be controlled by the keyboard. This is preferable to the traditional mouse/keyboard combo because less moving around of the hands is needed. [[Vim]] users will find Uzbl much easier to pick-up, especially as the default bindings loosely resemble Vim keystrokes. For instance, following a link requires the user to type {{Ic|fl}}, and then the keystrokes in the box that appears next to each link on the page. Shortening the command to just {{Ic|f}} in the config file allows for even faster navigation.<br />
<br />
Below are basic, default commands that can be used with uzbl-browser and uzbl-tabbed. These commands can all be found in {{ic|$XDG_CONFIG_HOME/uzbl/config}} (which is usually located in {{ic|~/.config/uzbl/config}}). The default settings work well, but many users like to edit them to suit their preferences and in fact, it is encouraged to change this file to suit your needs. More help with editing the config file can be found on [http://www.uzbl.org/readme.php the Uzbl readme].<br />
<br />
====Navigation====<br />
<br />
o = enter url<br />
O = edit url<br />
b = back<br />
m = forward<br />
S = stop<br />
r = reload<br />
R = reload ignoring cache<br />
fl = spawn numbers next to each hyperlink. Type the number after typing fl to follow the link.<br />
gh = go home<br />
<br />
====Page Movement====<br />
<br />
j = scroll up<br />
k = scroll down<br />
h = scroll left<br />
l = scroll right<br />
PgUp = scroll page up<br />
ctrl+b = scroll page up<br />
PgDn = scroll page down<br />
ctrl+f = scroll page down<br />
Home = vertical beginning of the page<br />
<< = vertical beginning of the page<br />
End = vertical end of the page<br />
>> = vertical end of the page<br />
Space = vertical end of the page<br />
^ = horizontal beginning of the page<br />
$ = horizontal end of the page<br />
/ = find in page<br />
? = find backwards in page<br />
n = repeat find forward<br />
N = repeat find backwards<br />
<br />
====Zooming====<br />
<br />
+ = zoom_in<br />
- = zoom_out<br />
T = toggle_zoom_type<br />
1 = set zoom_level = 1<br />
2 = set zoom_level = 2<br />
<br />
====Searching====<br />
<br />
ddg = search term in DuckDuckGo<br />
gg = search term in Google<br />
\wiki = search term in Wikipedia<br />
<br />
====Inserting Text====<br />
<br />
i = toggle_insert_mode (Esc works to go back to command mode much like vim)<br />
fi = go to the first input field and enter insert mode<br />
<br />
====Bookmarks and History====<br />
<br />
M = insert bookmark (bookmarks are saved in ~/.local/share/uzbl/bookmarks<br />
U = load url from history via dmenu<br />
u = load url from bookmarks via dmenu<br />
<br />
====Tabs (when using uzbl-tabbed)====<br />
<br />
go = load uri in new tab<br />
gt = go to next tab<br />
gT = go to previous tab<br />
gn = open new tab<br />
gi+n = goto 'n' tab<br />
gC = close current tab<br />
<br />
====Other====<br />
<br />
t = show/hide status bar<br />
w = open new window<br />
ZZ = exit<br />
: = enter command<br />
Esc = back to normal mode<br />
ctrl+[ = back to normal mode<br />
<br />
==Tips and tricks==<br />
<br />
* Create an alias in {{ic|~/.bashrc}} to start uzbl-tabbed as just uzbl:<br />
<br />
alias uzbl='uzbl-tabbed'<br />
<br />
* If you wish to open uzbl with a program launcher using the trick above:<br />
cd /usr/bin<br />
sudo ln -s uzbl-tabbed uzbl<br />
This creates a [[wikipedia:Symbolic_link|symbolic link]], called uzbl, which points to uzbl-tabbed.<br />
<br />
* Due to its lightweight nature, uzbl does NOT contain caching functionality. You can install [[Polipo]] to speed up page loading.<br />
<br />
==Troubleshooting==<br />
Parcellite can cause problems at the time of selecting text under uzbl - just disable it.<br />
<br />
==See also==<br />
<br />
* [http://www.uzbl.org/wiki/ Uzbl wiki with user config files and scripts]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=70700 Forum thread]<br />
* [https://github.com/Dieterbe/uzbl/raw/master/examples/config/config Configuration file]<br />
<br />
==Other Keyboard Navigation Enabled Browsers==<br />
* [[Firefox]] - with the following extension: [http://5digits.org/pentadactyl/ Pentadactyl]<br />
* [[Jumanji]]<br />
* [[Vimprobable]]<br />
* [[Luakit]]<br />
* [[Surf]]<br />
* [[Dwb]]</div>Varlogtimhttps://wiki.archlinux.org/index.php?title=Luakit&diff=354061Luakit2014-12-29T07:09:57Z<p>Varlogtim: /* Other Keyboard Navigation Enabled Browsers */</p>
<hr />
<div>[[Category:Web Browser]]<br />
[[tr:Luakit]]<br />
[http://mason-larobina.github.io/luakit/ Luakit] is an extremely fast, lightweight and flexible web browser using the webkit engine.<br />
It is customizable through lua scripts and fully usable with keyboard shortcuts.<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] {{Pkg|luakit}} from [[official repositories]].<br />
<br />
To use the latest development version, install {{AUR|luakit-git}} available from the [[AUR]].<br />
<br />
With the Unix philosophy in mind, Luakit is entirely customizable through its configuration files.<br />
Those files are written in the Lua scripting language, thus allowing virtually unlimited features.<br />
<br />
First, copy the configuration files to:<br />
<br />
$ cp -r /etc/xdg/luakit ~/.config<br />
<br />
Now you can edit any of these files to make your browser fits your needs. Even if you do not know much about Lua, the configuration is simple and well commented enough to make it straightforward.<br />
<br />
== Basic usage ==<br />
<br />
{{note|Most of the shortcuts are viewable and customizable from {{ic|~/.config/luakit/binds.lua}}.}}<br />
<br />
Press {{ic|:}} to access the command prompt. You can do nearly everything from there.<br />
Use {{ic|Tab}} to autocomplete commands.<br />
<br />
Use the {{ic|:help}} command to get information on the available keyboard shortcuts and what they do. (To see how the action for a particular keyboard shortcut is implemented in Lua, click anywhere in its help text.)<br />
<br />
To quit, use the {{ic|:quit}} command, or press {{ic|Shift+z}} followed by {{ic|Shift+q}}.<br />
You can also close the browser while remembering the session (i.e. restoring the tabs) by using the {{ic|:writequit}} command instead, or pressing {{ic|Shift+z}} twice.<br />
<br />
=== Browsing ===<br />
<br />
* Press {{ic|o}} to open a prompt with the {{ic|:open}} command and enter the URI you want. Press {{ic|Shift+o}} to edit the current URI.<br />
* If it is not a recognized URI, Luakit will use the default search engine specified in {{ic|~/.config/luakit/globals.lua}}.<br />
* Specify which search engine to use by prefixing the entry with the appropriate keywork (e.g. {{ic|:open google foobar}} will search ''foobar'' on Google).<br />
* Use common shortcuts to navigate. For [[emacs]] and [[vim]] ''aficionados'', some of their regular shortcuts are provided. You can use the mouse as well.<br />
* Use {{ic|f}} to display the index of all visible links. Enter the appropriate number or a part of the string to open the link.<br />
* Use {{ic|Shift+f}} instead to open link in a new tab.<br />
* Press {{ic|Ctrl+t}} to open a new tab, {{ic|Ctrl+w}} to close it. Press {{ic|t}} to prompt for an URI to be opened in a new tab, and {{ic|Shift+t}} to edit the current URI in a new tab.<br />
* Press {{ic|w}} to prompt for an URI to be opened in a new window, and {{ic|Shift+w}} to edit the current URI in a new window.<br />
* Switch from one tab to another by pressing {{ic|g}} followed by {{ic|t}} or {{ic|Shift+t}}, or use {{ic|Ctrl+PageUp}} and {{ic|Ctrl+PageDown}}.<br />
* You can switch to a specific tab with {{ic|Alt+''number''}}.<br />
* Use {{ic|Shift+h}} to go back in the browser history.<br />
* Use {{ic|Shift+l}} to go forward in the browser history.<br />
* Reorder the tabs with {{ic|<}} and {{ic|>}}.<br />
* Reload the page with {{ic|r}}, stop the loading with {{ic|Ctrl+c}}.<br />
* Re-open last closed tab with {{ic|u}}.<br />
* Open downloads page by pressing {{ic|g}} followed by {{ic|d}} (or {{ic|Shift+d}} for a new tab).<br />
* Copy URI to primary selection with {{ic|y}}.<br />
* View page source code with {{ic|:viewsource}}. Return to normal view with {{ic|:viewsource!}}.<br />
* View image source by pressing {{ic|;}} followed by {{ic|i}} (or {{ic|Shift+i}} for new tab).<br />
* Inspect elements with {{ic|:inspect}}. Repeat to open in a new window. Disable inspector with {{ic|:inspect!}}.<br />
<br />
=== Input fields ===<br />
<br />
Many webpages have editable elements like dropdown lists, checkboxes, text fields and so on. While they work perfectly with the mouse, you may encounter some troubles using the ''follow'' commands.<br />
In such a case, pressing the arrow keys may help.<br />
Alternatively, the {{ic|g}} {{ic|i}} shortcut can be used to focus input.<br />
<br />
=== Bookmarks ===<br />
<br />
If enabled (default configuration), bookmarks can be used from within Luakit.<br />
<br />
* The {{ic|:bookmarks}} command opens the bookmarks page. (Shortcut: {{ic|g}} followed by {{ic|b}}, or {{ic|Shift+b}} for a new tab).<br />
* The {{ic|:bookmark [''URI'' [''tags'']]}} command adds the URI specified (or the current tab's URI, if omitted) to the bookmarks by specified tags. Starting from version 2012-09-13-r1, bookmarks page will be opened (new tab) in new bookmark editing mode before saving. (Shortcut: {{ic|Shift+b}}).<br />
<br />
== Configuration ==<br />
<br />
=== Homepage ===<br />
<br />
Set your homepage as follows:<br />
<br />
{{hc|~/.config/luakit/globals.lua|2=<br />
globals = {<br />
homepage = "www.example.com",<br />
...<br />
}<br />
}}<br />
<br />
=== Custom search engines ===<br />
<br />
To search with the default search engine, press {{ic|o}} and type the phrases. To search with a different engine, type it's name after {{ic|o}} and then the phrases.<br />
<br />
You can virtually add any search engine you want. Make a search on the website you want and copy paste the URI to the Luakit configuration by replacing the searched terms with an {{ic|%s}}. Example:<br />
<br />
{{hc|~/.config/luakit/globals.lua|2=<br />
search_engines = {<br />
aur = "<nowiki>https://aur.archlinux.org/packages.php?O=0&K=%s&do_Search=Go</nowiki>",<br />
aw = "<nowiki>https://wiki.archlinux.org/index.php/Special:Search?fulltext=Search&search=%s</nowiki>",<br />
googleseceng = "<nowiki>https://www.google.com/search?name=f&hl=en&q=%s</nowiki>",<br />
...<br />
}<br />
}}<br />
<br />
The variable is used as a keyword for the {{ic|:open}} command in Luakit.<br />
<br />
Set the defaut search engine by using this same keyword:<br />
<br />
{{hc|~/.config/luakit/globals.lua|2=<br />
search_engines.default = search_engines.aur<br />
}}<br />
<br />
=== Download location ===<br />
<br />
To specify download location:<br />
<br />
{{hc|~/.config/luakit/rc.lua|2=<br />
-- Add download support<br />
require "downloads"<br />
require "downloads_chrome"<br />
<br />
-- Set download location<br />
downloads.default_dir = os.getenv("HOME") .. "/downloads"<br />
downloads.add_signal("download-location", function (uri, file)<br />
if not file or file == "" then<br />
file = (string.match(uri, "/([^/]+)$")<br />
or string.match(uri, "^%w+://(.+)")<br />
or string.gsub(uri, "/", "_")<br />
or "untitled")<br />
end<br />
return downloads.default_dir .. "/" .. file<br />
end)<br />
}}<br />
<br />
=== Adblock ===<br />
<br />
There are several plugins available out there.<br />
<br />
To configure the Adblock plugin [https://github.com/mason-larobina/luakit/wiki/AdBlock-Lua-module featured on the official website]:<br />
<br />
* Put the {{ic|adblock.lua}} and {{ic|adblock_chrome.lua}} files in {{ic|~/.config/luakit}}.<br />
* Edit {{ic|~/.config/rc.lua}} and add the following in the section labelled ''Optional user script loading'':<br />
<br />
{{hc|~/.config/rc.lua|<br />
<nowiki>----------------------------------<br />
-- Optional user script loading --<br />
----------------------------------</nowiki><br />
<br />
require "adblock"<br />
require "adblock_chrome"<br />
...<br />
}}<br />
<br />
* Fetch an adblock-compatible list, like [https://easylist-downloads.adblockplus.org/easylist.txt Easylist], and save it to {{ic|~/.local/share/luakit}}.<br />
* Restart Luakit to load the extension.<br />
* Use {{ic|:adblock-list-enable ''number''}} command within Luakit to turn Adblock's list(s) you downloaded on Adblock itself becomes enabled on startup.<br />
Full info on enabled lists and AdBlock state can be found using {{ic|:adblock}} or {{ic|g}} {{ic|Shift+a}} at {{ic|luakit://adblock/}} internal page, if the {{ic|adblock_chrome}} module is enabled, which is not a mandatory part.<br />
<br />
{{Note|For Adblock to run in '''normal''' mode, {{ic|easylist.txt}} and any others must be placed in {{ic|~/.local/share/luakit/adblock}}}}<br />
<br />
AdBlock for Luakit plugin is also available as a part of [https://github.com/mason-larobina/luakit-plugins/ Luakit Plugins] project.<br />
<br />
=== Bookmarks management ===<br />
<br />
==== Sync ====<br />
<br />
Starting from version 2012.09.13, Luakit bookmarks are stored in an SQLite database: {{ic|~/.local/share/luakit/bookmarks.db}}.<br />
<br />
You can put a symbolic link in place of the default file to store your bookmarks anywhere on your machine.<br />
This way if your are using a cloud sync application like Dropbox, you can keep your bookmarks synchronized between your different computers.<br />
<br />
==== Converting plain text bookmarks to SQLite format ====<br />
<br />
Bookmarks were stored in a simple plain text file: {{ic|~/.local/share/luakit/bookmarks}}. Each line is a bookmark. It is composed of 2 fields, the ''link'' and the ''group'' which are separated by a ''tab'' character.<br />
<br />
{{Warning|If spaces are inserted instead of tabulation character, the link will not be properly bookmarked.}}<br />
<br />
{{Note|Groups and links are alphabetically sorted, so there is no need to do it manually.}}<br />
<br />
To use bookmarks with the latest Luakit release, the file must be converted.<br />
A sample Lua script will do that:<br />
<br />
{{hc|bookmarks_plain_to_sqlite.lua|<nowiki><br />
local usage = [[Usage: luakit -c bookmarks_plain_to_sqlite.lua [bookmark plaintext path] [bookmark db path]<br />
]]<br />
<br />
local old_db_path, new_db_path = unpack(uris)<br />
<br />
if not old_db_path or not new_db_path then<br />
io.stdout:write(usage)<br />
luakit.quit(1)<br />
end<br />
<br />
-- One-pass file read into 'data' var.<br />
old_db = assert(io.open(old_db_path, "r"))<br />
local data = old_db:read("*all")<br />
assert(old_db:close())<br />
<br />
-- Init new_db, otherwise sqlite queries will fail.<br />
new_db = sqlite3{ filename = new_db_path }<br />
new_db:exec("CREATE TABLE IF NOT EXISTS bookmarks (id INTEGER PRIMARY KEY, uri TEXT NOT NULL, title TEXT NOT NULL, desc TEXT NOT NULL, tags TEXT NOT NULL, created INTEGER, modified INTEGER )")<br />
<br />
-- Fill<br />
local url,tag<br />
<br />
for line in data:gmatch("[^\n]*\n?") do<br />
<br />
if string.len(line) > 1 then<br />
<br />
print ("["..line.."]")<br />
<br />
-- Get url and tag (if present) from first line.<br />
_, _, url, tag = string.find(line, "([^\n\t]+)\t*([^\n]*)\n?")<br />
<br />
-- Optional yet convenient output.<br />
io.write(url)<br />
io.write("\t")<br />
io.write(tag)<br />
io.write("\n")<br />
<br />
-- DB insertion. Nothing will be overwritten. If URL and/or tag already exists, then a double is created.<br />
new_db:exec("INSERT INTO bookmarks VALUES (NULL, ?, ?, ?, ?, ?, ?)", <br />
{<br />
url, "", "", tag or "",<br />
os.time(), os.time()<br />
})<br />
end<br />
end<br />
<br />
print("Import finished.")<br />
print("\nVacuuming database...")<br />
new_db:exec "VACUUM"<br />
print("Vacuum done.")<br />
<br />
luakit.quit(0)<br />
</nowiki>}}<br />
<br />
As stated at beginning of the script, it must be ran with Luakit:<br />
<br />
$ luakit -c bookmarks_plain_to_sqlite.lua ''path/to/plaintext/bookmark'' ''path/to/db''<br />
<br />
The old plaintext bookmarks will be left unchanged. If the DB bookmarks do not exist, the file will be created. If it exists, do not worry, none of the previous bookmarks will be touched. However, this behaviour implies that you might get some doubles.<br />
<br />
==== Import from Firefox ====<br />
<br />
{{Note|This works only for Luakit versions before 2012.03.25! For newer version, you can first run this script, then convert the generted plain text bookmarks to the SQLite format as described at [[#Converting plain text bookmarks to SQLite format]].}}<br />
<br />
To import bookmarks from Firefox, first they must be exported to an HTML file using its bookmarks manager. After that the XML file can be converted to a Luakit format.<br />
<br />
The following one-line awk command will do that:<br />
<br />
{{bc|<nowiki><br />
$ cat bookmarks.html | awk '<br />
{gsub(/\"/," ")}<br />
/<\/H3>/{FS=">";gsub(/</,">");og=g;g=$(NF-2);FS=" "}<br />
/<DL>/{x++;if(x>= 3)gl[x-3]=g}<br />
/<\/DL>/{x--;if(x==2)g=og"2"}<br />
/HREF/{gsub(/</," ");gsub(/>/," ");if(g!=""){if(og!=g){printf "\n";og=g};printf "%s\t",$4;if(x>=3){for(i=0;i<=x-4;i++){printf "%s-",gl[i]}printf "%s\n",gl[x-3]}else{printf "\n"}}}'<br />
</nowiki>}}<br />
<br />
The more readable version of the script:<br />
<br />
{{hc|ff2lk.awk|<nowiki><br />
# Notes: 'folders' for Firefox bookmarks mean 'groups' for Luakit.<br />
<br />
# Put spaces where it is needed to delimit words properly.<br />
{gsub(/\"/," ")}<br />
<br />
# Since the folder name may have spaces, delimiter must be ">" here.<br />
/<\/H3>/ {<br />
FS=">"<br />
gsub(/</,">")<br />
oldgroup=group<br />
group=$(NF-2)<br />
FS=" "<br />
}<br />
<br />
# Each time a <DL> is encountered, it means we step into a subfolder.<br />
# 'count' is the depth level.<br />
# Base level starts at 2 (Firefox fault).<br />
# 'groupline' is an array of all parent folders.<br />
/<DL>/ {<br />
count++<br />
if ( count >= 3 )<br />
groupline[count-3]=group<br />
}<br />
<br />
# On </DL>, we step out.<br />
# If if return to the base level (i.e. not in a folder), then we give 'group' a fake name different<br />
# from 'oldgroup' to make sure a line will be skipped (see below).<br />
/<\/DL>/ {<br />
count--<br />
if( count == 2 )<br />
group=oldgroup"ROOT"<br />
}<br />
<br />
# The bookmark name.<br />
# If oldgroup is different than group, (i.e. folder changed) then we skip a line.<br />
# If we are in a folder, then we print the group name, i.e. all parents plus the current folder<br />
# separated by an hyphen.<br />
/HREF/ {<br />
gsub(/</," ")<br />
gsub(/>/," ")<br />
if (group != "")<br />
{<br />
if(oldgroup != group)<br />
{<br />
printf "\n"<br />
oldgroup=group<br />
}<br />
printf "%s\t",$4<br />
if ( count >= 3 )<br />
{<br />
for ( i=0 ; i <= count-4 ; i++ )<br />
{printf "%s-" , groupline[i]}<br />
printf "%s" , groupline[count-3]<br />
}<br />
printf "\n"<br />
}<br />
}</nowiki><br />
}}<br />
<br />
Run it with<br />
<br />
$ awk -f ff2lk.awk bookmarks.html >> bookmarks<br />
<br />
==== Export bookmarks ====<br />
<br />
The following script let you export Luakit bookmarks from its SQLite format to a plain text file. The resulting file may be suitable for other web browsers, or may be easily parsed by import scripts.<br />
<br />
{{hc|bookmarks_sqlite_to_plain.lua|<nowiki><br />
-- USER CONFIG<br />
<br />
local sep = " "<br />
<br />
-- END OF USER CONFIG<br />
<br />
local usage = [[Usage: luakit -c bookmarks_sqlite_to_plain.lua [bookmark db path] [bookmark plain path]<br />
<br />
DB scheme is<br />
<br />
bookmarks (<br />
id INTEGER PRIMARY KEY,<br />
uri TEXT NOT NULL,<br />
title TEXT NOT NULL,<br />
desc TEXT NOT NULL,<br />
tags TEXT NOT NULL,<br />
created INTEGER,<br />
modified INTEGER<br />
);<br />
]]<br />
<br />
local old_db_path, new_db_path = unpack(uris)<br />
<br />
if not old_db_path or not new_db_path then<br />
io.stdout:write(usage)<br />
luakit.quit(1)<br />
end<br />
<br />
-- One-pass file read into 'data' var.<br />
new_db = assert(io.open(new_db_path, "w"))<br />
<br />
-- Open old_db<br />
old_db = sqlite3{ filename = old_db_path }<br />
<br />
-- Load all db values to a string variable.<br />
local rows = old_db:exec [[ SELECT * FROM bookmarks ]]<br />
<br />
-- Iterate over all entries.<br />
-- Note: it could be faster to use one single concatenation for all entries, but<br />
-- it would be much more code and not so flexible. It is desirable to focus on<br />
-- clarity. After all, only a few hundred lines are handled.<br />
for _, b in ipairs(rows) do<br />
<br />
-- Change %q for %s to remove double quotes if needed.<br />
-- You can toggle the desired fields with comments.<br />
local outputstr = <br />
string.format("%q%s", b.uri or "", sep) .. <br />
string.format("%q%s", b.title or "", sep) ..<br />
string.format("%q%s", b.desc or "", sep) ..<br />
string.format("%q%s- ", b.tags or "", sep) ..<br />
((b.created or "" ) .. sep) ..<br />
((b.modified or "" ) .. sep) ..<br />
"\n"<br />
<br />
-- Write entry to file.<br />
new_db:write(outputstr)<br />
end<br />
<br />
<br />
print("Export done.")<br />
<br />
assert(new_db:close())<br />
<br />
luakit.quit(0)</nowiki><br />
}}<br />
<br />
As stated at beginning of the script, it must be ran with Luakit:<br />
<br />
$ luakit -c bookmarks_plain_to_sqlite.lua ''path/to/plaintext/bookmarks'' ''path/to/database''<br />
<br />
=== Tor ===<br />
<br />
Once [[Tor]] has been setup, simply run:<br />
<br />
$ torify luakit<br />
<br />
{{warning|To be sure of anonymity, you also need to change settings within Luakit, such as disabling Flash and changing the useragent string.}}<br />
<br />
=== Custom CSS ===<br />
<br />
Place the CSS file in the {{ic|styles}} subdirectory of Luakit data directory (create if does not exist). For example this will set monospace font for text input areas:<br />
<br />
{{hc|~/.local/share/luakit/styles/custom.css|<br />
input,textarea,select {<br />
font-family: DejaVu Sans Mono,Consolas,Monaco,Lucida Console,Liberation Mono,Bitstream Vera Sans Mono,Courier New, monospace;<br />
}<br />
}}<br />
<br />
And in {{ic|globals.lua}} assign the variable {{ic|user_stylesheet_uri}} to that file's location:<br />
<br />
{{hc|~/.config/luakit/globals.lua|2=<br />
domain_props = {<br />
["all"] = {<br />
...<br />
user_stylesheet_uri = "file://" .. luakit.data_dir .. "/styles/custom.css",<br />
...<br />
},<br />
...<br />
}<br />
}}<br />
<br />
== See also ==<br />
<br />
* [http://mason-larobina.github.com/luakit/ Home page]<br />
* [http://shariebeth.com/computers/luakitcheatsheet.txt Cheatsheet]<br />
<br />
==Other Keyboard Navigation Enabled Browsers==<br />
* [[Firefox]] - with the following extension: [http://5digits.org/pentadactyl/ Pentadactyl]<br />
* [[Jumanji]]<br />
* [[Vimprobable]]<br />
* [[Uzbl]]<br />
* [[Surf]]</div>Varlogtimhttps://wiki.archlinux.org/index.php?title=Jumanji&diff=354060Jumanji2014-12-29T07:09:46Z<p>Varlogtim: /* Other Keyboard Navigation Enabled Browsers */</p>
<hr />
<div>[[Category:Web Browser]]<br />
[http://pwmt.org/projects/jumanji/ jumanji] is a web browser that provides a minimalistic and space saving interface as well as an easy usage that mainly focuses on keyboard interaction like ''vimperator'' does.<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] one of ''jumanji'' variants from the [[AUR]]:<br />
* {{AUR|jumanji}} - Stable release.<br />
* {{AUR|jumanji-git}} - Development release.<br />
<br />
== Configuration ==<br />
<br />
=== config.h ===<br />
<br />
To modify config.h:<br />
* get jumanji-git PKGBUILD from AUR<br />
* {{ic|makepkg}}<br />
* {{ic|git --git-dir src/jumanji/ init}}<br />
* change src/jumanji/config.def.h<br />
* {{ic|makepkg -e}}<br />
<br />
=== rc file configuration ===<br />
<br />
jumanji allows for a lot of user configuration either by modifying the config.def.h file or through a rc file located at {{ic|~/.config/jumanji/jumanjirc}}. you can set searchengines, homepages, custom stylesheets, user scripts, proxy. Change the default download directory and much more. A sample configuration file below shows how to customize jumanji.<br />
# jumanji configuration<br />
# search engines<br />
searchengine ggl http://www.google.com/search?q=%s<br />
searchengine wiki http://en.wikipedia.org/w/index.php?search=%s<br />
# browser settings<br />
set homepage http://www.google.com/ig<br />
set auto_save 60<br />
set single_instance false<br />
# Use privoxy for adblocking<br />
set proxy localhost:8118 <br />
# look n feel<br />
set font monospace normal 9<br />
set stylesheet file:///home/inxs/.config/jumanji/style.css <br />
# follow hints<br />
script ~/.config/jumanji/scripts/hinting.js<br />
# downloads<br />
set download_dir ~/downloads/<br />
set download_command urxvt -e sh -c "wget --load-cookies ~/.config/jumanji/cookies '%s' -O '%s'";<br />
# keybindings<br />
map <C-,> nav_history previous<br />
map <C-.> nav_history next<br />
bmap ^DD$ quit<br />
<br />
{{Note| Latest version seems to use "proxy localhost:8118" instead of "''set'' proxy localhost:8118".}}<br />
<br />
== Commands ==<br />
<br />
Below are some basic commands that can be used with jumanji <br />
<br />
=== Look and feel ===<br />
<br />
C-m = Toggle status bar<br />
C-n = Toggle tab bar<br />
<br />
=== Page navigation ===<br />
<br />
o = enter url to open in same tab<br />
t = enter url to open in new tab<br />
j = scroll down<br />
k = scroll up<br />
h = scroll left<br />
l = scroll right<br />
C-d = scroll down (half the screen)<br />
C-u = scroll up (half the screen)<br />
space = page down<br />
gg = beginning<br />
G = end<br />
C-o = back<br />
C-i = forward<br />
:stop = stop<br />
r = reload<br />
<br />
=== Zooming ===<br />
<br />
zI = zoom_in<br />
zO = zoom_out<br />
z0 = zoom to original size<br />
<br />
=== Searching ===<br />
<br />
/ = search %s<br />
? = search reverse %s<br />
:open = start a search with your search engine %s (the first one in your jumanjirc is used)<br />
<br />
=== Bookmarks and history ===<br />
<br />
:bmark = insert bookmark (bookmarks are saved in ~/.config/jumanji/bookmarks)<br />
o <tab> = show bookmarks and history to open in same tab<br />
t <tab> = show bookmarks and history to open in new tab<br />
<br />
=== Link following ===<br />
<br />
f = spawn numbers next to each hyperlink. Type the number after typing f to follow the link in the same tab [http://www.pwmt.org/jumanji/faq/]<br />
F = spawn numbers next to each hyperlink. Type the number after typing F to follow the link in a new tab<br />
gh = Go to homepage in the same tab<br />
gH = open homepage in a new tab<br />
gf, C-s = view source<br />
gF = view source in a new tab<br />
<br />
=== Tabs ===<br />
<br />
gt or C-Tab or S-k = go to next tab<br />
gT or C-S-Tab or S-j = go to previous tab<br />
xgt = go to tab number x, where x is any number 0-9<br />
C-w = close tab<br />
<br />
=== Exit ===<br />
<br />
ZZ = exit<br />
C-q = exit<br />
<br />
== See also ==<br />
<br />
* [https://bbs.archlinux.org/viewtopic.php?id=100505 Old, closed forum thread]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=115119 The current forum thread]<br />
<br />
==Other Keyboard Navigation Enabled Browsers==<br />
* [[Firefox]] - with the following extension: [http://5digits.org/pentadactyl/ Pentadactyl]<br />
* [[Vimprobable]]<br />
* [[Uzbl]]<br />
* [[Luakit]]<br />
* [[Surf]]</div>Varlogtimhttps://wiki.archlinux.org/index.php?title=Uzbl&diff=354058Uzbl2014-12-29T07:09:16Z<p>Varlogtim: /* Other Keyboard Navigation Enabled Browsers */</p>
<hr />
<div>[[Category:Web Browser]]<br />
[http://www.uzbl.org/ Uzbl] is a lightweight browser based on '''uzbl-core'''. '''Uzbl''' adheres to the UNIX philosophy of "Write programs that do one thing and do it well". The uzbl-browser package includes uzbl-core, uzbl-browser and uzbl-event-manager. Most users will want to use '''uzbl-browser''' or '''uzbl-tabbed''' as they provide the fullest set of tools for browsing. Uzbl-browser allows for a single page per window (with as many windows as you want), while uzbl-tabbed provides a wrapper for uzbl-browser and implements basic tabs with multiple pages per window.<br />
<br />
==Installation==<br />
<br />
[[pacman|Install]] {{Pkg|uzbl-browser}} or {{Pkg|uzbl-tabbed}} available in the [[official repositories]].<br />
<br />
==Plugins==<br />
<br />
Uzbl can make use of outside [[browser plugins]] like Flash and Java. Installing these packages will enable their use in uzbl-browser and uzbl-tabbed.<br />
<br />
==Commands==<br />
<br />
One of the biggest advantages of using Uzbl is that nearly everything can be controlled by the keyboard. This is preferable to the traditional mouse/keyboard combo because less moving around of the hands is needed. [[Vim]] users will find Uzbl much easier to pick-up, especially as the default bindings loosely resemble Vim keystrokes. For instance, following a link requires the user to type {{Ic|fl}}, and then the keystrokes in the box that appears next to each link on the page. Shortening the command to just {{Ic|f}} in the config file allows for even faster navigation.<br />
<br />
Below are basic, default commands that can be used with uzbl-browser and uzbl-tabbed. These commands can all be found in {{ic|$XDG_CONFIG_HOME/uzbl/config}} (which is usually located in {{ic|~/.config/uzbl/config}}). The default settings work well, but many users like to edit them to suit their preferences and in fact, it is encouraged to change this file to suit your needs. More help with editing the config file can be found on [http://www.uzbl.org/readme.php the Uzbl readme].<br />
<br />
====Navigation====<br />
<br />
o = enter url<br />
O = edit url<br />
b = back<br />
m = forward<br />
S = stop<br />
r = reload<br />
R = reload ignoring cache<br />
fl = spawn numbers next to each hyperlink. Type the number after typing fl to follow the link.<br />
gh = go home<br />
<br />
====Page Movement====<br />
<br />
j = scroll up<br />
k = scroll down<br />
h = scroll left<br />
l = scroll right<br />
PgUp = scroll page up<br />
ctrl+b = scroll page up<br />
PgDn = scroll page down<br />
ctrl+f = scroll page down<br />
Home = vertical beginning of the page<br />
<< = vertical beginning of the page<br />
End = vertical end of the page<br />
>> = vertical end of the page<br />
Space = vertical end of the page<br />
^ = horizontal beginning of the page<br />
$ = horizontal end of the page<br />
/ = find in page<br />
? = find backwards in page<br />
n = repeat find forward<br />
N = repeat find backwards<br />
<br />
====Zooming====<br />
<br />
+ = zoom_in<br />
- = zoom_out<br />
T = toggle_zoom_type<br />
1 = set zoom_level = 1<br />
2 = set zoom_level = 2<br />
<br />
====Searching====<br />
<br />
ddg = search term in DuckDuckGo<br />
gg = search term in Google<br />
\wiki = search term in Wikipedia<br />
<br />
====Inserting Text====<br />
<br />
i = toggle_insert_mode (Esc works to go back to command mode much like vim)<br />
fi = go to the first input field and enter insert mode<br />
<br />
====Bookmarks and History====<br />
<br />
M = insert bookmark (bookmarks are saved in ~/.local/share/uzbl/bookmarks<br />
U = load url from history via dmenu<br />
u = load url from bookmarks via dmenu<br />
<br />
====Tabs (when using uzbl-tabbed)====<br />
<br />
go = load uri in new tab<br />
gt = go to next tab<br />
gT = go to previous tab<br />
gn = open new tab<br />
gi+n = goto 'n' tab<br />
gC = close current tab<br />
<br />
====Other====<br />
<br />
t = show/hide status bar<br />
w = open new window<br />
ZZ = exit<br />
: = enter command<br />
Esc = back to normal mode<br />
ctrl+[ = back to normal mode<br />
<br />
==Tips and tricks==<br />
<br />
* Create an alias in {{ic|~/.bashrc}} to start uzbl-tabbed as just uzbl:<br />
<br />
alias uzbl='uzbl-tabbed'<br />
<br />
* If you wish to open uzbl with a program launcher using the trick above:<br />
cd /usr/bin<br />
sudo ln -s uzbl-tabbed uzbl<br />
This creates a [[wikipedia:Symbolic_link|symbolic link]], called uzbl, which points to uzbl-tabbed.<br />
<br />
* Due to its lightweight nature, uzbl does NOT contain caching functionality. You can install [[Polipo]] to speed up page loading.<br />
<br />
==Troubleshooting==<br />
Parcellite can cause problems at the time of selecting text under uzbl - just disable it.<br />
<br />
==See also==<br />
<br />
* [http://www.uzbl.org/wiki/ Uzbl wiki with user config files and scripts]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=70700 Forum thread]<br />
* [https://github.com/Dieterbe/uzbl/raw/master/examples/config/config Configuration file]<br />
<br />
==Other Keyboard Navigation Enabled Browsers==<br />
* [[Firefox]] - with the following extension: [http://5digits.org/pentadactyl/ Pentadactyl]<br />
* [[Jumanji]]<br />
* [[Vimprobable]]<br />
* [[Luakit]]<br />
* [[Surf]]</div>Varlogtimhttps://wiki.archlinux.org/index.php?title=Vimprobable&diff=354057Vimprobable2014-12-29T07:08:56Z<p>Varlogtim: /* Other Keyboard Navigation Enabled Browsers */</p>
<hr />
<div>{{DISPLAYTITLE:Vimprobable}}<br />
[[Category:Web Browser]]<br />
[http://www.vimprobable.org/ Vimprobable] is a WWW browser that behaves like the Vimperator plugin available for Mozilla [[Firefox]]. It is based on the WebKit engine (using GTK bindings). It is a fork of the currently abandoned vimpression.<br />
<br />
==Install==<br />
There are two versions of Vimprobable in the [[AUR]]: {{AUR|vimprobable-git}} and {{AUR|vimprobable2-git}}. Now that Vimprobable2 is at version 1.0, it is considered the primary branch; development of Vimprobable1 will still recieve bugfixes, but active development will be restricted to Vimprobable2. <br />
<br />
The first version can only be customised by editing {{ic|config.h}} before compilation. It is pretty stable and very usable. Version 2, while also stable, is under more active development - it aims at allowing more customisation, for example through {{ic|:set}} and {{ic|:map}} commands.<br />
<br />
==Configuration==<br />
Both versions require you to make customizations in the {{ic|config.h}} file before recompiling with<br />
$ makepkg -fi<br />
<br />
Additionally, Vimprobable2 will look for a configuration file called {{ic|$XDG_CONFIG_HOME/vimprobable/vimprobablerc}} that has a number of options that can be configured without any need to recompile. You will need to create this file yourself.<br />
<br />
A basic vimprobablerc might contain the following options:<br />
set homepage=https://bbs.archlinux.org/<br />
set scrollbars=false<br />
set fontsize=12<br />
set monofontsize=10<br />
set monofont="Droid Sans Mono Slashed"<br />
<br />
More details on configuring Vimprobable2 can be found in the rc man page<br />
man vimprobablerc<br />
<br />
Within the source directory, you will find two other files that can be customized, {{ic|config.h}} and {{ic|keymap.h}}. As one would expect, the first contains general configuration options, such as appearance and the second allows you to set your own keybindings. Any changes to either of these files require that Vimprobable2 be recompiled before they take effect. <br />
<br />
{{Tip|As per the post install instructions, you will need to copy these files from the source directory to customize them.}}<br />
<br />
Details for the default keybindings and options can be found in the man page<br />
man vimprobable<br />
<br />
==Tips==<br />
Setting a more generic user agent will make accessing some websites more straightforward. In {{ic|$XDG_CONFIG_HOME/vimprobable/vimprobablerc}} add a useragent for a browser that the site will find more acceptable, for example:<br />
set useragent="Vimprobable2 (X11; U; Unix; en-US) AppleWebKit/531.2+ Compatible (Safari)"<br />
<br />
You can find a list of useragents here: http://www.useragentstring.com/pages/useragentstring.php<br />
<br />
You can specify additional search engines in Vimprobable2's {{ic|config.h}} like so<br />
<br />
static Searchengine searchengines[] = {<br />
{ "b", "http://blekko.com/?q=%s" },<br />
{ "d", "http://duckduckgo.com/?q=%s" },<br />
{ "g", "http://www.google.com/search?hl=en&source=hp&ie=ISO-8859-l&q=%s" },<br />
{ "a", "https://wiki.archlinux.org/index.php?title=Special%%3ASearch&search=%s&go=Go" },<br />
{ "w", "https://secure.wikimedia.org/wikipedia/en/w/index.php?title=Special%%3ASearch&search=%s&go=Go" },<br />
}<br />
<br />
If you are running Vimprobable in [http://tools.suckless.org/tabbed tabbed], you can direct other applications to open webpages and have them captured in {{ic|tabbed}} by starting Vimprobable with an {{ic|xid}}:<br />
$(tabbed -d >/tmp/tabbed.xid); vimprobable2 -e $(</tmp/tabbed.xid)<br />
and then directing the other applications to use that {{ic|xid}} to launch Vimprobable:<br />
exec vimprobable2 -e $(</tmp/tabbed.xid) "$1"<br />
<br />
With this script you can create a tabbed session if there is not alredy a window with tabbed, and then launch Vimprobable within it.<br />
{{bc|<nowiki><br />
#!/usr/bin/env bash<br />
[[ -z $((xprop -id $(</tmp/tabbed.xid)) 2>/dev/null) ]] && tabbed -d > /tmp/tabbed.xid <br />
exec vimprobable2 -e $(</tmp/tabbed.xid) $( [[ "$1" ]] && echo "$1") &<br />
</nowiki>}}<br />
<br />
==Resources==<br />
* [http://www.vimprobable.org/ Vimprobable] website<br />
* [http://tools.suckless.org/tabbed tabbed] a suckless program for managing tabs<br />
* [http://vimeo.com/53829053 A screencast] introduction to Vimprobable<br />
<br />
==Other Keyboard Navigation Enabled Browsers==<br />
* [[Firefox]] - with the following extension: [http://5digits.org/pentadactyl/ Pentadactyl]<br />
* [[Jumanji]]<br />
* [[Uzbl]]<br />
* [[Luakit]]<br />
* [[Surf]]</div>Varlogtimhttps://wiki.archlinux.org/index.php?title=Vimprobable&diff=354056Vimprobable2014-12-29T07:08:17Z<p>Varlogtim: /* Resources */</p>
<hr />
<div>{{DISPLAYTITLE:Vimprobable}}<br />
[[Category:Web Browser]]<br />
[http://www.vimprobable.org/ Vimprobable] is a WWW browser that behaves like the Vimperator plugin available for Mozilla [[Firefox]]. It is based on the WebKit engine (using GTK bindings). It is a fork of the currently abandoned vimpression.<br />
<br />
==Install==<br />
There are two versions of Vimprobable in the [[AUR]]: {{AUR|vimprobable-git}} and {{AUR|vimprobable2-git}}. Now that Vimprobable2 is at version 1.0, it is considered the primary branch; development of Vimprobable1 will still recieve bugfixes, but active development will be restricted to Vimprobable2. <br />
<br />
The first version can only be customised by editing {{ic|config.h}} before compilation. It is pretty stable and very usable. Version 2, while also stable, is under more active development - it aims at allowing more customisation, for example through {{ic|:set}} and {{ic|:map}} commands.<br />
<br />
==Configuration==<br />
Both versions require you to make customizations in the {{ic|config.h}} file before recompiling with<br />
$ makepkg -fi<br />
<br />
Additionally, Vimprobable2 will look for a configuration file called {{ic|$XDG_CONFIG_HOME/vimprobable/vimprobablerc}} that has a number of options that can be configured without any need to recompile. You will need to create this file yourself.<br />
<br />
A basic vimprobablerc might contain the following options:<br />
set homepage=https://bbs.archlinux.org/<br />
set scrollbars=false<br />
set fontsize=12<br />
set monofontsize=10<br />
set monofont="Droid Sans Mono Slashed"<br />
<br />
More details on configuring Vimprobable2 can be found in the rc man page<br />
man vimprobablerc<br />
<br />
Within the source directory, you will find two other files that can be customized, {{ic|config.h}} and {{ic|keymap.h}}. As one would expect, the first contains general configuration options, such as appearance and the second allows you to set your own keybindings. Any changes to either of these files require that Vimprobable2 be recompiled before they take effect. <br />
<br />
{{Tip|As per the post install instructions, you will need to copy these files from the source directory to customize them.}}<br />
<br />
Details for the default keybindings and options can be found in the man page<br />
man vimprobable<br />
<br />
==Tips==<br />
Setting a more generic user agent will make accessing some websites more straightforward. In {{ic|$XDG_CONFIG_HOME/vimprobable/vimprobablerc}} add a useragent for a browser that the site will find more acceptable, for example:<br />
set useragent="Vimprobable2 (X11; U; Unix; en-US) AppleWebKit/531.2+ Compatible (Safari)"<br />
<br />
You can find a list of useragents here: http://www.useragentstring.com/pages/useragentstring.php<br />
<br />
You can specify additional search engines in Vimprobable2's {{ic|config.h}} like so<br />
<br />
static Searchengine searchengines[] = {<br />
{ "b", "http://blekko.com/?q=%s" },<br />
{ "d", "http://duckduckgo.com/?q=%s" },<br />
{ "g", "http://www.google.com/search?hl=en&source=hp&ie=ISO-8859-l&q=%s" },<br />
{ "a", "https://wiki.archlinux.org/index.php?title=Special%%3ASearch&search=%s&go=Go" },<br />
{ "w", "https://secure.wikimedia.org/wikipedia/en/w/index.php?title=Special%%3ASearch&search=%s&go=Go" },<br />
}<br />
<br />
If you are running Vimprobable in [http://tools.suckless.org/tabbed tabbed], you can direct other applications to open webpages and have them captured in {{ic|tabbed}} by starting Vimprobable with an {{ic|xid}}:<br />
$(tabbed -d >/tmp/tabbed.xid); vimprobable2 -e $(</tmp/tabbed.xid)<br />
and then directing the other applications to use that {{ic|xid}} to launch Vimprobable:<br />
exec vimprobable2 -e $(</tmp/tabbed.xid) "$1"<br />
<br />
With this script you can create a tabbed session if there is not alredy a window with tabbed, and then launch Vimprobable within it.<br />
{{bc|<nowiki><br />
#!/usr/bin/env bash<br />
[[ -z $((xprop -id $(</tmp/tabbed.xid)) 2>/dev/null) ]] && tabbed -d > /tmp/tabbed.xid <br />
exec vimprobable2 -e $(</tmp/tabbed.xid) $( [[ "$1" ]] && echo "$1") &<br />
</nowiki>}}<br />
<br />
==Resources==<br />
* [http://www.vimprobable.org/ Vimprobable] website<br />
* [http://tools.suckless.org/tabbed tabbed] a suckless program for managing tabs<br />
* [http://vimeo.com/53829053 A screencast] introduction to Vimprobable<br />
<br />
==Other Keyboard Navigation Enabled Browsers==<br />
* [[Firefox]] - with the following extension: [http://5digits.org/pentadactyl/ Pentadactyl]<br />
* [[Jumanji]]<br />
* [[Vimprobable]]<br />
* [[Uzbl]]<br />
* [[Luakit]]<br />
* [[Surf]]</div>Varlogtimhttps://wiki.archlinux.org/index.php?title=Jumanji&diff=354055Jumanji2014-12-29T07:08:12Z<p>Varlogtim: /* See also */</p>
<hr />
<div>[[Category:Web Browser]]<br />
[http://pwmt.org/projects/jumanji/ jumanji] is a web browser that provides a minimalistic and space saving interface as well as an easy usage that mainly focuses on keyboard interaction like ''vimperator'' does.<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] one of ''jumanji'' variants from the [[AUR]]:<br />
* {{AUR|jumanji}} - Stable release.<br />
* {{AUR|jumanji-git}} - Development release.<br />
<br />
== Configuration ==<br />
<br />
=== config.h ===<br />
<br />
To modify config.h:<br />
* get jumanji-git PKGBUILD from AUR<br />
* {{ic|makepkg}}<br />
* {{ic|git --git-dir src/jumanji/ init}}<br />
* change src/jumanji/config.def.h<br />
* {{ic|makepkg -e}}<br />
<br />
=== rc file configuration ===<br />
<br />
jumanji allows for a lot of user configuration either by modifying the config.def.h file or through a rc file located at {{ic|~/.config/jumanji/jumanjirc}}. you can set searchengines, homepages, custom stylesheets, user scripts, proxy. Change the default download directory and much more. A sample configuration file below shows how to customize jumanji.<br />
# jumanji configuration<br />
# search engines<br />
searchengine ggl http://www.google.com/search?q=%s<br />
searchengine wiki http://en.wikipedia.org/w/index.php?search=%s<br />
# browser settings<br />
set homepage http://www.google.com/ig<br />
set auto_save 60<br />
set single_instance false<br />
# Use privoxy for adblocking<br />
set proxy localhost:8118 <br />
# look n feel<br />
set font monospace normal 9<br />
set stylesheet file:///home/inxs/.config/jumanji/style.css <br />
# follow hints<br />
script ~/.config/jumanji/scripts/hinting.js<br />
# downloads<br />
set download_dir ~/downloads/<br />
set download_command urxvt -e sh -c "wget --load-cookies ~/.config/jumanji/cookies '%s' -O '%s'";<br />
# keybindings<br />
map <C-,> nav_history previous<br />
map <C-.> nav_history next<br />
bmap ^DD$ quit<br />
<br />
{{Note| Latest version seems to use "proxy localhost:8118" instead of "''set'' proxy localhost:8118".}}<br />
<br />
== Commands ==<br />
<br />
Below are some basic commands that can be used with jumanji <br />
<br />
=== Look and feel ===<br />
<br />
C-m = Toggle status bar<br />
C-n = Toggle tab bar<br />
<br />
=== Page navigation ===<br />
<br />
o = enter url to open in same tab<br />
t = enter url to open in new tab<br />
j = scroll down<br />
k = scroll up<br />
h = scroll left<br />
l = scroll right<br />
C-d = scroll down (half the screen)<br />
C-u = scroll up (half the screen)<br />
space = page down<br />
gg = beginning<br />
G = end<br />
C-o = back<br />
C-i = forward<br />
:stop = stop<br />
r = reload<br />
<br />
=== Zooming ===<br />
<br />
zI = zoom_in<br />
zO = zoom_out<br />
z0 = zoom to original size<br />
<br />
=== Searching ===<br />
<br />
/ = search %s<br />
? = search reverse %s<br />
:open = start a search with your search engine %s (the first one in your jumanjirc is used)<br />
<br />
=== Bookmarks and history ===<br />
<br />
:bmark = insert bookmark (bookmarks are saved in ~/.config/jumanji/bookmarks)<br />
o <tab> = show bookmarks and history to open in same tab<br />
t <tab> = show bookmarks and history to open in new tab<br />
<br />
=== Link following ===<br />
<br />
f = spawn numbers next to each hyperlink. Type the number after typing f to follow the link in the same tab [http://www.pwmt.org/jumanji/faq/]<br />
F = spawn numbers next to each hyperlink. Type the number after typing F to follow the link in a new tab<br />
gh = Go to homepage in the same tab<br />
gH = open homepage in a new tab<br />
gf, C-s = view source<br />
gF = view source in a new tab<br />
<br />
=== Tabs ===<br />
<br />
gt or C-Tab or S-k = go to next tab<br />
gT or C-S-Tab or S-j = go to previous tab<br />
xgt = go to tab number x, where x is any number 0-9<br />
C-w = close tab<br />
<br />
=== Exit ===<br />
<br />
ZZ = exit<br />
C-q = exit<br />
<br />
== See also ==<br />
<br />
* [https://bbs.archlinux.org/viewtopic.php?id=100505 Old, closed forum thread]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=115119 The current forum thread]<br />
<br />
==Other Keyboard Navigation Enabled Browsers==<br />
* [[Firefox]] - with the following extension: [http://5digits.org/pentadactyl/ Pentadactyl]<br />
* [[Jumanji]]<br />
* [[Vimprobable]]<br />
* [[Uzbl]]<br />
* [[Luakit]]<br />
* [[Surf]]</div>Varlogtimhttps://wiki.archlinux.org/index.php?title=Luakit&diff=354054Luakit2014-12-29T07:08:06Z<p>Varlogtim: /* See also */</p>
<hr />
<div>[[Category:Web Browser]]<br />
[[tr:Luakit]]<br />
[http://mason-larobina.github.io/luakit/ Luakit] is an extremely fast, lightweight and flexible web browser using the webkit engine.<br />
It is customizable through lua scripts and fully usable with keyboard shortcuts.<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] {{Pkg|luakit}} from [[official repositories]].<br />
<br />
To use the latest development version, install {{AUR|luakit-git}} available from the [[AUR]].<br />
<br />
With the Unix philosophy in mind, Luakit is entirely customizable through its configuration files.<br />
Those files are written in the Lua scripting language, thus allowing virtually unlimited features.<br />
<br />
First, copy the configuration files to:<br />
<br />
$ cp -r /etc/xdg/luakit ~/.config<br />
<br />
Now you can edit any of these files to make your browser fits your needs. Even if you do not know much about Lua, the configuration is simple and well commented enough to make it straightforward.<br />
<br />
== Basic usage ==<br />
<br />
{{note|Most of the shortcuts are viewable and customizable from {{ic|~/.config/luakit/binds.lua}}.}}<br />
<br />
Press {{ic|:}} to access the command prompt. You can do nearly everything from there.<br />
Use {{ic|Tab}} to autocomplete commands.<br />
<br />
Use the {{ic|:help}} command to get information on the available keyboard shortcuts and what they do. (To see how the action for a particular keyboard shortcut is implemented in Lua, click anywhere in its help text.)<br />
<br />
To quit, use the {{ic|:quit}} command, or press {{ic|Shift+z}} followed by {{ic|Shift+q}}.<br />
You can also close the browser while remembering the session (i.e. restoring the tabs) by using the {{ic|:writequit}} command instead, or pressing {{ic|Shift+z}} twice.<br />
<br />
=== Browsing ===<br />
<br />
* Press {{ic|o}} to open a prompt with the {{ic|:open}} command and enter the URI you want. Press {{ic|Shift+o}} to edit the current URI.<br />
* If it is not a recognized URI, Luakit will use the default search engine specified in {{ic|~/.config/luakit/globals.lua}}.<br />
* Specify which search engine to use by prefixing the entry with the appropriate keywork (e.g. {{ic|:open google foobar}} will search ''foobar'' on Google).<br />
* Use common shortcuts to navigate. For [[emacs]] and [[vim]] ''aficionados'', some of their regular shortcuts are provided. You can use the mouse as well.<br />
* Use {{ic|f}} to display the index of all visible links. Enter the appropriate number or a part of the string to open the link.<br />
* Use {{ic|Shift+f}} instead to open link in a new tab.<br />
* Press {{ic|Ctrl+t}} to open a new tab, {{ic|Ctrl+w}} to close it. Press {{ic|t}} to prompt for an URI to be opened in a new tab, and {{ic|Shift+t}} to edit the current URI in a new tab.<br />
* Press {{ic|w}} to prompt for an URI to be opened in a new window, and {{ic|Shift+w}} to edit the current URI in a new window.<br />
* Switch from one tab to another by pressing {{ic|g}} followed by {{ic|t}} or {{ic|Shift+t}}, or use {{ic|Ctrl+PageUp}} and {{ic|Ctrl+PageDown}}.<br />
* You can switch to a specific tab with {{ic|Alt+''number''}}.<br />
* Use {{ic|Shift+h}} to go back in the browser history.<br />
* Use {{ic|Shift+l}} to go forward in the browser history.<br />
* Reorder the tabs with {{ic|<}} and {{ic|>}}.<br />
* Reload the page with {{ic|r}}, stop the loading with {{ic|Ctrl+c}}.<br />
* Re-open last closed tab with {{ic|u}}.<br />
* Open downloads page by pressing {{ic|g}} followed by {{ic|d}} (or {{ic|Shift+d}} for a new tab).<br />
* Copy URI to primary selection with {{ic|y}}.<br />
* View page source code with {{ic|:viewsource}}. Return to normal view with {{ic|:viewsource!}}.<br />
* View image source by pressing {{ic|;}} followed by {{ic|i}} (or {{ic|Shift+i}} for new tab).<br />
* Inspect elements with {{ic|:inspect}}. Repeat to open in a new window. Disable inspector with {{ic|:inspect!}}.<br />
<br />
=== Input fields ===<br />
<br />
Many webpages have editable elements like dropdown lists, checkboxes, text fields and so on. While they work perfectly with the mouse, you may encounter some troubles using the ''follow'' commands.<br />
In such a case, pressing the arrow keys may help.<br />
Alternatively, the {{ic|g}} {{ic|i}} shortcut can be used to focus input.<br />
<br />
=== Bookmarks ===<br />
<br />
If enabled (default configuration), bookmarks can be used from within Luakit.<br />
<br />
* The {{ic|:bookmarks}} command opens the bookmarks page. (Shortcut: {{ic|g}} followed by {{ic|b}}, or {{ic|Shift+b}} for a new tab).<br />
* The {{ic|:bookmark [''URI'' [''tags'']]}} command adds the URI specified (or the current tab's URI, if omitted) to the bookmarks by specified tags. Starting from version 2012-09-13-r1, bookmarks page will be opened (new tab) in new bookmark editing mode before saving. (Shortcut: {{ic|Shift+b}}).<br />
<br />
== Configuration ==<br />
<br />
=== Homepage ===<br />
<br />
Set your homepage as follows:<br />
<br />
{{hc|~/.config/luakit/globals.lua|2=<br />
globals = {<br />
homepage = "www.example.com",<br />
...<br />
}<br />
}}<br />
<br />
=== Custom search engines ===<br />
<br />
To search with the default search engine, press {{ic|o}} and type the phrases. To search with a different engine, type it's name after {{ic|o}} and then the phrases.<br />
<br />
You can virtually add any search engine you want. Make a search on the website you want and copy paste the URI to the Luakit configuration by replacing the searched terms with an {{ic|%s}}. Example:<br />
<br />
{{hc|~/.config/luakit/globals.lua|2=<br />
search_engines = {<br />
aur = "<nowiki>https://aur.archlinux.org/packages.php?O=0&K=%s&do_Search=Go</nowiki>",<br />
aw = "<nowiki>https://wiki.archlinux.org/index.php/Special:Search?fulltext=Search&search=%s</nowiki>",<br />
googleseceng = "<nowiki>https://www.google.com/search?name=f&hl=en&q=%s</nowiki>",<br />
...<br />
}<br />
}}<br />
<br />
The variable is used as a keyword for the {{ic|:open}} command in Luakit.<br />
<br />
Set the defaut search engine by using this same keyword:<br />
<br />
{{hc|~/.config/luakit/globals.lua|2=<br />
search_engines.default = search_engines.aur<br />
}}<br />
<br />
=== Download location ===<br />
<br />
To specify download location:<br />
<br />
{{hc|~/.config/luakit/rc.lua|2=<br />
-- Add download support<br />
require "downloads"<br />
require "downloads_chrome"<br />
<br />
-- Set download location<br />
downloads.default_dir = os.getenv("HOME") .. "/downloads"<br />
downloads.add_signal("download-location", function (uri, file)<br />
if not file or file == "" then<br />
file = (string.match(uri, "/([^/]+)$")<br />
or string.match(uri, "^%w+://(.+)")<br />
or string.gsub(uri, "/", "_")<br />
or "untitled")<br />
end<br />
return downloads.default_dir .. "/" .. file<br />
end)<br />
}}<br />
<br />
=== Adblock ===<br />
<br />
There are several plugins available out there.<br />
<br />
To configure the Adblock plugin [https://github.com/mason-larobina/luakit/wiki/AdBlock-Lua-module featured on the official website]:<br />
<br />
* Put the {{ic|adblock.lua}} and {{ic|adblock_chrome.lua}} files in {{ic|~/.config/luakit}}.<br />
* Edit {{ic|~/.config/rc.lua}} and add the following in the section labelled ''Optional user script loading'':<br />
<br />
{{hc|~/.config/rc.lua|<br />
<nowiki>----------------------------------<br />
-- Optional user script loading --<br />
----------------------------------</nowiki><br />
<br />
require "adblock"<br />
require "adblock_chrome"<br />
...<br />
}}<br />
<br />
* Fetch an adblock-compatible list, like [https://easylist-downloads.adblockplus.org/easylist.txt Easylist], and save it to {{ic|~/.local/share/luakit}}.<br />
* Restart Luakit to load the extension.<br />
* Use {{ic|:adblock-list-enable ''number''}} command within Luakit to turn Adblock's list(s) you downloaded on Adblock itself becomes enabled on startup.<br />
Full info on enabled lists and AdBlock state can be found using {{ic|:adblock}} or {{ic|g}} {{ic|Shift+a}} at {{ic|luakit://adblock/}} internal page, if the {{ic|adblock_chrome}} module is enabled, which is not a mandatory part.<br />
<br />
{{Note|For Adblock to run in '''normal''' mode, {{ic|easylist.txt}} and any others must be placed in {{ic|~/.local/share/luakit/adblock}}}}<br />
<br />
AdBlock for Luakit plugin is also available as a part of [https://github.com/mason-larobina/luakit-plugins/ Luakit Plugins] project.<br />
<br />
=== Bookmarks management ===<br />
<br />
==== Sync ====<br />
<br />
Starting from version 2012.09.13, Luakit bookmarks are stored in an SQLite database: {{ic|~/.local/share/luakit/bookmarks.db}}.<br />
<br />
You can put a symbolic link in place of the default file to store your bookmarks anywhere on your machine.<br />
This way if your are using a cloud sync application like Dropbox, you can keep your bookmarks synchronized between your different computers.<br />
<br />
==== Converting plain text bookmarks to SQLite format ====<br />
<br />
Bookmarks were stored in a simple plain text file: {{ic|~/.local/share/luakit/bookmarks}}. Each line is a bookmark. It is composed of 2 fields, the ''link'' and the ''group'' which are separated by a ''tab'' character.<br />
<br />
{{Warning|If spaces are inserted instead of tabulation character, the link will not be properly bookmarked.}}<br />
<br />
{{Note|Groups and links are alphabetically sorted, so there is no need to do it manually.}}<br />
<br />
To use bookmarks with the latest Luakit release, the file must be converted.<br />
A sample Lua script will do that:<br />
<br />
{{hc|bookmarks_plain_to_sqlite.lua|<nowiki><br />
local usage = [[Usage: luakit -c bookmarks_plain_to_sqlite.lua [bookmark plaintext path] [bookmark db path]<br />
]]<br />
<br />
local old_db_path, new_db_path = unpack(uris)<br />
<br />
if not old_db_path or not new_db_path then<br />
io.stdout:write(usage)<br />
luakit.quit(1)<br />
end<br />
<br />
-- One-pass file read into 'data' var.<br />
old_db = assert(io.open(old_db_path, "r"))<br />
local data = old_db:read("*all")<br />
assert(old_db:close())<br />
<br />
-- Init new_db, otherwise sqlite queries will fail.<br />
new_db = sqlite3{ filename = new_db_path }<br />
new_db:exec("CREATE TABLE IF NOT EXISTS bookmarks (id INTEGER PRIMARY KEY, uri TEXT NOT NULL, title TEXT NOT NULL, desc TEXT NOT NULL, tags TEXT NOT NULL, created INTEGER, modified INTEGER )")<br />
<br />
-- Fill<br />
local url,tag<br />
<br />
for line in data:gmatch("[^\n]*\n?") do<br />
<br />
if string.len(line) > 1 then<br />
<br />
print ("["..line.."]")<br />
<br />
-- Get url and tag (if present) from first line.<br />
_, _, url, tag = string.find(line, "([^\n\t]+)\t*([^\n]*)\n?")<br />
<br />
-- Optional yet convenient output.<br />
io.write(url)<br />
io.write("\t")<br />
io.write(tag)<br />
io.write("\n")<br />
<br />
-- DB insertion. Nothing will be overwritten. If URL and/or tag already exists, then a double is created.<br />
new_db:exec("INSERT INTO bookmarks VALUES (NULL, ?, ?, ?, ?, ?, ?)", <br />
{<br />
url, "", "", tag or "",<br />
os.time(), os.time()<br />
})<br />
end<br />
end<br />
<br />
print("Import finished.")<br />
print("\nVacuuming database...")<br />
new_db:exec "VACUUM"<br />
print("Vacuum done.")<br />
<br />
luakit.quit(0)<br />
</nowiki>}}<br />
<br />
As stated at beginning of the script, it must be ran with Luakit:<br />
<br />
$ luakit -c bookmarks_plain_to_sqlite.lua ''path/to/plaintext/bookmark'' ''path/to/db''<br />
<br />
The old plaintext bookmarks will be left unchanged. If the DB bookmarks do not exist, the file will be created. If it exists, do not worry, none of the previous bookmarks will be touched. However, this behaviour implies that you might get some doubles.<br />
<br />
==== Import from Firefox ====<br />
<br />
{{Note|This works only for Luakit versions before 2012.03.25! For newer version, you can first run this script, then convert the generted plain text bookmarks to the SQLite format as described at [[#Converting plain text bookmarks to SQLite format]].}}<br />
<br />
To import bookmarks from Firefox, first they must be exported to an HTML file using its bookmarks manager. After that the XML file can be converted to a Luakit format.<br />
<br />
The following one-line awk command will do that:<br />
<br />
{{bc|<nowiki><br />
$ cat bookmarks.html | awk '<br />
{gsub(/\"/," ")}<br />
/<\/H3>/{FS=">";gsub(/</,">");og=g;g=$(NF-2);FS=" "}<br />
/<DL>/{x++;if(x>= 3)gl[x-3]=g}<br />
/<\/DL>/{x--;if(x==2)g=og"2"}<br />
/HREF/{gsub(/</," ");gsub(/>/," ");if(g!=""){if(og!=g){printf "\n";og=g};printf "%s\t",$4;if(x>=3){for(i=0;i<=x-4;i++){printf "%s-",gl[i]}printf "%s\n",gl[x-3]}else{printf "\n"}}}'<br />
</nowiki>}}<br />
<br />
The more readable version of the script:<br />
<br />
{{hc|ff2lk.awk|<nowiki><br />
# Notes: 'folders' for Firefox bookmarks mean 'groups' for Luakit.<br />
<br />
# Put spaces where it is needed to delimit words properly.<br />
{gsub(/\"/," ")}<br />
<br />
# Since the folder name may have spaces, delimiter must be ">" here.<br />
/<\/H3>/ {<br />
FS=">"<br />
gsub(/</,">")<br />
oldgroup=group<br />
group=$(NF-2)<br />
FS=" "<br />
}<br />
<br />
# Each time a <DL> is encountered, it means we step into a subfolder.<br />
# 'count' is the depth level.<br />
# Base level starts at 2 (Firefox fault).<br />
# 'groupline' is an array of all parent folders.<br />
/<DL>/ {<br />
count++<br />
if ( count >= 3 )<br />
groupline[count-3]=group<br />
}<br />
<br />
# On </DL>, we step out.<br />
# If if return to the base level (i.e. not in a folder), then we give 'group' a fake name different<br />
# from 'oldgroup' to make sure a line will be skipped (see below).<br />
/<\/DL>/ {<br />
count--<br />
if( count == 2 )<br />
group=oldgroup"ROOT"<br />
}<br />
<br />
# The bookmark name.<br />
# If oldgroup is different than group, (i.e. folder changed) then we skip a line.<br />
# If we are in a folder, then we print the group name, i.e. all parents plus the current folder<br />
# separated by an hyphen.<br />
/HREF/ {<br />
gsub(/</," ")<br />
gsub(/>/," ")<br />
if (group != "")<br />
{<br />
if(oldgroup != group)<br />
{<br />
printf "\n"<br />
oldgroup=group<br />
}<br />
printf "%s\t",$4<br />
if ( count >= 3 )<br />
{<br />
for ( i=0 ; i <= count-4 ; i++ )<br />
{printf "%s-" , groupline[i]}<br />
printf "%s" , groupline[count-3]<br />
}<br />
printf "\n"<br />
}<br />
}</nowiki><br />
}}<br />
<br />
Run it with<br />
<br />
$ awk -f ff2lk.awk bookmarks.html >> bookmarks<br />
<br />
==== Export bookmarks ====<br />
<br />
The following script let you export Luakit bookmarks from its SQLite format to a plain text file. The resulting file may be suitable for other web browsers, or may be easily parsed by import scripts.<br />
<br />
{{hc|bookmarks_sqlite_to_plain.lua|<nowiki><br />
-- USER CONFIG<br />
<br />
local sep = " "<br />
<br />
-- END OF USER CONFIG<br />
<br />
local usage = [[Usage: luakit -c bookmarks_sqlite_to_plain.lua [bookmark db path] [bookmark plain path]<br />
<br />
DB scheme is<br />
<br />
bookmarks (<br />
id INTEGER PRIMARY KEY,<br />
uri TEXT NOT NULL,<br />
title TEXT NOT NULL,<br />
desc TEXT NOT NULL,<br />
tags TEXT NOT NULL,<br />
created INTEGER,<br />
modified INTEGER<br />
);<br />
]]<br />
<br />
local old_db_path, new_db_path = unpack(uris)<br />
<br />
if not old_db_path or not new_db_path then<br />
io.stdout:write(usage)<br />
luakit.quit(1)<br />
end<br />
<br />
-- One-pass file read into 'data' var.<br />
new_db = assert(io.open(new_db_path, "w"))<br />
<br />
-- Open old_db<br />
old_db = sqlite3{ filename = old_db_path }<br />
<br />
-- Load all db values to a string variable.<br />
local rows = old_db:exec [[ SELECT * FROM bookmarks ]]<br />
<br />
-- Iterate over all entries.<br />
-- Note: it could be faster to use one single concatenation for all entries, but<br />
-- it would be much more code and not so flexible. It is desirable to focus on<br />
-- clarity. After all, only a few hundred lines are handled.<br />
for _, b in ipairs(rows) do<br />
<br />
-- Change %q for %s to remove double quotes if needed.<br />
-- You can toggle the desired fields with comments.<br />
local outputstr = <br />
string.format("%q%s", b.uri or "", sep) .. <br />
string.format("%q%s", b.title or "", sep) ..<br />
string.format("%q%s", b.desc or "", sep) ..<br />
string.format("%q%s- ", b.tags or "", sep) ..<br />
((b.created or "" ) .. sep) ..<br />
((b.modified or "" ) .. sep) ..<br />
"\n"<br />
<br />
-- Write entry to file.<br />
new_db:write(outputstr)<br />
end<br />
<br />
<br />
print("Export done.")<br />
<br />
assert(new_db:close())<br />
<br />
luakit.quit(0)</nowiki><br />
}}<br />
<br />
As stated at beginning of the script, it must be ran with Luakit:<br />
<br />
$ luakit -c bookmarks_plain_to_sqlite.lua ''path/to/plaintext/bookmarks'' ''path/to/database''<br />
<br />
=== Tor ===<br />
<br />
Once [[Tor]] has been setup, simply run:<br />
<br />
$ torify luakit<br />
<br />
{{warning|To be sure of anonymity, you also need to change settings within Luakit, such as disabling Flash and changing the useragent string.}}<br />
<br />
=== Custom CSS ===<br />
<br />
Place the CSS file in the {{ic|styles}} subdirectory of Luakit data directory (create if does not exist). For example this will set monospace font for text input areas:<br />
<br />
{{hc|~/.local/share/luakit/styles/custom.css|<br />
input,textarea,select {<br />
font-family: DejaVu Sans Mono,Consolas,Monaco,Lucida Console,Liberation Mono,Bitstream Vera Sans Mono,Courier New, monospace;<br />
}<br />
}}<br />
<br />
And in {{ic|globals.lua}} assign the variable {{ic|user_stylesheet_uri}} to that file's location:<br />
<br />
{{hc|~/.config/luakit/globals.lua|2=<br />
domain_props = {<br />
["all"] = {<br />
...<br />
user_stylesheet_uri = "file://" .. luakit.data_dir .. "/styles/custom.css",<br />
...<br />
},<br />
...<br />
}<br />
}}<br />
<br />
== See also ==<br />
<br />
* [http://mason-larobina.github.com/luakit/ Home page]<br />
* [http://shariebeth.com/computers/luakitcheatsheet.txt Cheatsheet]<br />
<br />
==Other Keyboard Navigation Enabled Browsers==<br />
* [[Firefox]] - with the following extension: [http://5digits.org/pentadactyl/ Pentadactyl]<br />
* [[Jumanji]]<br />
* [[Vimprobable]]<br />
* [[Uzbl]]<br />
* [[Luakit]]<br />
* [[Surf]]</div>Varlogtimhttps://wiki.archlinux.org/index.php?title=Uzbl&diff=354053Uzbl2014-12-29T07:08:00Z<p>Varlogtim: /* See also */</p>
<hr />
<div>[[Category:Web Browser]]<br />
[http://www.uzbl.org/ Uzbl] is a lightweight browser based on '''uzbl-core'''. '''Uzbl''' adheres to the UNIX philosophy of "Write programs that do one thing and do it well". The uzbl-browser package includes uzbl-core, uzbl-browser and uzbl-event-manager. Most users will want to use '''uzbl-browser''' or '''uzbl-tabbed''' as they provide the fullest set of tools for browsing. Uzbl-browser allows for a single page per window (with as many windows as you want), while uzbl-tabbed provides a wrapper for uzbl-browser and implements basic tabs with multiple pages per window.<br />
<br />
==Installation==<br />
<br />
[[pacman|Install]] {{Pkg|uzbl-browser}} or {{Pkg|uzbl-tabbed}} available in the [[official repositories]].<br />
<br />
==Plugins==<br />
<br />
Uzbl can make use of outside [[browser plugins]] like Flash and Java. Installing these packages will enable their use in uzbl-browser and uzbl-tabbed.<br />
<br />
==Commands==<br />
<br />
One of the biggest advantages of using Uzbl is that nearly everything can be controlled by the keyboard. This is preferable to the traditional mouse/keyboard combo because less moving around of the hands is needed. [[Vim]] users will find Uzbl much easier to pick-up, especially as the default bindings loosely resemble Vim keystrokes. For instance, following a link requires the user to type {{Ic|fl}}, and then the keystrokes in the box that appears next to each link on the page. Shortening the command to just {{Ic|f}} in the config file allows for even faster navigation.<br />
<br />
Below are basic, default commands that can be used with uzbl-browser and uzbl-tabbed. These commands can all be found in {{ic|$XDG_CONFIG_HOME/uzbl/config}} (which is usually located in {{ic|~/.config/uzbl/config}}). The default settings work well, but many users like to edit them to suit their preferences and in fact, it is encouraged to change this file to suit your needs. More help with editing the config file can be found on [http://www.uzbl.org/readme.php the Uzbl readme].<br />
<br />
====Navigation====<br />
<br />
o = enter url<br />
O = edit url<br />
b = back<br />
m = forward<br />
S = stop<br />
r = reload<br />
R = reload ignoring cache<br />
fl = spawn numbers next to each hyperlink. Type the number after typing fl to follow the link.<br />
gh = go home<br />
<br />
====Page Movement====<br />
<br />
j = scroll up<br />
k = scroll down<br />
h = scroll left<br />
l = scroll right<br />
PgUp = scroll page up<br />
ctrl+b = scroll page up<br />
PgDn = scroll page down<br />
ctrl+f = scroll page down<br />
Home = vertical beginning of the page<br />
<< = vertical beginning of the page<br />
End = vertical end of the page<br />
>> = vertical end of the page<br />
Space = vertical end of the page<br />
^ = horizontal beginning of the page<br />
$ = horizontal end of the page<br />
/ = find in page<br />
? = find backwards in page<br />
n = repeat find forward<br />
N = repeat find backwards<br />
<br />
====Zooming====<br />
<br />
+ = zoom_in<br />
- = zoom_out<br />
T = toggle_zoom_type<br />
1 = set zoom_level = 1<br />
2 = set zoom_level = 2<br />
<br />
====Searching====<br />
<br />
ddg = search term in DuckDuckGo<br />
gg = search term in Google<br />
\wiki = search term in Wikipedia<br />
<br />
====Inserting Text====<br />
<br />
i = toggle_insert_mode (Esc works to go back to command mode much like vim)<br />
fi = go to the first input field and enter insert mode<br />
<br />
====Bookmarks and History====<br />
<br />
M = insert bookmark (bookmarks are saved in ~/.local/share/uzbl/bookmarks<br />
U = load url from history via dmenu<br />
u = load url from bookmarks via dmenu<br />
<br />
====Tabs (when using uzbl-tabbed)====<br />
<br />
go = load uri in new tab<br />
gt = go to next tab<br />
gT = go to previous tab<br />
gn = open new tab<br />
gi+n = goto 'n' tab<br />
gC = close current tab<br />
<br />
====Other====<br />
<br />
t = show/hide status bar<br />
w = open new window<br />
ZZ = exit<br />
: = enter command<br />
Esc = back to normal mode<br />
ctrl+[ = back to normal mode<br />
<br />
==Tips and tricks==<br />
<br />
* Create an alias in {{ic|~/.bashrc}} to start uzbl-tabbed as just uzbl:<br />
<br />
alias uzbl='uzbl-tabbed'<br />
<br />
* If you wish to open uzbl with a program launcher using the trick above:<br />
cd /usr/bin<br />
sudo ln -s uzbl-tabbed uzbl<br />
This creates a [[wikipedia:Symbolic_link|symbolic link]], called uzbl, which points to uzbl-tabbed.<br />
<br />
* Due to its lightweight nature, uzbl does NOT contain caching functionality. You can install [[Polipo]] to speed up page loading.<br />
<br />
==Troubleshooting==<br />
Parcellite can cause problems at the time of selecting text under uzbl - just disable it.<br />
<br />
==See also==<br />
<br />
* [http://www.uzbl.org/wiki/ Uzbl wiki with user config files and scripts]<br />
* [https://bbs.archlinux.org/viewtopic.php?id=70700 Forum thread]<br />
* [https://github.com/Dieterbe/uzbl/raw/master/examples/config/config Configuration file]<br />
<br />
==Other Keyboard Navigation Enabled Browsers==<br />
* [[Firefox]] - with the following extension: [http://5digits.org/pentadactyl/ Pentadactyl]<br />
* [[Jumanji]]<br />
* [[Vimprobable]]<br />
* [[Uzbl]]<br />
* [[Luakit]]<br />
* [[Surf]]</div>Varlogtim