ubuntu解决resolv.conf被重写问题

ubuntu解决resolv.conf被重写问题 解决resolv.conf被重写问题 来源:http://www.cnblogs.com/lanxuezaipiao/p/3613497.html 第二步中你虽然配置了DNS,但是每次重启虚拟机或重启网络后/etc/resolv.conf文件就会被重写,也就是又恢复原样了,你以前的配置就不存在了,每次都要手动配置是极不可取的,所以这步是必须的,首先我们要搞清楚resolv.conf被重写的原因和机制,这在不同Ubuntu版本下有所差异。那怎么知道呢?一般resolv.conf文件一开头就告诉你了。 解决该问题其实有两种办法,不怕麻烦的想理解原理的请参照方法一(与版本有关),怕麻烦的不想折腾的自觉转到方法二(与版本无关)。 方法一:与版本有关 a)Ubuntu 12.10 打开/etc/resolv.conf后可看到开头的一句话: # Generated by NetworkManager 说明resolv.conf这个文件是由NetworkManager这个程序生成的(对应的是network-manager服务),那么解决办法也就来了:我们关掉network-manager即可,命令如下: sudo service network-manager stop 或者 sudo /etc/init.d/network-manager stop 但是这种方法不是一劳永逸的,因为每次重启系统后还是会自动启动这个服务,因此我们需要完全禁止network-manager启动即可。 编辑network manager的配置文件/etc/init/network-manager.conf: sudo vi /etc/init/network-manager.conf 注释掉其中的start on部分即可: # network-manager - network connection manager # # The Network Manager daemon manages the system's network connections, # automatically switching between the best available. description "network connection manager" #start on (local-filesystems # and started dbus # and static-network-up) stop on stopping dbus expect fork respawn script # set $LANG so that messages appearing on the GUI will be translated.

READ MORE

ROS_Stack

