The officially official Devuan Forum!

You are not logged in.

#1 2024-12-30 23:37:06

Red_Fir
Member
Registered: 2023-10-01
Posts: 14  

[SOLVED] Sources.list hates me!

attempted to add backports.
after attempt, both cli and synaptic assure me that: "Type 'deb' is not known on line 1 in source list /etc/apt/sources.list"
Deleting the new addition makes no difference.
Shifting line one down I get a message that "Line 1 is malformed" even when there is no content on line one.
hash-tagging  # line one makes no difference

the .list as it stands

deb http://deb.devuan.org/merged/ daedalus main contrib non-free non-free-firmware
deb-src http://deb.devuan.org/merged/ daedalus main contrib non-free non-free-firmware

deb http://deb.devuan.org/merged/ daedalus-security main contrib non-free non-free-firmware
deb-src http://deb.devuan.org/merged/ daedalus-security main contrib non-free non-free-firmware

# daedalus-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debi … _backports

deb http://deb.devuan.org/merged/ daedalus-updates main contrib non-free non-free-firmware
deb-src http://deb.devuan.org/merged/ daedalus-updates main contrib non-free non-free-firmware

deb     http://deb.devuan.org/merged chimera-backports main
# deb-src http://deb.devuan.org/merged chimera-backports main

deb cdrom:[Devuan GNU/Linux 5.0.1 daedalus amd64 - netinstall 20230914]/ daedalus contrib main non-free non-free-firmware

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

Offline

#2 2024-12-31 01:01:57

golinux
Administrator
Registered: 2016-11-25
Posts: 3,354  

Re: [SOLVED] Sources.list hates me!

Spell "chimera" properly as "chimaera" and see if it makes a difference?

Offline

#3 2024-12-31 01:18:26

Red_Fir
Member
Registered: 2023-10-01
Posts: 14  

Re: [SOLVED] Sources.list hates me!

no difference!

The exact message:
E: Type 'deb' is not known on line 1 in source list /etc/apt/sources.list
E: The list of sources could not be read.
(that does seem rather distant from line 1?)

Even deleting the entry returns the same result

Last edited by Red_Fir (2024-12-31 01:19:48)

Offline

#4 2024-12-31 01:29:00

greenjeans
Member
Registered: 2017-04-07
Posts: 701  
Website

Re: [SOLVED] Sources.list hates me!

I don't think you're supposed to have the forward slash after the "merged" part, just a space then daedalus, should be:

deb http://deb.devuan.org/merged daedalus-updates  main

Last edited by greenjeans (2024-12-31 01:29:29)


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded 12/24!
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#5 2024-12-31 01:29:53

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,292  

Re: [SOLVED] Sources.list hates me!

Put the output of the folling into a "code" block:

hexdump -C /etc/apt/sources.list | head -n 5

... so we can look at the beginning of the file.

Offline

#6 2024-12-31 01:32:29

Red_Fir
Member
Registered: 2023-10-01
Posts: 14  

Re: [SOLVED] Sources.list hates me!

$ hexdump -C /etc/apt/sources.list | head -n 5
00000000  ef bb bf 64 65 62 20 68  74 74 70 3a 2f 2f 64 65  |...deb http://de|
00000010  62 2e 64 65 76 75 61 6e  2e 6f 72 67 2f 6d 65 72  |b.devuan.org/mer|
00000020  67 65 64 2f 20 64 61 65  64 61 6c 75 73 20 6d 61  |ged/ daedalus ma|
00000030  69 6e 20 63 6f 6e 74 72  69 62 20 6e 6f 6e 2d 66  |in contrib non-f|
00000040  72 65 65 20 6e 6f 6e 2d  66 72 65 65 2d 66 69 72  |ree non-free-fir|

Offline

#7 2024-12-31 01:33:55

Red_Fir
Member
Registered: 2023-10-01
Posts: 14  

Re: [SOLVED] Sources.list hates me!

sorry:

$ hexdump -C /etc/apt/sources.list | head -n 5
00000000  ef bb bf 64 65 62 20 68  74 74 70 3a 2f 2f 64 65  |...deb http://de|
00000010  62 2e 64 65 76 75 61 6e  2e 6f 72 67 2f 6d 65 72  |b.devuan.org/mer|
00000020  67 65 64 2f 20 64 61 65  64 61 6c 75 73 20 6d 61  |ged/ daedalus ma|
00000030  69 6e 20 63 6f 6e 74 72  69 62 20 6e 6f 6e 2d 66  |in contrib non-f|
00000040  72 65 65 20 6e 6f 6e 2d  66 72 65 65 2d 66 69 72  |ree non-free-fir|

Offline

#8 2024-12-31 01:48:44

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,292  

Re: [SOLVED] Sources.list hates me!

Those first three bytes are some kind of byte-order marker which is something that Window's Notepad likes to drop into text files, and you should remove them. You could do that with the folllowing command (do it ONCE only as it will otherwise remove the next three bytes):

sed '1s/^...//' -i /etc/apt/sources.list

Then, it should go without saying, never never never use Window's Notepad to edit text files.

(Of course I may well be wrong about Notepad smile)

