How to set my Raspberry Pi to boot into the GUI?树莓派(raspberry)启用root账户

jackxiang 2013-8-20 19:40 | |
As from my previous question, I asked what the power off button in the corner does. Then somebody said if you boot into the GUI automaticlly, it will give you some options.
My question is,
How to boot into the GUI at start-up?
Thanks in advance.
Assuming that you are using Raspbian, it is actually rather simple to do what you ask. Simply open the terminal, and type in the following:
sudo raspi-config
The following window should show up
Navigate to boot_behaviour and click enter. This should make it so that the GUI interface starts automatically.
if you are using Archlinux, please install X11 server follow steps on Archlinux Beginners Guide first. and install your favorite WM,
1.Add those line to your ~/.xinitrc
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
if [ -d /etc/X11/xinit/xinitrc.d ]; then
   for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
   done
   unset f
fi
exec openbox-session ## i'm using openbox
#exec awesome
2.Start X when login, add the following to bottom of ~/.bash_profile if you use bash, or ~/.zprofile if your are using zsh. see more on Archlinux Wiki
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
shareimprove this answer
answered May 3 at 7:17
Yuan He
412
up vote
0
down vote
Read this article which explains how to auto login and auto start desktop http://www.opentechguides.com/how-to/article/raspberry-pi/5/raspberry-pi-auto-start.html
来自:http://raspberrypi.stackexchange.com/questions/7261/how-to-set-my-raspberry-pi-to-boot-into-the-gui

今天玩树莓派,需要安装些东西,老是sudo感觉不方便于是想直接用root。咦···?默认不是空密码?试下密码raspberry。还不对。那是神马??

    论他找了下,原来之前用centos习惯了,错觉,错觉!!

    
树莓派(raspberry)启用root账户:
树莓派使用的linux是debian系统,所以树莓派启用root和debian是相同的。
debian里root账户默认没有密码,但账户锁定。
当需要root权限时,由默认账户经由sudo执行,Raspberry pi 系统中的Raspbian
默认用户是pi 密码为raspberry
重新开启root账号,可由pi用户登录后,在命令行下执行
sudo passwd root
执行此命令后系统会提示输入两遍的root密码,输入你想设的密码即可,然后在执行
sudo passwd --unlock root
这样就可以解锁root账户了。
好了,搞定!
来自:http://my.oschina.net/quanpower/blog/135196

作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/6604/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!


最后编辑: jackxiang 编辑于2013-8-20 19:49
评论列表
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]