bugGNU nano - Bugs: bug #55376, self-compiled nano does not read...


You are not allowed to post comments on this tracker with your current authentication level.

bug #55376: self-compiled nano does not read /etc/nanorc

Submitted by:  Robert Johnson <alohawolf>
Submitted on:  Fri 04 Jan 2019 03:04:09 AM UTC  
Severity:  3 - Normal Status:  Invalid
Assigned to:  None Open/Closed:  Closed

( Jump to the original submission)

Tue 07 Jan 2020 01:51:18 PM UTC, comment #8: 

As a mitigation, I've added a FAQ item about this:

Benno Schulenberg <bens>
Project Administrator
Tue 07 Jan 2020 04:46:26 AM UTC, comment #7: 

Bless this forum for pointing me in the right direction. I have voted my encouragement on bug #57061. Thank you all for addressing this.

Carter Pape <carterpape>
Wed 16 Oct 2019 08:18:46 AM UTC, comment #6: 

The suggestion for letting ./configure print the baked-in nanorc paths at its end has been posted as bug #57061.

Benno Schulenberg <bens>
Project Administrator
Sat 05 Jan 2019 04:51:39 PM UTC, comment #5: 

So, pidgin takes this strategy.

Strategy - I'll attach a log output from compiling pidgin, and the configure files.

Robert Johnson <alohawolf>
Sat 05 Jan 2019 04:10:31 PM UTC, comment #4: 

Printing the configured paths...  Good idea.  But do you have any example of a package that does this?  Because when I add at the end of configure.ac:

  AC_MSG_NOTICE([[The system's nanorc file is: /${sysconfdir}/nanorc]])

then ./configure prints:

configure: The system's nanorc file is: /${prefix}/etc/nanorc

That's no good.  How do I get it to fully expand $sysconfdir?

Benno Schulenberg <bens>
Project Administrator
Fri 04 Jan 2019 07:38:03 PM UTC, comment #3: 


Yes, that was it - may I may the suggestion of printing the defaults that are baked into the software at the end of the configure script running - its something I've seen done on other project to solve just this very problem.

Robert Johnson <alohawolf>
Fri 04 Jan 2019 06:55:53 PM UTC, comment #2: 

The most likely cause is that you have built nano with a default run of ./configure, which means that nano will not read /etc/nanorc but will instead read /usr/local/etc/nanorc.  If the latter does not exist, nano will still read the .nanorc in your homedir.  The prudent thing to do is thus: put all your configuration in the .nanorc file in your homedir and forget about any global configuration.

Benno Schulenberg <bens>
Project Administrator
Fri 04 Jan 2019 03:07:21 AM UTC, comment #1: 

incidentally, I find the same behavior on MacOS, when building 3.2 from homebrew.

Robert Johnson <alohawolf>
Fri 04 Jan 2019 03:04:09 AM UTC, original submission:  

I have an Ubunu 16.04 system that I build nano-3.2 from sources on, I updated my nanorc to reflect the correct location of the syntax highlight files, and I was unable to get any colors at all.

I used the sample from the nano source distribution and created a new nanorc for 3.2, and my nanorc includes the following line.

include "/usr/local/share/nano/*.nanorc"

Below are the contents of /usr/local/share/nano

user@leho /etc> ls /usr/local/share/nano/
asm.nanorc        debian.nanorc   guile.nanorc       man.nanorc       ocaml.nanorc       python.nanorc   tex.nanorc
autoconf.nanorc   default.nanorc  html.nanorc        mgp.nanorc       patch.nanorc       ruby.nanorc     xml.nanorc
awk.nanorc        elisp.nanorc    java.nanorc        mutt.nanorc      perl.nanorc        rust.nanorc
changelog.nanorc  fortran.nanorc  javascript.nanorc  nanohelp.nanorc  php.nanorc         sh.nanorc
cmake.nanorc      gentoo.nanorc   json.nanorc        nanorc.nanorc    po.nanorc          spec.nanorc
c.nanorc          go.nanorc       lua.nanorc         nftables.nanorc  postgresql.nanorc  tcl.nanorc
css.nanorc        groff.nanorc    makefile.nanorc    objc.nanorc      pov.nanorc         texinfo.nanorc

attached are configure and make logs.

Robert Johnson <alohawolf>


Attached Files
file #45876:  pidginconfiglog.txt added by alohawolf (18KiB - text/plain)
file #45877:  pidgin-configure.ac added by alohawolf (88KiB - application/octet-stream)
file #45878:  pidgin-configure added by alohawolf (771KiB - application/octet-stream)
file #45861:  nanorc added by alohawolf (10KiB - application/octet-stream)
file #45860:  nanomakeresults.txt added by alohawolf (62KiB - text/plain)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by carterpape (Posted a comment)
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by alohawolf (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-10-16 bens Open/ClosedOpen => Closed
    2019-01-05 alohawolf Attached File- => Added pidginconfiglog.txt, #45876
        Attached File- => Added pidgin-configure.ac, #45877
        Attached File- => Added pidgin-configure, #45878
    2019-01-05 bens StatusNone => Invalid
        SummaryColors not working on 3.2 => self-compiled nano does not read /etc/nanorc
    2019-01-04 alohawolf Attached File- => Added nanorc, #45861
    2019-01-04 alohawolf Attached File- => Added nanoconfigureresults.txt, #45859
        Attached File- => Added nanomakeresults.txt, #45860

    Back to the top

    Powered by Savane 3.5