• installing Brother printer

    From faeychild@2:250/1 to All on Sun Apr 11 05:53:51 2021


    This is something I do very infrequently and usually incorrectly.

    So I am asking if anyone has a foolproof method

    Do I run the Brother driver install script first and then install from
    MCC. I am guessing that with the Brother drivers installed, MCC will
    operate much better, - if it's needed.

    The printer is MFC-9040CDW and it is networked


    --
    faeychild
    Running plasmashell 5.15.4 on 5.10.27-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Sun Apr 11 11:33:34 2021
    On Sun, 11 Apr 2021 14:53:51 +1000, faeychild wrote:


    This is something I do very infrequently and usually incorrectly.

    I hear that. I do my three nodes and my neighbor.

    So I am asking if anyone has a foolproof method

    Not necessarily Foolproof, but works the majority of time.

    Do I run the Brother driver install script first and then install from
    MCC.

    I choose to install stuff which Brother does not install first, then
    run brother install script.

    I am guessing that with the Brother drivers installed, MCC will
    operate much better, - if it's needed.

    Offhand I do not understand that statement.

    The Brother scrip hunts for a package manager and uses first
    one found, I have to disable several prior to install. Managers are
    _pkg_mgrs="/usr/bin/dpkg /usr/bin/dnf /usr/bin/yum"
    on my system that I disable.

    The printer is MFC-9040CDW and it is networked

    Would have helped if you provided the brother support page for
    your printer. Going to assume W means scanner.

    If you want to automate the install, you will need the expect rpm.
    Want expect examples install expect-examples rpm.

    My script is made to undue the brother install, then do the install
    again due to updates of Brother rpms. I have a pull_brother script
    to tell me when there is a brother installer or brother rpm(s) update.

    Basically script does the following:
    ping_check to verify printer is up
    remove_printer install rpms/links/files....
    install the linux-brprinter-installer
    disable_enable_pkg_mgrs -d to disable all package managers except rpm
    install_scanner to install gimp, *xsane and whatnot
    run_expect /local/bin/install_hll2380dw.exp to run brother script
    /local/bin/brother_rule_changes
    systemctl enable saned.socket
    disable_enable_pkg_mgrs -e to enable all package managers
    and use xmessage to pop up cups instructions to complete the install.

    For the following it helps to have a complete hot backup partition
    where you can put back the system to a pre-install state to start again.

    To get get list of what to uninstall, I run aide -init to get a system
    baseline of all files on system.
    Use "autoexpect linux-brprinter-installer HL-L2380DW"
    to generate the expect script.
    Use the cups admin screen to pick/setup the printer.
    Then run aide -check, to get a list of all files changed on the
    system to figure out what I need to remove prior to doing the install.
    I read the *.exp to get list of rpms needing removal when uninstalling

    When you run "autoexpect some_script_here" it generates a .exp
    with all the output and your input. I then use it to create a new
    ..exp script to remove as much as I can so the script always runs
    even if the verbiage changes. For example end user agreements and
    rpm versions could change. Here is my printer expect file. ------8<------8<------8<--cut below this line----8<------8<------8< #!/usr/bin/expect -f
    #
    # This Expect script was generated by autoexpect on Thu Jun 11 03:38:57 2020
    # Expect and autoexpect were both written by Don Libes, NIST.
    #
    # Note that autoexpect does not guarantee a working script. It
    # necessarily has to guess about certain things. Two reasons a script
    # might fail are:
    #
    # 1) timing - A surprising number of programs (rn, ksh, zsh, telnet,
    # etc.) and devices discard or ignore keystrokes that arrive "too
    # quickly" after prompts. If you find your new script hanging up at
    # one spot, try adding a short sleep just before the previous send.
    # Setting "force_conservative" to 1 (see below) makes Expect do this
    # automatically - pausing briefly before sending each character. This
    # pacifies every program I know of. The -c flag makes the script do
    # this in the first place. The -C flag allows you to define a
    # character to toggle this mode off and on.

    set force_conservative 1 ;# set to 1 to force conservative mode even if
    ;# script wasn't run conservatively originally
    if {$force_conservative} {
    set send_slow {1 .1}
    proc send {ignore arg} {
    sleep .1
    exp_send -s -- $arg
    }
    }

    #
    # 2) differing output - Some programs produce different output each time
    # they run. The "date" command is an obvious example. Another is
    # ftp, if it produces throughput statistics at the end of a file
    # transfer. If this causes a problem, delete these patterns or replace
    # them with wildcards. An alternative is to use the -p flag (for
    # "prompt") which makes Expect only look for the last line of output
    # (i.e., the prompt). The -P flag allows you to define a character to
    # toggle this mode off and on.
    #
    # Read the man page for more info.
    #
    # -Don


    set timeout 35
    spawn bash linux-brprinter-installer HL-L2380DW
    match_max 100000

    expect {

    -re "Test Print" {
    send -- "n\r"
    exp_continue
    }

    -re "destination Device URI." {
    send -- "I\r"
    exp_continue
    }

    -re "enter IP address" {
    send -- "192.168.11.190\r"
    exp_continue
    }

    -re "y/N" {
    send -- "y\r"
    exp_continue
    }

    -re "Y/n" {
    send -- "y\r"
    exp_continue
    }

    -re "OK?" {
    send -- "y\r"
    exp_continue
    }

    }
    expect eof





    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From marchugo@2:250/1 to All on Sun Apr 11 12:55:23 2021
    On 4/11/21 6:53 AM, faeychild wrote:


    This is something I do very infrequently and usually incorrectly.

    So I am asking if anyone has a foolproof method

    Do I run the Brother driver install script first and then install from
    MCC. I am guessing that with the Brother drivers installed, MCC will
    operate much better, - if it's needed.

    The printer is MFC-9040CDW and it is networked


    After each fresh install of MGA, I always get the
    "linux-brprinter-installer" from this Brother website: welcome.solutions-brother.com.
    Unpack the .gz installer file as root in the console.
    The install script downloads a ton of RPMs to your pc and installs them automatically.
    At the end, watch out for this question: Will you specify the device URI
    Y/N?
    If you want the printer to be used as a USB device, choose N.

    Regards from Amsterdam,
    Marc.

    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1@fidonet)
  • From TJ@2:250/1 to All on Sun Apr 11 19:52:13 2021
    On 4/11/21 6:33 AM, Bit Twister wrote:

    The printer is MFC-9040CDW and it is networked
    Would have helped if you provided the brother support page for
    your printer. Going to assume W means scanner.

    I looked at Brother laser printers a while back, before my nephew came
    up with a free HP laser printer for me, a cast-off from his workplace.

    I believe "CDW" stands for Color Duplex Wireless.

    TJ

    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Mon Apr 12 05:04:55 2021
    On 12/4/21 4:52 am, TJ wrote:


    I believe "CDW" stands for Color Duplex Wireless.



    No way I'd argue with that. It sounds kosher


    --
    faeychild
    Running plasmashell 5.15.4 on 5.10.27-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Mon Apr 12 05:07:14 2021
    On 11/4/21 9:55 pm, marchugo wrote:

    At the end, watch out for this question: Will you specify the device URI Y/N?
    If you want the printer to be used as a USB device, choose N.


    And for the first time I'll be specifying a URI

    regards


    --
    faeychild
    Running plasmashell 5.15.4 on 5.10.27-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Mon Apr 12 05:13:30 2021
    On 11/4/21 8:33 pm, Bit Twister wrote:


    The Brother scrip hunts for a package manager and uses first
    one found, I have to disable several prior to install. Managers are
    _pkg_mgrs="/usr/bin/dpkg /usr/bin/dnf /usr/bin/yum"
    on my system that I disable.

    Alternate package managers. I had forgotten them


    Do you disable them in the install script


    We have downloaded and unpacked the latest
    linux-brprinter-installer-2.2.2-2. My old one is 2.2.2.1 opps!

    And I installed cups, first.


    regards

    --
    faeychild
    Running plasmashell 5.15.4 on 5.10.27-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Mon Apr 12 09:19:56 2021
    On Mon, 12 Apr 2021 14:13:30 +1000, faeychild wrote:
    On 11/4/21 8:33 pm, Bit Twister wrote:


    The Brother scrip hunts for a package manager and uses first
    one found, I have to disable several prior to install. Managers are
    _pkg_mgrs="/usr/bin/dpkg /usr/bin/dnf /usr/bin/yum"
    on my system that I disable.

    Alternate package managers. I had forgotten them
    Do you disable them in the install script

    In my install_printer script, Yes. I never modify vendor script
    unless I have to.

    I wrote a separate script to chmod -x $_mgr in $_pkg_mgrs
    if command line argument was -d, and a chmod +x $_mgr if argument
    was -e.

    We have downloaded and unpacked the latest
    linux-brprinter-installer-2.2.2-2. My old one is 2.2.2.1 opps!

    Yep, noticed they use the same script for different printers.
    Modified my unzip code to create a link to the latest version
    to make it easy for the expect scropt to always use the latest release.


    And I installed cups, first.

    And verify it is running. :)

    I did not mention that because I always get it during initial install
    from classic dvd iso. My Mageia install script calls a script that enables/disables all the units I want enabled/disabled.

    Forgot to mention, you could use a VirtualBox guest to do all your
    script testing. I usually do a guest install, then clone it and test in
    the clone. I keep delete/creating the clone until I am through testing
    my scripts.


    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From faeychild@2:250/1 to All on Tue Apr 13 00:08:06 2021
    On 12/4/21 6:19 pm, Bit Twister wrote:

    In my install_printer script, Yes. I never modify vendor script
    unless I have to.

    I wrote a separate script to chmod -x $_mgr in $_pkg_mgrs
    if command line argument was -d, and a chmod +x $_mgr if argument
    was -e.


    I realized later that I could also rename or move them




    And I installed cups, first.

    And verify it is running. :)

    Funny you should mention that :-)



    Forgot to mention, you could use a VirtualBox guest to do all your
    script testing. I usually do a guest install, then clone it and test in
    the clone. I keep delete/creating the clone until I am through testing
    my scripts.


    Virtual machines are excellent for a lot of things, unfortunately I am
    not as dedicated or organized as you.

    I am still telling myself to streamline my rsync script to shuttle
    backups and recovery - like your cloning.

    and sometime today - install the printer MGA8

    regards


    --
    faeychild
    Running plasmashell 5.15.4 on 5.10.27-desktop-1.mga7 kernel.
    Mageia release 7 (Official) for x86_64 installed via Mageia-7-x86_64-DVD.iso


    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)