CRUX + w3m + Ranger - GNU/Linux

Users browsing this thread: 1 Guest(s)
### w3m + Ranger on Crux ###

Well i did install CRUX linux and like most people i like Ranger + image preview so i try installing from CRUX PORTS i got my w3m installed but when i search for and image w3m wont preview :s so when i check the Pkgfile from w3m on the PORTS directory w3m was configure with image disable :( so i did enable it and try again but this time the install FAIL so i did search how many prefixes i can put on the file so i can make image preview work on w3m with no luck . After some hours of searching and reading i found some help from different people talking about ( w3mimgdisplay ) .
I hope this will help you on getting your image preview working on your CRUX Linux :D .

1. Download w3m:

Download (HTTP):

2. This required a patch:

3. w3m Dependencies:


4. Install w3m by running the following commands:

patch -Np1 -i ../w3m-0.5.3-bdwgc72-1.patch &&
sed -i 's/file_handle/file_foo/' istream.{c,h} &&
sed -i 's#gdk-pixbuf-xlib-2.0#& x11#' configure &&

./configure --prefix=/usr --sysconfdir=/etc &&

5. Now, as SUDO:

make install &&
install -v -m644 -D doc/keymap.default /etc/w3m/keymap &&
install -v -m644 doc/menu.default /etc/w3m/menu &&
install -v -m755 -d /usr/share/doc/w3m-0.5.3 &&
install -v -m644 doc/{HISTORY,READ*,keymap.*,menu.*,*.html} \

6. Command Explanations

patch -p1 < ../w3m-0.5.3-bdwgc72-1.patch :
This patch fixes compiling w3m with GC-7.2 installed.

sed -i 's/file_handle/file_foo/' istream.{c,h} :
This renames the file_handle function to avoid a clash with a glibc function that has the same name,defined in /usr/include/bits/fcntl.h.

sed -i 's#gdk-pixbuf-xlib-2.0#& x11#' configure :
This fixes compiling w3m using GTK+-2.24.27 as its image library. It has no impact if GTK+-2.24.27 is not installed.

--sysconfdir=/etc :
This option puts the configuration files in /etc.

7. NOW that w3m is installed get your RANGER from GIT and install sorry for not explaining howto
---> so when you get your RANGER running to get your image preview working you have to add this to your
( ~/.config/ranger/rc.conf ) .

set preview_images true
set preview_images_method w3m

8. This will still give Ranger ERROR because Ranger dont know where is your ( w3mimgdisplay ) so add this to your ( .zshrc ) or your favorite shell rc file.

export W3MIMGDISPLAY_PATH=/usr/libexec/w3m/w3mimgdisplay

Well i hope this work for you like it did for me on CRUX LINUX :P

[Image: IHD4kKO.png?1]
That's sure going to help people who are running Crux.
Thanks a lot!