Jump to content
SSForum.net is back!

Lynx

★ VIP
  • Posts

    2397
  • Joined

  • Last visited

Everything posted by Lynx

  1. I thought there was a tool in DCME that done it for you.
  2. Wow, that's really impressive. I'll download the trial later.
  3. The installer isn't the reason why Continuum won't work with just Wine.
  4. Seeing as the last laptop was pretty much impossible to use, I switched to an IBM ThinkPad T42 - which is surprisingly great. http://dl.krslynx.com/Temp/desktop_thinkpad.JPG I think I might actually stick with this for a few weeks longer, and instead of getting another MacBook I've been looking at the 27" iMac Core i7 with 8GB RAM and 2TB HDD - should be cool. Btw: That's an awesome background image, Dav.
  5. I'm in the process of designing a directory server website for ds1.krslynx.com - I'll make a post once it's online.
  6. I already said I'll do it for free. Message me if you have any issues with running multiple instances of the same application by running in different logins.
  7. That's really cool. Good job.
  8. You're correct, good catch. If you edit line one to '#!/usr/bin/python' it will run by running /path/to/dirserver.py instead of python /path/to/dirserver.py. Thanks. The script will check if the process is running, and if it's not execute a process. That is exactly what you requested - perhaps if you'd have been more explicit in your requests I wouldn't have needed to waste my time writing scripts that don't actually meet your requirements first time around. As I can't really be bothered to write something that's more intellegent in checking unique processes, I'll tell you that you can solve your issue of running multiple instances of the same software by running each (matching) process in a different user (you've got unlimited user-accounts on my server), then instead of using: for line in os.popen("ps -A | grep " +processName): use: userName = bluetds2 for line is os.popen("ps --User " +userName +" | grep " +processName):
  9. You're not editing the script. Here's the script simplified a bit more into functions/with full comments so you can understand how everything is working a little easier... You can find this on your server at location "~/4990_dirserver/dirserver.py" #/usr/bin/python #Python Script for L.C. #Saturday Jan 2nd 2010, 23:24 #by Christopher Burke krslynx@gmail.com #2010/Jan/02 - Made edits, made it easier to understand """To Run This Script: open utilities->terminal and execute: $ python /path/to/this_script.py You will need to check that processName variable matches the process that you're _running_, and you will need to make sure that the correct path to the process that you're trying to _run_ is located within the path field on line 23""" import os import sys import subprocess processName = "dirserver" # the process to check def runProcess(): # this function will run the below application # If you want to change what application it opens, change the below path subprocess.Popen(['/home/bluetds2/4990_dirserver/dirserver']) # If you want a script that checks multiple directory servers # (I've got no idea why you'd need this) then I guess that can be arranged. def checkProcess(): """ This function will effectively run ps -A | grep <appname> in the shell - therefore it will be checking if processName is running so for multiple instances, you'll need to edit the processName variable to the closest path possible.""" for line in os.popen("ps -A | grep " +processName): fields = line.split() # This is splitting the output of the above pid = fields[0] # and this is grabbing the leftmost output (pid) print "pid for", processName, 'is', pid # this is non-essential check = os.path.exists("/proc/" +pid) # this part of the script is # checking if a /proc/<pid> folder has been created (ie. if the proc- # ess exists) if check == True: # if the check is true... print processName, "was running, goodbye!" # it was running exit() # so exit else: # otherwise, run the runProcess function, found at line: 12 runProcess() """MAIN""" print "Checking if dirserver is running..." # This line is non-essential checkProcess() # check process runProcess() # run process, check process exits the script first anyway... If you'd like to use doc_flabbys script, you'll need to edit the mono Central.exe > logall.txt line to execute dirserver instead.
  10. http://www.guidebookgallery.org/pics/gui/desktop/empty/win95.png Sold my MacBook - This is pretty much my new desktop until I buy another computer. Awhsum eh?
  11. In the terminal, type: ps -A | grep dirserver That will show the output of the application, provided that it's actually called dirserver in the ps list, if that doesn't work type: ps -A | grep /home/bluetds2/4990_dirserver/dirserver which should defiantly show that it is running, provided it is actually running. If that works, then type this into the terminal: python /path/to/the/location/of/lc.py Do not enter interpretational Python (You should not see >>> anywhere). Edit: Seeing as you're running this on my server (I never noticed) - I'll test it myself. Testing: bluetds2@krslynx:~/4990_dirserver$ ps -A | grep dirserver bluetds2@krslynx:~/4990_dirserver$ python /home/bluetds2/4990_dirserver/dirserver.py Checking if dirserver is running... -- Snrrrub's Directory Server 1.0 started -- Press CTRL+C to exit. bluetds2@krslynx:~/4990_dirserver$ ps -A | grep dirserver 8584 pts/1 00:00:00 dirserver bluetds2@krslynx:~/4990_dirserver$ python /home/bluetds2/4990_dirserver/dirserver.py Checking if dirserver is running... pid for dirserver is 8584 dirserver was running, goodbye! Fully tested, it works.
  12. I guess in that case try: #/usr/bin/python #Python Script for L.C. #Saturday Jan 2nd 2010, 23:24 #by Christopher Burke krslynx@gmail.com import os import sys processLocation = "/home/bluetds2/4990_dirserver/" # the path to the application to open application = "dirserver" # the name of the application to open for line in os.popen("ps -A | grep " +processLocation + application): fields = line.split() pid = fields[0] if os.path.exists("/proc/" +pid) == False: os.popen(processLocation + application) elif os.path.exists("/proc/" +pid) == True: exit()
  13. Ehrm, afaik you can't ./ execute python scripts, you'll either need to use: $ python script.py from the terminal, or using crontab add the full path to the script, but check permissions to allow write/execute privileges. Here's an example that I just tested to open ChatNut on my Mac: #/usr/bin/python #Python Script for L.C. #Saturday Jan 2nd 2010, 23:24 #by Christopher Burke krslynx@gmail.com import os import sys processName = "chatnut" # the process to check processLocation = "/Users/cpburke/Downloads/" # the path to the application to open application = "SignedChatnut.jar" # the name of the application to open for line in os.popen("ps -A | grep " +processName): fields = line.split() pid = fields[0] print pid if os.path.exists("/proc/" +pid) == False: print "Process was not running, launching..." os.popen(processLocation + application) elif os.path.exists("/proc/" +pid) == True: print "Process was running." exit()
  14. Okay, here's a script: #/usr/bin/python #Python Script for L.C. #Saturday Jan 2nd 2010, 23:24 #by Christopher Burke krslynx@gmail.com import os import sys processName = "appName" # the process to check processLocation = "path/to/location" # the path to the application to open application = "nameOfApplication" # the name of the application to open for line in os.popen("ps -A | grep " +processName): fields = line.split() pid = fields[0] if os.path.exists("/proc/" +pid) == False: os.popen(processLocation + application) elif os.path.exists("/proc/" +pid) == True: exit() Test it, and let me know of any errors. You'll need to chmod the script to run it with crontab. Just a note: run this script with the same permission level as the application you're going to be running, otherwise expect /proc issues.
  15. I'll write one later for free once I'm done with this damn database assignment.
  16. If I remember Windows, go to the C:/ drive of the XP machine, and enable sharing and set the sharing tag to C$ - then, find out the IP of the XP machine. It should be a local IP (something like 192.168.2.1) - open up the command prompt (start -> run -> CMD) and enter //192.168.2.1/C$ substituting 192.168.2.1 for the IP of the XP laptop. This should take you directly to the shared folder, and it will bypass all of the fiddly bullshit that Vista has. WORKGROUP should not effect this. Once you're in, you'll be at the root of the C:/ drive, so you'll be able to freely pass all of the files to whatever location you like. You will need the administrator password for the XP machine in order to do this, otherwise you can set up localised sharing folders in each account which will let you login with a different user account for each sharing folder etc.
  17. You should. Both excellent artists. =)
  18. My Desktop... This doesn't really change at all, I only ever have files on it if I am working on them but not got them to the point where they're finished... http://dl.krslynx.com/Temp/ssfn/desktop.png My Dock, and the applications I have kept in the Dock. http://dl.krslynx.com/Temp/ssfn/dock.png All the desktop background images I ever use are located here.
  19. My desktop is never messy, I'm generally good at putting things where they belong.
  20. Yes, but ultimately anybody who is 100% left or 100% right is ultimately going to live by a system that does not work. Personally, I believe that my privacy and my civil liberties are the most important things that I have. However, Liberal/Socialist systems don't provide either of these things very well, but ultimately I would consider myself more left than right. I think the picture was pretty good at outlining the broad common differences between the left and right.
  21. Nice image, Bak.
  22. I tell you now, I am certain my words here will reach you. More seriously now, it would seem that you at least purport to be Christian given your references to God and Satan. I don't know how you've deluded yourself into thinking that wishing eternal damnation on other people is consistent with Christianity. Aside from that, your way of thinking is dangerous. Not much more to say here than that. Apart from lolol, I agree. lawlol
  23. Aaand to summarise,
  24. Nice
  25. Look at Forums - news is on them.
×
×
  • Create New...