Difference between revisions of "Ubuntu Tips"

From wikidb
Jump to: navigation, search
(ssh using on Mac)
(find)
Line 132: Line 132:
  
 
   find /opt/ros/jade/ -name *.so -exec grep CamShift "{}" ";"
 
   find /opt/ros/jade/ -name *.so -exec grep CamShift "{}" ";"
 +
 +
== Hardware Info ==
 +
 +
  sudo apt-get install hardinfo
 +
  hardinfo&
  
 
== Links ==
 
== Links ==
  
 
[http://linux.die.net/man/ man pages]
 
[http://linux.die.net/man/ man pages]

Revision as of 17:20, 10 September 2015

Run Levels

runlevel
 
telinit 3

Install

  • Package search
 sudo aptitude search phidget

Each search result is listed on a separate line.

  • The first character of each line indicates the current state of the package:
    • p, no trace of the package exists on the system,
    • c, the package was deleted but its configuration files remain on the system,
    • i, the package is installed, and
    • v, the package is virtual.
  • The second character indicates the stored action (if any; otherwise a blank space is displayed) to be performed on the package,
    • i, the package will be installed,
    • d, the package will be deleted, and
    • p, the package and its configuration files will be removed.
  • If the third character is
    • A, the package was automatically installed.

The follow provides some of the above info

 apt-cache search opencv
  • Detailed description of a package
 apt-cache show opencv-do
  • List the files in a package
 dpkg -L opencv-doc
  • Find the package a file is in
 dpkg -S highgui.h
  • Remove unneeded packages
 apt-get auto remove
  • Get source
 apt-get source phidget

Text Mode

Reference: Modify Ubuntu for text mode

 root@tabor:init# diff rc-sysinit.conf rc-sysinit.conf.org 
 14c14
 < env DEFAULT_RUNLEVEL=3
 ---
 > env DEFAULT_RUNLEVEL=2
 root@tabor:init# diff gdm.conf gdm.conf.org 
 13d12
 <           and runlevel[!3]

The result in gdm.conf should be:

 start on (filesystem
         and started dbus
         and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
              or stopped udevtrigger))
         and runlevel[!3]
 stop on runlevel [016]

Warning: Don't have an SD card connected to the USB port - maybe it tried to boot from it?

To get it going in X.

startx

Won't Boot

Boot from the 10.04 Install CD.

 sudo mkdir /media/tmp
 mount /dev/sda1 /media/tmp
 cd /media/tmp/etc                      fix things

ssh

Two ways to start service

 sudo /etc/init.d/ssh start
 sudo service ssh start

Two was to stop service

 sudo /etc/init.d/ssh stop
 sudo service ssh stop

Using ssh on Mac

ssh -X eepp@10.0.0.122

on Mac

system load

uptime
top
dstat
cat /proc/loadavg

/proc man

load from wikipedia

change hostname

  • Edit /etc/hostname , make the name change, save the file.
  • You should also make the same changes in /etc/hosts file.
  • Run sudo /etc/init.d/hostname restart or sudo service hostname restart. (There is no hostname init script so I rebooted.)
  • change name

Printing

Something like:

  • Preferences -> Printers
  • Add
  • Device first expand Network Printer
  • Device choose Network Printer
  • Enter 10.0.0.3 as Host and press find

Also install ascii 2 ps

 sudo apt-get install a2ps

find

 find /opt/ros/jade/ -name *.so -exec grep CamShift "{}" ";"

Hardware Info

 sudo apt-get install hardinfo
 hardinfo&

Links

man pages