Control your backup NAS from the desktop

Not Only for Linux

All that remains is to build the application using the commands from Listing 5. The first two mod commands fetch libraries used in the code from GitHub. The build command links everything together into a syno binary that can be copied and executed anywhere with a similar operating system environment. The IP and MAC addresses used in the code, and the SSH user on the NAS, need to be adapted to match the local conditions.

Listing 5

Building the Application

$ go mod init syno
$ go mod tidy
$ go build

One benefit of the Fyne framework is its platform independence. The program can also be built on other operating systems and desktop environments. Figure 6 shows the application running on a MacBook, but it could be used on Windows, too. Fyne even has tools for Android to help you generate the application in line with the operating system's specifications [2]. This framework is a genuine cross-platform jack-of-all-trades!

Figure 6: The Go program also looks smashing on a MacBook.

The Author

Mike Schilli works as a software engineer in the San Francisco Bay Area, California. Each month in his column, which has been running since 1997, he researches practical applications of various programming languages. If you email him at mailto:mschilli@perlmeister.com he will gladly answer any questions.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • GUI Apps with Fyne

    The Fyne toolkit offers a simple way to build native apps that work across multiple platforms. We show you how to build a to-do list app to demonstrate Fyne's power.

  • Straight to the Point

    With the Fyne framework, Go offers an easy-to-use graphical interface for all popular platforms. As a sample application, Mike uses an algorithm to draw arrows onto images.

  • Wheat and Chaff

    If you want to keep only the good photos from your digital collection, you have to find and delete the fails. Mike Schilli writes a graphical application with Go and the Fyne framework to help you cull your photo library.

  • Treasure Hunt

    A geolocation guessing game based on the popular Wordle evaluates a player's guesses based on the distance from and direction to the target location. Mike Schilli turns this concept into a desktop game in Go using the photos from his private collection.

  • Chip Shot

    We all know that the Fyne framework for Go can be used to create GUIs for the desktop, but you can also write games with it. Mike Schilli takes on a classic from the soccer field.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News