WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to add GUI to piCore64  (Read 1533 times)

Offline Wildcat

  • Newbie
  • *
  • Posts: 11
How to add GUI to piCore64
« on: October 21, 2021, 01:06:46 PM »
Hi all,

Total Noob here with RPI4+ 8GB RAM and wifi.
I got the CLI working fine and played around.
Now I'm trying to get the GUI and WIFI working.

I need to find out the proper steps, (and which TCZs to install).

Any help is greatly appreciated.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10313
Re: How to add GUI to piCore64
« Reply #1 on: October 21, 2021, 01:27:20 PM »
Hi Wildcat
Welcome to the forum.

For a GUI, try installing Xorg, flwm, aterm, and wbar.

Offline Wildcat

  • Newbie
  • *
  • Posts: 11
Re: How to add GUI to piCore64
« Reply #2 on: October 21, 2021, 02:59:42 PM »
Thank you Rich! I have a GUI running now.

Now, to the second part of my question: how do I activate the WIFI?

Thanks again!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10313
Re: How to add GUI to piCore64
« Reply #3 on: October 21, 2021, 05:53:03 PM »
Hi Wildcat
I guess the first thing we need to know is what kind of wireless device you have. Install  usbutils  and run:
Code: [Select]
lsusb > lsusb.txt
Then either post the contents of  lsusb.txt  or attach  lsusb.txt  to your next post.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 13944
Re: How to add GUI to piCore64
« Reply #4 on: October 21, 2021, 10:31:19 PM »
To use the RPi3/4 built-in wifi:

* load the firmware-rpi-wifi extension (this must be loaded first)
* load the wifi extension
* execute "sudo wifi.sh"

Offline Wildcat

  • Newbie
  • *
  • Posts: 11
Re: How to add GUI to piCore64
« Reply #5 on: October 25, 2021, 12:02:49 PM »
Thank you Juanito and Rich for your reply.

iwconfig recognizes the builtin wifi, but is unable to connect to my router.

The issue is that the router has a hidden ssid (I know it's not making the network more secure).

In RPI OS I would normally edit a wpa_supplicant.conf file as follows:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
country=US
update_config=1

network={
   scan_ssid=1
   ssid="MY Hidden Router Name"
    psk="My password"
   key_mgmt=WPA-PSK
}

From what I found on the internet, I should modify a couple of lines:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=staff

But I was unable to find wpa_supplicant.conf

Can you instruct me on the proper procedure in PiCore?

Thanks again for the kind help!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10313
Re: How to add GUI to piCore64
« Reply #6 on: October 25, 2021, 01:51:21 PM »
Hi Wildcat
I don't see  wpa_supplicant.conf  listed in the  wpa_supplicant  extension. If you create a  wpa_supplicant.conf
file, you can tell  wpa_supplicant  where to find it on startup using the  -c  option:
Code: [Select]
wpa_supplicant -c /Path/To/wpa_supplicant.conf

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 839
Re: How to add GUI to piCore64
« Reply #7 on: October 25, 2021, 02:22:31 PM »
the wifi.sh script provided will not work with hidden wifi.  You will need to manage the connection manually.

Write your wpa_suppliant.conf manually,  save it and make sure it's backed up.

Then write a script to start wpa_supplicant and manage dhcp.

Offline Wildcat

  • Newbie
  • *
  • Posts: 11
Re: How to add GUI to piCore64
« Reply #8 on: October 28, 2021, 04:02:28 PM »
:D  It works! :D

The main steps are:

1. Create hashed password for your network  (temporarily in your home directory or wherever you choose):

Code: [Select]
wpa_passphrase [your_wifi_SSID] [your_plaintext_passphrase] > wpa_supplicant.conf

2. Edit the resulting file (wpa_supplicant.conf), using your favorite editor. It should end up looking like this:

Code: [Select]
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=staff


country=US                         (change to your own country 2 letter code)
update_config=1


network={
   scan_ssid=1                     (use this line only for hidden SSID)
   ssid="MY network Name".     
   #psk="My plain text password"    (remove this line to maintain secrecy)
   psk="My hashed password"         (This is the result of wpa_passphrase)
   key_mgmt=WPA-PSK
}

3. Copy the file to it's destination, set ownership and copy to /opt/.filetool.lst as follows:
Code: [Select]
sudo cp wpa_supplicant.conf /etc/
sudo chown root.root /etc/wpa_supplicant.conf
sudo chmod 600 /etc/wpa_supplicant.conf
echo "etc/wpa_supplicant.conf" >> /opt/.filetool.lst

4. Activate  wpa_supplicant (use the exact line - do not substitute anything):
Code: [Select]
sudo /usr/local/sbin/wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf

---- Continue below ----

Offline Wildcat

  • Newbie
  • *
  • Posts: 11
Re: How to add GUI to piCore64
« Reply #9 on: October 28, 2021, 04:24:02 PM »
---- Continued from above ----

5. Activate dhcp (use the exact line - do not substitute anything):
Code: [Select]
sudo /sbin/udhcpc -b -i wlan0 -x hostname $ (hostname) -p /var/run/udhcpc.wlan0.pid

6. If all is well, you should have wifi working. If not, the original post by kissmurphy has more details that may be helpful:
(http://forum.tinycorelinux.net/index.php/topic,23445.msg147221.html#msg147221)

7. When everything works copy the commands from step 4 to /opt/bootlocal.sh. This way wifi will run on startup:
Code: [Select]
echo "/usr/local/sbin/wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf" >> /opt/bootlocal.sh

8. Copy the commands from step 5 to /opt/bootlocal.sh. This way dhcp will run on startup:
Code: [Select]
echo "/sbin/udhcpc -b -i wlan0 -x hostname $ (hostname) -p /var/run/udhcpc.wlan0.pid" >> /opt/bootlocal.sh

9. The final instruction will make the above instructions persistent (back up, next startup the system will remember these instructions):
Code: [Select]
filetool.sh -b

Thanks again for your kind help!

Offline Wildcat

  • Newbie
  • *
  • Posts: 11
Re: How to add GUI to piCore64
« Reply #10 on: October 28, 2021, 04:36:53 PM »
Hi all,

In the previous post I had to insert a space character in step 5 and step 8 between the $ sign and (hostname) right after it, because the server refused to accept them next to one another.
If you need to use this procedure, kindly remove the space when entering these lines in your machine.

Perhaps an experienced user could instruct me how to enter such information?

Thanks
WildCat