Thursday, October 29, 2009

List of PCI and USB Devices - Linux and Windows

Sometimes it's necessary to check devices installed on a PC. In Linux it is quite simple - command

$ lspci -h

gives out available options for listing PCI devices.
For example,

$ lspci -nn

shows up both textual and numeric ID's.

There is a similar command for USB devices:

$ lsusb -h

For the same purposes in Windows there is a nice program devcon.exe - it can be downloaded from
For instance, command

> devcon findall PCI*

lists all PCI devices. The following command shows up all PCI devices with assigned system resources:

> devcon resources PCI*


Sunday, October 25, 2009

Free Web Storage for Files

Sometimes it's necessary to add a download link to a file related to a post or embed a doc in. The simplest way would be to store files in a place like web-site directory which usually comes with Internet connection from ISPs (Internet Service Provider), but my ISP gives out only 10 MB for that purpose what is not too much. I checked out some of web file storage hosts and found that most of them have serious limitations.

My wish list of features would be the following:

  • Personal account on the host to have control over files;
  • "No delete" after certain period, my files should be stored forever unless I delete them myself;
  • Storage capacity should be more than 1 GB;
  • Public sharing should be available - many hosts limit their file storage to personal use only;
  • Files should be accessible via direct link - that would give a possibility to embed the files into a web page;
  • All those for free of charge would be nice too.
It is not easy to find a web-hosting which would meet all of the wishes, but there are some pretty close I've managed to find:

  1. ADrive - with the free basic subscription stored files are kept forever but public sharing (links to the files) expires in one month. This limitation was not very clear from their description of service, only when I made a file shared it showed such a notification. Also a share link from public domain leads to a page with "Download" button but not to the file itself, so embedding is not possible.

  2. MediaFire is pretty similar to ADrive besides there is no limitation in time for sharing link. A sharing link leads to a "Download" page - same as ADrive, their "Download" page shots out a pop-up every time you're there.

  3. FileFront is another one of the same kind, but its target group is gaming audience.
Those sites represent the same approach for free file storage. As declared these services really work for those who wants just to transfer files to others or to store personal files, but unfortunately it is not possible to get direct link to stored files.

  1. HotlinkFiles was recommended by some people and as the site name suggests it supports direct links. The site has been giving out "too many connections" error for pretty long time, now its response is more informative: they claim been "under attack from malicious hackers that have managed to destroy a large portion of user database". That sounds sad and reveals the danger of storing your info in one place - let's wish them good luck to recover quickly from the disaster.

  2. It seems that a real solution for file-hosting comes from web-hosting services, so I ended up with Google Sites. It's appeared to be a well working variant and I don't see any drawbacks so far. 10 GB of storage per account, direct sharing links, etc. - you can check the list of features.
    To get direct link to a file just copy the address from Properties of the Download link from the Google site page, then paste it into a web browser address field and press Enter - it will show the file and its address will change, this changed address I use as a direct link to the file. As an example below is an embedded PDF - a copy of the Google Sites Overview page:

As a quick update I'd like to add some more sites (I have not tested them yet, I hope I'll do it in the next round of search for file hosting services):
  1. Thanks to the visitor suggested - with free account you can get there 2.5GB of storage space with 7GB bandwidth.

  2. MyDataNest seems to be an interesting file hosting site. Basic free account gets 2GB of storage and 20 GB of monthly transfer.
I'll keep updating the post with fresh info - it would be interesting to hear suggestions regarding the topic - please, share your experience.

Saturday, October 10, 2009

Mixed Windows & Linux Network - Free Remote Desktop

Having some computers with Windows and others with Linux makes remote desktop access from one computer to another slightly more complicated. Here is what I found as a working solution.

  • From Windows to Windows connection - UltraVNC. It has viewer and server, 32 and 64-bit XP and Vista compatible. It works fine with hardware and virtual Windows machines and any edition (Microsoft remote desktop is not available for the cheapest versions as Home, Basic, Premium).

  • From Windows and Linux to Linux - NoMachine NX. They offer Windows and Linux viewers for free, Linux server is free as well. I used NX viewers and servers on hardware and virtual Linux boxes with KDE, on Debian and Ubuntu all work very good.

  • From Linux to Windows - I found Remote Desktop Connection (krdc) already installed on Mepis 8.0 and used UltraVNC server on Windows side. In krdc connection request: vnc:/IPAddress:0

VNC and SSH protocols should be enabled in firewalls on both server and client/viewer sides.

Friday, October 9, 2009

Free SketchUp 7.1 without 2D DWG and DXF Import - Ways Around

Recently the new SketchUp 7.1 was released. The most negative surprise from its free version is that import of 2D drawings in DWG and DXF standards has become impossible. Now this option is available in Pro version only.

