0

The first time I ran sudo apt edit-sources it prompted me to choose an editor, I pressed Ctrl+c and tried to rerun. Now whenever I run a command that doesn't exist I get this error message:

 ~ $ a
WARNING:root:could not open file '/etc/apt/sources.list.d/select-editr.list'

WARNING:root:could not open file '/etc/apt/sources.list.d/select-editor.list'

a: command not found

When I try to run select-editor:

 ~ $ select-editor
touch: cannot touch '/home/gib/.selected_editor': Permission denied
 ~ $ sudo select-editor

Select an editor.  To change later, run 'select-editor'.
  1. /bin/ed
  2. /bin/nano        <---- easiest
  3. /usr/bin/vim.basic
  4. /usr/bin/vim.tiny

Choose 1-4 [2]: 3
 ~ $ 

The files are empty:

 /etc/apt/sources.list.d $ ll | grep select
-rw-r----- 1 root root   0 May 15 11:54 select-editor.list
-rw-r----- 1 root root   0 May 15 11:54 select-editr.list

I'm guessing that the easiest way to fix this would be to put something in those files, though I don't know what.

I have export EDITOR=$(which vim) in my .profile.

EDIT:

I checked the location specified in the manual (man select-editor), and it seems to be set correctly, but I'm still getting the above error.

 ~ $ cat ~/.selected_editor
# Generated by /usr/bin/select-editor
SELECTED_EDITOR="/usr/bin/vim.basic"
2
  • Did you read the man pages ?
    – userDepth
    May 15, 2016 at 12:54
  • My problem is the warnings, not actually setting my default editor. I've edited my question to clarify.
    – gib
    May 15, 2016 at 13:03

1 Answer 1

1

File a bug @ Apt Team

The Man pages says edit-sources is a WIP

In the above link there's an e-mail and other related links for the APT Team.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .