Pages

Wednesday, December 8, 2010

Fakeroot and Yum

It seems that the yum and fakeroot do not get along too well.
I did not understand why ... Here is output:
yum search aaa
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Cannot open logfile /var/log/yum.log
Could not create lock at /var/run/yum.pid: [Errno 13] Permission denied: '/var/run/yum.pid'
Another app is currently holding the yum lock; waiting for it to exit...
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 258, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 104, in main
    show_lock_owner(e.pid, logger)
  File "/usr/share/yum-cli/utils.py", line 107, in show_lock_owner
    ps = get_process_info(pid)
  File "/usr/share/yum-cli/utils.py", line 62, in get_process_info
    if (not os.path.exists("/proc/%d/status" % pid) or
TypeError: %d format: a number is required, not str
 

And I have nothing on, like rpm, yum or gpk-prefs...

Sunday, December 5, 2010

Fedora 14 and NVIDIA FX5200

Today I set video driver on Fedora 14.
I have an FX5200 and I use akmod to make this working.
First when I install akmod with :
yum install kmod-nvidia-173xx-2.6.35.6-48.fc14.i686.PAE.i686
I have some errors:
$ glxinfo | grep direct
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Error: couldn't find RGB GLX visual or fbconfig
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
But i solve and Savage XR working well :

Thursday, December 2, 2010

Fedora 14 versus 3D software .

In the next few days ago I decided to try software 3d with Fedora 14.
I am disappointed again. I was expecting some improvements in this area by the developers.
Especially because it is a difficult topic.
But let's see why I have this impression...
I have searched for packages that are required with this command:
# yum search "3d engine"
...
============================== Matched: 3d engine ==============================
irrlicht.i686 : A high performance realtime 3D engine
crystalspace.i686 : Crystal Space a free 3D engine
ember.i686 : 3D client for WorldForge
ogre.i686 : Object-Oriented Graphics Rendering Engine
Code:: Blocks does not work with Ogre 3D or Irrlicht 3D packages. Although I spent quite a long time. However, on Windows XP this combination worked well.
Ember game working hard. Maybe because my video card - FX5200, not really likes the new drivers.
Code:: Blocks is very stubborn. Ogre and Irrlicht Wizards of the Linux version of Code:: Blocks does not work at all.

Friday, November 26, 2010

Savage Server and Selinux under Fedora 14

If you want to install fedora Savage Game Server 14, you will have problems with SELinux.
Use this commands to fix it.
$ chcon -t execmem_exec_t '/home/mythcat/SavageSer/silverback.bin'

Thursday, November 25, 2010

Fun with F-Spot 0.8.0 and sqlite3

Today I focused on the F-Spot version 0.8.0.
I knew that contains a database that keeps information about the pictures.
I found the database and tried a few commands:
$ cd .config/
$ cd f-spot/
$ ls
addin-db-001  photos.db
Once I found the database, I started SQLite3. See the example below:
$ sqlite3  photos.db 
SQLite version 3.7.2
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
exports         meta            photo_versions  rolls         
jobs            photo_tags      photos          tags          
sqlite> .schema photos
CREATE TABLE photos (
 id   INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, 
 time   INTEGER NOT NULL, 
 base_uri  STRING NOT NULL, 
 filename  STRING NOT NULL, 
 description  TEXT NOT NULL, 
 roll_id   INTEGER NOT NULL, 
 default_version_id INTEGER NOT NULL, 
 rating   INTEGER NULL 
);
CREATE INDEX idx_photos_roll_id ON photos(roll_id);
sqlite> select * from photos;
1|1279913277|file:///home/mythcat/Photos/2010/07/23|IMG_2970.JPG||1|1|0
It is easy to use and implemented various python scripts.

Sunday, November 21, 2010

Linux and denial of service - DoS

A denial-of-service attack (DoS attack) or distributed denial-of-service attack (DDoS attack) is an attempt to make a computer resource unavailable to its intended users.
We can see more on the wiki web page.

On Linux we can see if an attack is attempted with this:

netstat -ant | grep SYN_RECV | wc -l
This is an indication of a denial of service (DoS) attack against your system's X port.

It is likely one attack against a public service such as a web server or mail server.

Thursday, November 11, 2010

Notifications in Fedora 14

We use the following command
$ notify-send  "This is some text"
or
$zenity --info --text "This is some text"
This will display a text balloon "This is some text".
The problem appears when we want to display the output of a command.
For this, I used a python script. Here's the source code:
#!/usr/bin/env python
import os
import sys
import pynotify
pynotify.init("Output comand")
arg=sys.argv[1]
print arg
s = os.popen(arg).read()
n = pynotify.Notification("Output",s)
n.show()
If you wish to use a compound command, then you will need to use quotes.
For example, we use the command "ls-a 'as follows:
$python testpy.py "ls -a"
This is just a small example, you can create more complex applications.