Register FAQ Search Today's Posts Mark Forums Read

 2015-12-01, 09:48 #1 wildrabbitt   Jul 2014 3·149 Posts login on ubuntu Hi, I get william-MG-63MI-7059 login: when I boot up a ubuntu box (12.04). mprime is in the start up programs folder BUT DOES IT RUN BEFORE I'M LOGGED IN? I'd like to be able to only have to turn the machine on in the morning to get it working with mprime because I don't have a dedicated monitor for it. Is there something I can do to automatically login?
 2015-12-01, 10:41 #2 blip     Jan 2014 100100102 Posts I suggest the following procedure: Create a user called mprime with home dir /home/mprime Create folder /usr/lib/mprime and copy mprime and all related files to that folder. Get the two files "mprime" and "startmprime" from https://github.com/blipblip/mprime Copy mprime to /etc/init.d/mprime and make executable (sudo chmod +x /etc/init.d/mprime) Copy startmprime to /usr/lib/mprime/startmprime and make executable (sudo chmod +x /usr/lib/mprime/startmprime) Run "sudo update-rc.d mprime defaults". Next time you boot, mprime will start automatically. If you want to start it right away, run "sudo /etc/init.d/mprime start". To read/follow the status of mprime, run "tail -f /var/log/mprime.log" (exit with ^C) (I hope, I did not forget anything...)
 2015-12-01, 17:18 #3 wildrabbitt   Jul 2014 44710 Posts Thanks very much. Can I get those files from the command line? Would I need to install git?
2015-12-01, 17:24   #4
Xyzzy

"Mike"
Aug 2002

7,699 Posts

Quote:
 Originally Posted by wildrabbitt Can I get those files from the command line?
Code:
$wget https://github.com/blipblip/mprime/archive/master.zip --2015-12-01 11:23:07-- https://github.com/blipblip/mprime/archive/master.zip Resolving github.com (github.com)... 192.30.252.128 Connecting to github.com (github.com)|192.30.252.128|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://codeload.github.com/blipblip/mprime/zip/master [following] --2015-12-01 11:23:09-- https://codeload.github.com/blipblip/mprime/zip/master Resolving codeload.github.com (codeload.github.com)... 192.30.252.147 Connecting to codeload.github.com (codeload.github.com)|192.30.252.147|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1695 (1.7K) [application/zip] Saving to: ‘master.zip’ master.zip 100%[===============================================================================>] 1.66K --.-KB/s in 0.002s 2015-12-01 11:23:09 (796 KB/s) - ‘master.zip’ saved [1695/1695]$ ls -l master.zip
-rw-r--r-- 1 m m 1695 Dec  1 11:23 master.zip

\$ unzip master.zip
Archive:  master.zip
e4ae388ed1542f116dc41bfcf89a46b8c18f79b0
creating: mprime-master/
inflating: mprime-master/mprime
inflating: mprime-master/startmprime
Quote:
 Originally Posted by wildrabbitt Would I need to install git?
No.

Edit: You might need "wget" and "unzip". Use "sudo apt-get install wget unzip" to install them.

2015-12-01, 19:06   #5
wildrabbitt

Jul 2014

3×149 Posts

Thanks for that Xyzzy. I done what you said to do, now I'm trying to do this from the first post :

Quote:
 Create a user called mprime with home dir /home/mprime.

I understand I can do

but how do determine which directory becomes the home dir?

 2015-12-01, 19:11 #6 Xyzzy     "Mike" Aug 2002 7,699 Posts The system will create a folder called /home/username automatically.
2015-12-02, 14:54   #7
sixblueboxes

Feb 2013
Charlotte, North Carolina

1F16 Posts

