The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Hot answers tagged

241

Open Terminal and type: cat /etc/os-release This results in the following output on my Raspberry Pi 2... PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)" NAME="Raspbian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www....


74

This is an X power-saving thing. Firstly, you may need to install xset, a lightweight application that controls some X settings. apt-get install x11-xserver-utils Now open up your ~/.xinitrc file (if you don't have one then create it) and enter this: xset s off # don't activate screensaver xset -dpms # disable DPMS (Energy Star) features....


70

To enable ssh at startup, backup boot.rc on the boot partition on the SD image and replace it with boot_enable_ssh.rc I don't know about your router, but you may be able to configure it to reserve a fixed IP address for the MAC address of your Pi.


52

Copy boot_enable_ssh.rc to boot.rc from /boot in the Raspberry Pi's rootfs (SD card) Still in the Raspberry Pi's rootfs, edit /etc/network/interfaces in order to have a fixed IP address assigned (so no DHCP server is needed). For example, auto lo eth0 iface lo inet loopback iface eth0 inet static address 192.168.0.202 netmask 255.255.255.0 ...


47

Check for the existence of the directory: /lib/arm-linux-gnueabihf the soft-float version do not have this directory, they have: /lib/arm-linux-gnueabi instead, or you can list the packages installed using: dpkg -l and see the platform in the third column (all/armhf/armel)


39

You need to reconfigure you keyboard mappings. At the command line type: sudo dpkg-reconfigure keyboard-configuration Follow the prompts. Then restart your RasPi. sudo reboot Or sudo nano /etc/default/keyboard find the line where it says XKBLAYOUT=”gb” and change the gb to the two letter code for your country (e.g. US). And restart your RasPi. If ...


36

None of the boot_enable_ssh.rc stuff exists in current Raspian builds. You boot, a nice graphical menu gives you some options (including whether SSHD should load at boot) and then dumps you out on a command line. That's great if... you're a graphical user. If you're not, you're left in the position where you have to somehow externally run update-rc.d. All ...


26

The other solutions here did not work for me (fresh Raspbian, boot to GUI). Instead, this worked: Open up /etc/lightdm/lightdm.conf using your favorite text editor (I prefer nano). Look for the line #xserver-command=X. Change it to xserver-command=X -s 0 dpms It should be at line 87 if things don't change. Save and reboot. Source


25

/dev/mmcblk0p2 is the root file system, so it is not easily unmounted. It could probably be re-mounted as read-only, but a simpler way is to schedule a fsck at the next reboot. sudo touch /forcefsck then reboot. Or reboot with shutdown -rF now which does the same. (from https://superuser.com/questions/401217/how-to-check-root-partition-with-fsck) ...


21

sudo stands for Super User Do; it allows you to run as another user, usually the super user (root), to carry out administrative tasks, such as update the software, change filesystems, and start daemons. root has the ultimate power and can run pretty much anything. It can, therefore, do a lot of damage to your system and in the worst case, you will have to ...


21

This is completely dependant on the Class of SD card you are using. A Class 4 card, which is the minimum recommended has an average read/write speed of 4 MB/sec. If you spend a little extra and buy a Class 10 card, you should find that the boot time is approximately 25% of the Class 4, as it should read at 10MB/sec. Using finnw's estimate that 24 seconds ...


20

Do not look at uname -a. That just shows kernel version. To find the distribution version, run: sudo apt-get install lsb-release lsb_release -a My RPi shows: No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 7.8 (wheezy) Release: 7.8 Codename: wheezy


19

To start, you will need to install pptpclient, this can be achieved by: sudo apt-get install pptp-linux Next, Create a file in /etc/ppp/peers with arbitrary name and the following contents: pty "pptp $VPNHOSTNAME --nolaunchpppd --debug" name $USERNAME password $PASSWORD remotename PPTP require-mppe-128 require-mschap-v2 refuse-eap refuse-pap refuse-chap ...


18

https://github.com/RPi-Distro/pi-gen/releases lists releases of Raspbian since 2016-05-10. To find your Raspbian distribution image release date (not the /etc/os-release information such as VERSION="8 (jessie)") on a running system: $ cat /etc/rpi-issue Raspberry Pi reference 2016-05-10 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, ...


16

These are the RAM splits and what they should be used for. 240/16 - This is best if you are going to be doing nothing graphical, for example if you were using the Pi as a server and have no GUI. 224/32 - This is probably best if you are using the pi with a basic graphical desktop environment, without 3D. 192/64 - The default, probably the best general ...


16

I have this problem, too, when I'm using my huge TV. Try this: setfont /usr/share/consolefonts/Lat15-TerminusBold20x10.psf.gz To see a list of available fonts: ls /usr/share/consolefonts/ The numbers at the end indicate width and height (though not always that exact!) No idea why config.txt is missing. However, you can use this: https://raw.github.com/...


15

I timed it on my Pi, and it took 24 seconds from powerup to login prompt. This is with a Transcend Class 6 4GB SD card loaded with Debian Squeeze. This is the card that is recommended by RS for use with the RasPi, so this may qualify as "typical" as many users will probably have this type of card.


14

Following massive botnet attacks in 2016 due to IoT devices being easily hacked with default passwords, Raspbian once again comes with SSH turned off by default (source). The fix is pretty easy, you just need to create a file in the boot partition (not the directory within the root filesystem) called ssh. To check if you're in the right partition, it ...


14

I think @Jivings answer may be better, but I have it in my notes to do this: Install apt-get install x11-xserver-utils Edit /etc/xdg/lxsession/LXDE/autostart Append these lines: @xset s noblank @xset s off @xset -dpms Possibly also comment out the line that says @xscreensaver -no-splash, so the complete file should look something like this: @lxpanel --...


14

raspi-config You can change the memory split using the raspi-config utility in either debian-wheezy or raspbian-wheezy. Just run the utility: sudo raspi-config then select the memory split option (its about the 8th one in the list).


14

The accepted answer is correct, but a really simple method is: dpkg --print-architecture If your system is using a hard float architecture, you will then see: armhf ARM Hard Float. :-)


14

The Gammu documentation suggests (but doesn't go into any detail of) a workaround, Edit: Atmel has an Application Note that nicely describes the enumeration process. Enumeration changes because it happens in a conversation between host, hub and device, and response timing from each of these may vary, even if the setup is identical from one reboot to the ...


13

Using the Debian 7 (Wheezy) beta image, SSH is installed and enabled by default. You just need to connect to it via its IP address. There are a few ways to work out what IP address the Raspberry Pi is on without having to run ifconfig on it directly, for example: Your router configuration pages may have a screen stating IP addresses for machines connected ...


13

Assuming you're using Raspbian, you need to find out which .deb file you need, and transfer those to your Raspberry Pi, and place them in /var/cache/apt/archives/partial, and then just use the command: sudo dpkg -i /var/cache/apt/archives/partial/xxxx where xxxx is the exact name of the .deb file you want to install If you need to find dependencies, http:/...


13

I have since learnt that the Raspberry Pi foundation uses this repository for generating their images: https://github.com/RPi-Distro/pi-gen This can be modified to create an image as desired.


12

I've never used Arch, so this list of advantages is based on reading their documentation, and summarising it as follows: Whilst Debian has a bigger repository of software, the Arch repositories include packages that wouldn't qualify as 'free' according to GNU (and therefore wouldn't be included in Debian repositories). Arch packages tend to be current, more ...


12

These instructions assume you have a working cross-compiler on the slave. Please read How to build a GCC 4.7 toolchain for cross-compiling? if you haven't. It is also useful to have make installed on the master. Installation First, we must install distcc. We shall use the prebuilt packages supplied by the operating systems' package management systems, but ...


12

I think there is a bug in the image. /etc/apt/sources.list contains 2 lines that look like this deb http://ftp.uk.debian.org/debian/ squeeze main deb http://ftp.uk.debian.org/debian/ squeeze main non-free To solve your problem, delete the first one. Whilst the lines aren't exact duplicate, they do specify duplicate repositories.


Only top voted, non community-wiki answers of a minimum length are eligible