Sharing folder to smart TV

What's the best way to share a media folder to a smart TV with 20.04?

I installed samba, right clicked on the folder to share it in caja and what I get is this....

'net usershare' returned error 255: net usershare add: cannot create tmp file /var/lib/samba/usershares/:tmpLrxxxxxXX

I would say by editing the /etc/samba/smb.conf file.

  1. Assign your devices static IPs in your router interface
  2. Edit smb.conf.
  • Make a backup of /etc/samba/smb.conf then sudo pluma /etc/samba/smb.conf
    add the line usershare owner only = false in the [Global] section at the top of the file, below workgroup = WORKGROUP
  • Add your shares at the bottom end of the file. Should look like this:

[Your share]
path = /path/to/your/share
read only = yes
writeable = no
browseable = yes
hosts allow =
create mask = 0700
directory mask = 0700

Save and close Pluma.

  1. Add the following advanced rules in your firewall settings.
  • Name: Netbios Name Service
    Protocol: both
    From to your.server.ip port 137

  • Name: Netbios Datagram Service
    Protocol: UDP
    From to your.server.ip port 138

  • Name: Netbios Session Service
    Protocol: TCP
    From to your.server.ip port 139

  1. sudo service smbd restart

Hope this helps.

1 Like

@checkmate : I highly recommand to use universal media server (ums) to send media from your pc to your TV. Because it's reliable and easy.
The most details guide to start I found, is in French but you can use online translate on it:
I use ums since 6 years, I can help you if you need.