It was a strange decision of Google to strip off the option:, but anyway there are some ways to deal with it:
  1. It seems Google feels that they have done something bad and to sweeten the pill a little bit they are offering optional temporary plug-ins: one for Windows and another for Mac... But it can not last forever and with the next version most likely the option will be gone completely.

  2. One of possibilities is to keep an old working Sketchup version around. It can be kept on a hardware computer or on a virtual one. The former costs more as Hardware + MS license, but it should be fine if there is one extra Windows box around , the latter - is just for MS license (I don't know the deal with Mac). It's a pity there is no Sketchup for Linux, so the only option is to run it under Linux with WINE - some people say that it works.

  3. Use another program to import DWG and DFX and then convert it into SketchUp file. I know one such program - Alibre. Alibre is a true dimension/parameter driven 3D mechanical development tool (SketchUp as we know is not) and there is a free Xpress version offered. The free version has some limitations as 5 unique parts in assembly, for example, but it still enough for a small project. I actually prefer to use Alibre for part and assembly development and then if needed I export design to SketchUp format. For the exporting there is a plug-in for Alibre called Alibre3DPublisherForGoogleSketchUp.exe. The bad news is that Alibre stopped providing the plug-in for download from its site officially and seems they do not want to support this option in the future, but it is still available from Alibre FTP libraries:; the good one is that the plug-in is still working fine with the new 12.0 version of Alibre.

Comodo's cmdagent.exe Seized CPU - Bad Virus Database

This week Comodo stepped on a rake. They released a new virus database and cmdagent.exe service went completely crazy: it took about 100% of CPU time and made computers totally useless.

The cure was to start computer is Safe mode (press F8 during boot) and copy the installation default virus database bases.cav from
C:\Program Files\COMODO\COMODO Internet Security\repair
to the working directory
C:\Program Files\COMODO\COMODO Internet Security\scanners
then update the database again to the corrected new version.

Comodo had the problem rectified pretty quickly but still those who got into the trouble had to apply the fix manually. Hopefully it was the last time when Comodo accidentally released not completely tested update and they will be more careful in the future.

Sunday, October 4, 2009

C and C++ Compiling in Linux - Get It Ready

Not all Linux distributions are ready for C and C++ compilation right after installation. Some of them are missing compilers, others - some basic libraries. I decided to write the note how to make it working.

Create a new directory for the tests and save a file HelloWorld.c in it. The file has the following content:

#include <stdio.h>

main ()
printf ( "Hello World!\n");

On Mepis 7.0 machine cc and gcc C compilers were installed:

$ whereis cc gcc
cc: /usr/bin/cc
gcc: /usr/bin/gcc /usr/lib/gcc

but attempt to compile the C code ended up with an error :

$ cc HelloWorld.c -o HelloWorld_cc
HelloWorld.c:1:19: error: stdio.h: No such file or directory
HelloWorld.c: In function 'main':
HelloWorld.c:5: warning: incompatible implicit declaration
of built-in function 'printf'

The missing "stdio.h" library comes with the "build-essential" package. Mepis has Synaptic package manager - start it and install the package. After that compilation passes through without an error:

$ cc HelloWorld.c -o HelloWorld_cc
$ ./HelloWorld_cc
Hello World!

$ gcc HelloWorld.c -o HelloWorld_gcc
$ ./HelloWorld_gcc
Hello World!

Mepis 8.0 did not have a problem with C program, but neither c++ nor g++ compiler was installed:

$ whereis c++ g++

gave out nothing. With a package manager (again Synaptic in my case) install the compiler(s). After that "whereis" can find them:

$ whereis c++ g++
c++: /usr/bin/c++ /usr/include/c++
g++: /usr/bin/g++

Create HelloWorld.cpp C++ file:

#include <iostream>
using namespace std;

int main ()
cout << "Hello World!\n";
return 0;

Compilation is successful with the both compilers:

$ g++ HelloWorld.cpp -o HelloWorld_g++
$ ./HelloWorld_g++
Hello World!

$ c++ HelloWorld.cpp -o HelloWorld_c++
$ ./HelloWorld_c++
Hello World!


Saturday, October 3, 2009

Finding in Linux (bash shell)

I'd like to put in the list some useful commands for finding things in Linux environment.

  1. apropos keywords - searches through manual descriptions for the keywords. Say, we are interested in commands to find anything:

    $ apropos find search look locate match

    what gives out a list of related commands with short helpful description. On my Mepis 8.0 virtual machine it shows the following lines among others:

    apropos (1) - search the manual page names and descr...
    look (1) - display lines beginning with a given string
    find (1) - search for files in a directory hierarchy
    grep (1) - print lines matching a pattern
    kfind (1) - KDE find tool
    locate (1) - list files in databases that match a pat...
    rgrep (1) - print lines matching a pattern
    whereis (1) - locate the binary, source, and manual pa...
    which (1) - locate a command

    apropos will work only if manuals are installed - usually they are, but sometimes for the sake of resource saving manuals can be omitted.

  2. find is a very powerful command for searching files in directories:

    $ find startdir -name filename

    Different options allow to search for files by name, size, type, permission, owner, etc. - check manual and help:

    $ man find
    $ find --help

  3. grep searches for a pattern inside text file:

    grep "pattern" filename

    Example of finding files and then find a pattern inside the files:

    $ find /home/svn -name "test*txt"|xargs grep "first" -i
    The first line of the test file.

    There are some variations of grep as fgrep, rgrep, egrep, bzgrep, etc. - check it with "apropos grep".

  4. kfind is a GUI version of find with grep - it can search for files and pattern inside files.

  5. look prints out strings beginning with a pattern from a file:
    $ look pattern filename

  6. strings prints out all strings from a text or binary file:
    $ strings filename

  7. whereis locates different type of files. For instance:
    $ whereis find
    find: /usr/bin/find /usr/share/man/man1/find.1.gz

  8. locate searches for files in databases (it gives out all files with names containing given keyword):
    $ locate find

  9. which search for executables and shows up the whole path to directories where the files are found:
    $ which find