LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 02-01-2022, 10:56 AM   #1
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,153
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
Fixing dillo.


I'll post this in the arch forum because, that's where I built it. Anyone else should be able to compile it too. You need dillo's 3.1 devel source, it's depends and mbedtls. Your distro might name that slightly different. Someone else mentioned this in another thread about small light browsers on the Slack forum. So I decides to investigate it.

Anyone who is interested.

As you know dillo hasn't worked right for years. This fixes it so that it loads pages like it should. There isn't an AUR package for it. I haven't seen a post on it.

Get 3.1 dev source here.
https://github.com/orsenthil/dillo
https://github.com/orsenthil/dillo/a...ads/master.zip

Install mbedtls
Code:
pacman -S mbedtls
I made a PKGBUILD for it. (Build from a local source tree after you have it).

PKGBUILD
Code:
#Local PKGBUILD example

pkgname=dillo3dev
pkgver=3.1.dev
pkgrel=8
pkgdesc="A small, fast graphical web browser built on FLTK"
arch=(x86_64)
license=('GPL')
depends=('fltk' 'libjpeg' 'perl' 'libpng' 'gcc-libs' 'libxcursor'
         'libxi' 'libxinerama')
backup=(etc/dillo/{dillorc,dpidrc})

build() {
  cd "/path/to/the/source/dillo-master"
  CFLAGS+=' -fcommon'
  ./configure --prefix=/usr --sysconfdir=/etc --enable-cookies --enable-ssl
  make
}

package() {
  cd "/path/to/the/source/dillo-master"
  make DESTDIR="$pkgdir" install

  install -Dm644 ../dillo.desktop "$pkgdir/usr/share/applications/dillo.desktop"
  install -Dm644 ../ProgramIcon48.png "$pkgdir/usr/share/pixmaps/dillo.png"
}
dillo.desktop
Code:
[Desktop Entry]
Name=Dillo
GenericName=Web Browser
Comment=Very small and fast GUI web browser
Exec=dillo
Icon=dillo
Terminal=false
Type=Application
Categories=Network;GTK;WebBrowser;
ProgramIcon48.png
Code:
curl -F'file=@ProgramIcon48.png' https://0x0.st
https://0x0.st/oHyw.png
And that builds fine and runs.

I already have dillo installed so I never bothered to install this fixed version. I simply ran it from the build directory. I wanted to see if this would fix it. Point is, it has loaded all the pages that I have thrown at it, including cloudflare sites.

Code:
curl -F'file=@dilLQ.png' https://0x0.st
https://0x0.st/oHy3.png
If no one is interested in dillo, that's fine. It used to be one of my favorite browsers when it worked 5 or 6 years ago.

And if anyone is interested in making that little obnoxious scroll bar thicker so that you can actually grab it.

That is at:
/dillo-master/dw/fltkviewport.hh
Line 20
Code:
class FltkViewport: public FltkWidgetView
{
public:
   enum GadgetOrientation { GADGET_VERTICAL, GADGET_HORIZONTAL };

private:
   enum { SCROLLBAR_THICKNESS = 15 };

