With Linux, you can turn any device into a server to share data, media files, and other resources.

In 2021, there are more reasons than ever to love Linux. In this series, I’ll share 21 different reasons to use Linux. Here are four open source tools that can turn any device into a Linux server.

Sometimes, I find something mysterious about the server concept. Many people, if they have a mental image at all, assume that servers must be big, heavy rack-mounted machines, carefully maintained by a discreet system administrator and a team of magical repairmen. Others imagine servers as ethereal clouds that somehow power the Internet.

While such awe is good for the security of IT jobs, the truth is that no one in open source computing thinks that servers are or should be the exclusive province of experts. File and resource sharing is integral to open source, and open source makes it easier than ever, as these four open source server projects show.

Samba

The Samba project is a Suite of Windows interoperable programs for Linux and Unix. Although it is the low-level code that most users never interact with, its importance cannot be overstated. Historically, it was Microsoft’s biggest and most important target back when it was racing to kill Linux and open source. Times have changed, and Microsoft has met with the Samba team to offer support (at least for now), and through it all, the project continues to ensure that Linux and Windows computers can easily coexist on the same network. In other words, Samba makes it easy to share files on your local network, no matter what platform you’re using.

On the KDE Plasma desktop, you can right-click on any of your directories and select properties. In the Properties dialog box, click the Sharing TAB and enable sharing with Samba (Microsoft Windows).

In this way, you have opened a read-only directory for users on your local network. This means that anyone on the same WiFi network in your home can access the folder when you are at home, or if you are at work, anyone on your workplace network. Of course, to access it, other users need to know where to find it. The path to your computer can be represented by an IP address or a host name, depending on your network configuration.

Snapdrop

If opening the network by IP address and host name is confusing, or if you don’t like opening a folder for sharing and forget it’s open, you might prefer Snapdrop. This is an open source project that you can run yourself or connect to your computer through WebRTC using demo examples on the Internet. WebRTC enables point-to-point connectivity through a Web browser, meaning that two users on the same network can find each other through Snapdrop and communicate directly without going through an external server.

Once two or more clients are connected to the same Snapdrop service, users can exchange files and chat messages back and forth over the local network. It’s fast, and your data stays local.

VLC

Streaming services are more common than ever, but I have unconventional tastes in music and movies, so typical services rarely seem to have what I want. Fortunately, by connecting to the media drive, I can easily upload my own content from my computer to all corners of my house. For example, when I want to watch a movie on a screen other than my computer monitor, I can stream the movie file over my network and play it through any application that accepts HTTP, whether it’s on my TV, game console, or phone.

VLC can easily set up streaming media. In fact, it’s an option in the media menu, or you can press Ctrl+S on the keyboard. Add a file or group of files to your streaming queue and click the Stream button.

VLC uses the configuration wizard to help you decide which protocol to use when streaming data. I prefer to use HTTP because it is usually available on any device. When VLC starts playing the file, go to the IP or host name of the computer playing the file and the port assigned to it (default is 8080 when using HTTP), and sit back and enjoy.

PulseAudio

One of my favorite modern Linux features is PulseAudio. Pulse provides amazing flexibility for audio on Linux, including auto-discoverable local network streaming. The benefit for me is that I can stream podcasts and tech conference videos from my workstation in the office and stream audio from my phone. Whether I go into the kitchen, the break room or the farthest part of the backyard, I get perfect audio. This feature existed long before PulseAudio, but Pulse made it as easy as clicking a button.

There are some Settings that need to be made. First, you must make sure to install the PulseAudio setup package (Paprefs) to enable network audio in your PulseAudio configuration.

In Paprefs, enable network access to your local sound devices, possibly without authentication (assuming you trust others on your local network), and enable your computer as a Multicast/RTP sender. I usually only select any audio that streams through my speaker, but you can create a separate audio device in the Pulse output TAB so you can select exactly what’s being streamed. You have three options here:

  • Stream any audio played on the speaker
  • Stream all output sounds
  • Only stream audio directly to the multicast device (as needed).

Once enabled, your voice streams over the network and can be picked up by other local Linux devices. This is simple and dynamic audio sharing.

It’s not just the code that gets shared

Linux is shared. It is well known in the server world because it is good at serving. Whether it’s providing audio streaming, video streaming, files, or a great user experience, every Linux computer is a great Linux server.


Via: opensource.com/article/21/…

By Seth Kenlon (lujun9972

This article is originally compiled by LCTT and released in Linux China