TechnicalBooting lonely Linux

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 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 

 From:  Manthorp   
 To:  Drew (X3N0PH0N)     
41672.81 In reply to 41672.79 
*\o/* *\o/* *\o/* *\o/* *\o/* *\o/*  (imarealboy)  (hug)

Thanks Xen, thanks Ant!!!

"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.82 In reply to 41672.81 
(cheer)
0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  Manthorp      
41672.83 In reply to 41672.81 
I'm sure you won't want to touch this now for a while *but*...

You're running it on a virtual terminal now which is all good and that but you don't have much control over how it looks. You can set the font (from a very limited range of pixel fonts) and that's about it.

*If* you booted to a window manager and ran your script in a terminal within that you'd then be able to choose a nicer font (a ttf font), set up the colours and also (maybe more importantly) support any emoji people might use in their tweets (by installing symbola, should be in the repos) which can look quite nice on the terminal, like so.

I'd be happy to write you a config for i3 which launches a terminal fullscreen and runs your script.

 
0/0
 Reply   Quote More 

 From:  koswix  
 To:  Drew (X3N0PH0N)     
41672.84 In reply to 41672.83 
What that font?

 ▪                    
             ┌────┐    ┌────┐                      
          │    │    │    │ ▪                    
          │    └────┘    │                      
          │   ──┐  ┌──   │ ▪                    
   ┌──────┤    ▪    ▪    │                      
  ┌┘      │              │ ▪                    
┌─┤       └──┐  │  │  ┌──┘                      
│ │          │ ││  ││ │   ┌─┐                   
│ │          └─┼┤  └┴─┴───┘ │                   
│ │           ─┘│           │                   
│ │   ┌──────┐  └┬──────────┘                   
  │   │      │   │                              
  │   │      │   │                              
  └───┘      └───┘                              
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:  koswix     
41672.85 In reply to 41672.84 
Ubuntu Mono. I really like the Ubuntu fonts.

(Tangentially related, Red Hat just released a libre font which is also rather nice)
0/0
 Reply   Quote More 

 From:  Manthorp   
 To:  Drew (X3N0PH0N)     
41672.86 In reply to 41672.83 
Firstly, damn blast shit and bugger: it's suddenly stopped booting into the application.  It autologs-in ok, but then stops on the attached error message.  Have you any thoughts or sage advice?

(Edit: mended, thank fuckery.  I reinstalled twit)


Secondly, I rather like the minimal interface, but I agree that a little low-key tweaking as per your illustration would improve the legibility, so I think I'm up for trying it

"We all have flaws, and mine is being wicked."
James Thurber, The Thirteen Clocks 1951
 

Attachments:

0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  Manthorp      
41672.87 In reply to 41672.86 
Looks like Gzip doesn't like what it's getting from Twitter. Is it persistently doing this or is it a one off? Also check you're actually connected to the net.

(I'll get the script and test it here. In the meantime I'll make another post with instructions as to how to launch this all in a WM)
 
0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  Manthorp      
41672.88 In reply to 41672.86 
First you need to edit /etc/profile and comment out that line you added (put a # at the start of the line) since we don't want it auto-running that script on the login terminal any more.

Now install i3 and the stuff needed to make it usable.
 
Code: 
sudo apt-get install xorg xinit i3 i3status dmenu



I *think* that'll pull in all the needed dependencies on Debian.

Now make/edit ~/.bash_profile to start X automatically:
 
Code: 
nano ~/.bash_profile



And add this at the bottom (if the file is empty just add this):
 
Code: 
[[ -z $DISPLAY && $XDG_VTNR -le 3 ]] && startx



(This assumes that you're logging in on VT3 or lower, if you're not we'll cross that bridge then)

Now make/edit ~/.xinitrc to make it start i3 when X starts:
 
Code: 
nano ~/.xinitrc



And add this at the bottom:
 
Code: 
exec i3


Now make the i3 config file:
 
Code: 
nano ~/.i3/config

And put the following in it:
 
Code: 
set $mod Mod4

# start a terminal
bindsym $mod+Return exec xfce4-terminal --hide-menubar

# kill focused window
bindsym $mod+Shift+q kill

# start dmenu (a program launcher)
bindsym $mod+d exec --no-startup-id dmenu_run

# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"

new_window 1pixel
hide_edge_borders both

exec --no-startup-id xset -dpms;xset s off
exec --no-startup-id xfce4-terminal -e "node /path/to/index.js" --hide-menubar --hold

Reboot and it *should* work. The i3 bar shouldn't show, but if it does let me know and I'll sort it (I'm using a more recent i3 than Debian has and the config has changed so it's tricky to test).

That's a very minimal config. All you can do is close windows (win+shift+q), open a terminal (win+enter) and also launch programs by pressing win+d and then typing their name. To exit i3 press win+shift+e.


 
0/0
 Reply   Quote More 

 From:  Manthorp   
 To:  Drew (X3N0PH0N)     
41672.89 In reply to 41672.88 
Wow!  Thanks Xen.  I have to make the house a little less squalid for guests now, but I'll try this as soon as I can.

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

 From:  koswix  
 To:  Drew (X3N0PH0N)     
41672.90 In reply to 41672.88 
In Windows he'd just need to put a shortcut to LONELY.EXE I'm the startup folder.

Just sayin'.

:C

 ▪                    
             ┌────┐    ┌────┐                      
          │    │    │    │ ▪                    
          │    └────┘    │                      
          │   ──┐  ┌──   │ ▪                    
   ┌──────┤    ▪    ▪    │                      
  ┌┘      │              │ ▪                    
┌─┤       └──┐  │  │  ┌──┘                      
│ │          │ ││  ││ │   ┌─┐                   
│ │          └─┼┤  └┴─┴───┘ │                   
│ │           ─┘│           │                   
│ │   ┌──────┐  └┬──────────┘                   
  │   │      │   │                              
  │   │      │   │                              
  └───┘      └───┘                              
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:  koswix     
41672.91 In reply to 41672.90 
Which, again, is exactly what you'd do on a consumer level distro with a consumer level desktop.
0/0
 Reply   Quote More 

 From:  koswix  
 To:  Drew (X3N0PH0N)     
41672.92 In reply to 41672.91 
(nod)

I was talking about windows 10 IOT edition for raspberry pi.

 ▪                    
             ┌────┐    ┌────┐                      
          │    │    │    │ ▪                    
          │    └────┘    │                      
          │   ──┐  ┌──   │ ▪                    
   ┌──────┤    ▪    ▪    │                      
  ┌┘      │              │ ▪                    
┌─┤       └──┐  │  │  ┌──┘                      
│ │          │ ││  ││ │   ┌─┐                   
│ │          └─┼┤  └┴─┴───┘ │                   
│ │           ─┘│           │                   
│ │   ┌──────┐  └┬──────────┘                   
  │   │      │   │                              
  │   │      │   │                              
  └───┘      └───┘                              
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:  koswix     
41672.93 In reply to 41672.92 
Yeah, by 'desktop' I meant desktop environment. So Gnome or KDE or Unity or Cinnamon or Mate or Pantheon. As opposed to a niche tiling WM.
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Drew (X3N0PH0N)     
41672.94 In reply to 41672.63 
I forgive you only because you revealed i3 to me.

Seems to be much more what I want compared to awesome - at least based on the screens+docs on the website; dunno when I'll have time to get switched over. :(

0/0
 Reply   Quote More 

 From:  koswix  
 To:  Drew (X3N0PH0N)     
41672.95 In reply to 41672.93 
Yes, but by Windows 10 IOT edition for raspberry pi I meant "hahaha wtf are Microsoft on? Do they seriously expect /anyone/ to ever use that heap of shit? I mean, they sent me an Intel galileo board f with a windows 8 build that runs on it, for /free/, and I didn't even have the deceny to boot it up before I formatted the SD card
0/0
 Reply   Quote More 

 From:  Drew (X3N0PH0N)  
 To:  Peter (BOUGHTONP)     
41672.96 In reply to 41672.94 
I fucking love i3.

I'd tried to use tilers before, just to see why people like them so much, and never got on with them. I certainly never thought I'd switch to one, I was just curious. But i3 just instantly clicked for me.

I use it without any bar now (bar gradually seemed less useful), just keyboard based window management and dmenu (edit: just switched to rofi, it's pretty great) for launching.
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