Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromium autostart fails to launch #1737

Closed
AYapejian opened this issue Apr 29, 2018 · 4 comments
Closed

Chromium autostart fails to launch #1737

AYapejian opened this issue Apr 29, 2018 · 4 comments

Comments

@AYapejian
Copy link

Creating a bug report/issue:

Required Information:

  • DietPi Version:
root@pi-display:~# cat /DietPi/dietpi/.version
6
7
  • SBC: RPi 3
  • PSU: 5v 3a noname
  • SD Card: Sandisk evo 32gb
  • uname:
root@pi-display:~# uname -a
Linux pi-display 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l GNU/Linux

Additional Information (if applicable):

  • Software title: Chroumium
  • Can this issue be replicated on a fresh installation of DietPi? Yes with Autostart set to Chromium

Expected behaviour:

Chromium should autostart

Actual behaviour:

X starts and crashes

Steps to reproduce:

Install Chromium and set to autostart, reboot

Did you submit a dietpi-bugreport?

No

Extra details:

Issue seems to be that the /Dietpi/dietpi/login calls xinit chromium however the bin is chromium-browser

My Fix

Really just need to rename the binary in the login script I believe but some of these switches / notes may be helpful to others.

  • touch /root/start-chrome.sh
  • chmod +x /root/start-chrome.sh
  • Add contents to file and save:
#!/bin/sh
# If using the 7" Pi LCD set below in /DietPi/config.txt
#    framebuffer_width=1024
#    framebuffer_height=614
# 	 gpu_mem_256=128
# 	 gpu_mem_512=128
# 	 gpu_mem_1024=128

# Command line switches https://peter.sh/experiments/chromium-command-line-switches/
# 	--test-type gets rid of some of the chromium warnings that you may or may not care about in kiosk on a LAN
#   --pull-to-refresh=1 
#   --ash-host-window-bounds="400,300"

url=${CHROMIUM_URL:-"http://URL_IF_NOT_SET"}
chromium_opts="--kiosk --test-type --force-tablet-mode"
xinit /usr/bin/chromium-browser ${chromium_opts} ${url}

# Change /DietPi/dietpi/login
# `xinit chromium` to `/root/start-chrome.sh`
  • Run with /root/start-chrome.sh and/or replace xinit chromium with /root/start-chrome.sh in /Dietpi/dietpi/login ( NOTE: New to dietpi, I'm guessing this would get overwritten during updates though )
@symbios24
Copy link

try the sh start-chrome.sh

@Fourdee Fourdee added this to the v6.8 milestone Apr 30, 2018
@Fourdee Fourdee self-assigned this Apr 30, 2018
@Fourdee
Copy link
Collaborator

Fourdee commented Apr 30, 2018

@AYapejian

Many thanks for the report and fix👍

We'll try to replicate.

@Fourdee
Copy link
Collaborator

Fourdee commented Apr 30, 2018

Confirmed.

Notes:

  • 🈯️ We can also remove the pre-req for desktop install.
  • 🈯️ We'll implement auto GPU mem split increase in dietpi-software during Chromium install.
  • 🈯️ We'll also implement a startup bash script for Kiosk and additional options, based on @AYapejian
  • 🈯️ Default set to 720P can be adjusted in script | Also need to resolve: https://github.com/Fourdee/DietPi/issues/1137 (still exists as an issue)

Fourdee referenced this issue May 2, 2018
+ Moved some functions to /func
+ Chromium autostart testing:
https://github.com/Fourdee/DietPi/issues/1737
Fourdee referenced this issue May 2, 2018
+ DietPi-Software | Chromium: No longer requires a desktop and can be
installed as a lightweight single use program, using dietpi-autostart to
run under kiosk mode. Many thanks to @AYapejian! 720p is the default
window size, please see
'/var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh' for
full options when running under 'dietpi-autostart' mode:
https://github.com/Fourdee/DietPi/issues/1737
@Fourdee
Copy link
Collaborator

Fourdee commented May 2, 2018

Completed, thanks again @AYapejian 👍

@Fourdee Fourdee closed this as completed May 2, 2018
@Fourdee Fourdee mentioned this issue May 13, 2018
Fourdee referenced this issue May 13, 2018
**v6.8**
(13/05/18)

**Changes / Improvements / Optimizations:**

General | All future DietPi images (v6.8 and onwards), now has serial console enabled by default for the 1st run setup. It will be disabled automatically after first run setup to save on resources, unless 'CONFIG_SERIAL_CONSOLE_ENABLE=1' is set in dietpi.txt: https://github.com/Fourdee/DietPi/issues/1759

General | DietPi.com website: Server has been upgraded to Debian Stretch, featuring HTTPS redirect.

General | FBset is no longer a pre-req package for DietPi systems. This will be removed on fresh installations (not existing, to avoid any package conflicts): https://github.com/Fourdee/DietPi/issues/1716

General | DietPi login script and globals init moved to /etc/profile.d/99-dietpi-login.sh. Ensuring any user on system with sudo permissions can load them. Global commands are also now supported across multiple users, eg: either 'sudo -i G_AGI pacakge' or 'G_SUDO G_AGI package': https://github.com/Fourdee/DietPi/issues/1477

General | G_WHIP*: Improved scaling detection based on character count and line count. We now also calculate character count per line, to determine if additional lines are required against X. In other words, it should be a more 'snug' fit :) https://github.com/Fourdee/DietPi/issues/1740

