Permanently enable printing on live USB

Forum Forums New users New Users and General Questions Permanently enable printing on live USB

  • This topic has 13 replies, 5 voices, and was last updated Mar 11-7:47 am by Xunzi_23.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #136119
    Member
    fixer123

      I downloaded AntiX 23.1 (Full 64bit sysVinit) with the intent to use it as a live USB with persistence for some on-the-go tasks. The idea is to use it for Linux compatibility testing on various computers, and possibly as a working plug-in OS on a laptop while evaluating the laptop before overwriting its drive with a permanent Linux installation. I picked AntiX because some of the devices I will be evaluating have limited RAM, and it is designed for live usage with persistence.

      In the live session, Antix was unable to recognize any printer, even physically attached to the test PC via USB. CUPS did not appear to be installed, so I tried installing it, and that failed in the live session. Research on this forum found discussions about the printer services being disabled on live sessions, with a suggested command (sudo service cups start) to temporarily enable the service (which worked).

      The issue is discussed in To print on AntiX 17, which identifies a file (live-disable-services), in which CUPS is among the services intentionally disabled in a live session (still applicable in the current release). For my purposes, I need to permanently un-disable it.

      1. Is the identified file what controls disabling CUPS? Can CUPS be excluded from the disable list by editing that file (as root)?
      2. Mechanics of the edit:
      * The file gets exported to numerous directories. Must all copies be edited, or is a particular one the controlling copy?
      * What is the appropriate syntax for the edit — deleting the line or inserting a leading “#” (I’m not a programmer so it isn’t clear whether the comment prefix works in a quoted list)?

      Thanks

      #136122
      Member
      marcelocripe

        Hello fixer123.

        Welcome to antiX Linux and the Forum.

        I don’t know how to write in English and I send my texts translated by the internet translator. I hope you can understand everything. If your native language is not English, please translate my original Brazilian Portuguese text directly into your language with the help of internet translators and you will get a much better result.

        Please read my real welcome in the Welcome to antiX Linux and the forum (antiX 23) and Welcome to antiX Linux and the forum (antiX 19, 21 and 22) thread.

        Please learn how to ask for help here on the antiX forum by reading the threads I linked in my real welcome. Please note that there are 3 editions of antiX from series 19, 21 or 22 and 23 that have technical support in this forum. Each edition has 4 ISO images (full, base, net and core) on two different boot system types, SyVinit and Runit. If my sum is not wrong, at the present date there are about 32 different types of operating systems. That’s why you need to learn how to ask for help here on the antiX forum.

        marcelocripe
        (Original text in Brazilian Portuguese language)

        – – – – –

        Olá, fixer123.

        Seja bem-vindo(a) ao antiX Linux e ao fórum.

        Eu não sei escrever em idioma Inglês e envio os meus textos traduzidos pelo tradutor da internet. Eu espero que você consiga compreender tudo. Se o seu idioma nativo não for o Inglês, por favor, traduza o meu texto original em Português no Brasil diretamente para o seu idioma com a ajuda dos tradutores da internet que você obterá um resultado muito melhor.

        Por favor, leia a minha verdadeira boas-vindas no tópico Seja bem-vindo (a) ao antiX Linux e ao fórum (antiX 23) e Seja bem-vindo (a) ao antiX Linux e ao fórum (antiX 19, 21 e 22).

        Por favor, aprenda a pedir ajuda aqui no fórum do antiX lendo os tópicos que eu indiquei na minha verdadeira boas-vindas. Saiba que existem 3 edições do antiX, das séries 19, 21 ou 22 e 23 que possuem suporte técnico neste fórum. Cada edição possui 4 imagens ISOs (full, base, net e core) em dois tipos de sistema de inicialização diferentes, o SyVinit e o Runit. Se a minha soma não estiver errada, na presente data são cerca de 32 tipos diferentes de sistema operacionais. É por isso que você precisa aprender a pedir ajuda aqui no fórum do antiX.

        marcelocripe
        (Texto original em idioma Português do Brasil)

        #136129
        Member
        fixer123

          Marcelo, thanks for your reply. It’s great that this forum has people such as yourself who volunteer their time to write up guidance like that, and help newcomers participate effectively. Those posts are great guidance, but having read through them, I’m not sure how to apply them to this particular question. Any specific advice on posting this question would be welcomed.

          For context, the question is not about diagnosing a problem, and appears to apply across many of the distro’s variants, which is why this section of the forum seemed the most appropriate. The issue has come up repeatedly over time, going back earlier even than the releases you itemized, and logically applies to at least Full and Base, if not all of the images. I suspect it is independent of boot init type.

          The issue is the result of an intentional design choice, which was identified years ago. The reason for the choice makes sense (e.g., RAM usage, performance, etc.), but the result conflicts with one kind of usage for which AntiX is designed (running live with persistence). There is a workaround, although limited to a single session, and some other distros (including MX), are not built with this limitation. So there is not a technical issue with enabling printing in live mode. The specific line of code responsible for it has been identified — inclusion of CUPS in a list of services to be disabled when live.

          Unfortunately, the specifics of how to properly remove it from the list has never been addressed in previous times the issue was raised. Hence this question.

          #136130
          Member
          Xunzi_23

            Hi fixer123, I think the solution from an older thread is still valid.

            Help with antiX 21 live-USB Persistence Cups Autostart [Solved] starting at post below

            https://www.antixforum.com/forums/topic/help-with-antix-21-live-usb-persistence-cups-autostart/#post-107931

            #136136
            Member
            fixer123

              Xunzi_23, thanks for the link. That looks like a different kind of workaround. It controls whether or not that entire list of services is disabled (all or nothing). By editing the GRUB parameter, it will behave like an installed system, with nothing on the list disabled. I was going for a more surgical approach to keep the resource footprint minimal because some of the devices I’ll be using it on are pretty limited.

              But I noticed Bluetooth is also on the list, and that might not be the only other useful service. I’ll have to look at it closer. If I can’t get an answer on the surgical solution, editing the GRUB setting might still work for me. Good find.

              #136137
              Forum Admin
              anticapitalista

                Press F1 on live usb and have a read of the disable/enable options

                Philosophers have interpreted the world in many ways; the point is to change it.

                antiX with runit - leaner and meaner.

                #136139
                Member
                Robin

                  I suspect it is independent of boot init type.

                  No.

                  If you were on the runit version (full runit, to be precise, I guess; don’t know about the stripped down versions), I had asked you already to open control centre, head for the system → startup services entry and simply add CUPS to the list, make sure it is actually marked for startup: yes ( and status: up ), and remaster your boot medium with these settings as a personal remaster. This would be sufficient to have the cups service up on boot time.

                  But you stated you are on sysvinit still. I know there is a similar entry in the systvinit versions in the control centre. But I believe the sysvinit pendant doesn’t make the entries permanent so they are kept after a remaster. Not perfectly sure about this, not using sysvinit (and I can’t recollect also how this precisely was managed in sysvinit). If I recollect correctly, in sysvinit you have to edit some config file run at startup and add the command you have tested to work for you above to it manually.

                  —————–
                  Edit:
                  As always, I need too much time for typing in English language, so anticapitalista gave already the proper advice while I was still writing. For sysvinit just do what he asked you, to learn how to deal with the startup services when using this init system.

                  • This reply was modified 2 months, 2 weeks ago by Robin. Reason: edit: new answer while writing

                  Windows is like a submarine. Open a window and serious problems will start.

                  #136141
                  Member
                  fixer123

                    Robin, you’re correct on the init versions behaving differently (as I learned in further reading after posting the question). I downloaded the sysvinit version. The only relevance of my incorrect statement earlier was in the explanation to Marcelo of why I posted the question in this section of the forum.

                    On your reference to the control center, you may have asked that on someone else’s thread. But that was one of the first things I checked, and CUPS is in the startup list by default. It isn’t activated, though, in a live session because the startup setting is overridden by a disable setting.

                    #136142
                    Member
                    fixer123

                      anticapitalista, with all the development you do, I’m honored that you took the time to reply on this. I assume the enable/disable options you refer to are the boot options, which I found pretty detailed documentation for.

                      Modifying the boot options is all or nothing, and I was hoping for the more surgical approach of deleting CUPS from the disable list in live-disable-services. However, it looks like nobody wants to go there. If the only supported solution is removing the boot “l” parameter, I suppose I could look at the startup services in the control center, and disable there everything else that would no longer be disabled via live-disable-services.

                      #136148
                      Member
                      Robin

                        On your reference to the control center, you may have asked that on someone else’s thread.

                        Dear @fixer123, this was conjunctive. If you were on runit, I had asked you already. But since you are on sysvinit, I have not, and also not in any other thread 🙂
                        No problem, we all know here how difficult it is to master the foreign languages.

                        Modifying the boot options is all or nothing, and I was hoping for the more surgical approach of deleting CUPS from the disable list in live-disable-services. However, it looks like nobody wants to go there.

                        Well, that’s not precisely my impression. I pointed you to pretty selective methods, for runit and sysvinit both. Have you tried this:

                        If I recollect correctly, in sysvinit you have to edit some config file run at startup and add the command you have tested to work for you above to it manually.

                        There are several startup files which can be used to enable a service on startup.

                        ~/.desktop-session/startup

                        is one of them. But since the command needs root permissions (sudo), this is not the very best place, you’ll be asked again and again for your sudo password on each startup when putting it therein.

                        But if I recollect sysvinit properly, the folder

                        /etc/init.d

                        is the place where you want to put an additional startup entry in this init system.

                        Try adding a new file named “cups” to this folder, and write your above command into it (service cups start). If I’m not mistaken, you don’t need to precede the command by sudo herein, since the files are executed in root context on startup. The first line must read
                        #!/bin/bash
                        And you must make the file executable (set the permissions respectively, either in file manager (right click → properties) or by using the chmod console command.

                        I reckon you need to apply something like the following to make it recoginised by sysvinit then:
                        sudo update-rc.d cups defaults 99 10
                        But please check this from the manuals. I’m not experienced in managing sysvinit. Or wait for some more answers to come from people who are.

                        Then do a live remaster from antiX control centre, section live, which will integrate the change into your live boot medium, and it should be observed permanently on the next boot already.

                        Windows is like a submarine. Open a window and serious problems will start.

                        #136159
                        Member
                        fixer123

                          Robin, thanks for the detail. I was focused on simply deleting CUPS from the disable list. However, that list isn’t in the form of data; it’s hard coded. For something as convoluted as an OS, it’s always dangerous to mess with the code rather than designed and tested control points. I’ll need to investigate your suggestions further (after a lot more coffee). And as a backup plan, I can explore the boot parameter in conjunction with the startup configuration.

                          #136160
                          Forum Admin
                          anticapitalista

                            From what I see, you have 2 options.

                            1. remove the ‘l’ disable= boot option.
                            This adds approximately 40MB RAM usage to the live session.

                            2. Boot as usual and at desktop start printing daemon.
                            This adds about 30 seconds of ‘inconvenience’.

                            Philosophers have interpreted the world in many ways; the point is to change it.

                            antiX with runit - leaner and meaner.

                            #136161
                            Member
                            fixer123

                              anticapitalista, thanks for adding perspective. 🙂

                              #136171
                              Member
                              Xunzi_23

                                One more from my notes,
                                without avahai demon I have been unable to find printers on several setups
                                including my own which has one continually on Brother A3 device usb connected
                                and a laser printer only powered up or larger print jobs.

                                Having cups startup enabled on antiX 23 runit does not slow startup by
                                much, of late rarely conmann does, sometimes failing to connect in the process.

                              Viewing 14 posts - 1 through 14 (of 14 total)
                              • You must be logged in to reply to this topic.