Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking on Firefox app does not start firefox #232

Open
belkale opened this issue Dec 23, 2022 · 14 comments
Open

Clicking on Firefox app does not start firefox #232

belkale opened this issue Dec 23, 2022 · 14 comments

Comments

@belkale
Copy link

belkale commented Dec 23, 2022

Describe the bug:

Unable to start firefox by clicking on firefox app in app drawer

To Reproduce:

Steps to reproduce the behaviour:

  1. Click on username in bottom right
  2. Click on network to expand the dropdown
  3. Click on Firefox Web Browser
  4. Firefox does not start
  5. Following error is seen in ~/.cache/fyne/io.fyne.fynedesk/fynedesk.log

2022/12/23 14:54:56 At: /home/xxx/src/fynedesk/internal/x11/win/frame.go:282
2022/12/23 14:54:56 Fyne error: Put image error
2022/12/23 14:54:56 Cause: BadDrawable {NiceName: Drawable, Sequence: 6551, BadValue: 10497468, MinorOpcode: 0, MajorOpcode: 72}
2022/12/23 14:54:56 At: /home/xxx/src/fynedesk/internal/x11/win/frame.go:282
2022/12/23 14:54:56 Fyne error: X11 Error:
2022/12/23 14:54:56 Cause: BadGContext {NiceName: GContext, Sequence: 6558, BadValue: 10497470, MinorOpcode: 0, MajorOpcode: 62}
2022/12/23 14:54:56 At: /home/xxx/src/fynedesk/internal/x11/wm/desk.go:340

Device (please complete the following information):

  • OS: Ubuntu Linux
  • Version: 22.04.1 LTS
  • Go version: 1.19.4
  • FyneDesk version: b6e12b5
@belkale
Copy link
Author

belkale commented Dec 23, 2022

Firefox is installed as snap in my Ubuntu distribution.

@belkale
Copy link
Author

belkale commented Dec 23, 2022

Same problem with Rhythmbox. Does not start from app launcher.

@Jacalz
Copy link
Member

Jacalz commented Dec 23, 2022

You mention that the applications are installed as snap packages (at least for the former)? Does this happen with apt or Flatpak packages too?

@belkale
Copy link
Author

belkale commented Dec 24, 2022

I havent tried with apt or Flatpak packages. Both Firefox and Rhythmbox came by default in my Ubuntu distribution and both dont seem to work with Fynedesk. However, if I run from a terminal both work even in Fynedesk.

@Jacalz
Copy link
Member

Jacalz commented Dec 24, 2022

It would be useful if you could try other package formats. That way we can narrow it down to see if it is snap specific.

@belkale
Copy link
Author

belkale commented Dec 26, 2022

I could locate the firefox desktop file. The exec path there is

Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/firefox_firefox.desktop /snap/bin/firefox -new-window

and based on

func (data *fdoApplicationData) Run(env []string) error

command would be first argument which is env. Could that be causing the problem?

@belkale
Copy link
Author

belkale commented Dec 26, 2022

Verified that having env in the beginning is the problem. Changed firefox desktop file and changed Exec to keep just /snap/bin/firefox and it worked fine.

It would be useful to add a debug level to fyne desktop and as part of debug print the current command being run.

@belkale
Copy link
Author

belkale commented Dec 26, 2022

In case of Rhythmbox, there are multiple Exec within desktop. First one is for starting Rhythmbox but the rest are for play/pause etc. But while reading we pick the last Exec and this makes the exec use the wrong command. Instead of rhythmbox, we use rhythmbox-client.

Exec=rhythmbox %U
Exec=rhythmbox-client --play-pause
Exec=rhythmbox-client --next
Exec=rhythmbox-client --previous
Exec=rhythmbox-client --quit

@belkale
Copy link
Author

belkale commented Dec 26, 2022

Looks like there is a Go implementation https://code.rocketnine.space/tslocum/desktop

@mwelwankuta
Copy link

has this issue been resolved?

@Jacalz
Copy link
Member

Jacalz commented Dec 28, 2022

has this issue been resolved?

Not yet. The issue was opened just two days ago and there are no PRs or commits that mention fixing this yet.

@mwelwankuta
Copy link

alright thank's will try to fix it

@andydotxyz
Copy link
Contributor

Thanks. The code should be limited to the xdg code, as we have "app launcher" abstraction and this just refers to the .desktop spec. Do jump on to #fynedesk on Gophers Slack if you wish to chat further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants