Giter VIP home page Giter VIP logo

raspi-config's People

Contributors

alkarex avatar asb avatar mircea-vutcovici avatar rob-bishop avatar ryanteck avatar stonie avatar vpetersson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raspi-config's Issues

Add a OpenGLES functionality warning to the OpenGL page

Hi,

Enabling the OpenGL desktop acceleration support stops OpenGLES based apps from working; this is currently the expected behaviour: raspberrypi/firmware#556

As this will effect a number of OpenGL ES based applications and libraries (including the bundled VideoCore examples under /opt/vc) already in the wild, please could you add a warning on the settings page along the lines of:

"WARNING: Enabling this option disables OpenGL ES for both console only and desktop applications."

Thank you and all the best
Wayne

Changing overscan in raspi-config breaks config.txt overscan settings, screws up EmulationStation in RetroPie

The EmulationStation software in RetroPie depends on the setting overscan_scale=1 being set in /boot/config.txt. If you use raspi-config to change the overscan settings, however, it comments this line out and there is no way to fix it other than changing the file again manually. The error is here at line 165 (164-169 shown)

  if [ "$1" -eq 0 ]; then # disable overscan
    sed $CONFIG -i -e "s/^overscan_/#overscan_/"
    set_config_var disable_overscan 1 $CONFIG
  else # enable overscan
    set_config_var disable_overscan 0 $CONFIG
  fi

It's that sed $CONFIG -i -e "s/^overscan_/#overscan_/" that does it. After setting disable overscan, it comments out everything beginning with overscan_ in the file, breaking overscan_scale, and then does not uncomment when you re-enable overscan. As a result, EmulationStation's overscan settings break.

The cleanest way to do this would be to tag the commented lines, for instance by changing them from overscan_* to ##raspi-config##overscan_. Having three hashtags indicates that this was commented from raspi-config. Then, when we re-enable, just search for all ##raspi-config##overscan_ instances and replace back to overscan_.

Another way would be to just drop the line entirely - if we're setting disable_overscan=1, does it really matter if we have other overscan settings also set in the file? Overscan is disabled, so wouldn't it just ignore those?

I'd be happy to write a quick PR for this as it's two lines of code, but I'm not sure if this is being maintained.

Make compatible with Raspberry Pi Zero

Some of the settings are not usefull for the Raspberry Pi Zero. Please let's make this fully compatible with the Raspberry Pi Zero.

I can check to the code if this is OK.

raspi-config: configuring scratch login should fail if no pi user

When using raspi-config to configure raspbian to boot directly to Scratch, a problem occurs if the pi user has been renamed or removed.

/etc/inittab is modified to auto login the pi user without checking if the pi user exists - if the user has been renamed this causes the process to respawn 'too quickly' and the user is unable to login to the console.

I suggest that raspi-config should check that the pi user exists before proceeding to modify /etc/inittab.

Problem with resizing the filesystem

I just bought a new Sandisk Ultra 16GB MicroSDHC card with an SD adaptor and installed Raspbian onto it. For the first time, it booted fine. Then I resized the filesystem with this tool, and rebooted. It didn't boot anymore, it only gave hundreds of "error -110 transferring data" errors. So, I formatted the card, reinstalled the OS and tried again. The same thing happened. I reinstalled the OS again, and performed a manual resize of the filesystem (with fdisk and resize2fs). It worked.
It seems like that in some cases, the tool doesn't work properly. Could someone investigate this?

raspi-config package cannot be removed

Removing raspi-config fails on raspbian 2015-02-16-raspbian-wheezy image:
Please fix.
sudo dpkg --purge raspi-config
(Reading database ... 35768 files and directories currently installed.)
Removing raspi-config ...
Usage: /etc/init.d/raspi-config start
invoke-rc.d: initscript raspi-config, action "stop" failed.

dpkg: error processing raspi-config (--purge):
subprocess installed pre-removal script returned error exit status 3
update-rc.d: warning: default start runlevel arguments (2 3 4 5) do not match raspi-config Default-Start values (S)
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match raspi-config Default-Stop values (none)
[....] Checking if shift key is held down:Error opening '/dev/input/event*': No such file or directory
[ ok Switching to ondemand scaling governor.
Errors were encountered while processing:
raspi-config

Audio config auto

I just ran sudo raspi-config, went to advanced, audio and chose auto, enter.

The program responds with: There was an error running option A9 Audio.

In the terminal the following is printed: amixer: Control default open error: No such file or directory

Is this a dependency problem or is it because there is no jack or hdmi connected?

I'm running Rasbian Jesse on the Pi 2 (B).

I think the config tool is great! Maybe it would be nice to add support for user created (or maintained) scripts that can enable certain device and program specific configurations. Or make users able to share scripts to each other. So if i have a cousin with a pi and i have a pi running i can help remotely by sending a script with correct parameters to set stuff up. Or if i have a lot of pies in my network i can have them all execute a configuration script so the parameters are updated.

If there is already an obvious way of doing this I don't know of it.

Move to systemd

initscripts is deprecated, update the code to use systemd.

there was an error running option b1 desktop/cl1

I install raspian litte and write " sudo raspi-config"
can see the windows . when I want to set graphical desktop I have this error "
there was an error running option b1 desktop/cl1"
what is wrong?

curl: Missing dependency.

curl is clearly missing as a dependency in the debian/control file, since the "Add to Rastrack" portion of the script depends on it!

diff --git a/debian/control b/debian/control
index 3d63e64..d51f01d 100644
--- a/debian/control
+++ b/debian/control
@@ -10,5 +10,5 @@ Homepage: https://github.com/asb/raspi-config

 Package: raspi-config
 Architecture: all
-Depends: ${misc:Depends}, whiptail, parted, lua5.1, triggerhappy
+Depends: ${misc:Depends}, whiptail, parted, lua5.1, triggerhappy, curl
 Description: Simple configuration for Raspberry Pi

Wifi support ?

Anyone already working on setting SSID/psk in raspi-config ?

Boot options (e.g. to turn autologin on/off) don't work with Jessie Lite (or if /etc/init.d/lightdm doesn't exist)

(NOTE: This is a dupe of [https://github.com/RPi-Distro/issues/4] - I'm not sure where new issues are supposed to go.)

Hi

I've encountered a problem where I couldn't use raspi-config to switch between boot options, e.g. to turn console autologin for user pi on or off.

Having looked at the script, it looks like boot options can only change if /etc/init.d/lightdm exists - on non-graphical light installations where lightdm doesn't exist, such as Jessie Lite, that means it's impossible to change boot options using raspi-config.

How about changing-

      B1*)
--->    if [ -e /etc/init.d/lightdm ]; then                               <--- DELETE THIS LINE
          if [ $SYSTEMD -eq 1 ]; then
            systemctl set-default multi-user.target
            ln -fs /lib/systemd/system/[email protected] /etc/systemd/system/getty.target.wants/[email protected]
          else
            update-rc.d lightdm disable 2
            sed /etc/inittab -i -e "s/1:2345:respawn:\/bin\/login -f pi tty1 <\/dev\/tty1 >\/dev\/tty1 2>&1/1:2345:respawn:\/sbin\/getty --noclear 38400 tty1/"
          fi
--->    fi                                                               <--- DELETE THIS LINE
        ;;
      B2*)
--->    if [ -e /etc/init.d/lightdm ]; then                              <--- DELETE THIS LINE
          if [ $SYSTEMD -eq 1 ]; then
            systemctl set-default multi-user.target
            ln -fs /etc/systemd/system/[email protected] /etc/systemd/system/getty.target.wants/[email protected]
          else
            update-rc.d lightdm disable 2
            sed /etc/inittab -i -e "s/1:2345:respawn:\/sbin\/getty --noclear 38400 tty1/1:2345:respawn:\/bin\/login -f pi tty1 <\/dev\/tty1 >\/dev\/tty1 2>&1/"
          fi
--->    fi                                                               <--- DELETE THIS LINE
        ;;

To-

      B1*)
        if [ $SYSTEMD -eq 1 ]; then
          systemctl set-default multi-user.target
          ln -fs /lib/systemd/system/[email protected] /etc/systemd/system/getty.target.wants/[email protected]
        else
--->      [ -e /etc/init.d/lightdm ] && update-rc.d lightdm disable 2       <--- CHANGE TO THIS
          sed /etc/inittab -i -e "s/1:2345:respawn:\/bin\/login -f pi tty1 <\/dev\/tty1 >\/dev\/tty1 2>&1/1:2345:respawn:\/sbin\/getty --noclear 38400 tty1/"
        fi
        ;;
      B2*)
        if [ $SYSTEMD -eq 1 ]; then
          systemctl set-default multi-user.target
          ln -fs /etc/systemd/system/[email protected] /etc/systemd/system/getty.target.wants/[email protected]
        else
--->      [ -e /etc/init.d/lightdm ] && update-rc.d lightdm disable 2       <--- CHANGE TO THIS
          sed /etc/inittab -i -e "s/1:2345:respawn:\/sbin\/getty --noclear 38400 tty1/1:2345:respawn:\/bin\/login -f pi tty1 <\/dev\/tty1 >\/dev\/tty1 2>&1/"
        fi
        ;;

Thanks for all your hard work! Loving the Pi and about to get another soon. :)

Seasons Greetings
Julie
x

keyboard layout change may not take immediate effect in X

If the keyboard layout is changed after X11 has launched (with startx, or because boot to desktop has been selected on an earlier boot), Xorg does not appear to recognise the keyboard change until the next restart (or physical re-plug of the keyboard).

Rather than force a reboot after every change, I believe a sufficient solution is to add:

udevadm trigger --subsystem-match=input --action=change

Expand filesystem programmatically

I want to automatize the bootstrapping of a fresh Raspbian installation using an Ansible playbook. Is it possible to expand the filesystem with a one-off command, instead of having to start this manually from the menu?

Display IP address

As discussed here when the Pi boots up for the first time, raspi-config starts automatically and obscures the IP address that gets displayed.
This means that in the rare scenarios where you have a monitor and ethernet connected, but don't have a keyboard connected (?!), you can't see what the Pi's IP address is in order to connect to it via SSH. Having raspi-config display the Pi's IP address would fix this.

Overclocking init.d script should be properly installed

I think it would be sensible to install the init.d script for turning on the cpu scaler by always installing it, and using settings in /etc/default/ to control whether it is turned on or not.

At the moment, the first time you turn it on in the app, the script it enabled, and if you turn off overclocking, the script is never removed. By making it a properly installed script, it would be less complex.

I'm happy to code it up, but didn't want to make the effort if you were against the idea in principle :)

Needs 'ru' language support

As I mentioned on raspberrypi/noobs#125 the next version of NOOBS will add the Russian language, so the part of raspi-config that automatically sets the OS-language from the NOOBS-language will need to be updated too.

Raspbian 4.4 error on RPi 3 when trying to expand file system (Re-reading the partition table failed.: Device or resource busy)

On a fresh image of Raspbian 4.4, I get this error when trying to expand filesystem:

pi@raspberrypi:~ $ sudo raspi-config --expand-rootfs

Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): Disk /dev/mmcblk0: 7.5 GiB, 8068792320 bytes, 15759360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3c2bcb52

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 8192 137215 129024 63M c W95 FAT32 (LBA)
/dev/mmcblk0p2 137216 15759359 15622144 7.5G 83 Linux

Command (m for help): Partition number (1,2, default 2):
Partition 2 has been deleted.

Command (m for help): Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (2048-15759359, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (137216-15759359, default 15759359):
Created a new partition 2 of type 'Linux' and of size 7.5 GiB.

Command (m for help): Disk /dev/mmcblk0: 7.5 GiB, 8068792320 bytes, 15759360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3c2bcb52

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 8192 137215 129024 63M c W95 FAT32 (LBA)
/dev/mmcblk0p2 137216 15759359 15622144 7.5G 83 Linux

Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

Please reboot
pi@raspberrypi:~ $

Is that expected?

filtered over-clocking

wouldn't it be safer to have the overclocking setting to be filtered like
[pi1]
[pi2]
[pi3]
To reduce the risk of accidental over/underclock if using the same sd card across multiple models of the pi?

Add VNC

Install tightvncserver by default in Raspbian

Add 'Enable VNC Server on boot' option to raspi-config, which installs tightvncserver if it's not there and adds a VNC server init script on boot - or easily run script stored in /usr/local/bin - maybe this could be an option?

Migrate issues from spindle repo

Now that raspi-config has its own github repo, separate from spindle, maybe the raspi-config specific issues from the spindle repo could be moved here instead?

Admittedly I dunno if github allows you to do that...

Raspi-config is not approachable by the blind...

I was approached by a blind user who'd purchased a Raspberry Pi, and was very pleased with it, except for the initial set-up, which he was unable to successfully perform on Wheezy. This, in large part, was due to the fact that his "screen" did not discern any color differences for him, so that in raspi-config, he cannot tell what line is highlighted.

Could there be a way to make the menu more handicap-friendly? Such as placing an arrow (-->) on the currently selected line, or some other indicator? Or, could there be a way to start it, or drop out into a non-curses, text-only version, that would be more friendly to mechanical readers?

He has tried to go through it several times, with very little success. I'm hoping that someone at your end might be able to more easily address the issue than me trying to learn the logic being performed and modifying it for him.

raspi-config: Internationalisation Options - Selection

If you configure one of the "Internationalisation Options" "Change Locale", "Change Timezone" or "Change Keyboard Layout" the raspi-config tool jumps back to "Setup Options" intead of resting in the section "Internationalisation Options"

enable and disable camera prevents 16M split

An explicit start_file in config.txt prevents automatic selection of start_cd.elf when gpu_mem=16.

Probably the best fix is for disable camera to remove start_file and fixup_file, instead of setting them to the defaults. It would also be okay to set them to _cd when selecting the 16M split.

Comment Error

Since an error in comments is probably not a 'bug' I will put it here ...

The following comment line is obviously in error.
raspi-config
Line 153 # $1 is 0 to disable overscan, 1 to disable it

As per the code that follows it, the comment should read:

$1 is 0 to disable overscan, 1 to enable overscan.

Michael J Wells

#BUG raspi-config cause ext4 FS Corruption at FS resize

see discussion at raspberrypi/linux#289

!! ->>> missing ext4 fsck

 diff -ur /usr/bin/raspi-config.orig /usr/bin/raspi-config
--- /usr/bin/raspi-config.orig  2012-10-28 21:13:22.000000000 +0000
+++ /usr/bin/raspi-config       2013-05-09 14:40:58.981203727 +0000
@@ -52,6 +52,12 @@
 case "$1" in
   start)
     log_daemon_msg "Starting resize2fs_once" &&
+    #
+    # must force fsck bevor resize2fs
+    echo "Forced EXT4 fsck bevor resize2fs"
+    /sbin/fsck.ext4 -f  /dev/mmcblk0p2
+    sync
+    sleep 2
     resize2fs /dev/mmcblk0p2 &&
     rm /etc/init.d/resize2fs_once &&
     update-rc.d resize2fs_once remove &&

Init script contains errant backslash

You shouldn't be escaping the # when writing the init script. The backslash gets written to the script, so you end up with

modprobe i2c-dev
\# Calibrate the clock (default: 0x47). See datasheet for MCP7940N
i2cset -y $i 0x6f 0x08 0x47
modprobe i2c:mcp7941x
echo mcp7941x 0x6f > /sys/class/i2c-dev/i2c-$i/device/new_device
hwclock -s

misleading and hostile message in initial Raspbian setup

When selecting Advanced Options -> Hostname, I am greeted with the sentence "RFCs mandate that a hostname's labels may contain only the ASCII letters ...". This is patently false. RFCs do not "mandate" anything - they document consensus and suggest how to best interoperate with existing systems.

This philosophy is understood by anybody who is experienced in dealing with the technical aspects of Internet. However, as one of the goals of RPi is education, there will be many people for whom setting a hostname and taking charge of administering a node is a mind-opening experience, and this is one of the first screens they will see.

Especially at a time when governments everywhere are trying to contort the Internet into something they can control, language that leads people into thinking that the Internet only works due to some responsible authority setting "mandates" is a grave mistake.

Suggestion: change the wording to something like "For compatibility with other systems, a host name may contain only the letters ..."

Use sed instead of lua

Hi, I doesn't know what does these lua means but I think I can replace it with something else which is shorter and reduce the dependencies.

set_config_var() {
  lua - "$1" "$2" "$3" <<EOF > "$3.bak"
local key=assert(arg[1])
local value=assert(arg[2])
local fn=assert(arg[3])
local file=assert(io.open(fn))
local made_change=false
for line in file:lines() do
  if line:match("^#?%s*"..key.."=.*$") then
    line=key.."="..value
    made_change=true
  end
  print(line)
end
if not made_change then
  print(key.."="..value)
end
EOF
mv "$3.bak" "$3"
}

I think that function is to change arm_freq=700 to arm_freq=900. You can use sed in that way too:

function set_config_var() {
  grep -q "^$1=" $3 && sed -i "/^$1=/c $1=$2" $3 || echo "$1=$2" >> $3
  return 0  # search $1 and change "$1=*" to "$1=$2" or append "$1=$2" to EOF
}

And for the function to get the config values you can do it with sed too:

get_config_var() {
  lua - "$1" "$2" <<EOF
local key=assert(arg[1])
local fn=assert(arg[2])
local file=assert(io.open(fn))
for line in file:lines() do
  local val = line:match("^#?%s*"..key.."=(.*)$")
  if (val ~= nil) then
    print(val)
    break
  end
end
EOF
}

With sed:

get_config_var() {
  sed -n "s/$1=// p" $2
}

Sorry that I didn't send you a pull request as I don't think I should fork it just for these code. I hope you can reduce the dependencies and shorten the code by using a shorter function. Thanks.
Ivan Tham [email protected]

it's going back to main menu instead of submenu

If I choose Internationalisation Options, then choose for example Change Locale. After this has finished, I will end in the main Menu. I think it's better if it goes to Internationalisation Options automatically.

RFE - Expand filesize - option to reserve xx bytes/% of free space

I backed up an 8GB running Jessie install according to the directions on the foundation website.
I then restored the image to a new 8GB sd card - according to the foundation directions. The new card fails to boot because there is a problem:
bad geometry: block count exceeds size of device
After MUCH time I discovered my 8GB SD cards were not all the same - of eight 8GB cards, I have:
2 - 7,906,263,040 GB
4 - 7,948,206,080 GB
2 - 8,026,849,280 GB

This can lead to much woe. (as can be seen by doing a google search)


Request For Enhancement

Add an option to the raspi-config utility to expand to the full size of the sd card less x% or xx bytes.

If I had reduced by 2% I would have been able to restore any of those cards to any other of the cards with out the error.

Thanks

Minor: Formatting in Rastrack menu

In the menu for Rastrack, the description is strangely broken into 2 lines:

   ... This is just a bit of fun, not any sort of
   official
   registration.

Screenshot:
raspi

Package Information:

pi@raspberrypi ~ $ dpkg -p raspi-config
Package: raspi-config
Priority: extra
Section: unknown
Installed-Size: 70
Maintainer: Alex Bradbury <[email protected]>
Architecture: all
Version: 20150131-1
Depends: whiptail, parted, lua5.1, triggerhappy
Size: 12892
Description: Simple configuration for Raspberry Pi
Homepage: https://github.com/asb/raspi-config

Running raspi-config from command line does nothing

I'm running arch linux ARM OS for the raspberry pi (Linux alarmpi 3.6.11+ #346 PREEMPT Fri Dec 28 00:50:33 GMT 2012 armv6l GNU/Linux).

When I run the raspi-config (as root and normal user) script to extend my 2GB partition to 8GB, it just runs without any errors or output.

Any ideas?

Batch mode

Can you add a non interactive mode? E.g --resizefs ?

Adding support for more languages

Hi!

Since Raspbian is available in a lot of languages I think it would be nice if raspi-config could be multi-language, too.
Translation could have been done by the community of Raspberry Pi users.

Users could run raspi-config in another language (than English) by typing raspi-config --lang=XX, where XX would stay for the language code for a language - or raspi-config could include a screen where a user can select a language.

Detect whether filesystem has been expanded

Hi,

On my Pi setup/installation script, I use raspi-config --expand-rootfs but would like to tell whether or not the filesystem has been expanded, so that it doesn't repeatedly try to do it (when it has already been done).

Trawled through github without luck. I could create a temp file when it's been done, before rebooting, but wondered if anyone could help with something more comprehensive using df

Ideas welcome

Thanks

System errors after changing to hostname with a space

When entering an invalid hostname (ie, with a space), it will save the invalid hostname to /etc/hosts, but remove the space (unsure about other characters) and save the changed hostname to /etc/hostname. This causes some funny errors, such as "sudo: unable to resolve host"

Any reason why it doesn't prevent you from entering invalid hostnames in the first place?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.