ROS_Stack rostopic pub my_topic std_msgs/String "hello there" *** Multi_line_pub *** $ rostopic pub /send_BTSVR std_msgs/String "data: '\ first line second line third line '" === 【创建ROS Package (catkin) 】=== 1. 确认你的catkin Workspace:~/catkin_ws/ 2. $ cd ~/catkin_ws/src 3. 创建package (http://wiki.ros.org/ROS/Tutorials/catkin/CreatingPackage) catkin_create_pkg <package_name> [depend1] [depend2] [depend3] ... [dependn] e.g.: catkin_create_pkg beginner_tutorials std_msgs rospy roscpp 4. 编译catkin Workspace: cd ~/catkin_ws catkin_make 5. Source the generated setup file: $ . ~/catkin_ws/devel/setup.bash 6. 可用工具: rospack roscd <package_name> 7. Customize Your Packages: http://wiki.ros.org/ROS/Tutorials/CreatingPackage#ROS.2BAC8-Tutorials.2BAC8-catkin.2BAC8-CreatingPackage.Customizing_Your_Package 8. the binary file generated after your building your catking project is in this path: /home/exbot/catkin_ws/devel/lib/{your pkg_name} === 【Eclipse Project 生成步骤:】 ==== Generate the Eclipse Files for dev.

READ MORE

Linux调整磁盘分区大小

Linux调整磁盘分区大小 Resize the disk (Linux调整磁盘分区大小) Resize the partition. Run parted: $ parted Show the partition list: (parted) print There should be two partitions; 1 should be a boot partition, about 64MB; the second should be the main partition, about 3.6G Some Disk Commands of Linux, that you should know: sudo df -h Display the FileSystem that you mounted sudo fdisk -l Show your disk information that is unmounted or un-parted Sonictl: Here I didn’t see two partitions by print command. but fdisk -l showed me that.

READ MORE

Fixed- Failed to create VirtualBox COM object REGDB_E_CLASSNOTREG (0x80040154)

Fixed- Failed to create VirtualBox COM object REGDB_E_CLASSNOTREG (0x80040154) Fix: Failed to create VirtualBox COM object REGDB_E_CLASSNOTREG (0x80040154) January 16, 2014 Blog 0x80040154, com object, failed to create, virtualbox Kirt When opening Oracle VM one day, you stumble upon this message (note the error code 0x80040154): Failed to create the VirtualBox COM object. The application will now terminate. Callee RC: REGDB_E_CLASSNOTREG (0x80040154) virtualbox创建COM对象失败,程序终止。召唤者 RC: REGDB_E_CLASSNOTREG (0x80040154) 。 【解决】 The Virtual Machine service isn’t running. A reinstall would probably work but there is an simpler fix:

READ MORE

ROS进二阶学习笔记(1) TF 学习笔记3 -- TF Listener 编写 (Python)and Adding frame(Python)

ROS进二阶学习笔记(1) TF 学习笔记3 – TF Listener 编写 (Python)and Adding frame(Python) ROS进二阶学习笔记(1) TF 学习笔记3 – TF Listener 编写 (Python) Ref: http://wiki.ros.org/tf/Tutorials/Writing%20a%20tf%20listener%20%28Python%29 In the previous tutorials we created a tf broadcaster to publish the pose of a turtle to tf. In this tutorial we’ll create a tf listener to start using tf. and use tf to get access to frame transformations. 还是要请先读了Ref 再来这里sonictl@csdn看总结: 这个listen的程序做了3件事情: 放个 turtle2乌龟到舞台上去,用的turtlesim/Spawn服务; 用tf.TransformListener类下的lookupTransform方法,查询turtle2 相对于 turtle1 的位置。 用查到的相对位置来发布cmd速度和角速度信息,引导 turtle2 运动 看看代码 我小改了下代码: (path: nodes/learning_tf_listener.py ) 1. #!/usr/bin/env python 2. import roslib 3.

READ MORE

ROS进二阶学习笔记(1) TF 学习笔记2- -- TF Broadcaster 编写 (Python)

ROS进二阶学习笔记(1) TF 学习笔记2- – TF Broadcaster 编写 (Python) ROS进二阶学习笔记(1) TF 学习笔记2 – TF Broadcaster Ref: http://wiki.ros.org/tf/Tutorials#Learning_tf Ref: Writing a tf broadcaster (Python) This tutorial teaches you how to broadcast the state of a robot to tf. Ref内的东西请读者自行研读,这里要做点总结: /tf topic上 是有一个发布器broadcaster 发布 /tf 消息才能被 /tf 的 listener 收听到。 /tf 的发布器类:python: tf.TransformBroadcaster 所以我们要理解它里面的方法: sendTransform(translation, rotation, time, child, parent) 1. 先看看tf broadcaster的示例代码: 1. #!/usr/bin/env python 2. import roslib 3. roslib.load_manifest('learning_tf') 4. import rospy 5. 6. import tf 7. import turtlesim.msg 8. 9. def handle_turtle_pose(msg, turtlename): 10.

READ MORE

ROS进二阶学习笔记(1) TF 学习笔记1-TF介绍 + tf工具

ROS进二阶学习笔记(1) TF 学习笔记1-TF介绍 + tf工具 ROS进二阶学习笔记(1) TF 学习笔记1: – TF介绍 + tf工具 Ref: http://wiki.ros.org/tf/Tutorials#Learning_tf Ref: http://wiki.ros.org/tf/Tutorials/Introduction%20to%20tf 惭愧的是,时隔10个月,重新来学习tf的东西。 1. Running the Demo Now that we’re done getting the turtle_tf tutorial package, let’s run the demo. $ roslaunch turtle_tf turtle_tf_demo.launch Once the turtlesim is started you can drive the center turtle around in the turtlesim using the keyboard arrow keys, select the roslaunch terminal window so that your keystrokes will be captured to drive the turtle. 关于这个demo,解释一下: demo 用了tf library 建立了3个frame: a world frame, a turtle1 frame, and a turtle2 frame

READ MORE

在 Win7-Win8下使用 VirtualBOX虚拟机安装 OS X 10.11 El Capitan 及 Xcode 7.0

在 Win7-Win8下使用 VirtualBOX虚拟机安装 OS X 10.11 El Capitan 及 Xcode 7.0 在 Win 7或8 下使用 VirtualBOX 虚拟机安装 OS X 10.11 El Capitan 及 Xcode 7.0 来源:http://bbs.feng.com/read-htm-tid-9908410.html ( OS X and Xcode 7.0 请参考本链接) http://www.wikigain.com/install-mac-os-x-el-capitan-virtualbox/ (泪推!!还是要信Google,得永生啊!!!) https://xuanwo.org/2015/08/09/vmware-mac-os-x-intro/ (参考其“提示VBoxManage不是可执行的命令” 部分,及自行搜索:CMD切换操作目录命令) 建议电脑要求 Windows 7或8或8.1, 32或64 bit,在 Win10 下需要使用 Win 8 相容模式启动 VirtualBOX CPU Intel Core i5 / i7,要有VT-x硬件加速 内存 4GB 以上 硬盘 500GB 以上,NTFS 格式 由于虚拟机不支持Apple Quartz Extreme/Core Image,需要 Quartz Extreme 的应用软件例如 iBooks Author,Pixelmator,SketchBook 等不能在虚拟机下使用。 虚拟硬盘文件种子下载: OS X 10.11 El Capitan GM Candidate.torrent*(17.27 KB, 下载次数: 9218)* 或 网盘下载(虚拟硬盘文件+下面安装步骤的截图) 链接:http://pan.

READ MORE

Using Win7 to control the Lubuntu via VNC

Using Win7 to control the Lubuntu via VNC 有时候在嵌入式计算机没有显示器键鼠供其使用,但又需要通过Terminal或者图形界面对它进行操作,可通过远程连接软件进行。比如vnc Using Win7 to control the Lubuntu via VNC ===== Lubuntu VNC Server installation ===== 1. install tools: tightvncserver autocutsel sudo apt-get install tightvncserver autocutsel #tightvncserver is vnc server application #autocutsel is for getting bidirectional clipboard sharing 2. setup password to access desktops: orangepi 3. Run the server once and kill it: Commands: $ tightvncserver :1 $ tightvncserver -kill :1 4. modify the ~/.vnc/xstartup file: commands: $ vim ~/.vnc/xstartup file content: #!/bin/sh xrdb $HOME/.

READ MORE

Controlling A Roomba with an Arduino - Arduino串口控制Roomba教程

Controlling A Roomba with an Arduino - Arduino串口控制Roomba教程 Controlling A Roomba with an Arduino arduino,tech Add comments Jun 10 2009 串口控制roomba, roomba编程 I set out this weekend to get an Arduino board to control my Roomba. (The Roomba has a great – and generally open – interface, and iRobot deserves significant credit for encouraging creative repurposing/extensions of their products.) I’ve got a few project ideas in mind, but for an initial step just wanted to verify that the Arduino could a) send control commands (“move forward”, “turn right”, etc.

READ MORE