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

2.4.0 Regression - Wrong arguments to kfmclient when running under KDE #71

Closed
colbell opened this issue Nov 25, 2013 · 2 comments
Closed

Comments

@colbell
Copy link
Contributor

colbell commented Nov 25, 2013

Summary

Using launchy 2.4.0 under KDE 4.11.2 the browser no longer opens.

Under launchy 2.3.0

$ launchy -n http://www.ruby-lang.org/
/usr/bin/xdg-open http://www.ruby-lang.org/

The above call to xdg-open succeeds in opening the browser.

Under launchy 2.4.0

launchy -n http://www.ruby-lang.org/
/usr/bin/kfmclient http://www.ruby-lang.org/

This time it successfully identifies that it is running under KDE, but no browser window opens.

If I try to execute the generated command line I get:

/usr/bin/kfmclient http://www.ruby-lang.org/
Syntax Error: Unknown command 'http://www.ruby-lang.org/'

The help text for the command:

Usage: kfmclient [Qt-options] [KDE-options] [KDE-tempfile-options] [options] command [URL(s)] 

KDE tool for opening URLs from the command line

Generic options:
  --help                    Show help about options
  --help-qt                 Show Qt specific options
  --help-kde                Show KDE specific options
  --help-kde-tempfile       Show KDE-tempfile specific options
  --help-all                Show all options
  --author                  Show author information
  -v, --version             Show version information
  --license                 Show license information
  --                        End of options

Options:
  --noninteractive          Non interactive use: no message boxes
  --commands                Show available commands

Arguments:
  command                   Command (see --commands)
  URL(s)                    Arguments for command

You just need to add the argument openURL. The following command succeeds in opening a browser window.

/usr/bin/kfmclient openURL http://www.ruby-lang.org/

If I change the method Kde.browser In the source file lib/launchy/detect/nix_desktop_environment.rb from

      def self.browser
        'kfmclient'
      end

To

      def self.browser
        'kfmclient openURL'
      end

Launchy then succeeds in opening a browser window

@copiousfreetime
Copy link
Owner

@colbell Thanks for finding this bug! I don't have a KDE system so I appreciate you finding this. I'll push a 2.4.1 update tomorrow.

@copiousfreetime
Copy link
Owner

@colbell release 2.4.1 pushed, can you test and make sure it works for you?

jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Jan 18, 2014
pkgsrc change:
Update HOMEPAGE per http://rubygems.org/gems/launchy (the old page is 403)

Changes from HISTORY.md:

## Version 2.4.2 - 2013-11-28
* Fix kde issue - <copiousfreetime/launchy#72> - colbell

## Version 2.4.1 - 2013-11-26
* Abstract out the argv of the commandline - <copiousfreetime/launchy#71>

## Version 2.4.0 - 2013-11-12
* Support `Launchy.open( url, :debug => true )` - <http://github.com/copiousfreetime/launchy/issues/63> - schmich
* Fix inconsistencies in `debug?` and `dry_run?` methods - <http://github.com/copiousfreetime/launchy/issues/63> - schmich
* Fix detection of missing *nix desktops - <http://github.com/copiousfreetime/launchy/issues/70>
* Fix running tests in bare Linux environment - <http://github.com/copiousfreetime/launchy/issues/67> - gioele
* Fix mistaking windows drive as uri schema - <http://github.com/copiousfreetime/launchy/issues/65>
* Attempt fixing windows `start` command oddities, again - <http://github.com/copiousfreetime/launchy/issues/62>
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Jan 20, 2014
pkgsrc change:
Update HOMEPAGE per http://rubygems.org/gems/launchy (the old page is 403)

Changes from HISTORY.md:

## Version 2.4.2 - 2013-11-28
* Fix kde issue - <copiousfreetime/launchy#72> - colbell

## Version 2.4.1 - 2013-11-26
* Abstract out the argv of the commandline - <copiousfreetime/launchy#71>

## Version 2.4.0 - 2013-11-12
* Support `Launchy.open( url, :debug => true )` - <http://github.com/copiousfreetime/launchy/issues/63> - schmich
* Fix inconsistencies in `debug?` and `dry_run?` methods - <http://github.com/copiousfreetime/launchy/issues/63> - schmich
* Fix detection of missing *nix desktops - <http://github.com/copiousfreetime/launchy/issues/70>
* Fix running tests in bare Linux environment - <http://github.com/copiousfreetime/launchy/issues/67> - gioele
* Fix mistaking windows drive as uri schema - <http://github.com/copiousfreetime/launchy/issues/65>
* Attempt fixing windows `start` command oddities, again - <http://github.com/copiousfreetime/launchy/issues/62>
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Mar 12, 2014
pkgsrc change:
Update HOMEPAGE per http://rubygems.org/gems/launchy (the old page is 403)

Changes from HISTORY.md:

## Version 2.4.2 - 2013-11-28
* Fix kde issue - <copiousfreetime/launchy#72> - colbell

## Version 2.4.1 - 2013-11-26
* Abstract out the argv of the commandline - <copiousfreetime/launchy#71>

## Version 2.4.0 - 2013-11-12
* Support `Launchy.open( url, :debug => true )` - <http://github.com/copiousfreetime/launchy/issues/63> - schmich
* Fix inconsistencies in `debug?` and `dry_run?` methods - <http://github.com/copiousfreetime/launchy/issues/63> - schmich
* Fix detection of missing *nix desktops - <http://github.com/copiousfreetime/launchy/issues/70>
* Fix running tests in bare Linux environment - <http://github.com/copiousfreetime/launchy/issues/67> - gioele
* Fix mistaking windows drive as uri schema - <http://github.com/copiousfreetime/launchy/issues/65>
* Attempt fixing windows `start` command oddities, again - <http://github.com/copiousfreetime/launchy/issues/62>
jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Oct 11, 2014
pkgsrc change:
Update HOMEPAGE per http://rubygems.org/gems/launchy (the old page is 403)

Changes from HISTORY.md:

## Version 2.4.2 - 2013-11-28
* Fix kde issue - <copiousfreetime/launchy#72> - colbell

## Version 2.4.1 - 2013-11-26
* Abstract out the argv of the commandline - <copiousfreetime/launchy#71>

## Version 2.4.0 - 2013-11-12
* Support `Launchy.open( url, :debug => true )` - <http://github.com/copiousfreetime/launchy/issues/63> - schmich
* Fix inconsistencies in `debug?` and `dry_run?` methods - <http://github.com/copiousfreetime/launchy/issues/63> - schmich
* Fix detection of missing *nix desktops - <http://github.com/copiousfreetime/launchy/issues/70>
* Fix running tests in bare Linux environment - <http://github.com/copiousfreetime/launchy/issues/67> - gioele
* Fix mistaking windows drive as uri schema - <http://github.com/copiousfreetime/launchy/issues/65>
* Attempt fixing windows `start` command oddities, again - <http://github.com/copiousfreetime/launchy/issues/62>
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

2 participants