Menu

Welcome message from a text file

DonC
2020-11-21
2020-12-06
  • DonC

    DonC - 2020-11-21

    Recently the possibility to have the server welcome message from a text file has been added.
    I have not been able to get this to work (using 3.6.0 under Ubuntu 20.04).
    Can someone please show me a working example of the server command line with the -w option to define the text file.
    Must the text file be in a certain place/directory ? certain access rights?
    I have tried all I can think of and it always simply uses the file name as the welcome message. :(

    EDIT: I just looked at the source code and see that Jamulus simply tries to see if the file exists and if it does uses its contents. So Jamulus is not finding the file or doesn't have access rights. What do I need to do?

     

    Last edit: DonC 2020-11-21
    • Gilgongo

      Gilgongo - 2020-11-21

      The most common issue is that the syntax is wrong. Can you show us the command line you're using to start the server?

       
      • DonC

        DonC - 2020-11-21

        Here is the line from the unit file: (all on one line)

        ExecStart=/usr/local/bin/Jamulus -s -n -F -e "jamulusclassical.fischvolk.de:22524" -u 15 -T -w "/home/odroid/jamserverwelcome.txt" -o "Strings Server;St-Blaise;206;"

         
        • Gilgongo

          Gilgongo - 2020-11-21

          That looks OK. I have had some slightly odd things happen with permissions in Jamulus, but I assume the user given in User= in the unit file (and possibly Group=) has permissions to r+x odroid and that /home has at least world execute permission (it should do if it's Ubuntu, so root:root drwxr-xr-x basically).

          If that's all OK, what have you got in the welcome message exactly? It should just be plain text HTML.

           

          Last edit: Gilgongo 2020-11-21
          • DonC

            DonC - 2020-11-21

            OK, I got it going by placing the text file in the same directory as the Jamulus executable with the same group and user. Not very clean if you ask me, but it works.
            Same group, user and permissions in the home directory didn't work ????

             
            • Gilgongo

              Gilgongo - 2020-11-21

              Yes - as I say I have experienced some weird issues with permissions in the past, but with write permissions for recording. This should only need read perms so it's even odder.

              BTW I've put mine in the same directory as I have recordings, which directory is r+w+x the Jamulus user.

               
    • Andrew S

      Andrew S - 2020-11-23

      I know you're using linux, but for those who don't, my experience is that a full path/filename works fine with the -w option on Windows. Also the welcome text can be HTML, including CSS - but obviously nothing that links to other objects such as images.

       
  • scofra

    scofra - 2020-11-21

    I see you're passing the absolute path as an argument to the -w flag. Assuming you've run an ls -l to ensure the file exists and has data in it, I wonder if a symlink would work: pointing from wherever you want your welcome text file to live, back to the Jamulus executable directory.

     
  • BartM

    BartM - 2020-12-06

    Check your jamulus service unit file, if there is a ProtectHome= true setting in the unit file (/etc/systemd/sytem/jamulus.service} change it to false or read-ony. If the value is true all files under /home are not accessable to the process. In thia case, where your tekst file is in the /home directory the read-only setting would be sufficient. The proces is able to read the file. See also https://sourceforge.net/p/llcon/discussion/server/thread/a3b144ca08/#4b35 here server recordings could not be written in the home directory because of this issue.

     

    Last edit: BartM 2020-12-06
    • DonC

      DonC - 2020-12-06

      Thanks for the info Bart. I will try it at the next update as I don't like the way it is now.
      Don

       
  • BartM

    BartM - 2020-12-06

    For more info on the ProtectHome= parameter see
    man 5 systemd.exec