Offline

#9 2024-12-31 02:06:04

Red_Fir
Member
Registered: 2023-10-01
Posts: 14  

Re: [SOLVED] Sources.list hates me!

no joy

the initial attempt was made as root and it came up in Libre Office Writer when moused.
Subsequent efforts made as su'd user in Mousepad

new message from cli
"root@devuan:/home/bill# apt-get update
E: Type 'b' is not known on line 1 in source list /etc/apt/sources.list
E: The list of sources could not be read."

so we lost the de?

Last edited by Red_Fir (2024-12-31 02:09:25)

Offline

#10 2024-12-31 03:09:22

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,292  

Re: [SOLVED] Sources.list hates me!

Interesting. the three dots matched 5 bytes... probably due to encoding. Now you can edit with, say, nano to add the missing "de" and save, then verify it with hexdump, and it should be ok.

EDIT: so, apparently it's libreoffice writer that adds those bytes. Thus, don't use that for editing text files. I suppose it seems that GUI tool developers nowadays don't really know what they are doing

Offline

#11 2024-12-31 03:17:22

Red_Fir
Member
Registered: 2023-10-01
Posts: 14  

Re: [SOLVED] Sources.list hates me!

Tah Dah!!!
Thank you very much!
Mousepad did the trick.

Offline

#12 2024-12-31 04:19:38

EDX-0
Member
Registered: 2020-12-12
Posts: 96  

Re: [SOLVED] Sources.list hates me!

nano works fine, so does vim for editing that sort of text files without adding other extraneous bits, bytes and chars that should not be there.

on the offhand you can also use something like the https://github.com/eylles/devuan-script … mirrors.sh script from devuan-scripts, which does some automation to set the sources.list correctly for the current suites.

Offline

#13 2024-12-31 07:36:03

steve_v
Member
Registered: 2018-01-11
Posts: 403  

Re: [SOLVED] Sources.list hates me!

Red_Fir wrote:

the initial attempt was made as root and it came up in Libre Office Writer when moused.
Subsequent efforts made as su'd user in Mousepad

The only thing more confusing here than the use of libreoffice for editing a simple text file... Is the use of libreoffice as root.
Just.. Why? Use a real text editor, from an elevated terminal. Nano, vi(m), emacs, mcedit, all work just fine without any weird encoding issues or the hazard of runing enormous GUI bloat as root. Nano has been the default $EDITOR for years, and with good reason.

Last edited by steve_v (2024-12-31 07:36:35)


Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Offline

#14 2024-12-31 10:32:51

stargate-sg1-cheyenne-mtn
Member
Registered: 2023-11-27
Posts: 267  

Re: [SOLVED] Sources.list hates me!

whatever happened to gksudo and kdsudo for elevated privileges in gui applications(i.e. mousepad, synaptic, etc.)?


Be Excellent to each other and Party On!
https://www.youtube.com/watch?v=rph_1DODXDU
https://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure
Do unto others as you would have them do instantaneously back to you!

Offline

#15 2024-12-31 12:19:46

steve_v
Member
Registered: 2018-01-11
Posts: 403  

Re: [SOLVED] Sources.list hates me!

kdesudo was replaced with a config option for kdesu some time ago, but kdesu and friends are living on borrowed time because wayland (intentionally) doesn't support running GUI applications as another user at all.

While I generally disagree with wayland's intentionally missing features, in this case nothing of value is really lost.
GUI applications that need to do something with elevated permissions should handle this themselves (with e.g. a polkit auth prompt when writing a file), and I have never seen any good argument for running entire GUI programs as root. KDE applications (e.g. dolphin, kate) already do this, and I expect other DEs do as well or soon will.
If synaptic doesn't, then that's a bug that should be filed against synaptic.

As for mousepad... I'm still completely baffled as to why anyone would want to run a GUI text editor as root. Use a modern GUI editor that handles saving files with elevated permissions... Or just use GNU nano, because there's zero need for a GUI editor when working with config files to begin with.

Running libreoffice as root just to edit a text file is especially insane IMO, and I see no reason any desktop environment should support it or provide tools to enable it. kdesu and gksu were hacks, situations where they are useful (as opposed to pathological) are few and far between, and there's no reason for them to continue to exist.

"Run as administrator" for GUI applications (along with GUI logins as root) is a terrible idea inherited from Winblows and perpetuated by ex-Winblows users. It needs to die, and sooner rather than later.

Last edited by steve_v (2024-12-31 12:28:54)


Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Offline

#16 2024-12-31 12:50:35

rolfie
Member
Registered: 2017-11-25
Posts: 1,203  

Re: [SOLVED] Sources.list hates me!

whatever happened to gksudo and kdsudo for elevated privileges in gui applications(i.e. mousepad, synaptic, etc.)?

gksu and so on have been replaced by pkexec and polkit policies some time ago. Somewhere in the release notes should be a note telling that gksu is depracated and removed from the distribution (inherited from Debian).

Last edited by rolfie (2024-12-31 12:50:54)

Offline

#17 2024-12-31 13:01:38

rolfie
Member
Registered: 2017-11-25
Posts: 1,203  

Re: [SOLVED] Sources.list hates me!

... the initial attempt was made as root and it came up in Libre Office Writer when moused ...

Take this as learning. Never ever attempt to modify any Linux conf or script file with anything else but a pure text editor. These kinda files are pure ASCII text, no control characters allowed but CR LF and maybe TAB. LO and like as Windows editors add characters that are not welcome in the Linux world.

Opposite to steve_v's opinion I am using geany as a gui multi-tab text editor to edit my confs and scripts as root for convenience. I am setting up a root terminal and a policy kit policy to enable to do that. When I call up geany from this root terminal I am getting all the files I ever fooled with on my system (unless I did not remove them from the list of files). This setup also allows easy copy/paste into the files.

Last edited by rolfie (2024-12-31 13:03:21)

Offline

#18 2024-12-31 15:16:20

greenjeans
Member
Registered: 2017-04-07
Posts: 701  
Website

Re: [SOLVED] Sources.list hates me!

Opposite to steve_v's opinion I am using geany as a gui multi-tab text editor to edit my confs and scripts as root for convenience.

Yep.
I've been doing it for years, I actually made a right-click extension "Edit file as Root" years ago that opens files in Pluma for me to edit, super handy. Much better than just working in the root account for long periods of time I reckon.


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded 12/24!
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#19 2024-12-31 18:18:33

steve_v
Member
Registered: 2018-01-11
Posts: 403  

Re: [SOLVED] Sources.list hates me!

greenjeans wrote:

I actually made a right-click extension "Edit file as Root" years ago that opens files in Pluma for me to edit, super handy. Much better than just working in the root account for long periods of time I reckon.

steve_v:
*opens a bunch of root-owned files in kate tabs, as unprivileged user*
*screws around for as long as needed, as unprivileged user*
*hits "save"*
*gets polkit authentication prompt*
*profits*

Much better than just having a GUI editor running as root for long periods of time I recon.

Aside, everything any of us might do in a GUI editor can also be done in emacs at a TTY.


Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Offline

#20 2025-01-01 01:24:19

EDX-0
Member
Registered: 2020-12-12
Posts: 96  

Re: [SOLVED] Sources.list hates me!

for editing config files there are also ways that don't involve running a text editor as root, but running it as a normal user and then using tee with sudo and an askpass program to create an authentication prompt so that the current buffer of the text editor (for example vim) is sent to tee and then tee which has root priviledges just writes the text onto the file.

other option is to make use of sudoedit

Offline

#21 2025-01-01 04:21:46

greenjeans
Member
Registered: 2017-04-07
Posts: 701  
Website

Re: [SOLVED] Sources.list hates me!

@ steve_v

For some of us yes.
For 99.999999 of the normie population that I make things for who have no idea what emacs, tty, or kate or even nano mean:

Ehrr, I don't like titlebar color, file manager>>filesystem root>>usr/share/themes/(default-theme)/(appropriate folder)/(appropriate file)

Right-click>>edit as root>>opens in text-editor as root>>edit file>>save>>close>>root privileges gone. Logout>>login>>changes applied.

Profit. It's all about the GUI for new users or users that don't care to learn how to use the CLI.


https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded 12/24!
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#22 2025-01-01 06:32:36

stargate-sg1-cheyenne-mtn
Member
Registered: 2023-11-27
Posts: 267  

Re: [SOLVED] Sources.list hates me!

i seem to remember using "sudo gedit" for some files that required elevated privileges to save edits.

then i came across a commentary saying never to use plain "sudo" for gui applications but use "gksudo gedit" instead.

that was many years ago and i don't remember the exact scenario/situation but in those days when something went borked i just did a fresh install and carried on(simpler times...ha!)


Be Excellent to each other and Party On!
https://www.youtube.com/watch?v=rph_1DODXDU
https://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure
Do unto others as you would have them do instantaneously back to you!

Offline

#23 2025-01-01 06:58:15

EDX-0
Member
Registered: 2020-12-12
Posts: 96  

Re: [SOLVED] Sources.list hates me!

use sudo but with -A and set your

$SUDO_ASKPASS

to

/usr/bin/ssh-askpass

just install

ssh-askpass-gnome

to provide the askpass.

Offline

#24 2025-01-01 07:08:40

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,292  

Re: [SOLVED] Sources.list hates me!

Please note that whilst we can continue to be amazed about all your different operator habits, the OP problem was not a question about how and when to be root.

The problem was that libreoffice writer apparently added some extra "invisible" bytes to the beginning of a supposedly text file, and the solution was to remove those bytes.

Offline

#25 2025-01-01 15:16:36

trinidad
Member
From: Waterford WI
Registered: 2022-11-15
Posts: 24  
Website

Re: [SOLVED] Sources.list hates me!

LO adds a byte order mark unless the file is saved in a specific (UTF-8 without BOM) context. Been that way for a long long time, mostly to accomodate calc and db csv usage files. Running as root has nothing to do with the problem. In the future if you continue to run root for editing just use a root terminal and nano for conf files as the save routine in LO writer is annoying anyway.

https://bugs.documentfoundation.org/sho … i?id=44291

TC

Offline

Board footer