ubuntu 12.04 desktop amd64 android编译环境 - zbunix/building GitHub Wiki
怎样将mount_umount_cp_chown权限给普通test用户
要设置某用户能使用mount需要用root来设置 mount命令只有root可以执行 所以需要用sudo这个命令设置某用户在执行mount的时候也拥有root权限 sudo工具由文件/etc/sudoers进行配置,其实就是编辑这个文件 这个文件的编辑必须必须用visudo这个命令来编辑,不能用其他的记事本 zbunix@server:/bin$ sudo cat /etc/sudoers Defaults env_reset Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" root ALL=(ALL:ALL) ALL zbunix ALL=(ALL) ALL test ALL=NOPASSWD:/bin/mount,/bin/umount,/bin/cp,/bin/chown # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL
ubuntu 12.04中永久添加dns的方法
设置DNS: Ubuntu设置DNS,只要将DNS地址写入/ect/resolv.conf文件即可,但在12.04 desktop版中,重启系统之后,静态IP设置生效,但无法链接外网,/etc/resole.conf文件的DNS地址也覆盖掉了。 解决办法,在/etc/resolvconf/resolv.conf.d/目录下创建tail文件,写入 nameserver 202.96.134.133 nameserver 202.96.128.68 然后重启,DNS生效。 静态IP配置方法: 编辑/etc/network/interfaces,删掉内容,并输入以下几行(假设你的网卡是eth0) sudo gedit /etc/network/interfaces auto eth0 iface eth0 inet static //指定为static address 192.168.1.103 //IP地址 gateway 192.168.1.1 //网关 netmask 255.255.255.0 //子网掩码 network 192.168.1.0 //这个是网络? broadcast 192.168.1.255 //广播 然后重启网络设备 sudo /etc/init.d/networking restartubuntu-12.04-desktop-amd64.iso ================================ 重启窗口管理器lightdm =====================sudo restart lightdmGDM--------GTK KDM--------Qt XDM------ LightDM----$sudo dpkg-reconfigure gdm
xmanager使用的lightdm配置文件
$ vi /etc/lightdm/lightdm.conf [SeatDefaults] user-session=ubuntu greeter-session=unity-greeter greeter-hide-users=true allow-guest=false [XDMCPServer] enabled=true greeter-show-manual-login=true启用XDMCPServer
[XDMCPServer] enabled=true登陆界面不显示或隐藏用户列表
[SeatDefaults] greeter-hide-users=true关闭guest用户
[SeatDefaults] allow-guest=false需要手动输入用户名和密码
[XDMCPServer] greeter-show-manual-login=true$ sudo apt-get install gnome-shell装完之后注销,然后登录的时候选择Gnome即可
$ sudo apt-get install smbfs samba $ vi /etc/samba/smb.conf [global] workgroup = MYGROUP server string = Samba log file = /var/log/samba/log.%m max log size = 50 security = user passdb backend = tdbsam encrypt passwords=yes socket options = TCP_NODELAY include = /etc/samba/smb.conf.%G load printers = no printing = bsd printcap name = /dev/null disable spoolss = yes [homes] comment = Home Directories browseable = no writable = yes path = /home/%S/ard valid users = %S create mode = 0664 directory mode = 0775 [share] comment = os3-server samba path = /home browseable = yes writable = yes write list = @samba-all valid users = @samba-all create mode = 0664 directory mode = 0775 [Public] comment = Public path = /home/qnap/Public browseable = yes writable = yes write list = @samba-all valid users = @samba-all create mode = 0664 directory mode = 0775 $ vi /etc/samba/smb.conf-os-group [os-group] comment = os-group samba #path = /nwd-data/os-group path = /share browseable = yes writable = yes write list = @os-group valid users = @os-group create mode = 0664 directory mode = 0775 建smb用户和密码 $ sudo smbpasswd -a zbunixzbunix@32u:~/ard$ cat smb.conf #建smb用户和密码: $ sudo smbpasswd -a user_name #重启samba服务 : $ sudo service smbd restart [global] workgroup = MYGROUP server string = Samba log file = /var/log/samba/log.%m max log size = 50 security = user passdb backend = tdbsam encrypt passwords=yes socket options = TCP_NODELAY #include = /etc/samba/smb.conf.%G load printers = no printing = bsd printcap name = /dev/null disable spoolss = yes [homes] comment = Home Directories browseable = no writable = yes path = /home/%S valid users = %S create mode = 0664 directory mode = 0775编译的时候出现"/usr/bin/ld: cannot find -lz"错误,需要安装zlib-dev这个包,在线安装命令为:apt-get install zlib1g-dev
将gcc版本降低为4.4可以避免ics编译错误: $ sudo apt-get install gcc-4.4 $ sudo rm -f /usr/bin/gcc $ sudo ln -s /usr/bin/gcc-4.4 /usr/bin/gcc $ sudo apt-get install g++-4.4 $ sudo rm -f /usr/bin/g++ $ sudo ln -s /usr/bin/g++-4.4 /usr/bin/g++ $ sudo apt-get install g++-4.4-multilibubuntu12.04 64bit 编译android源码时出现如下错误: host Executable: cmu2nuance (out/host/linux-x86/obj/EXECUTABLES/cmu2nuance_intermediates/cmu2nuance) /usr/bin/ld: cannot find -lncurses collect2: ld returned 1 exit status make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1 make: *** Waiting for unfinished jobs.... host Executable: coverage (out/host/linux-x86/obj/EXECUTABLES/coverage_intermediates/coverage) 安装libncurses5-dev:i386可以解决 sudo apt-get install libncurses5-dev:i386 ubuntu12.04 64bit 编译kernel源码时出现如下错误: HOSTLD scripts/kconfig/mconf scripts/kconfig/mconf.o: In function `show_help': mconf.c:(.text+0x811): undefined reference to `stdscr' scripts/kconfig/mconf.o: In function `main': mconf.c:(.text+0x1286): undefined reference to `initscr' mconf.c:(.text+0x128d): undefined reference to `stdscr' scripts/kconfig/lxdialog/checklist.o: In function `print_arrows': checklist.c:(.text+0x41): undefined reference to `wmove' checklist.c:(.text+0x61): undefined reference to `acs_map' 安装libncurses5-dev可以解决 sudo apt-get install libncurses5-dev ======>这两个程序任意时刻只能装一个,不能共存,所以编译时需注意