You are not logged in.

#1 2013-02-12 03:10:50

Tacna
Member
Registered: 2012-04-14
Posts: 25

Luakit + adblock plus

Hello.

I'm trying to run adblock with luakit. I was following the instructions on the wiki.

I placed the adblock.lua and adblock_chrome.lua files in my ~/.config/luakit folder and when I go to add require "adblock" and require "adblock_chrome" to my rc.lua file, upon restarting Arch Linux, my entire home screen is set to the default set up. i.e. the wallpaper is set to default, my tags are numbered 1 through 9 instead of my customized tags, my awesome menu is set to the default.

When commenting out those adblock commands and saving my rc.lua file, my Arch Linux setup goes back to my personal configuration.

Any ideas on why this is happening?

Offline

#2 2013-02-12 03:44:29

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: Luakit + adblock plus

Ah ... which rc.lua did you add that to?  That should be luakit's rc.lua, not your window manager's.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2013-02-12 05:28:26

Tacna
Member
Registered: 2012-04-14
Posts: 25

Re: Luakit + adblock plus

Trilby wrote:

Ah ... which rc.lua did you add that to?  That should be luakit's rc.lua, not your window manager's.

I didn't know luakit had an independent rc.lua file. Where is it suppose to be? My ~/.config/luakit folder had no such file.

Or do I just create a new one in the aforementioned folder and just type:

require "adblock"
require "adblock_chrome"

into it?

edit:

I found the rc.lua in /etc/xdg/luakit but when I typed in the commands require "adblock" and require "adblock_chrome" and saved the lua file, luakit won't start anymore.

Last edited by Tacna (2013-02-12 06:06:45)

Offline

#4 2013-02-12 11:32:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: Luakit + adblock plus

Both the wiki page for luakit (under installation) and the post install message from pacman when you installed luakit say you need to copy the configs to your ~/.config/luakit directory.

You should not modify the system-wide luakit configs as they will be overwritten with every update.

Also, while this may not be explicit enough in the wiki, those require lines may not be able to go anywhere in the file; they should go in the userscript section. To be sure there is no issue with the order, I'd put them right before the comment lines reading "-- End user script loading --".

Last edited by Trilby (2013-02-12 11:43:30)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2013-02-23 20:35:29

Tacna
Member
Registered: 2012-04-14
Posts: 25

Re: Luakit + adblock plus

I copied the config files into my luakit config folder, wrote the require lines in the section you suggested and luakit still does not open.

Ideas?

Offline

#6 2013-03-15 01:17:07

Tacna
Member
Registered: 2012-04-14
Posts: 25

Re: Luakit + adblock plus

Any suggestions?

Offline

#7 2013-03-15 01:53:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: Luakit + adblock plus

What errors does it give?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2013-06-25 00:11:04

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Re: Luakit + adblock plus

I was having trouble with this too for a bit. Basically I didn't realize the easylist I copied into a file didn't have the .txt extension and that caused luakit to not start. Also, make sure the easylist.txt (or whatever you want to use) is in ~/.local/share/luakit somewhere and not in ~/.config or else that will also cause something to not load right. Trilby is right about putting the require commands after the script loading part in the file. If you are still unsure as to why you are having errors... just try starting luakit from the terminal and see what it says.

Offline

#9 2013-06-25 00:47:55

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: Luakit + adblock plus

This works for me ( just to give you an idea of how someone else got it to work):

mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/luakit/
cd ${XDG_CONFIG_HOME:-$HOME/.config}/luakit/
cp /etc/xdg/luakit/rc.lua .
wget "https://github.com/Plaque-fcc/luakit-adblock/raw/master/adblock.lua" "https://github.com/Plaque-fcc/luakit-adblock/raw/master/adblock_chrome.lua"
vim rc.lua

NOTE:  You can use 'vim' or any other editor you want for rc.lua.
You will need to add the following "require" lines to your rc.lua file, at the bottom of all the other "requires":

require "adblock"
require "adblock_chrome"

-----------------------------
-- End user script loading --
-----------------------------

Then, issue the follow commands:

mkdir -p ${XDG_CACHE_HOME:-$HOME/.config/share}/luakit/adblock/
cd ${XDG_CACHE_HOME:-$HOME/.config/share}/luakit/adblock/
wget "https://easylist-downloads.adblockplus.org/easylist.txt"

This should set everything up.  Try opening a terminal and then type in "luakit" and hit enter.
See if there are any error messages (like rg_arc suggested).

If luakit does not load properly and prints error messages, let us know.
If luakit opens, try typing:

:adblock

To see if adblock is working.

=================

If your entire window manager settings are changing, then you've edited another file that affects your window manger.  Luakit's files do not effect anything BUT luakit.  Depending on which version of awesome you're using it may be configurable by "lua" and if you've added the require lines to one of awesome's files then it may revert to defaults.  I would double-check all your 'awesome' config files to be sure.

Offline

#10 2013-06-25 00:58:01

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Re: Luakit + adblock plus

The only thing I am having trouble with now is Facebook is still showing ads even though adblock is enabled. I know its working since ads aren't showing on other websites.

Offline

Board footer

Powered by FluxBB