TechnicalBooting lonely Linux

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  koswix  
 To:  Peter (BOUGHTONP)     
41672.61 In reply to 41672.48 
:'D

 ▪                    
             ┌────┐    ┌────┐                      
          │    │    │    │ ▪                    
          │    └────┘    │                      
          │   ──┐  ┌──   │ ▪                    
   ┌──────┤    ▪    ▪    │                      
  ┌┘      │              │ ▪                    
┌─┤       └──┐  │  │  ┌──┘                      
│ │          │ ││  ││ │   ┌─┐                   
│ │          └─┼┤  └┴─┴───┘ │                   
│ │           ─┘│           │                   
│ │   ┌──────┐  └┬──────────┘                   
  │   │      │   │                              
  │   │      │   │                              
  └───┘      └───┘                              
If Feds call you and say something bad on me, it may prove what I said are truth, they are afraid of it.

0/0
 Reply   Quote More 

 From:  koswix  
 To:  Drew (X3N0PH0N)     
41672.62 In reply to 41672.49 
Bastard. No need for that. Apologise to him.

 ▪                    
             ┌────┐    ┌────┐                      
          │    │    │    │ ▪                    
          │    └────┘    │                      
          │   ──┐  ┌──   │ ▪                    
   ┌──────┤    ▪    ▪    │                      
  ┌┘      │              │ ▪                    
┌─┤       └──┐  │  │  ┌──┘                      
│ │          │ ││  ││ │   ┌─┐                   
│ │          └─┼┤  └┴─┴───┘ │                   
│ │           ─┘│           │                   
│ │   ┌──────┐  └┬──────────┘                   
  │   │      │   │                              
  │   │      │   │                              
  └───┘      └───┘                              
If Feds call you and say something bad on me, it may prove what I said are truth, they are afraid of it.

0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  Peter (BOUGHTONP)     
41672.63 In reply to 41672.59 
Ahahah. Y'know, I noticed that when I made the post then completely forgot about it :D

I'mSoRRyBP (hug)
0/0
 Reply   Quote More 

 From:  Manthorp   
 To:  Drew (X3N0PH0N)     
41672.64 In reply to 41672.56 
I completely erased the card and reinstalled everything from scratch so everything's tickety-boo.

Yes, it does have inittab after all.  After a bit of mucking about I made this change to it and it worked, so thank you very much.  I've created an image of the installation with everything working, just in case of disaster.

Now I just have to install Ant's code and (maybe) it's done!

"We all have flaws, and mine is being wicked."
James Thurber, The Thirteen Clocks 1951
 
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  Manthorp      
41672.65 In reply to 41672.64 
I'm sure there must have been an easier way to do this, I might see if there's a method without using a window manager at all.

I would have hoped it would be boot to prompt, autologin, run lonely script.
0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  Manthorp      
41672.66 In reply to 41672.64 
Glad it's working.

You *should* now be able to just add the script you want to run to /etc/profile and it should run. That is if you're logging in automatically to a virtual terminal and not using a window manager. Ant's talk of window managers has me confused.

Edit: Although Ant's approach of running it as a daemon will make sure it comes back up if it crashes, which adding it to /etc/profile won't. So it's a better solution.
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  Drew (X3N0PH0N)     
41672.67 In reply to 41672.66 
You may not have used a window manager, I must admit I stopped reading a while back :$
0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  ANT_THOMAS     
41672.68 In reply to 41672.67 
////////// :O //////////
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  Drew (X3N0PH0N)     
41672.69 In reply to 41672.68 
One of my RPis has decided to stop working at 7:15 this morning. No light, pressure, outdoor temp or box room temp data for me today :((
0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  ANT_THOMAS     
41672.70 In reply to 41672.69 
:|

How will you manage?
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  Drew (X3N0PH0N)     
41672.71 In reply to 41672.70 
It is stressing me out :'(
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  Drew (X3N0PH0N)     
41672.72 In reply to 41672.70 
Look at the missing data!!!

Attachments:

0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  ANT_THOMAS     
41672.73 In reply to 41672.72 
I need to know the temperature of your box :((
0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  Drew (X3N0PH0N)     
41672.74 In reply to 41672.73 
37°C
0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  ANT_THOMAS     
41672.75 In reply to 41672.74 
Hot.
0/0
 Reply   Quote More 

 From:  graphitone  
 To:  Drew (X3N0PH0N)     
41672.76 In reply to 41672.75 
Filth.
0/0
 Reply   Quote More 

 From:  Manthorp   
 To:  Drew (X3N0PH0N)     
41672.77 In reply to 41672.66 
MY 'lonely' search index.js now lives and runs perfectly happily in /pi/.  So are you suggesting I  just add something like
Quote: 
. /home/pi/node index.js.sh
to the end of /etc/profile? I'm basing that on THIS article.  I'm cautious of doing anything that might fuck up my access to the terminal window on boot, so I want to get my code right.

"We all have flaws, and mine is being wicked."
James Thurber, The Thirteen Clocks 1951
 
0/0
 Reply   Quote More 

 From:  Manthorp   
 To:  Manthorp      
41672.78 In reply to 41672.77 
I've also found THIS.  The "solution that works on bootup to the console" takes a very different approach.

"We all have flaws, and mine is being wicked."
James Thurber, The Thirteen Clocks 1951
 
0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  Manthorp      
41672.79 In reply to 41672.78 
After boot means before login. That would launch your script as a daemon and would not (by default) output anywhere. The script's parent would be the init process rather than a particular terminal, like.

You want to launch the script as the child of the terminal after login, so you get output. So the best approach is to add it to /etc/profile (or ~/.bashrc (assuming you're using bash (you probably are))). /etc/profile will be run for any user that logs in whereas ~/.bashrc is specific to your user. Either is fine.

The code in your post above isn't quite right. You want to run your script with the node binary. The node binary is in your path (i.e. you can just call it by name like other system binaries). So you want to do:
 
Code: 
node /path/to/your/file.js

(I don't know why your index.js has a .sh extension. It shouldn't. It won't hurt but it's not right)

(The dot in your example is used to tell the shell to execute something that's not in your path. Since we're running node itself and then executing your script with node, you don't need it here)
 
0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  Manthorp      
41672.80 In reply to 41672.77 
Oh and:

>I'm cautious of doing anything that might fuck up my access to the terminal window on boot, so I want to get my code right.

You have many TTYs (terminals, basically) available. I don't know which one Debian uses at boot but you can press ctrl+alt+f1, f2, f3 etc. to get to the others.

Also you can stop the running script with ctrl+c.
0/0
 Reply   Quote More 

Reply to All  
 

1–20  21–40  41–60  61–80  81–100  101

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats