unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* luakit: user config in guix (disable WebGL)
@ 2019-02-04 18:05 Giovanni Biscuolo
  2019-02-05 14:58 ` Giovanni Biscuolo
  0 siblings, 1 reply; 3+ messages in thread
From: Giovanni Biscuolo @ 2019-02-04 18:05 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 3857 bytes --]

Hi!

I need to disable WebGL in luakit [1]

looking at my installed
/gnu/store/...-luakit-2017.08.10/etc/xdg/luakit/rc.lua
I find this

--8<---------------cut here---------------start------------->8---
-- Load users global config
-- ("$XDG_CONFIG_HOME/luakit/globals.lua" or "/etc/xdg/luakit/globals.lua")
local globals = require "globals"
--8<---------------cut here---------------end--------------->8---

and in /gnu/store/...-luakit-2017.08.10/etc/xdg/luakit/globals.lua this

--8<---------------cut here---------------start------------->8---
-- Per-domain webview properties
-- https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html
-- https://webkitgtk.org/reference/webkit2gtk/stable/WebKitSettings.html
globals.domain_props = {
    ["all"] = {
        enable_webgl               = true,
        -- enable_scripts          = false,
        -- enable_plugins          = false,
        -- zoom_text_only          = true,
    }, --[[
    ["youtube.com"] = {
        enable_scripts = true,
        enable_plugins = true,
    }, ]]
}
--8<---------------cut here---------------end--------------->8---

but if I try to customize "global.domain_props" in
"$XDG_CONFIG_HOME/luakit/globals.lua" with:

--8<---------------cut here---------------start------------->8---
globals.domain_props = {
    ["all"] = {
        enable_webgl               = false,
    },
}
--8<---------------cut here---------------end--------------->8---

I get this error:

--8<---------------cut here---------------start------------->8---
[    0.078579] I [core/luah]: Loading rc: /gnu/store/q26fkwb4bg9052wy4q96x6j4ba15kj5w-luakit-2017.08.10/etc/xdg/luakit/rc.lua
[    0.247536] E [core/common/lualib]: Lua error: attempt to index global 'globals' (a nil value)
                 Traceback:
                 (1) /home/giovanni/.config/luakit/globals.lua:5                                            in main chunk
                 (2) [C]                                                                                    in function require
                 (3) /gnu/store/q26fkwb4bg9052wy4q96x6j4ba15kj5w-luakit-2017.08.10/etc/xdg/luakit/rc.lua:31 in main chunk
[    0.247646] W [core/luah]: loading rc '/gnu/store/q26fkwb4bg9052wy4q96x6j4ba15kj5w-luakit-2017.08.10/etc/xdg/luakit/rc.lua' failed, falling back...
[    0.092112] F [core/luakit]: couldn't find rc file
--8<---------------cut here---------------end--------------->8---

the _strange_ thing is that if I write an *empty*
$XDG_CONFIG_HOME/luakit/globals.lua I get a similar error

--8<---------------cut here---------------start------------->8---
[    0.078378] I [core/luah]: Loading rc: /gnu/store/q26fkwb4bg9052wy4q96x6j4ba15kj5w-luakit-2017.08.10/etc/xdg/luakit/rc.lua
[    0.253037] E [core/common/lualib]: Lua error: attempt to index local 'globals' (a boolean value)
                 Traceback:
                 (1) /gnu/store/q26fkwb4bg9052wy4q96x6j4ba15kj5w-luakit-2017.08.10/etc/xdg/luakit/window.lua:8 in main chunk
                 (2) [C]                                                                                       in function require
                 (3) /gnu/store/q26fkwb4bg9052wy4q96x6j4ba15kj5w-luakit-2017.08.10/etc/xdg/luakit/rc.lua:40    in main chunk
[    0.253147] W [core/luah]: loading rc '/gnu/store/q26fkwb4bg9052wy4q96x6j4ba15kj5w-luakit-2017.08.10/etc/xdg/luakit/rc.lua' failed, falling back...
[    0.076004] F [core/luakit]: couldn't find rc file
--8<---------------cut here---------------end--------------->8---

I don't know nothing about lua but the code i write in "globals.lua"
seems simple

any hint please?

Thanks!
Giovanni

[1] I'm using Guix on a foreign distro running on a LTSP terminal not
supporting GPU acceletation

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: luakit: user config in guix (disable WebGL)
  2019-02-04 18:05 luakit: user config in guix (disable WebGL) Giovanni Biscuolo
@ 2019-02-05 14:58 ` Giovanni Biscuolo
  2019-02-05 17:17   ` Raphaël Mélotte
  0 siblings, 1 reply; 3+ messages in thread
From: Giovanni Biscuolo @ 2019-02-05 14:58 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 1730 bytes --]

Hi!

ehrm, I figured out what I was doing wrong: bad lua code

Giovanni Biscuolo <g@xelera.eu> writes:

[...]

> and in /gnu/store/...-luakit-2017.08.10/etc/xdg/luakit/globals.lua this
>
> --8<---------------cut here---------------start------------->8---
> -- Per-domain webview properties
> -- https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html
> -- https://webkitgtk.org/reference/webkit2gtk/stable/WebKitSettings.html
> globals.domain_props = {
>     ["all"] = {
>         enable_webgl               = true,
>         -- enable_scripts          = false,
>         -- enable_plugins          = false,
>         -- zoom_text_only          = true,
>     }, --[[
>     ["youtube.com"] = {
>         enable_scripts = true,
>         enable_plugins = true,
>     }, ]]
> }
> --8<---------------cut here---------------end--------------->8---

actually the lines I pasted above are just a (little) part of the entire
"globals.lua" file I have in store, not the whole file

> but if I try to customize "global.domain_props" in
> "$XDG_CONFIG_HOME/luakit/globals.lua" with:
>
> --8<---------------cut here---------------start------------->8---
> globals.domain_props = {
>     ["all"] = {
>         enable_webgl               = false,
>     },
> }
> --8<---------------cut here---------------end--------------->8---
>
> I get this error:

I copied the entire "globals.lua" from the store to
/home/giovanni/.config/luakit/globals.lua (customized it) and it worked

in other words, the code I used in
/home/giovanni/.config/luakit/globals.lua was not valid lua code

[...]

sorry for the noise!

bye!
Giovanni

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: luakit: user config in guix (disable WebGL)
  2019-02-05 14:58 ` Giovanni Biscuolo
@ 2019-02-05 17:17   ` Raphaël Mélotte
  0 siblings, 0 replies; 3+ messages in thread
From: Raphaël Mélotte @ 2019-02-05 17:17 UTC (permalink / raw)
  To: Giovanni Biscuolo; +Cc: help-guix


Giovanni Biscuolo writes:
> I copied the entire "globals.lua" from the store to
> /home/giovanni/.config/luakit/globals.lua (customized it) and it 
> worked
>
> in other words, the code I used in
> /home/giovanni/.config/luakit/globals.lua was not valid lua code

Hi !

I'm also using luakit but I'm not used to customizing it, so I 
can't really give you any advise here.

I just wanted to mention that customizing "globals.lua" seems to 
be unsupported in the next version (2.0/2.1, not yet in Guix 
master).

I stumbled accross it while reading the changelog for the next 
version (available here: 
https://github.com/luakit/luakit/blob/develop/CHANGELOG.md ).

--
Raphaël

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-05 17:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-04 18:05 luakit: user config in guix (disable WebGL) Giovanni Biscuolo
2019-02-05 14:58 ` Giovanni Biscuolo
2019-02-05 17:17   ` Raphaël Mélotte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).