   int scrollX, scrollY;
   int scrollDX, scrollDY;
   int hasDragScroll, dragScrolling, dragX, dragY;
   int horScrolling, verScrolling;
Ok, my 2 cents worth.

Last edited by teckk; 02-01-2022 at 10:58 AM.
 
Old 02-01-2022, 11:14 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,686

Rep: Reputation: Disabled
Here is my RPM spec file for Dillo.
 
Old 02-01-2022, 11:31 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
This just builds the git master without any changes, yes?
build() and package() seem to be the same as for the community package, the prepare() function presumably isn't necessary anymore?
 
Old 02-01-2022, 12:01 PM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,686

Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
the prepare() function presumably isn't necessary anymore?
Yep. It's not needed. From my changelog:
Code:
- Latest snapshot
- Disable LTO
- Drop BR on gtk+-devel
- Replace BR on openssl-devel with mbedtls-devel
- Drop patch for OpenSSL 1.1.1
- Patch test/Makefile.am to link dw_simple_container_test with -lX11
- Add icons
 
Old 02-01-2022, 12:19 PM   #5
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,153

Original Poster
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
Thanks @ondoho, I don't think that I even knew about that. Learn something new all of the time.

openssl patch
https://github.com/archlinux/svntogi.../openssl.patch

So no, the build I did does not use openssl. It uses mbedtls.

Code:
pacman -Si mbedtls
...
Provides        : polarssl  libmbedcrypto.so=7-64  libmbedtls.so=13-64
                  libmbedx509.so=1-64
I also failed to retrace my steps well enough. From that source above one needs to run autogen.sh manaully first to make a configure file, or make it part of the PKGBUILD.

My goal was so that everyone, whatever distro they used, could easily get the source and compile it, if they wanted to.
 
Old 02-02-2022, 02:34 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ So the current git master of dillo depends on mbedtls instead of openssl?
It's not in the depends array of your PKGBUILD.

Dunno, I might make a proper dillo-git package from this, it's currently not in the AUR.
 
Old 02-02-2022, 08:02 AM   #7
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,153

Original Poster
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
I just built this fresh from an empty directory to make sure it builds from this PKGBUILD

Here is a new PKGBUILD.
Code:
pkgname=dillo-master
pkgver="3.1.d"
pkgrel=10
pkgdesc="Dillo using mbedtls"
arch=(x86_64)
license=('GPL')
depends=('fltk' 'libjpeg' 'perl' 'libpng' 'gcc-libs' 'libxcursor'
         'libxi' 'libxinerama' 'mbedtls')
backup=(etc/dillo/{dillorc,dpidrc})

source=(https://github.com/orsenthil/dillo/archive/refs/heads/master.zip
        https://github.com/archlinux/svntogit-community/blob/packages/dillo/trunk/dillo.desktop
        https://www.dillo.org/Icons/ProgramIcon128.png)
        
sha256sums=('SKIP'
            'SKIP'
            'SKIP')

build() {
  cd "$srcdir/$pkgname"
  ./autogen.sh
  CFLAGS+=' -fcommon'
  ./configure --prefix=/usr --sysconfdir=/etc --enable-cookies --enable-ssl
  make
}

package() {
  cd "$srcdir/$pkgname"
  make DESTDIR="$pkgdir" install

  install -Dm644 ../dillo.desktop "$pkgdir/usr/share/applications/dillo.desktop"
  install -Dm644 ../ProgramIcon48.png "$pkgdir/usr/share/pixmaps/dillo.png"
}
And that built and run. Change that however you want.

And if you want to make a patch for the scrollbar size.
../src/dillo-master/dw/fltkviewport.hh
Line 20

I'm an amature with the AUR. Never posted anything in it. I've always built stuff from source for myself and used it. Plus, the devs are kinda harsh if you don't get it right. (Which is why I haven't posted anything in it.) Maybe I'll look into that one of these days when I have lots of time to get it right. You seen to know how to do it.

I don't think that there is that much interest in dillo. Just something that i have wanted to fix for 3 or 4 years now. Got around to it.

Last edited by teckk; 02-02-2022 at 08:05 AM.
 
Old 02-02-2022, 08:10 AM   #8
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,153

Original Poster
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
And that seems to open everything that you throw at it.

Code:
curl -F'file=@dil2.png' https://0x0.st
https://0x0.st/oHgz.png
https://0x0.st/oHgz.png
 
Old 02-02-2022, 08:30 AM   #9
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,633

Rep: Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558

It seems Dillo uses it's own rendering engine (not webkit/gecko/etc), which has me curious, but I've yet to find anything on Dillo or FLTK websites - don't suppose anyone knows where there's details?

 
Old 02-02-2022, 09:07 AM   #10
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,153

Original Poster
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
What are you referring to? It's own web browser engine?

You'll have to look at it's source code. It is part of it. It is not a seperate engine like webkit, webengine, blink etc. It is in the source, I can't tell you a lot more. I'm not an expert on it. I looked the code base over to change it the way I wanted. I think that you probably would have to talk to the dillo devs to fully understand it. That's quite a bit of code there, just like a lot of projects. There are some readme's in the source tree.

It doesn't run scripts, doesn't even display frames correctly. fltk of course is just the tool kit for the graphics. It is a very fast little browser that just diplays the essence of the page. You can post on LQ wit hit, I've done it before just not as convenient. And...It wont keep the formatting that you use sometimes.

Something else that it will do. Most web browsers, if you turn javascript and images off. If you load some pages you get a blank page. Dillo will diplay the page. It simply does not redirect to the "Blank page" because you don't have scripts on.
 
Old 02-02-2022, 09:12 AM   #11
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,153

Original Poster
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
From the source tree there is...
https://github.com/orsenthil/dillo/tree/master/devdoc
https://github.com/orsenthil/dillo/tree/master/devdoc
 
Old 02-02-2022, 10:12 AM   #12
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,633

Rep: Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558

Yeah, I just want something simple to look at - I suspect Dillo will be easier to comprehend than Firefox/etc, and it certainly wont waste disk space - its under 100MB vs "at least 30GB" (!) for FF...

 
Old 02-03-2022, 02:35 AM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
teckk, how did you arrive at that dependency list? Compare to the community version. Is there a reason why you dropped zlib?

Anyhow, I had to fix a few things:
  • renamed to dillo-git to conform with AUR practices
  • you had the wrong link for the .desktop file
  • "conflicts" is required otherwise pacman goes haywire over an already installed version of dillo
  • tried to fix versioning (I'm not good at this either) for git packages

These things I'm sure about, the dependencies not so much. I just took what was in the [community] version and replaced openssl with mbedtls.

So, new PKGBUILD:
Code:
# teckk & ondoho 2022
pkgname=dillo-git
pkgver=20181013081556
pkgrel=2
epoch=1
pkgdesc="Dillo using mbedtls"
provides=(dillo)
conflicts=(dillo)
arch=(x86_64)
license=('GPL')
depends=('fltk' 'libjpeg' 'libpng' 'mbedtls' 'perl' 'zlib' )
backup=(etc/dillo/{dillorc,dpidrc})
url="https://github.com/orsenthil/dillo"
source=("$pkgname::git+${url}.git"
        https://raw.githubusercontent.com/archlinux/svntogit-community/packages/dillo/trunk/dillo.desktop
        https://www.dillo.org/Icons/ProgramIcon128.png)
sha256sums=('SKIP'
            'e94ead3a359c2eceb934b07af0fac4864251b9721fa7f4855331daa017b66202'
            '72ecb57983117b17f0777caf6cf935a2ad5d72aca7b07b11f5b75562cb420778')

pkgver() {
    cd "${srcdir}/${pkgname}"
    git log -1 --format="%cd" --date="format:%Y%m%d%H%M%S"
}

build() {
  cd "$srcdir/$pkgname"
  ./autogen.sh
  CFLAGS+=' -fcommon'
  ./configure --prefix=/usr --sysconfdir=/etc --enable-cookies --enable-ssl
  make
}

package() {
  cd "$srcdir/$pkgname"
  make DESTDIR="$pkgdir" install

  install -Dm644 ../dillo.desktop "$pkgdir/usr/share/applications/dillo.desktop"
  install -Dm644 ../ProgramIcon128.png "$pkgdir/usr/share/pixmaps/dillo.png"
}
___________________

Quote:
Originally Posted by boughtonp View Post
It seems Dillo uses it's own rendering engine (not webkit/gecko/etc), which has me curious, but I've yet to find anything on Dillo or FLTK websites - don't suppose anyone knows where there's details?
dillo is just a very small, very fast GUI browser. I use it for some hotkeys (e.g. to show me the online conky documentation) and never to actually browse. It's functional, but doesn't do javascript. Think Internet Explorer 5.
FLTK (the fast light toolkit) is used in a few other applications.
Both it and dillo have their own websites.
 
Old 02-03-2022, 07:42 AM   #14
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,153

Original Poster
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
Code:
makepkg
==> ERROR: Missing package() function in ~/test/dillo5/PKGBUILD
Added:
Code:
package() {
  cd "$srcdir/$pkgname"
  make DESTDIR="$pkgdir" install

  install -Dm644 ../dillo.desktop "$pkgdir/usr/share/applications/dillo.desktop"
  install -Dm644 ../ProgramIcon128.png "$pkgdir/usr/share/pixmaps/dillo.png"
}
And that built fine without modifying any of the source. I didn't install it. The executable is at:
<BuidDir>/src/dillo-git/src/dillo

And that appears to load everything thrown at it. Here is a collage of screen grabs. The text looks better than that. I did a lesser quality jpeg for size sake.

Warning, image is still 2.6 MB. (Fairly big for a jpeg)
Code:
curl -F'file=@diltest.jpg' https://0x0.st
https://0x0.st/oHGj.jpg
https://0x0.st/oHGj.jpg

And sure enough, someone is going to ask me how I made that collage.
In my ~/.fluxbox/keys I have the Prt Scr key mapped to:
Code:
###PrtScr key 
#Capture desktop
Print :Exec scrot
#Print :Exec import -window root 0.png
#Print :Exec imlib2_grab 0.png
#Print :Exec ffmpeg -f x11grab -video_size 1920x1080 -i $DISPLAY -vframes 1 0.png
#Capture Focused window
Mod4 Print :Exec sleep 3 && scrot -u
#Mod4 Print :Exec scrot -u
#Mod4 Print :Exec import -screen 0.png
#Capture Select area
Control Print :Exec fbrun -text "scrot -s"
#Capture terminal session. exit to stop.
Mod1 Print :Exec xterm -e script
Then I used imagemagick. (Stripped down version)
Code:
#! /usr/bin/bash

echo "Montage images"
read -p $'\nEnter/Paste image files :' im_files
im_files=($im_files)

while :; do
    read -p $'\nNumber of tiles wide :' tiles
    read -p $'\nOutfile name :' out_file

    montage -mode concatenate \
    -title "XX Collage of dillo pages XX" \
    -tile "$tiles" "${im_files[@]}" "$out_file"

    file "$out_file"
    du -h "$out_file"

    read -p $'\nEnter resize for image(50% 20%) :' re_size

    convert "$out_file" -resize "$re_size" "$out_file"

    file "$out_file"
    du -h "$out_file"

    read -p $'\nFile size, image size right? Enter y or n :' yn
    case "$yn" in
        [Yy]* ) exit ;;
    
        [Nn]* ) echo -e "\nTry again then" ;;
    esac
done
 
Old 02-03-2022, 08:34 AM   #15
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,153

Original Poster
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
And if you want to see that scrollbar fix. I Make it way too big to show it.

And for anyone not using arch that would like to compile it the old fashioned way.

<BuildDir>/src/dillo-git/dw/fltkviewport.hh
Code:
class FltkViewport: public FltkWidgetView
{
public:
   enum GadgetOrientation { GADGET_VERTICAL, GADGET_HORIZONTAL };

private:
   enum { SCROLLBAR_THICKNESS = 45 }; //Way too big
Code:
cd <BuildDir>/src/dillo-git
make clean
./autogen.sh
make
Then run
<BuildDir>/src/dillo-git/src/dillo

And the scrollbars will look like this silly example:
https://0x0.st/oHGG.png

Last edited by teckk; 02-03-2022 at 08:36 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Claws Mail on Salix 13.37 missing Dillo HTML plugin; trouble building Dillo SkyMeadow Linux - Newbie 3 03-03-2012 08:41 PM
How do I make Dillo stop cacheing? Nebetsu Linux - Software 0 05-22-2005 12:28 PM
DSL dillo for other distros APB_4 Linux - Software 0 04-24-2005 06:46 PM
Dillo Web Browser - Smoking Fast Breezwell Linux - Software 1 02-12-2004 02:44 PM
Dillo - Forums like these SirLancelotX Linux - Software 20 07-27-2003 05:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

All times are GMT -5. The time now is 05:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration