1

Well the title says it all, how can I auto-start a program before anything else and prevent any other program from running until a certain directory is mounted?

I am building a front-end program for the command "ncpmount" and it has to prevent any program from running until the user logs into their remote account and their files become mounted.

3
  • do you want the program to start on bootup?
    – RolandiXor
    Oct 31, 2010 at 23:45
  • Yes, it will just skip past GDM and automatically log into an account called Student and wait for the files to be mounted until anything else is accessible.
    – daxvena
    Nov 1, 2010 at 0:06
  • Can you clarify your requirements a bit? You say "before anything else", but then describe GDM running to log them in. Which things do you need to block, and what will be performing the ncpmount?
    – Kees Cook
    Nov 1, 2010 at 5:32

1 Answer 1

2

If you can use it, ncpfs is a filesystem module which allows you to mount a NetWare share using the Linux standard mount utility. This would allow you to add a line to your /etc/fstab which will mount the share as part of the system startup. You would then simply check to see if your mountpoint contains files to make sure that the mount worked successfully. Check with the Ubuntu documentation for detailed information on adding a line to /etc/fstab.

If you need to use ncpmount, bear in mind you will have to use the -P option, as the user will not be able to enter a password if one is required. That being said, you could use a rc.local file to run ncpmount as part of the system startup. I recommend looking to the Ubuntu documentation for detailed information about rc.local.

Finally, after doing all that typing, I found this document on Novell's site. It's a walkthrough for setting up /etc/fstab to automatically mount a NetWare share on system startup. That may be all the guide you need.

Sorry, I had prepared more helpful links for you, but I don't have enough reputation to post more than one.

6
  • post them in chat and I'll add them in a comment or pass them on to a moderator
    – RolandiXor
    Nov 1, 2010 at 0:47
  • I need a reputation of 20 before I can use chat... thanks for the suggestions in any case.
    – ayan4m1
    Nov 1, 2010 at 2:52
  • Guess this reputation is really answer blocking you :(
    – AntonioCS
    Nov 1, 2010 at 10:47
  • I am already doing this, but I don't want it to log into only one account, I want a dialog that starts on startup to ask for a username and password.
    – daxvena
    Nov 3, 2010 at 22:40
  • Well, you'd presumably have to code that dialog as part of your application. Then run ncpmount from within your code using the captured credentials. I am not familiar with an extant piece of software that shows a graphical password prompt for ncpmount/mount. The only thing I can think of in terms of keeping other programs from running during this process would be to have a second thread in your code which would use 'ps' and 'kill' to try and detect other application starts and end them until the NetWare share has connected.
    – ayan4m1
    Nov 8, 2010 at 18:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .