Wednesday, December 8, 2010

POSIX (Portable Operating System Interface [for Unix])

http://en.wikipedia.org/wiki/POSIX

The name for a family of standards specified by the IEEE to define an API (application programming interface).  Originally done for Unix variants, but can be applied to any OS.

Friday, December 3, 2010

Re: Remote VNC Desktop

The link is gone.

First, setup ssh
Second, install x11vnc
Third, connect to remote how with x11vnc running.


On Tue, Oct 5, 2010 at 1:45 PM, Stan Hughes <hughes.stan@gmail.com> wrote:
http://digg.com/news/technology/Remote_Desktop_for_Linux



Thursday, December 2, 2010

MIME (Multipurpose Internet Mail Extensions)

http://en.wikipedia.org/wiki/MIME

With the 'file' command it cause the display to be in a mime format (text/plain; charset=us-ascii) rather than a human readable form (ASCII text).



Wednesday, November 17, 2010

SELinux (Security Enhanced Linux)


http://en.wikipedia.org/wiki/Security-Enhanced_Linux

This is a Linux feature developed by NSA (National Security Agency).  It is not a Linux distribution, but a set of modification that can be applied to Unix-like OS (Operating System) kernels.


This is a really good overview article of what SELinux is and is not.  

MAC (Mandatory Access Controls) - enforced by SELinux.

DAC (Discretionary Access Control) - the old way of controlling what privileges a user can set on a file.

The SELinux policy has no concept of an all-powerful superuser.  It looks at things from the perspective of what is allowed.

An Internet-facing server should be locked down very strictly.

FC3 (Fedora Core 3) allows a targeted policy - "allow all, deny as needed."


Some more good information.  

AVC (access vector cache)

Wednesday, November 3, 2010

Getting VNC to Run



This has been a pain, but here goes:

Install Openssh

# sudo apt-get install openssh-server openssh-client

Test to make sure that the ssh is working.

# ssh localhost

The rest of this is a bit of guess from watching what Steve was doing.

Install x11vnc and vnc-java.

Connect to host machine using ssh.

ssh stan@XX.XX.X.XX

Start the x11vnc service on host machine.

x11vnc -forever -usepw -httpdir /usr/share/vnc-java/ -httpport 5800

There will be a port number given after the service starts.  The number given was 5901.

Open a terminal server client on the guest machine.

Computer:  xx.xx.x.xx:5901

Protocal:  VNC

User Name:  stan



Thursday, October 28, 2010

Re: CDF (Channel Definition Format)

The README of file-5.04-1 say's Microsoft Compound Document File

On Thu, Oct 28, 2010 at 4:04 PM, Stan Hughes <hughes.stan@gmail.com> wrote:
http://www.fileinfo.com/extension/cdf

The above link says that it is 'Content Definition File'.  

XML-based data format designed for storing and sharing abstract Enterprise Content  Management (ECM)


On Tue, Oct 5, 2010 at 3:32 PM, Stan Hughes <hughes.stan@gmail.com> wrote:
http://www.webopedia.com/TERM/C/CDF.html

XML specification developed by Microsoft that allows Web publishers to push content to users.


Re: The Fine Free File Command (FFFC)

Also called 'fine freeware file' in the README file.


On Tue, Oct 26, 2010 at 1:02 PM, Stan Hughes <hughes.stan@gmail.com> wrote:
http://www.darwinsys.com/file/

The home page for the 'file' command.


Talks about updates.


Give a nice history of the 'file' command.


An ftp link to the latest source code.


The Free Software Foundation (FSF) page.  A bit old.  The most recent version is said to be 4.23.

Notes on the file-5.04 release.



Tuesday, October 26, 2010

Counting Files in a Folder

http://www.linux.org/docs/ldp/howto/Bash-Prompt-HOWTO/x700.html

ls -1 | wc -l


Makefile Tutorial

http://mrbook.org/tutorials/make/

A nice makefile tutorial.



Christos Zoulas


Lives in New York, New York.

http://www.netbsd.org/people/core.html

Member of the NetBSD Core Group


Interview with Guillaume Lasmayous on Nov 22, 2009.

Came to US form Greece at 17 to study.  Started working with a VAX11/780 running 4.2 BSD.

Spends a few hours a week on BSD stuff.

Wants NetBSD to be a reference implementation for Unix.

Has worked on if_iwn.c driver.  Imported openssl, openssh, cvs, file.


Christos' developer page:  Tcsh and File 5.04


The home page for the Fine Free File Command


Christos face book page.


Christos on differences between NetBSD and Linux.

The Fine Free File Command (FFFC)

http://www.darwinsys.com/file/

The home page for the 'file' command.


Talks about updates.


Give a nice history of the 'file' command.


An ftp link to the latest source code.


The Free Software Foundation (FSF) page.  A bit old.  The most recent version is said to be 4.23.

Notes on the file-5.04 release.


Wednesday, October 20, 2010

Extracting a *.tgz file

http://www.linuxquestions.org/questions/linux-newbie-8/how-to-extract-tgz-125678/

 tar xvzf file.tgz

Getting gcc on an Ubuntu Server

https://help.ubuntu.com/community/CompilingSoftware

Using the following 3 apt-get commands.

 sudo apt-get install build-essential

 sudo apt-get install automake

 sudo apt-get install checkinstall








Friday, October 15, 2010

CentOS\RHEL

http://openenterprisenews.com/analysis/how-badly-is-centos-hurting-red-hat.html

A identical binary clone of Red Hat Enterprise LInux minus the trademarks.


Tuesday, October 5, 2010

Tuesday, September 28, 2010

file command

The file command:

http://linux.about.com/library/cmd/blcmdl1_file.htm

file [ -bciknsvzL ] [ -f namefile ] [ -m magicfiles ] file Am ] ...
file -C [ -m magicfile ]

File test each argument in an attempt to classify it.  

Three set of tests:  filesystem tests, magic number tests, and language tests.

The first test that succeeds prints the file type.

NOTE:  This test devices also.

Getting the source code for file:

Add the following line to the /etc/apt/sources.list file.

Update the sources.


 $ apt-get update
Get the source

 
$ apt-get source file







Wednesday, August 18, 2010

Server Message Block (SMB)

http://en.wikipedia.org/wiki/Server_Message_Block

An application network protocol known as "Microsoft Windows Network" in Windows systems.

Implemented by Samba on Linux systems and other Unix like systems.

Also called Common Internet File System (CIFS).

Friday, August 6, 2010

Wonderful Linux Command-line Cheat Sheet

http://www.pixelbeat.org/cmdline.html

rsync command is a network efficient file copier.  I need to learn more about this.

Doing a Grub Repair from a Live Ubuntu CD


This was done using a Ubuntu 10.04 live CD.

This is the guide I followed:  


SystemRescueCD looks pretty good, but there is no need to use it if you have any live Linux CD with the correct tools.

SystemRescueCD didn't have a cool picture so I grab a general picture from here:  http://behdad.ws/post/681808291/rescue-cds

First you must know the '/' and '/boot' mount points.  '/boot' may not need to be mounted, if it is included under the root mount point.

To find this information use System => Administration => Disk Utility.  You can also get this information running 'fdisk -l' as root.

In my case the install was on a single partition on /dev/sda3.





ubuntu@ubuntu:~$ sudo mkdir /mnt/linux
ubuntu@ubuntu:~$ sudo mount /dev/sda3 /mnt/linux
ubuntu@ubuntu:~$ sudo mount -o bind /proc /mnt/linux/proc
ubuntu@ubuntu:~$ sudo mount -o bind /dev /mnt/linux/dev
ubuntu@ubuntu:~$ sudo mount -o bind /sys /mnt/linux/sys
ubuntu@ubuntu:~$ sudo chroot /mnt/linux /bin/bash
root@ubuntu:/# grub-install /dev/sda
Installation finished. No error reported.
root@ubuntu:/# exit
exit
ubuntu@ubuntu:~$ sudo umount /mnt/linux/{dev,proc,sys}
ubuntu@ubuntu:~$ sudo umount /mnt/linux
ubuntu@ubuntu:~$ 

Reboot the computer and Grub should now work.  The link to repairing a damage Grub gives a more detailed description.  It might also be good to read the section on Grub to understand how Grub works.

The reason this works is because the Grub information selecting the Linux and Windows boots is located in the /mnt/linux/boot folder and was never damaged.


Good luck.

Tuesday, June 22, 2010

How to Ignore an Exception

try
{
    // try something that might throw an exception here.
}
catch (...)
{
   // exception will be caught but ignored.
}

Get My First Appplication on my Nexus One Phone

I have Java, Eclipse and the Android SDK installed.  Also the computer is seeing my phone.

Working from the following link:


Everything seemed fine till I got to the point to look at the code.  The code window doesn't show up.  I have seen it before, but I don't remember what I did.

Had to double click on the HelloAndroid.java name in the tree HelloAndroid ==> src ==> com.example.helloandroid ==> HelloAndroid.java

Now I am unable to edit the code.  Now I can edit the file.  I am now sure what changed.  Was it just way behind?  Don't thing so, other options where working.

My old portable my not be powerful enough to run Eclipse.

Running the app ran it on my HTC that was connected.



Tuesday, June 8, 2010

Keyboard and Mouse Sharing

Can be done with Synergy and Synergy+ in the open source area.  Can be done with done with Multiplicity and ZoneScreen if you want to buy the application.  Synergy will work across Linux and Windows.  Multiplicity and ZoneScreen only seem to work with Windows but is much more capable.  This is a nice site that shows the alternatives.

File Sharing with Pogoplug NAS

http://www.crunchgear.com/2009/12/21/review-second-generation-pogoplug-nas/

Looks pretty nice.  Actually transcodes video files automatically.  This lets you display it on your IPOD.  Also has a Android app.  Is is build upon Linux which they don't hide.  The Linux platform is OpenPogo.  You share everything through their server.

There is also TonidoPlug based on Ubuntu.  This seems to support sharing applications which is cool.  It is based on SheevaPlug.  Is PogoPlug based on SheevaPlug?  Lets you share using your own static IP or through DynDNS.com.

Is available from buy.com for $98.00.

Thursday, June 3, 2010

The Ubuntu 9.10 Karmic Koala with Linux 2.6.31-generic

I am having trouble getting Linux to see my Google phone so I can test Android applications.

Getting the information in the title.

Get the Linux info

uname -a

Get the Ubunto info

lsb_release -a

LSB stands for Linux Standard Base


Root Kit for Android

http://www.computerworld.com/s/article/9177576/Android_rootkit_is_just_a_phone_call_away?taxonomyId=15&pageNumber=1

This root kit was created by a security consultant working for Chicago's Trustwave. The demo root kit is for a demo in the up coming Defcon hacking conference in LA.  Basically once the root kit is installed it can be activated with a message or phone call.  It can reroute 911 calls or reroute web addresses.  This is only a prof of concept.  The risk currently is low for this type of attack.  One of the things that help reduce the risk is getting apps through the store.  This way if there is a problem, Android can contact those who download the malices app.

It would seems like you want to make darn sure that your browser doesn't have holes in it what would let someone install a root kit from the Internet.

What might be the avenue of attack?  Web, messages, USB, and Bluetooth.  Are there any others?


Re: MeeGo

http://www.phoronix.com/scan.php?page=article&item=meego_10_perf&num=5

A comparison of Linux net book distributions.  MeeGo did very well.  I like the fast startup time.


The MeeGo site.

On Thu, Jun 3, 2010 at 8:29 AM, Stan Hughes <hughes.stan@gmail.com> wrote:
A Netbook and tablet Linux bases OS build from the ground up for the Intel Atom but work on a lot of other platforms.


The above is a nice article about it.

This is an example of a table Intel is building using MeeGo.  Looks pretty good.  Hope to have something out by early 2011.




MeeGo

A Netbook and tablet Linux bases OS build from the ground up for the Intel Atom but works on a lot of other platforms.


The above is a nice article about it.

This is an example of a table Intel is building using MeeGo.  Looks pretty good.  Hope to have something out by early 2011.



Tuesday, April 27, 2010

Getting Linux System Information

From the Linux Magazine I found a wonderful article about getting the hardware system information.

Linux System Information Decoded

There are two commands that can be run using sudo (Ubuntu), dmidecode and biosdecode.

biosdecode

There is a good man page on the command.  I pulled the following info from the man page.

       * SMBIOS (System Management BIOS)
         Use dmidecode for a more detailed output.

       · DMI (Desktop Management Interface, a legacy version of SMBIOS)
         Use dmidecode for a more detailed output.

       · SYSID

       · PNP (Plug and Play)

       · ACPI (Advanced Configuration and Power Interface)

       · BIOS32 (BIOS32 Service Directory)

       · PIR (PCI IRQ Routing)

       · 32OS (BIOS32 Extension, Compaq-specific)
         See ownership for a Compaq ownership tag retrieval tool.

       · SNY (Sony-specific, not decoded)

       · VPD (Vital Product Data, IBM-specific)
         Use vpddecode for a more detailed output.

       · FJKEYINF (Application Panel, Fujitsu-specific)

The information for my HP laptop is as follows:
# biosdecode 2.9
ACPI 2.0 present.
    OEM Identifier: HP   
    RSD Table 32-bit Address: 0xBFED5AC7
    XSD Table 64-bit Address: 0x00000000BFED5B17
SMBIOS 2.4 present.
    Structure Table Length: 731 bytes
    Structure Table Address: 0x000DC010
    Number Of Structures: 19
    Maximum Structure Size: 121 bytes
BIOS32 Service Directory present.
    Revision: 0
    Calling Interface Address: 0x000FDC10
PNP BIOS 1.0 present.
    Event Notification: Not Supported
    Real Mode 16-bit Code Address: E73F:9F8D
    Real Mode 16-bit Data Address: 0040:0000
    16-bit Protected Mode Code Address: 0x000FC3E8
    16-bit Protected Mode Data Address: 0x00000400

dmidecode
There is a good man page on this one also.

The following information is for my HP laptop:

SMBIOS 2.4 present.
19 structures occupying 731 bytes.
Table at 0x000DC010.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
    Vendor: Hewlett-Packard
    Version: F.52    
    Release Date: 03/24/2008
    Address: 0xE6F30
    Runtime Size: 102608 bytes
    ROM Size: 1024 kB
    Characteristics:
        ISA is supported
        PCI is supported
        PNP is supported
        BIOS is upgradeable
        BIOS shadowing is allowed
        ESCD support is available
        Boot from CD is supported
        Selectable boot is supported
        Print screen service is supported (int 5h)
        8042 keyboard services are supported (int 9h)
        Serial services are supported (int 14h)
        Printer services are supported (int 17h)
        ACPI is supported
        USB legacy is supported
        AGP is supported
        Smart battery is supported
        BIOS boot specification is supported
        Targeted content distribution is supported

Handle 0x0001, DMI type 1, 27 bytes
System Information
    Manufacturer: Hewlett-Packard
    Product Name: HP Pavilion dv9700 Notebook PC   
    Version: Rev 1
    Serial Number: CNF8174BCW
    UUID: 434E4638-3137-3442-4357-001E685F55DF
    Wake-up Type: Power Switch
    SKU Number: GP236AV    
    Family: 103C_5335KV

Handle 0x0002, DMI type 2, 8 bytes
Base Board Information
    Manufacturer: Quanta
    Product Name: 30CB
    Version: 79.29
    Serial Number: None

Handle 0x0003, DMI type 3, 17 bytes
Chassis Information
    Manufacturer: Quanta
    Type: Notebook
    Lock: Not Present
    Version: N/A
    Serial Number: None
    Asset Tag:                    
    Boot-up State: Safe
    Power Supply State: Safe
    Thermal State: Safe
    Security Status: None
    OEM Information: 0x00000104

Handle 0x0004, DMI type 4, 35 bytes
Processor Information
    Socket Designation: U2E1
    Type: Central Processor
    Family: <OUT OF SPEC>
    Manufacturer: Intel
    ID: 76 06 01 00 FF FB EB BF
    Version: Intel(R) Core(TM)2 Duo CPU T8300
    Voltage: 3.3 V
    External Clock: 800 MHz
    Max Speed: 2400 MHz
    Current Speed: 2400 MHz
    Status: Populated, Enabled
    Upgrade: Socket 478
    L1 Cache Handle: 0x0005
    L2 Cache Handle: 0x0006
    L3 Cache Handle: Not Provided
    Serial Number: Not Specified
    Asset Tag: Not Specified
    Part Number: Not Specified

Handle 0x0005, DMI type 7, 19 bytes
Cache Information
    Socket Designation: L1 Cache
    Configuration: Enabled, Socketed, Level 1
    Operational Mode: Write Back
    Location: Internal
    Installed Size: 64 KB
    Maximum Size: 64 KB
    Supported SRAM Types:
        Burst
        Pipeline Burst
        Asynchronous
    Installed SRAM Type: Asynchronous
    Speed: Unknown
    Error Correction Type: Unknown
    System Type: Unknown
    Associativity: Unknown

Handle 0x0006, DMI type 7, 19 bytes
Cache Information
    Socket Designation: L2 Cache
    Configuration: Enabled, Socketed, Level 2
    Operational Mode: Write Back
    Location: External
    Installed Size: 3072 KB
    Maximum Size: 3072 KB
    Supported SRAM Types:
        Burst
        Pipeline Burst
        Asynchronous
    Installed SRAM Type: Burst
    Speed: Unknown
    Error Correction Type: Unknown
    System Type: Unknown
    Associativity: Unknown

Handle 0x0007, DMI type 9, 13 bytes
System Slot Information
    Designation: PCI Express Slot 1
    Type: 64-bit PCI Express
    Current Usage: Available
    Length: Long
    ID: 0
    Characteristics:
        5.0 V is provided
        3.3 V is provided

Handle 0x0008, DMI type 9, 13 bytes
System Slot Information
    Designation: PCI Express Slot 2
    Type: 64-bit PCI Express
    Current Usage: Available
    Length: Long
    ID: 0
    Characteristics:
        5.0 V is provided
        3.3 V is provided
        PME signal is supported
        Hot-plug devices are supported

Handle 0x0009, DMI type 9, 13 bytes
System Slot Information
    Designation: PCI Express Slot 6
    Type: 64-bit PCI Express
    Current Usage: Available
    Length: Long
    ID: 0
    Characteristics:
        5.0 V is provided
        3.3 V is provided
        PME signal is supported

Handle 0x000A, DMI type 10, 6 bytes
On Board Device Information
    Type: Video
    Status: Enabled
    Description:   

Handle 0x000B, DMI type 11, 5 bytes
OEM Strings
    String 1: $HP$
    String 2: LOC#ABA
    String 3: ABS 70/71 79 7A 7B 7C

Handle 0x000C, DMI type 16, 15 bytes
Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: None
    Maximum Capacity: 4 GB
    Error Information Handle: Not Provided
    Number Of Devices: 2

Handle 0x000D, DMI type 17, 27 bytes
Memory Device
    Array Handle: 0x000C
    Error Information Handle: No Error
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 2048 MB
    Form Factor: DIMM
    Set: 1
    Locator: DIMM 1
    Bank Locator: Bank 0,1
    Type: DDR2
    Type Detail: Synchronous
    Speed: 667 MHz (1.5 ns)
    Manufacturer: Not Specified
    Serial Number: Not Specified
    Asset Tag: Not Specified
    Part Number: Not Specified

Handle 0x000E, DMI type 17, 27 bytes
Memory Device
    Array Handle: 0x000C
    Error Information Handle: No Error
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 2048 MB
    Form Factor: DIMM
    Set: 1
    Locator: DIMM 2
    Bank Locator: Bank 2,3
    Type: DDR2
    Type Detail: Synchronous
    Speed: 667 MHz (1.5 ns)
    Manufacturer: Not Specified
    Serial Number: Not Specified
    Asset Tag: Not Specified
    Part Number: Not Specified

Handle 0x000F, DMI type 19, 15 bytes
Memory Array Mapped Address
    Starting Address: 0x00000000000
    Ending Address: 0x000FFFFFFFF
    Range Size: 4 GB
    Physical Array Handle: 0x000C
    Partition Width: 0

Handle 0x0010, DMI type 20, 19 bytes
Memory Device Mapped Address
    Starting Address: 0x00000000000
    Ending Address: 0x0007FFFFFFF
    Range Size: 2 GB
    Physical Device Handle: 0x000D
    Memory Array Mapped Address Handle: 0x000F
    Partition Row Position: 2
    Interleave Position: 2
    Interleaved Data Depth: 2

Handle 0x0011, DMI type 32, 20 bytes
System Boot Information
    Status: <OUT OF SPEC>

Handle 0x0012, DMI type 127, 4 bytes
End Of Table