Quote:
 Originally Posted by blip I suggest the following procedure: Create a user called mprime with home dir /home/mprime Create folder /usr/lib/mprime and copy mprime and all related files to that folder. Get the two files "mprime" and "startmprime" from https://github.com/blipblip/mprime Copy mprime to /etc/init.d/mprime and make executable (sudo chmod +x /etc/init.d/mprime) Copy startmprime to /usr/lib/mprime/startmprime and make executable (sudo chmod +x /usr/lib/mprime/startmprime) Run "sudo update-rc.d mprime defaults". Next time you boot, mprime will start automatically. If you want to start it right away, run "sudo /etc/init.d/mprime start". To read/follow the status of mprime, run "tail -f /var/log/mprime.log" (exit with ^C) (I hope, I did not forget anything...)
I've implemented this and it seems to be working well. On first try, though, I copied "mprime" from /usr/lib/mprime (instead of the "mprime" retrieved from https://github.com/blipblip/mprime). This had the unfortunate result of starting mprime as if it had never run before, and halting the other startup processes -- including the SSH server, so I had to go to the machine to fix this. I re-read the directions and realized my mistake.

I really like having a service I can start and stop, rather than typing "mprime &", and then stopping it by killing the process.

Last fiddled with by sixblueboxes on 2015-12-02 at 15:07 Reason: Forgot to say thank you :D

 2015-12-02, 16:35 #8 blip     Jan 2014 2×73 Posts Those two files actually are text files and can be read with any text editor. In case of an update of mprime, you can install as follows: Stop mprime: "sudo /etc/init.d/mprime stop" Copy new mprime version into folder /usr/lib/mprime, overwriting the old version (or copy /usr/lib/mprime/mprime to /usr/lib/mprime/mprime.28.7, if that is the old version you were running. Then you can easily revert to a know working version). Restart mpime: "sudo /etc/init.d/mprime start"
2015-12-05, 01:35   #9
wildrabbitt

Jul 2014

44710 Posts
need more4 help

Hi, still trying to get this working. Here are some questions I have which might help me do it :

Quote:
 I suggest the following procedure: Create a user called mprime with home dir /home/mprime Create folder /usr/lib/mprime and copy mprime and all related files to that folder.
When you say mprime and all related files do you mean the files you mention here :

Quote:
 Get the two files "mprime" and "startmprime" from https://github.com/blipblip/mprime
or the files I'd get if I get the tar.gz from mersenee.org?
Quote:
 Copy mprime to /etc/init.d/mprime and make executable (sudo chmod +x /etc/init.d/mprime)

1 : Can you confirm that this means there are two copies of mprime in different places?

2 : I can't find an init.d directory in /etc (I'm using 14.04 ubuntu). What should I do?

Last fiddled with by wildrabbitt on 2015-12-05 at 01:38

2015-12-05, 11:22   #10
blip

Jan 2014

2·73 Posts

Quote:
 When you say mprime and all related files do you mean the files you mention here :
No. I mean the software from here

Quote:
 1 : Can you confirm that this means there are two copies of mprime in different places?
No. One ist the real software, which has to reside in the folder /usr/lib/mprime. (form above link)
The other file is just a control file with the same name to setup the service running mprime.
Quote:
 2 : I can't find an init.d directory in /etc (I'm using 14.04 ubuntu). What should I do?
Look harder. This directory always is there, when you run ubuntu 14.04.

 2015-12-05, 17:20 #11 wildrabbitt   Jul 2014 3·149 Posts Thanks blip. I've done everything. I rebooted and ran tail -f /var/log/mprime.log and get there is no such file or directory. How can work out if mprime is running. Do I need to initialise it with some work before it automatically starts?

 Similar Threads Thread Thread Starter Forum Replies Last Post wombatman Linux 2 2015-08-22 07:08 michelin Information & Answers 1 2014-06-28 16:36 Rodrigo PrimeNet 10 2014-02-22 16:53 rudi_m PrimeNet 3 2008-10-27 08:46 Andi47 mersennewiki 10 2008-03-20 04:18

All times are UTC. The time now is 01:16.

Tue Oct 20 01:16:37 UTC 2020 up 39 days, 22:27, 0 users, load averages: 2.56, 2.15, 2.11