No Print or Cups entries in the Admin menu [Solved]

Technical issues/questions of an intermediate or advanced nature.
User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

No Print or Cups entries in the Admin menu [Solved]

Post#1 by Ed_P » 03 Feb 2023, 00:14

Something didn't print the way I wanted and when I went to check the printer's defaults there were no print options in the menu! :o

Code: Select all

~#  uname -a
Linux porteus.example.net 5.18.8-porteus #1 SMP PREEMPT_DYNAMIC Sat Jul 2 10:05:31 MSK 2022 x86_64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz GenuineIntel GNU/Linux

~#  cat /etc/porteus/*
001-core.xzm:20221211
002-xorg.xzm:20221211
002-xtra.xzm:20221211
003-cinnamon.xzm:20220925
initrd.xz:20220928

~#  ls -l /mnt/live/memory/images
000-kernel.xzm : Jul 2 2022
001-core.xzm : Dec 11 03:47
002-xorg.xzm : Dec 11 03:50
002-xtra.xzm : Dec 11 01:13
003-cinnamon.xzm : Sep 25 01:21
011-slapt-get-0.11.6-x86_64-2gv.xzm : Oct 29 13:51
07-printing-x86_64-2022-08-06.xzm : Aug 6 07:54
Dellsound.xzm : May 14 2022
Dellwifi2.xzm : Jul 30 2022
GETMODtweaks.xzm : Jan 20 02:16
changes : Feb 2 13:52
firefox-94.0.2-x86_64-en-US.xzm : Nov 24 2021

~#  cat /proc/cmdline
quiet BOOT_IMAGE=(loop)/boot/syslinux/vmlinuz from=/ISOs/Porteus-CINNAMON-v5.0-x86_64-221210.iso volume=33 reboot=cold extramod=/porteus5.0/Modules changes=EXIT:/porteus5.0/changes/50save.dat noload=kde;jinn;lxqt;xfce;lxde;mate;open;dat.xzm;mychanges;autonet;menu1

ISO: /ISOs/Porteus-CINNAMON-v5.0-x86_64-221210.iso
The desktop files are in the 07 module so kinda perplexing. :hmmm:

Rebooting didn't help. But the program is present.

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# system-config-printer
Added in 6 hours 4 minutes 10 seconds:
Interesting. :hmmm:

If I rename the /Modules/07-printing*.xzm file to 07-printing*.xyzm, reboot, rename the module back to 07-printing*.xzm and manually activate it the menu's Admin print items appear.

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# activate /mnt/nvme0n1p7/porteus5.0/Modules/07-printing-*.xzm
Updating shared library links:  /sbin/ldconfig
Updating glib schemas: /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas
cups: started scheduler.
Updating menu
Updating desktop database
root@porteus:/home/guest# ls -oh /usr/share/applications/*print*
-rw-r--r-- 1 root 9.3K Feb  3 00:55 /usr/share/applications/system-config-printer.desktop
root@porteus:/home/guest# ls -oh /usr/share/applications/*cup*
-rw-r--r-- 1 root 2.2K Feb  3 00:55 /usr/share/applications/cups.desktop
root@porteus:/home/guest# 
So, it's a timing issue, with the 07-printing module being at the top of my /Modules directory.

Code: Select all

oot@porteus:/home/guest# ls -oh /mnt/nvme0n1p7/porteus5.0/Modules/*.xzm
-rwxrwxrwx 1 guest 732K Oct 29 14:43 /mnt/nvme0n1p7/porteus5.0/Modules/011-slapt-get-0.11.6-x86_64-2gv.xzm*
-rwxrwxrwx 1 guest  88M Aug  6 12:22 /mnt/nvme0n1p7/porteus5.0/Modules/07-printing-x86_64-2022-08-06.xzm*
-rwxrwxrwx 1 guest 512M Jan 13 17:37 /mnt/nvme0n1p7/porteus5.0/Modules/50save.dat.xzm*
-rwxrwxrwx 1 guest 8.0K Oct 22 01:14 /mnt/nvme0n1p7/porteus5.0/Modules/Dellautonet.xzm*
-rwxrwxrwx 1 guest 4.0K May 14  2022 /mnt/nvme0n1p7/porteus5.0/Modules/Dellsound.xzm*
-rwxrwxrwx 1 guest 908K Jul 30  2022 /mnt/nvme0n1p7/porteus5.0/Modules/Dellwifi2.xzm*
-rwxrwxrwx 1 guest 4.0K Jan 20 02:17 /mnt/nvme0n1p7/porteus5.0/Modules/GETMODtweaks.xzm*
-rwxrwxrwx 1 guest  64M Dec 30  2021 /mnt/nvme0n1p7/porteus5.0/Modules/firefox-94.0.2-x86_64-en-US.xzm*
-rwxrwxrwx 1 guest  25M Feb  2 18:29 /mnt/nvme0n1p7/porteus5.0/Modules/mychanges.xzm*
root@porteus:/home/guest# 
Interesting. Nemo shows it as being 1st but ls doesn't. :hammer:
Ed

beny
Full of knowledge
Full of knowledge
Posts: 2086
Joined: 02 Jan 2011, 11:33
Location: italy

No Print or Cups entries in the Admin menu

Post#2 by beny » 03 Feb 2023, 11:29

hi Ed_P but the cups daemon start before,i don't see any script that start cups or am i wrong ,i have open the module /root/07-printing-x86_64-2022-07-02.xzm

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

No Print or Cups entries in the Admin menu

Post#3 by Ed_P » 03 Feb 2023, 18:27

Hi beny. Nothing starts cups or printing, other than the user selecting them in the Admin menu. The /usr/share/applications/ .desktop files for them are in the 07-printing-x86_64-2022-08-06.xzm/usr/share/applications folder and they should load when the 07 module is activated when booting.

I just did a reboot and lo and behold the 2 Admin menu items are present. :o :unknown: Why sometimes and not all times? :Search:
Ed

beny
Full of knowledge
Full of knowledge
Posts: 2086
Joined: 02 Jan 2011, 11:33
Location: italy

No Print or Cups entries in the Admin menu

Post#4 by beny » 03 Feb 2023, 18:43

hi Ed_P also in my system sometime modules do not start at boot well all it related to the modules directory maybe the aufs limit of the allowed modules but i can go wrong

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

No Print or Cups entries in the Admin menu

Post#5 by Ed_P » 03 Feb 2023, 21:04

Well I think I found the source of the problem. When I boot without my changes=EXIT cheatcode, my safe boot, the Print/Cups menu items appear. When I boot with my changes=EXIT cheatcode the Print/Cups menu items don't appear. Now the question is WHY. :crazy:

In both cases the 07 module is loaded.

Code: Select all

guest@porteus:~$ ls -oh /mnt/live/memory/images
total 0
drwxr-xr-x  5 root  61 Jul  2  2022 000-kernel.xzm/
drwxr-xr-x 20 root 305 Dec 11 03:47 001-core.xzm/
drwxr-xr-x 10 root 154 Dec 11 03:50 002-xorg.xzm/
drwxr-xr-x  6 root  72 Dec 11 01:13 002-xtra.xzm/
drwxr-xr-x 10 root 129 Sep 25 01:21 003-cinnamon.xzm/
drwxr-xr-x  6 root  60 Oct 29 13:51 011-slapt-get-0.11.6-x86_64-2gv.xzm/
drwxr-xr-x  7 root  94 Aug  6 07:54 07-printing-x86_64-2022-08-06.xzm/
drwxr-xr-x  3 root  26 May 14  2022 Dellsound.xzm/
drwxr-xr-x  3 root  26 Jul 30  2022 Dellwifi2.xzm/
drwxr-xr-x  4 root  37 Jan 20 02:16 GETMODtweaks.xzm/
drwxr-xr-x 10 root 103 Feb  3 09:30 changes/
drwxr-xr-x  4 root  37 Nov 24  2021 firefox-94.0.2-x86_64-en-US.xzm/
guest@porteus:~$ 
Added in 20 minutes 18 seconds:

Code: Select all

guest@porteus:~$ ls -oh /mnt/live/memory/images/07-printing-x86_64-2022-08-06.xzm/usr/share/applications
total 23K
-r--r--r-- 1 root 2.2K Aug  6 08:02 cups.desktop
-rw-r--r-- 1 root   13 Aug  6 07:50 mimeinfo.cache
-rw-r--r-- 1 root 9.9K Aug  6 07:46 simple-scan.desktop
-rw-r--r-- 1 root 9.3K Nov  2  2021 system-config-printer.desktop
guest@porteus:~$ ls -oh /usr/share/applications/*print*
/bin/ls: cannot access '/usr/share/applications/*print*': No such file or directory
guest@porteus:~$ ls -oh /usr/share/applications/*cups*
/bin/ls: cannot access '/usr/share/applications/*cups*': No such file or directory
guest@porteus:~$ ls -oh /usr/share/applications/*scan*
-rw-r--r-- 1 root 9.9K Aug  6 07:46 /usr/share/applications/simple-scan.desktop
guest@porteus:~$ 
:o

Added in 20 minutes 41 seconds:
Ok, I've determined why my safe mode boot has the print and cups menus. My safe mode boot uses a module I make of changes I make in update mode that I want to keep and use in safe mode without needing the save.dat file. My changes.xzm file is 25 MB, my save.dat file is 512 MB, and is half full.

In my changes.sh script I have:

Code: Select all

cp -a -p --parents    /usr/share/applications/cups*                  /tmp/mod/
cp -a -p --parents    /usr/share/applications/*print*                /tmp/mod/
cp -a -p --parents    /usr/share/applications/*Flash*                /tmp/mod/
if [ -e               /usr/share/applications/sun_java* ]; then
   cp -a -p --parents /usr/share/applications/sun_java*              /tmp/mod/
fi
When and why I included them in my changes.sh script I don't remember but it's certainly long before Porteus 5.0. And since the 07 module doesn't load the print/cups menu items I'm glad I include them in my changes module.

Added in 8 hours 44 minutes 17 seconds:
So, if I boot without my changes=EXIT cheatcode, and without my changes.xzm module the Print & Cups menu items appear.

Code: Select all

guest@porteus:~$ ls -oh /mnt/live/memory/images
total 0
drwxr-xr-x  5 root  61 Jul  2  2022 000-kernel.xzm/
drwxr-xr-x 20 root 305 Dec 11 08:47 001-core.xzm/
drwxr-xr-x 10 root 154 Dec 11 08:50 002-xorg.xzm/
drwxr-xr-x  6 root  72 Dec 11 06:13 002-xtra.xzm/
drwxr-xr-x 10 root 129 Sep 25 05:21 003-cinnamon.xzm/
drwxr-xr-x  6 root  60 Oct 29 17:51 011-slapt-get-0.11.6-x86_64-2gv.xzm/
drwxr-xr-x  7 root  94 Aug  6 11:54 07-printing-x86_64-2022-08-06.xzm/
drwxr-xr-x  4 root  37 Oct 22 05:14 Dellautonet.xzm/
drwxr-xr-x  3 root  26 May 14  2022 Dellsound.xzm/
drwxr-xr-x  3 root  26 Jul 30  2022 Dellwifi2.xzm/
drwxr-xr-x  4 root  37 Jan 20 07:16 GETMODtweaks.xzm/
drwxr-xr-x  4 root  37 Nov 24  2021 firefox-94.0.2-x86_64-en-US.xzm/
guest@porteus:~$ ls -oh /usr/share/applications/*print*
-rw-r--r-- 1 root 9.3K Nov  3  2021 /usr/share/applications/system-config-printer.desktop
guest@porteus:~$ ls -oh /usr/share/applications/*cups*
-r--r--r-- 1 root 2.2K Aug  6 12:02 /usr/share/applications/cups.desktop
guest@porteus:~$ 
And if I boot without the changes=EXIT cheatcode and my new changes.xzm module without the /usr/share/application/ Print and Cups files the Print & Cups menu items appear.

Code: Select all

guest@porteus:~$ ls -oh /mnt/live/memory/images
total 0
drwxr-xr-x  5 root  61 Jul  2  2022 000-kernel.xzm/
drwxr-xr-x 20 root 305 Dec 11 03:47 001-core.xzm/
drwxr-xr-x 10 root 154 Dec 11 03:50 002-xorg.xzm/
drwxr-xr-x  6 root  72 Dec 11 01:13 002-xtra.xzm/
drwxr-xr-x 10 root 129 Sep 25 01:21 003-cinnamon.xzm/
drwxr-xr-x  6 root  60 Oct 29 13:51 011-slapt-get-0.11.6-x86_64-2gv.xzm/
drwxr-xr-x  7 root  94 Aug  6 07:54 07-printing-x86_64-2022-08-06.xzm/
drwxr-xr-x  4 root  37 Oct 22 01:14 Dellautonet.xzm/
drwxr-xr-x  3 root  26 May 14  2022 Dellsound.xzm/
drwxr-xr-x  3 root  26 Jul 30  2022 Dellwifi2.xzm/
drwxr-xr-x  4 root  37 Jan 20 02:16 GETMODtweaks.xzm/
drwxr-xr-x  4 root  37 Nov 24  2021 firefox-94.0.2-x86_64-en-US.xzm/
drwxr-xr-x  8 root  95 Feb  4 01:33 mychanges.xzm/
guest@porteus:~$ ls -oh /usr/share/applications/*print*
-rw-r--r-- 1 root 9.3K Nov  2  2021 /usr/share/applications/system-config-printer.desktop
guest@porteus:~$ ls -oh /usr/share/applications/*cups*
-r--r--r-- 1 root 2.2K Aug  6 08:02 /usr/share/applications/cups.desktop
guest@porteus:~$ 
So the problem is tied to my use of the changes=EXIT cheatcode.

Added in 34 minutes 44 seconds:
I may have found the problem. :o Two .wh files in my save.dat file.

Code: Select all

/mnt/live/memory/images/changes/usr/share/applications/.wh.system-config-printer.desktop
/mnt/live/memory/images/changes/usr/share/applications/.wh.cups.desktop
Time to clean out the saved .wh files.

Added in 9 hours 44 minutes 21 seconds:
And now, with my changes=EXIT cheatcode boot, I have the Print & Cups menus. :) :good:

The .wh. files in the save.dat were the problem. (as .wh. files usually are.)
Ed

Post Reply