Reputation: 31
I am building a simple GUI, and found a built in one for use with my GOLANG code. I have tried to simply run a go run main.go with the example of their hello world just to test functionality. Got an issue that there was no DISPLAY variable. Then set the variable and now I'm getting this issue. Please assist!
package main
import (
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/widget"
)
func main() {
a := app.New()
w := a.NewWindow("Hello World")
w.SetContent(widget.NewLabel("Hello World!"))
w.ShowAndRun()
}
Error is shown here
Upvotes: 1
Views: 1234
Reputation: 92
You need to import fyne.io/fyne/v2
in our code like this:
package main
import (
"fyne.io/fyne/v2" // add this line to your code
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/widget"
)
func main() {
a := app.New()
w := a.NewWindow("Hello World")
w.SetContent(widget.NewLabel("Hello World!"))
w.ShowAndRun()
}
Upvotes: 1
Reputation: 31
After a ton of work, days of being completely frustrated. I found the answer. starting with setting the correct display in conjunction with your ipaddress.
export DISPLAY=(your IP address):0.0 the :0.0 sets to your default display.
You want to then follow this information:
setting your first inbound rule
set 3 of these as listed here
name them however you would like. Just ensure you have set TCP and UDP and an ALL category under the protocol. Mine only worked when setting all 3, (when I figured setting just 1 with all category would work for the protocol.)
Upvotes: 1
Reputation: 3265
It sounds like you are running Linux with a Wayland setup. Not all apps support this yet, so it is recommended to switch on “xwayland” which adds X11 compatibility.
Fyne is working on wayland support and you can try it out using the “-tags wayland” build parameter. It is about 95% complete, we aim to have it enabled by default later this year.
Upvotes: 0