{"action":"created","issue":{"url":"https://api.github.com/repos/ruby-gnome2/ruby-gnome2/issues/294","labels_url":"https://api.github.com/repos/ruby-gnome2/ruby-gnome2/issues/294/labels{/name}","comments_url":"https://api.github.com/repos/ruby-gnome2/ruby-gnome2/issues/294/comments","events_url":"https://api.github.com/repos/ruby-gnome2/ruby-gnome2/issues/294/events","html_url":"https://github.com/ruby-gnome2/ruby-gnome2/issues/294","id":54670077,"number":294,"title":"fork_command method for Vte::terminal doesn't work as expected","user":{"login":"cedlemo","id":1135841,"avatar_url":"https://avatars.githubusercontent.com/u/1135841?v=3","gravatar_id":"","url":"https://api.github.com/users/cedlemo","html_url":"https://github.com/cedlemo","followers_url":"https://api.github.com/users/cedlemo/followers","following_url":"https://api.github.com/users/cedlemo/following{/other_user}","gists_url":"https://api.github.com/users/cedlemo/gists{/gist_id}","starred_url":"https://api.github.com/users/cedlemo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cedlemo/subscriptions","organizations_url":"https://api.github.com/users/cedlemo/orgs","repos_url":"https://api.github.com/users/cedlemo/repos","events_url":"https://api.github.com/users/cedlemo/events{/privacy}","received_events_url":"https://api.github.com/users/cedlemo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-17T18:18:41Z","updated_at":"2015-01-18T08:37:37Z","closed_at":"2015-01-18T08:37:37Z","body":"I tried to use the fork_command method like in the test file test_terminal.rb but I cannot use it as expected.\r\n\r\nFirstly the constant Vte::PtyFlags::DEFAULT didn't exist, I have to use Vte::Pty::Flags::DEFAULT.\r\n\r\nSecondly if I try this (like in the test file):\r\n\r\n    flags = Vte::Pty::Flags::DEFAULT\r\n    terminal.fork_command(flags, nil, nil)\r\n\r\nI have this error : \r\n\r\n    Vte::Terminal#fork_command(command, argv, envv, directory, lastlog, utmp, wtmp)' style has been deprecated. Use\r\n    #Vte::Terminal#fork_command(:pty_flags => :default, :working_directory => <current>, :argv => <user_shell>, :envv => nil, :spawn_flags => :child_inherits_stdin)\r\n\r\nSo ok it's just that the tests are not up to date but when I try to use : \r\n\r\n    terminal.fork_command(:pty_flags =>flags, \r\n                                      :working_directory =>File.dirname(__FILE__), \r\n                                      :argv => '/usr/bin/fish', \r\n                                      :envv=>nil, \r\n                                      :spawn_flags => :child_inherits_stdin )\r\n\r\nI have this kind of error:\r\n\r\n    /home/cedlemo/.gem/ruby/2.2.0/gems/glib2-2.2.4/lib/glib2/deprecatable.rb:47:in `fork_command': malloc: possible integer overflow (ArgumentError)\r\n   from /home/cedlemo/.gem/ruby/2.2.0/gems/glib2-2.2.4/lib/glib2/deprecatable.rb:47:in `block in define_deprecated_method_by_hash_args'\r\n\r\nI am able to have a working terminal/vte if I don't use arguments:\r\n\r\n    terminal.fork_command()\r\n\r\nAny advices?"},"comment":{"url":"https://api.github.com/repos/ruby-gnome2/ruby-gnome2/issues/comments/70400552","html_url":"https://github.com/ruby-gnome2/ruby-gnome2/issues/294#issuecomment-70400552","issue_url":"https://api.github.com/repos/ruby-gnome2/ruby-gnome2/issues/294","id":70400552,"user":{"login":"cedlemo","id":1135841,"avatar_url":"https://avatars.githubusercontent.com/u/1135841?v=3","gravatar_id":"","url":"https://api.github.com/users/cedlemo","html_url":"https://github.com/cedlemo","followers_url":"https://api.github.com/users/cedlemo/followers","following_url":"https://api.github.com/users/cedlemo/following{/other_user}","gists_url":"https://api.github.com/users/cedlemo/gists{/gist_id}","starred_url":"https://api.github.com/users/cedlemo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cedlemo/subscriptions","organizations_url":"https://api.github.com/users/cedlemo/orgs","repos_url":"https://api.github.com/users/cedlemo/repos","events_url":"https://api.github.com/users/cedlemo/events{/privacy}","received_events_url":"https://api.github.com/users/cedlemo/received_events","type":"User","site_admin":false},"created_at":"2015-01-18T08:37:37Z","updated_at":"2015-01-18T08:37:37Z","body":"Thanks you,\r\nit works:\r\n\r\n    terminal.fork_command(:pty_flags =>flags,\r\n                          :working_directory =>File.dirname(__FILE__),\r\n                          :argv => ['/usr/bin/fish'],\r\n                          :envv=>nil,\r\n                          :spawn_flags => GLib::Spawn::SEARCH_PATH )"}}