RPI kiosk mode fullscreen epiphany - raspberry-pi

I have a raspberry pi 2 model B with Raspbian that i want to boot into fullscreen browser.
I can get it boot into the browser with the right url, but not in fullscreen.
I am using ths command line to boot it up.
epiphany-browser http://mylink.com
What should i do to get it into fullscreen?

install xautomation first:
sudo apt-get install xautomation
and then you can put this in a shell script:
#/!/bin/bash
epiphany-browser http://mylink.com &
sleep 15
xte "key F11" -x:0
Got it from link

Related

How to run foreground script after autologin to raspbian CLI

I have python script that runs in infinitve loop and gets input from keyboard. Works like a charm when I run it manually from CLI. I want to automate this process -> that it will start up automaticly after Rpi boot and login "pi" user.
I used raspi-config to setup autologin to CLI as "pi" user and then I want to run python script in foreground.
Right now Rpi boots -> login as pi user to CLI -> and waits for action. And here I want to have my script start
I tried to run it as a service or in crontab but it always runs in the background. I also tried running it through /etc/rc.local but it starts running before the login prompts which i don't want. I found some tutorials but all of them are for GUI and background processes. I thought that it will be quite easy but after several hours I decided to ask here.
My OS is
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.8 (stretch)
Release: 9.8
Codename: stretch
I run script -> python keyboardinput.py
I would invoke your script from /home/pi/.bashrc
Your script would run every time you login and a shell starts.

How can I activate a service after the desktop on raspberry pi (not immediately with boot)?

I want to launch an executable script python automatically. How can I activate a service after the desktop on raspberry pi?
I want to launch an executable script python automatically. How can I activate a service after the desktop on raspberry pi?
When I launched the service at the boot, it's failes (need some library python).
I'll try autostart, sudo nano /etc/rc.local and service.
Nothing works.
So, the answer i think is to launch the script automatically after boot.
Thanks a lot for your help
You can insert the script run in crontab, for it to run after a few seconds upon reboot. For example:
#reboot sleep 20 && /usr/bin/python my_script.py
Hope it helps!

How to run Google Assistant library (on AIY kit), upon startup of Raspberry Pi?

We set up a voice kit using Raspberry Pi (using "the MagPi essentials AIY Projects" manual). We are able to enable Google Assistant using the command "src/assistant_library_demo.py" in the dev terminal, after Raspberry Pi starts up. We would like to embed the voice kit in a stuffed animal with a portable power supply (i.e., used to charge cell phone on the go). But when the portable power supply is charged, the Raspberry Pi resets. That requires us to go back into the Raspberry Pi, open the dev terminal, and run the Google Assistant file.
My question: Is it possible to run a startup script that automatically runs Google Assistant upon Raspberry Pi starting up? How to do this?
I ended up creating a crontab job after a 10 second wait. Starting right at boot didn't give it enough time for the internet to connect fully.
In terminal type:
crontab -e
Choose an option if it asks how you want to open/edit the file. Then at the bottom put:
#reboot sleep 10 && /home/pi/pathtofile > /home/pi/cronlog 2>&1
Save the file and reboot or pull the cable out and plug it back in. The cronlog helped me troubleshoot this whole process and get feedback on why it didn't work.
Take a look at this page. It tells you how to set up a service which will run automatically.
If the link has gone bad, here is a short explanation of it:
Create a file called my_assistant.service in the src directory, and put in the following code
[Unit]
Description=My awesome assistant app
[Service]
Environment=XDG_RUNTIME_DIR=/run/user/1000
ExecStart=/bin/bash -c 'python3 -u src/my_assistant.py'
WorkingDirectory=/home/pi/AIY-projects-python
Restart=always
User=pi
[Install]
WantedBy=multi-user.target
Where the file says src/my_assistant.py, replace my_assistant with your program's filename. Now go to the folder that file the .sevice file is in, and run the command sudo mv my_assistant.service /lib/systemd/system/. This code moves the file to the services folder. Now you can run the following commands to change the service:
Enable the service- sudo systemctl enable my_assistant.service
Disable it- sudo systemctl disable my_assistant.service
Start it (just runs it once, enabling makes it run on startup)- sudo service my_assistant start
Stop it- sudo service my_assistant stop
See the logs, when the program was started and if an error occurred- sudo service my_assistant status

Rasperry Pi won't boot any more after installing upstart

I'm running Jessie 8.0 on a raspberry pi 2 B and it doesn't boot completely anymore after installing upstart
sudo apt-get install upstart
FYI: Apache, PHP, MySQL, KODI were installed upfront
What can I do? Could I try to uninstall upstart?
Thanks in advance
Just ran into this headache this morning on my Raspberry Pi 3. You can use Recovery / Single User Mode to fix this.
Plug in a keyboard and HDMI connection to the Pi.
Repeatedly press shift while booting to get to the recovery console.
Press 'e' to edit config, use tab and arrow keys to navigate to cmdline.txt
Add "init=/bin/bash" to the end as the last argument
Press "OK", and then hit the escape key to continue booting
After the boot sequence looks like it has stopped (mine looked like it had frozen mid-boot, don't worry), try pressing enter to get a CLI prompt
Type /etc/init.d/mountall.sh
Type mount -n -o remount,rw / (This mounts the root of SD Card)
At this point most commands should be functional, now you can use Escounda's answer and type: sudo apt-get purge --auto-remove upstart
After a reboot everything should be back to normal with no OS reinstall required! Don't forget to remove "init=/bin/bash" from your cmdline.txt when you're finished.
I'm probably late to the party, but I had the same issue yesterday (Pi won't boot, no way to use apt to remove upstart)
So I installed Ubuntu in a VM and chrooted into my SD Card (See https://raspberrypi.stackexchange.com/a/24011/13597 for more informations about this)
Then removed upstart just like in Escounda's second post
I managed to boot again by removing upstart:
sudo apt-get purge --auto-remove upstart
This command will also automatically reinstall systemd-sysv

How to connect Raspberry-Pi with laptop Monitor

Is there any way to make my raspberry-pi to be displayed on my laptop monitor? If so please guide the steps to do so.
Only if you do it via a network
Install tight VNC: sudo apt-get install tightvncserver
Start a VNC session vncserver :1 -geometry 1024x728 -depth 24
Install Tight VNC client on your laptop and connect