[SOLVED] can't change pacman.conf in nano 24 January 2022, 15:35:17 Hi is there a special way to edit config files in artix?I can't save any files because the usual keyboard shortcuts aren't working Last Edit: 25 January 2022, 01:20:21 by nous
Re: can't change pacman.conf in nano Reply #1 – 24 January 2022, 15:49:44 There's no special way. You can just pick whatever text editor is your favorite. I have no idea what "the usual keyboard shorcuts aren't working" means, but you could try vim or something I guess.
Re: can't change pacman.conf in nano Reply #2 – 24 January 2022, 16:05:33 Quote from: Dudemanguy – on 24 January 2022, 15:49:44you could try vim or something I guess.If by "usual" the OP means close to Apple's shortcuts adopted in slightly modified form by Microsoft, or IBM CUA shortcut keys, or WordStar keys, he should try nano or joe (TUI), or kwrite or gedit (GUI).vi is included by default on installation media, so it doesn't require installing (non-base install) like other listed editors might.
Re: can't change pacman.conf in nano Reply #3 – 24 January 2022, 16:16:10 Quote from: highwaydre – on 24 January 2022, 15:35:17Hi is there a special way to edit config files in artix?I can't save any files because the usual keyboard shortcuts aren't workingNano has its own set of keyboard shortcuts. There is no problem in using these, most commonly used shortcuts are listed in the bottom of the screen, and you can access inline help by pressing Ctrl-G.The only thing you must consider is that Nano uses terminal-specific shortenings for key combinations. E.g. '^' stands for 'Ctrl-' and 'M-' stands for 'Alt-'.
Re: can't change pacman.conf in nano Reply #4 – 24 January 2022, 16:29:28 If you want to set a default editor, for user(s) add "export EDITOR=vim" for example, in your shell config or you can do it in /etc/profile.d/editor.sh for system wide
Re: can't change pacman.conf in nano Reply #5 – 24 January 2022, 17:06:58 thanks for the responses. for example control plus x should close the file but nothing happens. will setung the default editor solve that?
Re: can't change pacman.conf in nano Reply #6 – 24 January 2022, 17:36:31 Quote from: highwaydre – on 24 January 2022, 17:06:58thanks for the responses. for example control plus x should close the file but nothing happens. will setung the default editor solve that? Read carefully what the editor tells you in the bottom of the screen. There is info area and prompt line out there. It seems that you are trying to close the editor while changes you made to the file are still not saved, so it prompts you whether you want to save, discard or cancel exiting.E.g. Ctrl-O will save the changes, and the editor prompts you to enter the file name. You may just press enter to save the changes into the existing file, or type in another name (same as 'Save as...' option in GUI editors).And yeah, if you are running Artix in VirtualBox, you must use left Ctrl, because right Ctrl is used as a 'host' key in VirtualBox by default. Last Edit: 24 January 2022, 17:51:27 by VictorBrand
Re: can't change pacman.conf in nano Reply #7 – 24 January 2022, 17:53:22 Quote from: highwaydre – on 24 January 2022, 17:06:58thanks for the responses. for example control plus x should close the file but nothing happens. will setung the default editor solve that? You can't edit files you don't have write access to. You should read up on file permissions and ownership in GNU/Linux.For system configuration files such as /etc/pacman.conf, you need to open root shell or use sudo or doas:Code: [Select]$ su# nano /etc/pacman.conforCode: [Select]$ sudo nano /etc/pacman.conforCode: [Select]$ doas nano /etc/pacman.conf