Announcement

Collapse
No announcement yet.

How do you modify the MOTD from the CLI?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How do you modify the MOTD from the CLI?

    Hello!

    Until two weeks ago I was unaware of the existence of Kubuntu and still know next to nothing about it, so please – answers in strictly layman’s language!

    I am required to alter to alter the motd using the Konsole/Terminal/Shell as it variously seems to be called (ie not using GUI). I’ve looked in a dozen different places on the internet and, for far as I can tell from all the techno-babble, have found a dozen different and contradictory answers, variously telling me I need to modify amongst other things “update-motd”, “update motd.d”, “modt.tail”.

    Okay, so far I have discovered “su”, set up a password and got into the /etc# directory where of the three files mentioned above only one – update motd.d – actually seems to exist but I can’t see what you do with it.

    I have now spent 10 hours researching this and it’s driving me up the wall. So if anyone could tell me, in plain English, what I need to do, I’d be eternally grateful!

    Cheers in advance!!
    Last edited by Snowhog; Dec 28, 2013, 10:58 AM.

    #2
    Hi not sure if this is what you'r looking for, but searching for "motd" in my system (Kubuntu 13.10) returned:

    Code:
    $ locate motd
    /etc/update-motd.d
    /etc/update-motd.d/00-header
    /etc/update-motd.d/10-help-text
    /etc/update-motd.d/90-updates-available
    /etc/update-motd.d/91-release-upgrade
    /etc/update-motd.d/98-fsck-at-reboot
    /etc/update-motd.d/98-reboot-required
    /etc/update-motd.d/99-footer
    It returns also other entries, but the ones I showed are for config the "MOTD", so my best guess is that you will configure motd in the "00-header file". That usually is the default config, but depends on what are your going to change.

    Hope it helped.
    Last edited by SteveRiley; Dec 28, 2013, 10:12 PM. Reason: fixed tags

    Comment


      #3
      I'm assuming you are using Kubuntu 13.10, but it would be helpful if you tell us for sure. Also, tell us exactly what you want changed in motd.

      Oh, and welcome to Kubuntu Forums . Net and the wonderful world of Kubuntu Linux.
      Using Kubuntu Linux since March 23, 2007
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        Kiraitachi – thank you for the reply. I’m doubtlessly doing something wrong – can’t believe how excruciatingly confusing and complicated this software is – but when I typed in “locate modt” (in various places, see below), I get nowt!

        Snowhog – thank you for the kind welcome. Yes, I am using 13.10.

        As for what I want to change, I need to change the message that allegedly comes up when you start Kubuntu, with another message of my choice.

        I say “allegedly”; in fact I get no message at all when I start Kubuntu. But when I researched this, I find the MOTD is supposed to come up when you “log in”. But again, there is no log-in procedure at all when I start up, you just bring up the console and all that comes up is “kubuntu@kubuntu:~$”. From there you just start working, no login, no message of the day! All soooo frustrating.

        I have spent an insane amount of my holiday on this one simple task, and at the expense of so much other coursework and I’m close to throwing in the towel.

        Help..?

        Code:
        kubuntu@kubuntu:-~$ locate modt
        kubuntu@kubuntu:-~$ su
        Password:
        root@kubuntu:/home/kubuntu# locate modt
        root@kubuntu:/home/kubuntu# cd /etc
        root@kubuntu:/etc# locate modt
        root@kubuntu:/etc# update-modt.d/00
        bash: update-modt.d/00: No such file or directory
        root@kubuntu:/etc#

        Comment


          #5
          So are you saying that you aren't getting/seeing a graphical log in screen, and, you are never presented with the graphical Desktop?? If yes to all, then there is something wrong with your installation and we will need further information concerning your PC specs, including the video card manufacture and model.
          Using Kubuntu Linux since March 23, 2007
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            No and Yes respectively; I do not get a log in screen - either graphical or at the kernel/terminal - the only time I have ever been asked for a password is when entering su mode in the kernel. However, when I launch, I am initially taken to the desktop, from where I access the kernel.

            I should mention, just in case it is somehow relevant, that I don't have Kubuntu installed on my machine,I launch it from a bootable USB stick.

            Comment


              #7
              Okay, just to confirm that I'm understanding.

              You are using a LiveUSB stick to run Kubuntu from. You do not have it installed to your computer.
              You do boot into the graphical Desktop (looks like the following)


              Is this correct?
              Using Kubuntu Linux since March 23, 2007
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                Absolutely. From there I launch the terminal/kernel and start working. No login at any stage.
                Last edited by lee_wright_wrong; Dec 29, 2013, 02:22 PM.

                Comment


                  #9
                  Okay. That is normal when booting from a LiveCD/DVD/USB. There is no log in. You are running a "Live" session. You have to install Kubuntu to your HDD for a user account to be created. Anything you do within a Live session isn't going to be remembered when you quit, unless you created a persistent partition on the USB stick when you burned the .iso to it, and even then, only certain changes would be saved.
                  Using Kubuntu Linux since March 23, 2007
                  "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                  Comment


                    #10
                    OK, I see, so am I going to have to install before I can do this MOTD task? If so I hope it's simple to do without accidentally over-writing Windows :-)

                    Comment


                      #11
                      In your original message, you wrote "I am required to alter to alter the motd using the Konsole/Terminal/Shell..." Yet, you're booting from a live USB rather than an installed system. Why are you required to change the MOTD of a live USB? Just curious...

                      Comment


                        #12
                        Originally posted by lee_wright_wrong View Post
                        As for what I want to change, I need to change the message that allegedly comes up when you start Kubuntu, with another message of my choice.
                        Why? What exactly, do you want to see?
                        Originally posted by lee_wright_wrong View Post
                        I have spent an insane amount of my holiday on this one simple task, and at the expense of so much other coursework and I’m close to throwing in the towel.
                        Is changing the MOTD part of a school assignment??

                        See update-motd - dynamic MOTD generation
                        Last edited by Snowhog; Dec 29, 2013, 02:59 PM.
                        Using Kubuntu Linux since March 23, 2007
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment


                          #13
                          Yes, it's college work. In college, we work on installed Linux on the computers, but we were told we could work on it at home over the holidays - so, not having Linux at home, I made a live USB stick, incorrectly it seems assuming I could work from that and that there would not be any difference! It's not made a difference on most of the stuff - building directories, copying, re-naming, moving files, using wildcards, changing the date/time etc, but it seems this is different. So, I guess I should install it?

                          What do I want to see? Just a message saying summit like "this is the new MOTD" would be fine!
                          Last edited by lee_wright_wrong; Dec 29, 2013, 03:36 PM.

                          Comment


                            #14
                            Sorry, only just spotted the link at the end of your message; hold fire on replying to my last one till I've worked through that :-)

                            Comment


                              #15
                              No, I don't think you need to install. You can try this as a test.

                              Press Alt+F2 and type: kdesudo kate /etc/update-motd.d/100-custom
                              Press Enter
                              After Kate opens type:

                              Code:
                              #!/bin/sh
                              #
                              #    100-custom - my custom addition to the MOTD
                              #    
                              echo Hello world!
                              Save and close Kate and do a shutdown/reboot. From the Grub menu choose the second entry and on the next screen choose the recovery boot option. This will boot you into a terminal session. Do you see Hello world! displayed?
                              Using Kubuntu Linux since March 23, 2007
                              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                              Comment

                              Working...
                              X