DietPi-Automation | 'AUTO_SETUP_RAMLOG_MAXSIZE' added to dietpi.txt. Sets max /var/log tmpfs size during 1st run. Requires v6.8 or higher image.

DietPi-Config | Native PC > Soundcard: 'firmware-intel-sound' is now installed automatically for Intel based CPUs.

DietPi-Drive_Manager | Added ability to adjust reserved blocks percentage on ext4 file system: https://github.com/Fourdee/DietPi/issues/1662

DietPi-Drive_Manager | Added ability to check and optionally repair a filesystem. Many thanks to MonZon for the feature request! rootFS and /boot checks will be added in v6.9, currently additional drives are supported by this feature https://github.com/Fourdee/DietPi/issues/1740

DietPi-Drive_Manager | Enabled access for virtual machines: https://github.com/Fourdee/DietPi/issues/1765

DietPi-LetsEncrypt | Lighttpd: SSL configuration upgrade according to Mozillas SSL generator: https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=lighttpd-1.4.35&openssl=1.0.1t&hsts=yes&profile=intermediate

DietPi-LetsEncrypt | Minor code and error handling improvements, as well increasing transparency of what the script is currently doing: https://github.com/Fourdee/DietPi/pull/1738

DietPi-Process_tool | Rewrite of save file, to allow for stringed entries. The save file will be cleared during the update, to support this feature: https://github.com/Fourdee/DietPi/issues/1750

DietPi-Process_tool | Added Plex Media Server to process tool, however, transcoding will not be affected by this: https://github.com/Fourdee/DietPi/issues/1750#issuecomment-386826317

DietPi-Set_Hardware | Allo Piano firmware is now installed on demand and will be removed on update, if not chosen as soundcard: https://github.com/Fourdee/DietPi/issues/1656

DietPi-Software | AmiBerry (Amiga Emulator): Updated to v2.19, contains bug fixes and improvements: https://github.com/Fourdee/DietPi/issues/1707#issue-314377609

DietPi-Software | Chromium: No longer requires a desktop and can be installed as a lightweight single use program, using dietpi-autostart to run under kiosk mode. Many thanks to @AYapejian! 720p is the default window size, please see '/var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh' for full options when running under 'dietpi-autostart' mode: https://github.com/Fourdee/DietPi/issues/1737

DietPi-Software | Readymedia (MiniDLNA): Removed ALSA pre-req as it is not required. Many thanks to @bokiroki: https://github.com/Fourdee/DietPi/issues/1712

DietPi-Software | Pi-hole: Enabled support for FTLDNS: https://github.com/Fourdee/DietPi/issues/1696

DietPi-Software | Gitea: Updated to latest version (1.4), for new installations only. Many thanks to @yumiris: https://github.com/Fourdee/DietPi/pull/1723

DietPi-Software | PHPBB3: Latest version update (3.2.2), for new installations only.

DietPi-Software | Docker: Enabled for ARMv8 devices: https://github.com/Fourdee/DietPi/issues/1736

PREP | G_HW_MODEL: Added for 'OrangePi PC Plus'. Many thanks to @SuBLiNeR: https://github.com/Fourdee/DietPi/pull/1704

PREP | Optimized rootfs re-partition and resize. This will reduced the required initial system reboot count by one. Will take affect from official v6.8 DietPi images and onwards.

**Bug Fixes:**

General | Remote SCP/Rsync fix when running under 'dietpi' user: https://github.com/Fourdee/DietPi/issues/1703

General | ASUS TB: Resolved issues with onboard WiFi not being detected. Our latest image is required for this fix due to kernel: https://github.com/Fourdee/DietPi/issues/1760

General | Sparky SBC: Unmute USB-DAC audio fix applied during boot. Many thanks to @sudeep.

DietPi-Config | RPi onboard sound: Resolved an issue where changing from 3.5mm output back to auto, would not have any effect.

DietPi-Config | Resolved an error when selecting 'Sample Rate' CPU option.

DietPi-Drive_Manager | Resolved issues with incorrect detection of drives and mounts on Debian Stretch: https://github.com/Fourdee/DietPi/issues/1748

DietPi-Drive_Manager | Resolved issues RootFS transfer being stuck in a endless rsync loop: https://github.com/Fourdee/DietPi/issues/1748

DietPi-Drive_Manager | Resolved an issue where setting read only/write modes had no effect on fstab entries. This affected recent images only: https://github.com/Fourdee/DietPi/issues/1758

DietPi-Justboom | ALSA must now be installed, and /etc/asound.conf must exist, before this application can be run.

DietPi-LetsEncrypt | Now skips any webserver configuration edit, if CertBot execution returns with error: https://dietpi.com/phpbb/viewtopic.php?f=11&t=1909

DietPi-Software | Pi-SPC: PATH fix for sds.sh.

DietPi-Software | WiringPi: Now installed to '$HOME/WiringPi', previously this would be wiringPi-HEAD-8d188fa.

DietPi-Software | XRDP: Resolved an issue with blue screen running under Xorg. VNC4 is now installed by default, and the new connection method is 'Xvnc': https://github.com/Fourdee/DietPi/issues/1727#issuecomment-383858979

DietPi-Software | AmiBerry: Fix for standard boot SDL2 keyboard leaking to background. Please note fast boot is still affected by the SDL2 keyboard leak: https://github.com/Fourdee/DietPi/issues/1707

**Allo GUI v7:**
- Resolved errors with swapfile display/change.
- Resolved issues with CPU gov not being correctly applied.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants