Go to advanced search

by nicnut210
Wed Nov 21, 2018 3:56 am
Forum: Beginners
Topic: if/else statement to run gui or no gui?
Replies: 5
Views: 881

Re: if/else statement to run gui or no gui?

Hey everyone. I giving this a bump. I never found out if this is how this code should look, or even if it's possible to do if/then statements in a shell script. Is that possible? if so is this the best way to execute what I am trying to do? value=$( tvservice -s “state 0x12000a [HDMI CEA (4) RGB lim...
by nicnut210
Sun Nov 18, 2018 10:04 pm
Forum: Beginners
Topic: if/else statement to run gui or no gui?
Replies: 5
Views: 881

Re: if/else statement to run gui or no gui?

HI Roken,

Well I use my Pi some of the time with the monitor and some of the time without the monitor. That's why I am asking about this if/else statement. it needs to be able to do both. Let me know what you think about the code in my first post and if that will work.

Thanks, Nick
by nicnut210
Sun Nov 18, 2018 9:04 pm
Forum: Beginners
Topic: if/else statement to run gui or no gui?
Replies: 5
Views: 881

Re: if/else statement to run gui or no gui?

Hi Roken, I understand that a full desktop is running even though a monitor is not plugged in. I can run Pure Data with a gui or withot a gui. If I am using the Pi headless I want to run Pure Data with no gui becuase that runs smoother and all the gui stuff slows down the software. I want the Pi to ...
by nicnut210
Sun Nov 18, 2018 7:53 pm
Forum: Beginners
Topic: if/else statement to run gui or no gui?
Replies: 5
Views: 881

if/else statement to run gui or no gui?

Hi, Upon booting up my Pi launches a shell script that opens up a python menu that lets me open up Pure Data files (music/sound software). Here is the code: #!/bin/bash cd /home/pi/pdrpi (sleep 10 && sudo python pd_menu.py) & I mostly run my Pi in a headless manner so I want to start using Pure Data...
by nicnut210
Sat Nov 17, 2018 11:13 pm
Forum: Beginners
Topic: [SOLVED] how to determine if something plugged into the HDMI port?
Replies: 3
Views: 541

Re: how to determine if something plugged into the HDMI port?

Thank you everyone for your replies. When a monitor was plugged into the HDMI port and I typed tvservice -s in the terminal I got back 0x12000a When I SSH into the Pi with nothing plugged into the HDMI port I got back 0x40001 I think this sounds right so I will mark this as solved. if it sounds wron...
by nicnut210
Fri Nov 16, 2018 10:33 pm
Forum: Beginners
Topic: [SOLVED] how to determine if something plugged into the HDMI port?
Replies: 3
Views: 541

[SOLVED] how to determine if something plugged into the HDMI port?

Hi, I have a project that will use a Pi in either a headless way or with a monitor plugged into the HDMI port. If nothing is plugged into the HDMI port I want to use my software without the gui because it's supposed to run a lot smoother. Is there a command in terminal I can run that will tell me if...
by nicnut210
Wed Oct 17, 2018 5:40 pm
Forum: Troubleshooting
Topic: trouble autstarting a shell script.
Replies: 2
Views: 188

Re: trouble autstarting a shell script.

Oh my god. Thank you this worked! I've been trying to figure this out for weeks.

I changed the autostart document in : /home/pi/.config/lxsession/LXDE-pi/

and added the line: @/home/pi/pdrpi/on_reboot.sh

Bam. It worked.

Thank you so much.

Nick
by nicnut210
Tue Oct 16, 2018 3:43 pm
Forum: Troubleshooting
Topic: trouble autstarting a shell script.
Replies: 2
Views: 188

trouble autstarting a shell script.

Hi, This is my first post on the forum. Thank you for all the info on here. I see a lot of people asking about autostarting a script upon rebooting the Pi. I have tried many things but none seem to work. I have a shell script called on_reboot.sh, it opens a python script that displays a menu on an L...

Go to advanced search