From finn at finerdetails.com.au Mon Dec 16 17:08:50 2002 From: finn at finerdetails.com.au (Finn Blucher) Date: Mon Aug 2 21:26:21 2004 Subject: [Canberra-pm] Runing commands on server. Message-ID: <20021217100850.2740f8fe.finn@finerdetails.com.au> Hey, not really sure where to start with this. Basically I would like people to be able to double click on an icon on their windows desktop and it executes commands on a linux server. I was thinking about a simple tcp client server. I'm not really worried about transmitting username/password in clear text, it's a very small site, but if encryption is easy enough to add I may as well. It's mostly needed to start backups manually. It probably would only need to be capable of running one predefined command. Any ideas, or has this all been done before? Finn. From pjf at perltraining.com.au Mon Dec 16 17:34:51 2002 From: pjf at perltraining.com.au (Paul Fenwick) Date: Mon Aug 2 21:26:21 2004 Subject: [Canberra-pm] Runing commands on server. In-Reply-To: <20021217100850.2740f8fe.finn@finerdetails.com.au> References: <20021217100850.2740f8fe.finn@finerdetails.com.au> Message-ID: <20021216233451.GA10911@mukc.org.au> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 G'day Finn, On Tue, Dec 17, 2002 at 10:08:50AM +1100, Finn Blucher wrote: > not really sure where to start with this. Basically I would like > people to be able to double click on an icon on their windows > desktop and it executes commands on a linux server. I was thinking [...] > mostly needed to start backups manually. It probably would only need > to be capable of running one predefined command. Any ideas, or has > this all been done before? To use the oft-quoted Perl motto, "There's more than one way to do it". However, if you're running a web-server (such as apache) on your Linux server, then I may have a very simple and easy solution for you. Create a script which runs the backup commands that you're after, and place it in a basic-auth protected cgi-bin directory. The basic-auth means that it's not going to be stumbled over by web-crawlers or curious work experience students. Make sure that your script prints out a content-type (print "Content-type: text/plain\n\n"), and you probably should have it spawn off a separate process so the backup can run as an independant task to the original CGI (which your web-server may kill if it gets bored, or the client goes away). Randal outlines one such method of doing this (with source-code) at: http://www.stonehenge.com/merlyn/LinuxMag/col39.html You can probably get away with something much less complex than what Randal has done, since you may not have a requirement to monitor the running process from a web-browser. Once you've done that, it's simply a task of book-marking the page and dragging the bookmark to the desktop. Cheers, Paul - -- Paul Fenwick | http://perltraining.com.au/ Director of Training | Ph: +61 3 9354 6001 Perl Training Australia | Fax: +61 3 9354 2681 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9/mMbx5N6j7FHnlURAl9wAJ4m/O5+2qHeZYsgc3O+itiJc1klyQCcDQcr hF3x20tdncV8ysLqB8KtaSI= =i6WW -----END PGP SIGNATURE----- From iain-pm at dellah.org Mon Dec 16 17:41:02 2002 From: iain-pm at dellah.org (Iain 'Spoon' Truskett) Date: Mon Aug 2 21:26:22 2004 Subject: [Canberra-pm] Runing commands on server. In-Reply-To: <20021217100850.2740f8fe.finn@finerdetails.com.au> References: <20021217100850.2740f8fe.finn@finerdetails.com.au> Message-ID: <20021216234101.GA12790@ouroboros.anu.edu.au> * Finn Blucher (finn@finerdetails.com.au) [17 Dec 2002 10:11]: > not really sure where to start with this. Basically I would like > people to be able to double click on an icon on their windows desktop > and it executes commands on a linux server. I was thinking about a > simple tcp client server. I'm not really worried about transmitting > username/password in clear text, it's a very small site, but if > encryption is easy enough to add I may as well. It's mostly needed to > start backups manually. It probably would only need to be capable of > running one predefined command. Any ideas, or has this all been done > before? One possibility would be to install putty, and have the desktop icon do something like "putty.exe user@serverhostname command" (or similar, it's a while since I've used Windows). They double-click, it prompts them for a password, it runs the command on the server. With a bit of ssh tweaking you can make it so that they can't log in to a shell. cheers, -- Iain. From finn at finerdetails.com.au Mon Dec 16 21:01:40 2002 From: finn at finerdetails.com.au (Finn Blucher) Date: Mon Aug 2 21:26:22 2004 Subject: [Canberra-pm] Runing commands on server. References: <20021217100850.2740f8fe.finn@finerdetails.com.au> <20021216234101.GA12790@ouroboros.anu.edu.au> Message-ID: <000601c2a578$9f87f060$2000a8c0@walkingtux> I went the boring way, used putty. I had already tried using cgi to do the job, but the browser seemed to be timing out waiting the hour or so for the backup to run. Hadn't really looked into what the problem was. Ta for the help. Finn. ----- Original Message ----- From: "Iain 'Spoon' Truskett" To: Sent: Tuesday, December 17, 2002 10:41 AM Subject: Re: [Canberra-pm] Runing commands on server. > * Finn Blucher (finn@finerdetails.com.au) [17 Dec 2002 10:11]: > > not really sure where to start with this. Basically I would like > > people to be able to double click on an icon on their windows desktop > > and it executes commands on a linux server. I was thinking about a > > simple tcp client server. I'm not really worried about transmitting > > username/password in clear text, it's a very small site, but if > > encryption is easy enough to add I may as well. It's mostly needed to > > start backups manually. It probably would only need to be capable of > > running one predefined command. Any ideas, or has this all been done > > before? > > One possibility would be to install putty, and have the desktop icon do > something like "putty.exe user@serverhostname command" (or similar, it's > a while since I've used Windows). They double-click, it prompts them for > a password, it runs the command on the server. > > With a bit of ssh tweaking you can make it so that they can't log in to > a shell. > > > cheers, > -- > Iain. > _______________________________________________ > Canberra-pm mailing list > Canberra-pm@mail.pm.org > http://mail.pm.org/mailman/listinfo/canberra-pm > From rweir at softhome.net Tue Dec 17 22:27:46 2002 From: rweir at softhome.net (Rob Weir) Date: Mon Aug 2 21:26:22 2004 Subject: [Canberra-pm] Runing commands on server. In-Reply-To: <000601c2a578$9f87f060$2000a8c0@walkingtux> References: <20021217100850.2740f8fe.finn@finerdetails.com.au> <20021216234101.GA12790@ouroboros.anu.edu.au> <000601c2a578$9f87f060$2000a8c0@walkingtux> Message-ID: <20021218042746.GA3282@thebox.home.local> On Tue, Dec 17, 2002 at 02:01:40PM +1100, Finn Blucher wrote: > used putty. I had already tried using cgi to do the job, but the browser > seemed to be timing out waiting the hour or so for the backup to run. Hadn't The HTTP protocol probably specifies a data timeout of significantly less than an entire hour :) As someone else suggested, you should fork off the backup process. -rob -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://mail.pm.org/pipermail/canberra-pm/attachments/20021218/2bd355ca/attachment.bin