[PATCH] gnu: lxqt-session: fix lxqt-rc.xml permission issue

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Reza Alizadeh Majd
Owner
unassigned
Submitted by
Reza Alizadeh Majd
Severity
normal

Debbugs page

Reza Alizadeh Majd wrote 6 years ago
(address . guix-patches@gnu.org)(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)
20190518090229.22339-1-r.majd@pantherx.org
* gnu/packages/lxqt.scm (lxqt-session): change lxqt-rc.xml permission to
755 after initial copy to user directory.
---
gnu/packages/lxqt.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm
index d91efe715d..94d47bc862 100644
--- a/gnu/packages/lxqt.scm
+++ b/gnu/packages/lxqt.scm
@@ -827,6 +827,14 @@ allows for launching applications or shutting down the system.")
(("DESTINATION \"\\$\\{LXQT_ETC_XDG_DIR\\}")
"DESTINATION \"etc/xdg"))
#t))
+ (add-after 'unpack 'patch-openbox-permission
+ (lambda _
+ (substitute* "startlxqt.in"
+ (("cp \"\\$LXQT_DEFAULT_OPENBOX_CONFIG\" \"\\$XDG_CONFIG_HOME/openbox\"")
+ (string-append "cp \"$LXQT_DEFAULT_OPENBOX_CONFIG\" \"$XDG_CONFIG_HOME/openbox\"\n"
+ " # fix openbox permission issue\n"
+ " chmod -R 755 \"$XDG_CONFIG_HOME/openbox\"")))
+ #t))
(add-after 'unpack 'patch-translations-dir
(lambda* (#:key outputs #:allow-other-keys)
(substitute* '("lxqt-config-session/CMakeLists.txt"
--
2.19.0
Reza Alizadeh Majd wrote 6 years ago
lxqt-rc.xml permission issue
(address . 35789@debbugs.gnu.org)
c5b386ce-e81b-4976-af1e-3d9d4b3dbf1c@www.fastmail.com
Hi Guix,

Based on issue that I submitted before
lxqt-session copies an openbox related file (lxqt-rc.xml) to user's home directory,
since this file permissions are set as readonly in `gnu/store`, users are unable to
modify this file using openbox settings GUI, for this I submitted following patch to
set proper permessions to `lxqt-rc.xml` file after initial copy to user's home
directory.
Ludovic Courtès wrote 6 years ago
Re: [bug#35789] [PATCH] gnu: lxqt-session: fix lxqt-rc.xml permission issue
(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)(address . 35789@debbugs.gnu.org)
87pnob283x.fsf@gnu.org
Hello,

Reza Alizadeh Majd <r.majd@pantherx.org> skribis:

Toggle quote (3 lines)
> * gnu/packages/lxqt.scm (lxqt-session): change lxqt-rc.xml permission to
> 755 after initial copy to user directory.

[...]

Toggle quote (6 lines)
> + (substitute* "startlxqt.in"
> + (("cp \"\\$LXQT_DEFAULT_OPENBOX_CONFIG\" \"\\$XDG_CONFIG_HOME/openbox\"")
> + (string-append "cp \"$LXQT_DEFAULT_OPENBOX_CONFIG\" \"$XDG_CONFIG_HOME/openbox\"\n"
> + " # fix openbox permission issue\n"
> + " chmod -R 755 \"$XDG_CONFIG_HOME/openbox\"")))

That will make every file executable.

What about just:

chmod u+w "$XDG_CONFIG_HOME/openbox"/*

?

One last thing: could you provide the explanation you gave in just one
or two lines of comment right above this ‘substitute*’ expression?

Thank you,
Ludo’.
Reza Alizadeh Majd wrote 6 years ago
[PATCH] gnu: lxqt-session: fix lxqt-rc.xml permission issue
(address . 35789@debbugs.gnu.org)(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)
20190521180751.95600-1-r.majd@pantherx.org
* gnu/packages/lxqt.scm (lxqt-session): add write permission to
lxqt-rc.xml file after initial copy to user directory
---
gnu/packages/lxqt.scm | 9 +++++++++
1 file changed, 9 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm
index d91efe715d..e69f29ed1c 100644
--- a/gnu/packages/lxqt.scm
+++ b/gnu/packages/lxqt.scm
@@ -827,6 +827,15 @@ allows for launching applications or shutting down the system.")
(("DESTINATION \"\\$\\{LXQT_ETC_XDG_DIR\\}")
"DESTINATION \"etc/xdg"))
#t))
+ ;; add write permission to lxqt-rc.xml file which is stored as read-only in store
+ (add-after 'unpack 'patch-openbox-permission
+ (lambda _
+ (substitute* "startlxqt.in"
+ (("cp \"\\$LXQT_DEFAULT_OPENBOX_CONFIG\" \"\\$XDG_CONFIG_HOME/openbox\"")
+ (string-append "cp \"$LXQT_DEFAULT_OPENBOX_CONFIG\" \"$XDG_CONFIG_HOME/openbox\"\n"
+ " # fix openbox permission issue\n"
+ " chmod u+w \"$XDG_CONFIG_HOME/openbox\"/*")))
+ #t))
(add-after 'unpack 'patch-translations-dir
(lambda* (#:key outputs #:allow-other-keys)
(substitute* '("lxqt-config-session/CMakeLists.txt"
--
2.19.0
Reza Alizadeh Majd wrote 6 years ago
Re: [bug#35789] [PATCH] gnu: lxqt-session: fix lxqt-rc.xml per mission issue
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 35789@debbugs.gnu.org)
c8c0f79f-65f0-4548-84c4-07a9cb6b8f06@www.fastmail.com
Hi,

Toggle quote (2 lines)
> chmod u+w "$XDG_CONFIG_HOME/openbox"/*

you're right, setting the write permission to lxqt-rc.xml is preferred.

I also add a comment line before permission modification phase and amend
my last commit.


Best,
Reza
Ludovic Courtès wrote 6 years ago
Re: [bug#35789] [PATCH] gnu: lxqt-session: fix lxqt-rc.xml permission issue
(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)(address . 35789-done@debbugs.gnu.org)
87h89ju9u0.fsf@gnu.org
Reza Alizadeh Majd <r.majd@pantherx.org> skribis:

Toggle quote (3 lines)
> * gnu/packages/lxqt.scm (lxqt-session): add write permission to
> lxqt-rc.xml file after initial copy to user directory

Applied, thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 35789@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 35789
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help