Hello there, I've been using Perl for few years now and I'm lurking here since then. I've always been able to solve my issues with previous posts. But I just encountered a problem that I don't even know how I should formulate it in the search bar... Some context : I do some VHDL simulation on a distant server using SSH. Those simulations create .vcd files that can be viewed with a software called GTKWave through a X11 server. My job right now, is to develop a simple user interface to do this without the user to have to do command line stuff. I'm using Net::SSH::Perl (Net::OpenSSH not working on Windows) and Tk. The SSH command I send to view the .vcd file is :

DISPLAY=192.my_local_ip:42.0 gtkwave waveform.vcd

This command works perfectly in my Perl script (I've removed some code for clarification):

my @selected_waves = $waves_listbox->curselection(); my $wave = $waves_listbox->get($selected_waves[0]); # $wave = "waveform.vcd"; my ($stdout, $stderr, $exit); my $gtk_cmd = "$disp_pref gtkwave $simu_folder/$wave"; print "$gtk_cmd\n"; ($stdout, $stderr, $exit) = $ssh->cmd($gtk_cmd);

So my problem is when $wave is forced to the value "waveform.vcd" it works well. But when I use the listbox selection nothing happens (no error), GTKWave doesn't show up. I print the command I sent and it is exactly the same (there is no \n hiding in the listbox item, i tried to chomp it). I guess the variable $wave behaves differently with the listbox->get, but I don't understand why. I'm curious what you guys think of it. Thank you


In reply to Tk Listbox and SSH command by Praetrorian

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.