Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Chicken and egg situation: In order to use my raspberry screen I need to boot in  (Read 2280 times)

ChairmanPoo

  • Bay Watcher
  • Send in the clowns
    • View Profile

So I am traveling and I got a raspberry pi 4 with a small screen. My only devices at home are said raspberry pi, a cellphone, and a laptop. I dont have a secondary screen. I need a secondary screen in order to use said screen because raspberry 4 wont display anything unless I type this

"sudo rm -rf LCD-show

git clone https://github.com/goodtft/LCD-show.git

chmod -R 755 LCD-show

cd LCD-show/

sudo ./LCD7C-show"



Any idea on how to replicate all that WITHOUT actually using a secondary screen?
Logged
There's two kinds of performance reviews: the one you make they don't read, the one they make whilst they sharpen their daggers
Everyone sucks at everything. Until they don't. Not sucking is a product of time invested.

bloop_bleep

  • Bay Watcher
    • View Profile

There's a 4 now? woah.
Logged
Quote from: KittyTac
The closest thing Bay12 has to a flamewar is an argument over philosophy that slowly transitioned to an argument about quantum mechanics.
Quote from: thefriendlyhacker
The trick is to only make predictions semi-seriously.  That way, I don't have a 98% failure rate. I have a 98% sarcasm rate.

ChairmanPoo

  • Bay Watcher
  • Send in the clowns
    • View Profile

There's a 4 now? woah.
*runs bloop_bleep out hitting him with a belt*

Unclean! Unclean!




Anyways: does ANYBODY have any ideas?
Logged
There's two kinds of performance reviews: the one you make they don't read, the one they make whilst they sharpen their daggers
Everyone sucks at everything. Until they don't. Not sucking is a product of time invested.

Ziusudra

  • Bay Watcher
    • View Profile

So I am traveling and I got a raspberry pi 4 with a small screen. My only devices at home are said raspberry pi, a cellphone, and a laptop. I dont have a secondary screen. I need a secondary screen in order to use said screen because raspberry 4 wont display anything unless I type this

"sudo rm -rf LCD-show

git clone https://github.com/goodtft/LCD-show.git

chmod -R 755 LCD-show

cd LCD-show/

sudo ./LCD7C-show"



Any idea on how to replicate all that WITHOUT actually using a secondary screen?
I don't understand why you would have to rm and then clone again ... but if the Pi has internet access to do the clone, couldn't you SSH to the Pi from the laptop?
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile

So I am traveling and I got a raspberry pi 4 with a small screen. My only devices at home are said raspberry pi, a cellphone, and a laptop. I dont have a secondary screen. I need a secondary screen in order to use said screen because raspberry 4 wont display anything unless I type this

"sudo rm -rf LCD-show

git clone https://github.com/goodtft/LCD-show.git

chmod -R 755 LCD-show

cd LCD-show/

sudo ./LCD7C-show"



Any idea on how to replicate all that WITHOUT actually using a secondary screen?
I don't understand why you would have to rm and then clone again ... but if the Pi has internet access to do the clone, couldn't you SSH to the Pi from the laptop?

Because the one removed is from the Raspberry Pi OS install (presumably) and the one reinstalled is modified so that it should give a working LCD screen.

But yes, remote access from the laptop via SSH seems like a good solution.

Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile

I would put the needful in /etc/rc.local

OR, create a script in /etc/init.d with the appropriate run level prefix in the filename.


Then I would put the needed console fu in there.
Ideally, you would only need to clone and compile one time though. After the binaries are built you just need to start them.


To make the modifications without a display, I would use SSH, from the laptop, using something like PuTTY.
« Last Edit: November 26, 2020, 11:38:30 pm by wierd »
Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile

Oh, I was assuming the problem was just bootstrapping for the first time.

put the needed console fu in there.

That is, edit /etc/rc.local with a text editor, for example using nano (but any would do)

Code: [Select]
sudo nano /etc/rc.local
and add the line (if I've got it correct...)

Code: [Select]
sudo /path/to/LCD7C-show &
replacing /path/to/ with the actual (absolute) path

Recommend testing that from the command line while SSH'd in, to make sure that it works properly.
« Last Edit: November 27, 2020, 12:30:20 am by feelotraveller »
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile

When invoking from the commandline in that fashion, you need to prefix the absolute path with a preceding period.

Also, /etc/rc.local executes with root privileges, and should not need to invoke sudo.

so, like this:

Code: [Select]

./Path/To/Executable/LCD7C-show &


Make sure that the executable is marked with the -x permission.
« Last Edit: November 27, 2020, 02:07:09 am by wierd »
Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile

Thanks for teaching me something.  :)  Namely that sudo is not needed when invoking commands from /etc/rc.local/.

I'm not sure about Raspberry Pi OS but on linux basically the . (in ./) is not needed when invoking the full path.

The executable had better have the -x permission or it will not run the first time around when installing the binary.  ;D
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile

Thats correct.  And, if it fails due to lack of -x permission, it will return an exit status other than 0, which will make the system's init return an error value, and make many GUIs fail to load.

So, very important.
Logged