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

Fix for Arch Linux ARM on Raspberry Pi #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

terrywang
Copy link

A quick and ugly fix for screenfetch running on Arch Linux ARM @ Raspberry Pi.

ScreenFetch from master branch

terry@pi:~$ ./screenfetch
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.
                             terry@pi
                             OS: Archarm 
                             Kernel: armv6l Linux 3.10.4-1-ARCH+
         #####               Uptime: 3h 11m
        #######              Packages: Unknown
        ##O#O##              Shell: 606
        #######              Disk: 587M / 4.6G (13%)
      ###########            CPU: ARMv6-compatible processor rev 7 (v6l) @ 700MHz
     #############           RAM: 45MB / 460MB
    ###############         
    ################        
   #################        
 #####################      
 #####################      
   #################        



Looking at the code logic, looks like screenfetch is pulling distribution information from /etc/os-releases.

On Pi, the contents of the /etc/os-release file like below, the key issue is its ID => archarm. This file is a part of the filesystem package.

NAME="Arch Linux ARM"
ID=archarm
ID_LIKE=arch
PRETTY_NAME="Arch Linux ARM"
ANSI_COLOR="0;36"
HOME_URL="http://archlinuxarm.org/"
SUPPORT_URL="https://archlinuxarm.org/forum"
BUG_REPORT_URL="https://github.com/archlinuxarm/PKGBUILDs/issues"

This commit is a quick and ugly fix, may need a bit more polish when merged;-)

NOTE: Shell detection is another problem, I'll look into it later if I have time. lspci is causing error messages, may also need some code to handle it.

terry@pi:~$ ./screenfetch-dev
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.
                   -`
                  .o+`                 terry@pi
                 `ooo/                 OS: Arch Linux 
                `+oooo:                Kernel: armv6l Linux 3.10.4-1-ARCH+
               `+oooooo:               Uptime: 3h 13m
               -+oooooo+:              Packages: 159
             `/:-:++oooo+:             Shell: 606
            `/++++/+++++++:            Disk: 587M / 4.6G (13%)
           `/++++++++++++++:           CPU: ARMv6-compatible processor rev 7 (v6l) @ 700MHz
          `/+++ooooooooooooo/`         RAM: 46MB / 460MB
         ./ooosssso++osssssso+`       
        .oossssso-````/ossssss+`      
       -osssssso.      :ssssssso.     
      :osssssss/        osssso+++.    
     /ossssssss/        +ssssooo/-    
   `/ossssso+/:-        -:/+osssso+-  
  `+sso+:-`                 `.-/+oso: 
 `++:.                           `-/+/
 .`                                 `/

KittyKatt added a commit that referenced this pull request Aug 30, 2013
@ghost ghost assigned KittyKatt Aug 30, 2013
@KittyKatt
Copy link
Owner

@terrywang Please review the referenced commit and try it out, please.

@terrywang
Copy link
Author

@KittyKatt Works like a charm. Nicer fix, looks much better than my ugly fix ;-)

terry@pi:~/screenFetch$ ./screenfetch-dev 
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.
                   -`
                  .o+`                 terry@pi.terry.im
                 `ooo/                 OS: Arch Linux 
                `+oooo:                Kernel: armv6l Linux 3.10.9-1-ARCH+
               `+oooooo:               Uptime: 17m
               -+oooooo+:              Packages: 184
             `/:-:++oooo+:             Shell: 314
            `/++++/+++++++:            Disk: 705M / 4.6G (16%)
           `/++++++++++++++:           CPU: ARMv6-compatible  rev 7 (v6l) @ 700MHz
          `/+++ooooooooooooo/`         RAM: 52MB / 460MB
         ./ooosssso++osssssso+`       
        .oossssso-````/ossssss+`      
       -osssssso.      :ssssssso.     
      :osssssss/        osssso+++.    
     /ossssssss/        +ssssooo/-    
   `/ossssso+/:-        -:/+osssso+-  
  `+sso+:-`                 `.-/+oso: 
 `++:.                           `-/+/
 .`                                 `/

@KittyKatt
Copy link
Owner

I might be able to work on those other issues, too. Shell detection shouldn't be hard. Just gotta figure out the PPID walk pattern I need to do there. :)

@terrywang
Copy link
Author

Haven't got a chance to look into the detectshell_ver and detectshell functions yet, will do when I have time. I'll be more than happy to test if you've figured it out;-)

@KittyKatt
Copy link
Owner

@terrywang are you regularly on IRC? I would love to run some test commands with you at some point and it's easiest to do over IRC or some faster form of communication. :D

@terrywang
Copy link
Author

@KittyKatt Not regularly on IRC (freenode? which channel?). Send me an email and I'll do the test and reply back ASAP ;-)

@KittyKatt KittyKatt added the bug label Jul 30, 2014
@KittyKatt KittyKatt assigned KittyKatt and unassigned KittyKatt Sep 10, 2014
@konfou
Copy link
Contributor

konfou commented May 21, 2017

Why hasn't this been merged?

@KittyKatt
Copy link
Owner

Mostly because I've dropped support for this to @darealshinji due to many life issues I've had in the last several years. The good news is I'm hoping to hop on this wagon again not too long from now, later this year. Perhaps the highlight will help alert darealshinji and he'll see if he can merge. Sorry for the delay, I just lost the time I was using to work on this to lots of personal issues.

@darealshinji
Copy link
Collaborator

darealshinji commented Jun 2, 2017

I can manually merge this but I can't test if it works.

@darealshinji
Copy link
Collaborator

darealshinji commented Jun 4, 2017

Is this fix still needed? Doesn't the current code already detect ARM Arch Linux?

case "${distro_detect}" in
   [...]
   "archlinux"|"Arch Linux"|"arch"|"Arch"|"archarm")

[/etc/os-release detection ...]
  [[ "${distro}" == "Arch" || "${distro}" == "Archarm" || "${distro}" == "archarm" ]] && distro="Arch Linux"

@terrywang
Copy link
Author

This PR was created back in August 2013, I haven't been closely following the project for quite some time as I've switched to neofetch. I'll test using the master branch again on Arch Linux ARM running on my Pi and report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants