E:Malformed entry 1 in sources file /etc/apt/sources.list.d/third-party.sources (URI parse), E:The list of sources could not be read

After upgrade from Ubuntu Mate 22.04 to Ubuntu Mate 24.04.
Synaptic did not work.
sudo apt update
[sudo] lösenord för nn:
E: Malformed entry 1 in sources file /etc/apt/sources.list.d/third-party.sources (URI parse)
E: The source list cannot be read.

I am swedish not so flued in computer (hacking) english :slightly_frowning_face:
But how do I solve this hickup.
Copy paste i terminal works for me :wink:

1 Like

Hi, @NilleB and welcome to the Ubuntu MATE Community!

1 Like

Kan du visa oss vad cat /etc/apt/sources.list.d/third-party.sources säger?
TL: Can you show us what cat /etc/apt/sources.list.d/third-party.sources says?

3 Likes

Tack för svar!

Det här blev resultatet:

cat /etc/apt/sources.list.d/third-party.sources
Types: deb
URIs: cdrom:[Ubuntu-MATE 22.04.3 LTS Jammy Jellyfish - Release amd64 (20230807.1)]/
Suites: jammy
Components: main restricted universe multiverse

3 Likes

Hi and Thank You for welcoming me!

2 Likes

Hi, @NilleB :slight_smile:

Following up to the great question of @keiaa.07.05.00 and your answer with the output of the file /etc/apt/sources.list.d/third-party.sources , I believe that what is missing in that file of yours is an "Enabled: no" line at the the beginning of that file (since you've upgraded from "Ubuntu MATE 22.04 LTS" to "Ubuntu MATE 24.04 LTS" and that file, in your case, only contains a reference to the CD of Ubuntu MATE 22.04).

So, I suggest that you run the following command that will add a line containing the text "Enabled: no" at the beginning of that file:

sudo sed -i '1i Enabled: no' /etc/apt/sources.list.d/third-party.sources

After you do that, please try to run the following command which, hopefully, it will now work:

sudo apt update

I hope this helps. Please keep us posted :slight_smile:

3 Likes

Worked Great ricmarques!

Heder åt sådana tips!!!

sudo apt update
=> many noble- updates

I run it twice to update the last 8 packages.

Synaptic also works normal
Warning in panel vanished
:sweat_smile: :joy:

4 Likes

I was too quick to shout hello <(

No normal upstart of Mate 24.04.
Starting via recovery.... normal upstart and my login followed by startx works.

But this second hickup, how too fix that?

Hi again, @NilleB :slight_smile:

You wrote:

I'm sorry that you had another problem :frowning: To be able to better help you, could you please describe more specifically what do you mean by "No normal upstart of Mate 24.04."?

1 Like

The Mate icon time "clock" never stop counting, no normal upstart.
Shut down via power key and start again via recovery, normal upstart, my login and startx.

Hi again, @NilleB :slight_smile:

You wrote:

Hmmm.... Given that you are able to boot via recovery mode, my suggestion is to boot in that recovery mode and REMOVE the "quiet" and "splash" options from the default Linux Kernel option in the GNU GRUB (GRand Unified Boot Loader) configuration.

To do that, please edit the /etc/default/grub file with administrator privileges, by running the following command (that will open the "Pluma" text editor as superuser):

sudo pluma /etc/default/grub

In that /etc/default/grub file, change the following line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

... change that line so it becomes the following one instead:

GRUB_CMDLINE_LINUX_DEFAULT=""

(To explain a bit what this does: removing "quiet" from the boot options allows the boot messages to appear and removing "splash" disables the so-called splash screen).

After doing that, please save and close that /etc/default/grub file, and then run the following command:

sudo update-grub

After running that sudo update-grub command, please reboot the computer and see if the following boot is normal. IF that boot is NOT normal, I'll assume that you will then be able to see error messages on screen and, in that case, could you please take a photo of those error messages using, for instance, the camera of your smartphone and include it a new reply in this same discussion topic?

I make this suggestion (of removing "quiet splash" from the boot options of GRUB) because I like to see the boot messages while booting and also because this seems to have helped other people, here in the "Ubuntu MATE Community", in different contexts. See, for instance, the following replies of mine in different topics:

I hope this helps :slight_smile: Please, keep us posted!

3 Likes

Thank You for tips!

I run your supposed commands.
On restart the "normal" login screen dos not show up.

Many lines scroll on the screen and there are some red marked failed lines .
But it was too fast to get any photo before they disappeared.

The same login prompt as with recovery:
Login name
Password
startx

PS Had too manually set numlock on, on my HP350G2 with numpad before typing my password which has numbers.

Mate 24.04 starts.

2 Likes

Hi again, @NilleB :slight_smile:

You wrote:

Hmmm... Could you please take a picture of that "same login prompt" and include it in a new reply in this same discussion topic? When you say "startx", you mean that you write the "startx" command to start the MATE Graphical interface / session, right?

1 Like

As previous stated is my written English is not so good, especially computer/technical language.
Need to use translation software <(

How do I copy pictures from my mobile phone ( Tamagutchi v. 2.01 :wink: Samsung XCover 5.

After some trouble I managed too take some pictures but......

So I write as shown as accurately as possible:
Hope this is of some help.

Quote
Picture 1

Ubuntu 24.04.2 LTS HP350G2 tty1
HP350G2 login:

Picture 2 as picture 1 plus

Hint: Num Lock on

HP350G2 login: xxxxxxx
Password: nnnnnnn
Welcome to Ubuntu 24.04.2 LTS (GNU/Linux 6.8.0-55-generic x86_64)

Expanderat Säkerhetsunderhåll (ESM) för Applications är aktiverat.

0 uppdateringar kan verkställas omedelbart.

xxxxxx@HP350G2:~$ startx

End of quote

And the MATE Graphical interface / session starts.
Puuuh.


Are there any logfile of start sequences too copy instead?
If so how to find and copy them?

1 Like

Hi again, @NilleB :slight_smile:

Although you wrote in your last message that "As previous stated is my written English is not so good, especially computer/technical language. Need to use translation software", let me tell you that your last message was perfectly understandable, detailed and clear. Thanks! :slight_smile:

Now, I admit that problems like the GUI (Graphical User Interface) not starting (automatically) as it's happening to you is NOT a kind of problem that I'm used to troubleshoot :frowning: Even so, I will try to help you (and maybe other people that are more used to troubleshoot that kind of problem will also participate in this topic and try to help).

Could you please tell what is the output of the following commands:

systemctl get-default

cat /etc/X11/default-display-manager

systemctl status lightdm -l --no-pager
2 Likes

Thank You for answer!! :smiley:

And I have too thank the translation software :sweat_smile:

The three commands gave this output in order:

graphical.target

/usr/sbin/lightdm

× lightdm.service - Light Display Manager
Loaded: loaded (/usr/lib/systemd/system/lightdm.service; indirect; preset: enabled)
Active: failed (Result: exit-code) since Sat 2025-03-08 07:06:02 CET; 15h ago
Docs: man:lightdm(1)
Main PID: 1579 (code=exited, status=1/FAILURE)
CPU: 12ms

mar 08 07:06:02 HP350G2 systemd[1]: lightdm.service: Scheduled restart job, restart counter is at 5.
mar 08 07:06:02 HP350G2 systemd[1]: lightdm.service: Start request repeated too quickly.
mar 08 07:06:02 HP350G2 systemd[1]: lightdm.service: Failed with result 'exit-code'.
mar 08 07:06:02 HP350G2 systemd[1]: Failed to start lightdm.service - Light Display Manager.

1 Like

Hi again, @NilleB :slight_smile:

Thanks for the outputs. Could you please try to run the following command:

sudo dpkg-reconfigure lightdm

... and then reboot?

I'm suggesting that because that was the working solution posted by @ironfoot in a somewhat similar (but different) scenario (upgrade from Ubuntu MATE 24.04 LTS to Ubuntu MATE 24.10):

And to take another good suggestion by @ironfoot in that other topic, could you also please include, in your reply, the output of the following command:

lightdm --show-config

2 Likes

I run the proposed command and rebooted.

lightdm --show-config
=>
Failed to load configuration from /etc/lightdm/lightdm.conf: Key file does not start with a group

I also run
sudo dpkg-reconfigure lightdm

After reboot:
lightdm --show-config
Failed to load configuration from /etc/lightdm/lightdm.conf: Key file does not start with a group

It takes my home made starting routine ...... startx to kick Mate in the ass so it starts :wink:

1 Like

Hi @NilleB ,

First of all, kudo's to @ricmarques for this route to solving the problem at hand. His knowledge and attention to detail in this thread not only lead me to the following answer but I also learned about some lightdm commands I previously didn't know about.

By coincidence I just happened to spot a link which I guessed could be of any help:

Let me quote the important part

I got lightdm to work by adding [Seat:*] at the beginning of the file
The problem happened because this file is supposed to be an INI file. Apparently this format needs any configuration inside a group. [Seat:*] is a kind of default group for lightdm, so adding it seemed like the best option, and it worked.

So, not having [Seat:*] as the first line of the file probably triggered the error you encountered.

More about INI file format here:

2 Likes

Hi, @NilleB and @tkn :slight_smile:

I'm going to tell now something that I know it can be surprising (it surprised me right now, too!). In some cases, I think that it can be normal that we do NOT have a /etc/lightdm/lightdm.conf file. In fact, that's the case of the computer I'm using right now which began as having Ubuntu MATE 20.04 LTS ("Focal Fossa") and that a few years later I did an "in-place" / "online" upgrade (using the "Software Updater") to Ubuntu MATE 22.04.1 LTS ("Jammy Jellyfish") and that, a few years after that, I did another "in-place" / "online" upgrade (again using the "Software Updater") this time to Ubuntu MATE 24.04.1 LTS ("Noble Numbat")

Here's what happens in this computer:

ricmarques@mylaptop:~$ cat /etc/lightdm/lightdm.conf
cat: /etc/lightdm/lightdm.conf: No such file or directory


ricmarques@mylaptop:~$ lightdm --show-config 
   [Seat:*]
F  guest-wrapper=/usr/lib/lightdm/lightdm-guest-session
J  greeter-session=arctica-greeter
E  greeter-wrapper=/usr/lib/lightdm/lightdm-greeter-session
K  allow-guest=true
G  user-session=mate
H  xserver-command=X -core
I  type=xlocal
I  display-setup-script=/sbin/prime-offload
I  display-stopped-script=/sbin/prime-switch
L  greeter-show-manual-login=false
J  greeter-show-remote-login=true
K  greeter-allow-guest=true

   [LightDM]
D  backup-logs=false
K  guest-account-script=arctica-greeter-guest-account-script

Sources:
A  /usr/share/lightdm/lightdm.conf.d/50-arctica-greeter-guest-wrapper.conf
B  /usr/share/lightdm/lightdm.conf.d/50-arctica-greeter.conf
C  /usr/share/lightdm/lightdm.conf.d/50-disable-guest.conf
D  /usr/share/lightdm/lightdm.conf.d/50-disable-log-backup.conf
E  /usr/share/lightdm/lightdm.conf.d/50-greeter-wrapper.conf
F  /usr/share/lightdm/lightdm.conf.d/50-guest-wrapper.conf
G  /usr/share/lightdm/lightdm.conf.d/50-ubuntu-mate.conf
H  /usr/share/lightdm/lightdm.conf.d/50-xserver-command.conf
I  /usr/share/lightdm/lightdm.conf.d/90-nvidia.conf
J  /etc/lightdm/lightdm.conf.d/90-arctica-greeter.conf
K  /etc/lightdm/lightdm.conf.d/91-arctica-greeter-guest-session.conf
L  /etc/lightdm/lightdm.conf.d/91-arctica-greeter-mate.conf


ricmarques@mylaptop:~$ ls -l /etc/lightdm/lightdm.conf.d/
total 12
-rw-r--r-- 1 root root 777 abr 12  2022 90-arctica-greeter.conf
-rw-r--r-- 1 root root 474 abr 12  2022 91-arctica-greeter-guest-session.conf
-rw-r--r-- 1 root root 112 abr  7  2021 91-arctica-greeter-mate.conf


ricmarques@mylaptop:~$ cat /usr/lib/systemd/system/lightdm.service
[Unit]
Description=Light Display Manager
Documentation=man:lightdm(1)
[email protected] plymouth-quit.service
After=systemd-user-sessions.service [email protected] plymouth-quit.service

[Service]
# temporary safety check until all DMs are converted to correct
# display-manager.service symlink handling
ExecStartPre=/bin/sh -c '[ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ]'
ExecStart=/usr/sbin/lightdm
Restart=always
BusName=org.freedesktop.DisplayManager


ricmarques@mylaptop:~$ systemctl status lightdm -l --no-pager 
● lightdm.service - Light Display Manager
     Loaded: loaded (/usr/lib/systemd/system/lightdm.service; indirect; preset: enabled)
     Active: active (running) since Sun 2025-03-09 13:18:16 WET; 14min ago
       Docs: man:lightdm(1)
    Process: 2689 ExecStartPre=/bin/sh -c [ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ] (code=exited, status=0/SUCCESS)
   Main PID: 2693 (lightdm)
      Tasks: 11 (limit: 18922)
     Memory: 227.3M (peak: 627.2M)
        CPU: 34.331s
     CGroup: /system.slice/lightdm.service
             ├─2693 /usr/sbin/lightdm
             └─2700 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

mar 09 13:18:16 mylaptop systemd[1]: Starting lightdm.service - Light Display Manager...
mar 09 13:18:16 mylaptop lightdm[2693]: Seat type 'xlocal' is deprecated, use 'type=local' instead
mar 09 13:18:16 mylaptop systemd[1]: Started lightdm.service - Light Display Manager.
mar 09 13:18:17 mylaptop lightdm[2728]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=115) by (uid=0)
mar 09 13:18:18 mylaptop lightdm[2728]: gkr-pam: couldn't unlock the login keyring.
mar 09 13:18:18 mylaptop lightdm[2995]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "ricmarques"
mar 09 13:21:44 mylaptop lightdm[2995]: gkr-pam: unable to locate daemon control file
mar 09 13:21:44 mylaptop lightdm[2995]: gkr-pam: stashed password to try later in open session
mar 09 13:21:44 mylaptop lightdm[2995]: pam_unix(lightdm:session): session opened for user ricmarques(uid=1000) by (uid=0)
mar 09 13:21:45 mylaptop lightdm[2995]: gkr-pam: unlocked login keyring

1 Like