ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need a script for school and I have tryed to get one to work but with no luck. I need one that will execute 10 VNC's and then terminate the exection after opening them all. Please help me.
I was actually trying to encourage you to show us the code you have already so that you appear to ve showing willing. Don't think many people would do your homework for you, especially with an attitude like you've just shown. Obviously my attempt to keep things light-hearted and in good faith didn't go too well. That's a shame, as what you're after is fairly easy and am sure a few people could have helped you out, including myself.
Hope you get things and find what you're looking for.
I got this sprung on me with no time to work on it, I did the best i could with it and like I said it didn't work. I throwed what code I had a way to try and start over so I have no idea what it was or why it didnt work.
I have to have this by tonight, so i had google it and not found anything that helped me, I knew I was running out of time and being in such a tight I ask for assistance.
I have never used Linux in any shape or form so I am totally lost with it and scripting, I just felt affended when I am told no one would do my home work for me.
If I knew how to do it I would be more than glad to write the script for you or anyone else that needed a helping hand, I dont have the time to learn it at present I just need to get past this assignment so to freeup a little time that I may have a opportunity to discover the world of Linux.
#!/bin/bash
# Fire up ten instances of VNC
# Well, it's xvncviewer - change to whatever client
# you are wishing to run
# Set your counter
count=0
# Create a loop to run through 10 times
while [ $count -ne 10 ]
do
# Execute your command and background
xvncviewer &
# Increment your counter
count=$(( $count + 1 ))
done
# Get the PID's of your running processes
pidof xvncviewer > vncpids
# Now read your PID's back in
exec < vncpids
# Now kill each process
read line
kill -9 $line
That fires up 10 xvncviewers, then kills them once all 10 are open. Play with it to suit your needs. If you need anything else, tinker with it or ask politely.
Now, if I could only get some halogen bulbs for my flashlight to help read my map better...
Originally posted by mdaddyrabbit Foudlsy, I will go back and read the the rules, which I should have done in the beginning, but for the most part you can bite me.
And here's the same comment from a mod; and I ask you
to edit your post and remove the foul language and personal
attack.
Well said!! I looked at this thread because I thought I might be able to help in some way. I didn't expect another poster (who said what I would have said) to be berated for helping. mdaddyrabbit - appreciate help when it is offered. You might not get it again.
Sorry for the loss of temperment, under alot of stress, which is nobodys problem but mine. I am truly sorry for my actions within this forum. I appreciate the help I have gotton here. Fouldsy I truley appreciate your help. I wish everyone well.
There's not really anything you could say that would bother me, I usually just ignore threads and members with such outbursts, but at least you realised your mistake. I hope the script was helpful in some way and that you find time during all your studies to appreciate Linux + maybe pick up a bit of coding yourself!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.