Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

You may notice that you're getting some pretty vague answers, not all of which are really helpful. There's a reason.

Generally speaking, Perlmonks is a friendly and helpful community, but that comes with a minor caveat: a lot of the people here are technically minded. To get useful information out of technically-minded people, you have to give them the technical information that they need in order to understand your question. You haven't done that.

To illustrate, I'm going to make up three very different situations and supply samples of how you could ask your question. I don't know if any of these three corresponds to your actual situation, because you haven't given us enough info to tell the difference. So you can think of these as examples:

  • Situation 1: All-Local
    Ok, I've got a system here running Debian stable (wheezy), and I'm running a Perl script out of /var/www/cgi-bin/blah/index.cgi, which gets form data from a web browser (http://127.0.0.1/cgi-bin/blah/). In certain situations, depending on the form data, I want the Perl script to launch vi in a terminal window (I'm using Putty, because I used to be a Windows user and got used to that) to edit a particular file, say, /var/www/blah-config. I've ensured that blah-config is owned by www-data and is chmod u+w. From my Perl cgi script, how can I launch a command in a terminal window, as the www user, displayed on a certain user's desktop? (I'm logged into KDE as a regular user, not as www.)
  • Situation 2: Single Server, Single Client
    Hi, I've got a web server, we'll call it george, and a desktop system, bob. I'm running a Perl script on the web server, which I access in a web browser on the client by going to http://george/foo/quu.pl There's a file on the server, /var/www/quu.txt, that I want the user on the desktop system (bob@bob) to be able to edit. He's a vi user, so he wants to edit the file in vi; but the desktop system, bob, is a Windows system and doesn't have vi installed. It does have Putty. vim is installed on george, of course, because that's a Debian system (squeeze). Unfortunately, for arcane reasons beyond my control, the firewall between the two systems won't allow ssh traffic, only http. How can I work around this? Can I use a combination of Perl on the server and Putty on the client to edit the file via http somehow?
  • Situation 3: Single Web Server, Many Clients
    Hi, I have a web server, and we've got a website that has a lot of dynamic content, based on a Perl framework. (It's a sort of a game where you explore a dungeon and kill monsters.) Each user account has an associated config file, and because the config files can have comments and are kind of complex, we'd like to allow users to edit them in a text editor. Currently it's a plain textarea web form, but some of our users have played a similar game where the servers let them edit their config files in a vi editor, and they've been asking us for this feature. I asked them what browser they run the vi editor in, and they said it doesn't run in a browser, they use something called Putty for that. The cgi script, which has access to the browser cookie and session database, can determine which file the user is allowed to edit, but I need to know how to launch that in an editor so the remote user can edit it. Our users have a variety of systems, ranging from FreeBSD to Windows Eight. I think the one guy is even using something called VMS, whatever that is. Is there some cross-platform way we can make this work for our users?

The answers to these three questions would be totally completely different. And we can't tell which question you're asking, or even whether ANY of these questions are the question you're asking. You need to be much more specific about your situation, so we can understand what you are trying to do.


In reply to Re: perl script to open vi editor by jonadab
in thread perl script to open vi editor by Anonymous Monk

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-24 08:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found