Coder Social home page Coder Social logo

Comments (11)

copiousfreetime avatar copiousfreetime commented on August 20, 2024

Are you running this on a machine that has no display? Launchy is a library that opens up a browser. 't' is a library that does command line twitter. So, if you are running t on a system that does not have a browser installed, launchy will probably fail when t attempts to use launchy to open up a browser so that t may be authorized for twitter.

Does that make sense?

In any case, feel free to do the following

% export LAUNCHY_DEBUG=true
% gem t authorize --display-url

And post the output here. I'll do what I can to help.

from launchy.

GeoffreyPlitt avatar GeoffreyPlitt commented on August 20, 2024

vagrant@precise32:~/t$ bundle exec t authorize -d
Faraday: you may want to install system_timer for reliable timeouts
/var/lib/gems/1.8/gems/faraday-0.8.7/lib/faraday/request/multipart.rb:4: warning: already initialized constant DEFAULT_BOUNDARY
Welcome! Before you can use t, you'll first need to register an
application with Twitter. Just follow the steps below:

  1. Sign in to the Twitter Developer site and click
    "Create a new application".
  2. Complete the required fields and submit the form.
    Note: Your application must have a unique name.
    We recommend: "/t".
  3. Go to the Settings tab of your application, and change the
    Access setting to "Read, Write and Access direct messages".
  4. Go to the Details tab to view the consumer key and secret,
    which you'll need to copy and paste below when prompted.

Press [Enter] to open the Twitter Developer site.

LAUNCHY_DEBUG: Checking if class Launchy::Application::Browser is the one for handles?(https://dev.twitter.com/apps)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Darwin is the one for matches?(linux-gnu)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Nix is the one for matches?(linux-gnu)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Jruby is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Rbx is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::MacRuby is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Mri is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Darwin is the one for matches?(linux-gnu)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Nix is the one for matches?(linux-gnu)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Jruby is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Rbx is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::MacRuby is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Mri is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Fluxbox is the one for is_current_desktop_environment?()}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Gnome is the one for is_current_desktop_environment?()}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Xfce is the one for is_current_desktop_environment?()}
LAUNCHY_DEBUG: Launchy::Application : Unable to find xprop' in /var/lib/gems/1.8/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /opt/vagrant_ruby/bin LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Kde is the one for is_current_desktop_environment?()} LAUNCHY_DEBUG: Current Desktop environment not found. Please rerun with environment variable LAUNCHY_DEBUG=true or the '-d' commandline option and file a bug at https://github.com/copiousfreetime/launchy/issues/new LAUNCHY_DEBUG: Launchy::Application : Unable to findxdg-open' in /var/lib/gems/1.8/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /opt/vagrant_ruby/bin
/var/lib/gems/1.8/gems/launchy-2.2.0/lib/launchy/applications/browser.rb:62:in browser_cmdline': Unable to find a browser command. If this is unexpected, Please rerun with environment variable LAUNCHY_DEBUG=true or the '-d' commandline option and file a bug at https://github.com/copiousfreetime/launchy/issues/new (Launchy::CommandNotFoundError) from /var/lib/gems/1.8/gems/launchy-2.2.0/lib/launchy/applications/browser.rb:66:incmd_and_args'
from /var/lib/gems/1.8/gems/launchy-2.2.0/lib/launchy/applications/browser.rb:77:in open' from /var/lib/gems/1.8/gems/launchy-2.2.0/lib/launchy.rb:29:inopen'
from /home/vagrant/t/lib/t/cli.rb:82:in authorize' from /home/vagrant/.bundler/ruby/1.8/thor-f8c4c7ab78f7/lib/thor/command.rb:27:insend'
from /home/vagrant/.bundler/ruby/1.8/thor-f8c4c7ab78f7/lib/thor/command.rb:27:in run' from /home/vagrant/.bundler/ruby/1.8/thor-f8c4c7ab78f7/lib/thor/invocation.rb:120:ininvoke_command'
from /home/vagrant/.bundler/ruby/1.8/thor-f8c4c7ab78f7/lib/thor.rb:363:in dispatch' from /home/vagrant/.bundler/ruby/1.8/thor-f8c4c7ab78f7/lib/thor/base.rb:438:instart'
from /home/vagrant/t/bin/t:20
from /var/lib/gems/1.8/bin/t:19:in `load'
from /var/lib/gems/1.8/bin/t:19

from launchy.

copiousfreetime avatar copiousfreetime commented on August 20, 2024

@GeoffreyPlitt Can you tell me more about how you are running this command? What operating system, is it a remote server with no graphical display?

It looks like you are running t authorize -d on a remote linux machine that has no graphical display or even X11 installed.

At this point I'm guess this is a bug in the interaction between t and launchy. One or the other of them will need a fix. I'll figure this out and update launchy or submit a pull request to @sferik as appropriate.

from launchy.

GeoffreyPlitt avatar GeoffreyPlitt commented on August 20, 2024

Yes, it's a Vagrant box, no display. Thanks!

from launchy.

copiousfreetime avatar copiousfreetime commented on August 20, 2024

Alright, stay tuned, it might be a day or two.

from launchy.

sferik avatar sferik commented on August 20, 2024

@copiousfreetime Thanks. Sorry for punting these issues to you, but they seem to be coming from launchy and the error message specifically suggests:

file a bug at https://github.com/copiousfreetime/launchy/issues/new

If I'm using launchy wrong, I'll happily fix it myself (no need for you to submit a pull request).

The -d flag is supposed to invoke launchy with :dry_run => true, so it shouldn't matter that the VM is headless, as long as it can write to STDOUT.

Basically, I just want to display the URL if there's no way to automatically open it.

from launchy.

copiousfreetime avatar copiousfreetime commented on August 20, 2024

@sferik not a problem and it'll make me finally get around to playing and testing with t :-)

from launchy.

copiousfreetime avatar copiousfreetime commented on August 20, 2024

I think I have a solution worked out. It'll involve changing both launchy and t. stay tuned.

from launchy.

sferik avatar sferik commented on August 20, 2024

@copiousfreetime Please do share. Since posting, I've received another bug report about this: sferik/t-ruby#98

from launchy.

copiousfreetime avatar copiousfreetime commented on August 20, 2024

basically I'm going to allow an error block to be passed to launchy to be called if an error happens. The combine that with a patch to t that utilizes it and prints the url if launchy would have raised an exception. I'm getting on a plane here shortly, I'll be coding it up today.

from launchy.

copiousfreetime avatar copiousfreetime commented on August 20, 2024

Fixed and version 2.3 released.

from launchy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.