(2015-03-30, 16:55)alphatech69 Wrote: Thanks for your detailed explanation, I tested it yesterday, it sounds like I have permission issues, I created the login user as mythtvuser, sorry being new to Linux, what is the proper command to fix it, should I also be part of a Linux group for permissions?
Thanks
First off, no apoligies needed, we all start somewhere. In fact, you should take pride in what you've accomplished so far. Kodi can be a lot for a new user to take in. Furthermore, MythTV is the 800 pound gorilla of the media/PVR world. I tip my hat to you sir. With that said...
We now know that your regular login user is 'mythtvuser'. You asked "what is the proper command to fix it?" While we could change the regular login users name, that would create a lot of other work in the long run so we'll just leave it be. To add some context to my instructions above, a little explanation is in order. In linux/unix, whenever you see a tilda (~), that's just *nix shorthand for '/home/<logged_in_user>' or in your case, '/home/mythtvuser'. Effectively, where the above instructions say 'ls -l ~/.mythtv/channels' we are really telling it 'ls -l /home/mythtvuser/.mythtv/channels'
Moving on, we need a little more info about how myth was installed. You'd indicated that you are using Ubuntu. Did you:
- install Ubuntu and then install mythtv, perhaps following a guide, or did you
- use the mythbuntu distribution which automates the install of myth/mysql/apache/etc?
If you used b) mythbuntu, the automated install creates a
system user and group, both named 'mythtv'. When you copy/paste the code from my original post, you would replace all instances of '<backend-user>' with 'mythtv' (don't type the " ' " marks).
If you used method a) to set up myth, replace <backend-user> with whatever user the guide had specified myth to install and run as.
A simple way to determine the backend-user is to glean its name from the list of home directories with:
Another way we can determine the backend-user is by trying the command:
Code:
cat /etc/passwd | grep myth
which translates to "show me the contents (cat) of the users file (/etc/passwd) but only show me the entries that have the string 'myth' in them ( | grep myth)." You will definitely see your regular user, mythtvuser, and likely see the <mythtbackend-user> in the output as well.
Running all the commands in my above post
while logged in as 'mythtvuser' will solve the channel icon issue with no further changes needed.
Lastly, you'd asked "should I also be part of a Linux group for permissions?" While this isn't necessary, adding your regular user to the system user which runs the mythbackend can be helpful down the road. This is accomplished with:
Code:
sudo adduser mythtvuser mythtv
would add regular user 'mythhtvuser' to the backend system group 'mythtv' using the assumption that the backend is running as the user/group 'mythtv'. adjust the group accordingly if you've determined it is running as something else.
NB: adding a user to a group will only take effect after you logout and back into and/or reboot the system.
To see all the groups on your system, use:
...where the more command, like cat, shows you the contents of a file but only as much as your current window allows, pausing until you tell it to show you more of the file. Use the enter key to advance through the file one more line at a time or spacebar to see the next screen's worth. The syntax of the output is
group_name:password:GID:user_list. Passwords are typically encrypted and denoted with the letter 'x' when this is so, GID is the group id # (<1000 are system groups, >=1000 are user groups), and user_list can be nonexistent, a single user, or a comma-seperated list of several users.
Now here comes the hardest part for new users to wrap their heads around. Adding a user to a group gives you the permissions of the group, not the groups owner. Example: the home directory of the user 'mythtv' has permissions 755, the user 'mythtvuser' is a member of the group 'mythtv'. mythtvuser gets
group member permissions rwx
r-xr-x (read and execute), as opposed to the directory
owner permissions which gets
rwxr-xr-x (read, write, and execute). If the group member mythtvuser also needed write access to the directory and all of it's subdirectories...
Code:
sudo chmod -R g+w /home/mythtv
...would accomplish this. It's worth noting that not only would mythtvuser gain the new priviliges but so would
every member of the mythtv group.
Fun, right? It get's better...an alternate way to do the very same thing is instead of 'g+w', using the octal notation '775'. Why? Because....reasons. I only bring that up because you are bound to run into a tutorial which uses octal versus explicit.
For an in depth look at chmod (or any other linux command for that matter) use:
The usefulness of the man command cannot be stressed enough. The output will seem arcane at first but you will get used to it and will become your goto helper. When you are told to RTFM, the man command
is what they are refering to in the *nix world. Protip: Googling "man <command>" may yield prettier output than running man in your shell but always remember that google may yield stale results or even no results.
Your system is always the authoritative answer. That said, I google-man often to ease my eyeballs.
HTH. I apologize for the verbose writeup but it's purpose is not only to help solve your particular problem but also serve as a reference to other new linux users that come down this road and for my growing knowledge base of linux tuts. From what I've been seeing on the XBMC, Kodi and RaspberryPi forums and subreddits, were getting quite a few more new users than ever before. If it came off as a bit condescending, that was purely a function of my assumption you are completely new at this and we all know the risk of making assumptions.