Friday, November 4, 2011

pacman-key --init not enough random bytes available

Running pacman-key I get



[youri@slavluv ~]$ sudo pacman-key --init
gpg: Generating pacman keychain master key...


Not enough random bytes available.  Please do some other work to give
the OS a chance to collect more entropy! (Need 284 more bytes)


a.)[youri@slavluv aur]$ wget http://aur.archlinux.org/packages/rn/rng-tools/rng-tools.tar.gz
b.)[youri@slavluv aur]$ tar zxvf rng-tools.tar.gz
c.)[youri@slavluv aur]$ cd rng-tools
d.)[youri@slavluv rng-tools]$ makepkg -s
e.)[youri@slavluv rng-tools]$ sudo pacman -U rng-tools-3-2-i686.pkg.tar.xz
f.) change timeout=0 to timeout=10 in /etc/conf.d/rngd

2.) [youri@slavluv rng-tools]$ sudo rngd -f -r /dev/urandom

3.) [youri@slavluv ~]$ sudo pacman-key --init
Password:
gpg: Generating pacman keychain master key...
....+++++
................+++++
gpg: key DBCCC88E marked as ultimately trusted
gpg: Done
==> Updating trust database...
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u



Tuesday, June 7, 2011

Trying to play GTA vice city under linux with wine.

First I need to install wine:

[youri@slavluv Downloads]$ sudo pacman -S wine

Now to configure wine and create all the folders, and it also installs gecko packages. In config I added drive D: as /tmp/CD

[youri@slavluv Downloads]$ winecfg

Make the folder in CD in tmp and mount the iso. "-o loop" (modprobe loop if it's not loaded)

[youri@slavluv tmp]$ mkdir CD
[youri@slavluv tmp]$ sudo mount -o loop /home/youri/Downloads/Grand\ Theft\ Auto\ Vice\ City\ -\ PC/GTA_Vice_City.iso CD/


Run the setup:

[youri@slavluv tmp]$ wine CD/setup.exe




Went through install (did not choose to use radio stations)

Using the no-cd crack (I have the cd but not cd-rom drive, so I have to download it, it's not illegal if you have the licensed CD)

[youri@slavluv Grand Theft Auto Vice City - PC]$ cp -f Crack/gta-vc.exe /home/youri/.wine/drive_c/Program\ Files/Rockstar\ Games/Grand\ Theft\ Auto\ Vice\ City/


Now I went to install directory ( /home/youri/.wine/drive_c/Program Files/Rockstar Games/Grand Theft Auto Vice City ) and ran wine gta-vc.exe


It messed up my screen/didn't work.

Mounting the play CD the same way I did the install CD loaded the game. All the textures are blocky though. Probably would work fine at this point for someone with a decent video card..


Errors:

fixme:d3d:CompareFunc Unrecognized WINED3DCMPFUNC value 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:swapchain_gl_present Render-to-fbo with WINED3DSWAPEFFECT_FLIP
fixme:d3d:CompareFunc Unrecognized WINED3DCMPFUNC value 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:swapchain_gl_present Render-to-fbo with WINED3DSWAPEFFECT_FLIP
fixme:d3d:CompareFunc Unrecognized WINED3DCMPFUNC value 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:StencilOp Unrecognized stencil op 0
fixme:d3d:swapchain_gl_present Render-to-fbo with WINED3DSWAPEFFECT_FLIP
fixme:d3d:CompareFunc Unrecognized WINED3DCMPFUNC value 0

Disabling "Allow pixel shader" in wine settings  fixes the blockiness. Game is still slow though.

Thursday, April 21, 2011

lighttpd fastcgi issues

Suddenly "mod_fastcgi" being enabled in "server.modules" for lighttpd is causing problems.

 2011-04-21 19:30:58: (log.c.166) server started
2011-04-21 19:30:58: (mod_fastcgi.c.978) bind failed for: unix:/var/run/lighttpd/php-fastcgi.socket-0 Permission denied
2011-04-21 19:30:58: (mod_fastcgi.c.1399) [ERROR]: spawning fcgi failed.
2011-04-21 19:30:58: (server.c.938) Configuration of plugins failed. Going down.

Fix:

[youri@nemesis run]$ sudo gpasswd -a youri http
Password:
Adding user youri to group http

Or I should maybe make lighttpd run as http user again.

Wednesday, April 20, 2011

Mapping the cell locations from an iphone db on google maps

IOs stores the GPS locations of towers it connects to in this file:

/var/root/Library/Cache/locationd/consolidated.db

It's an sqlite3 file... So here is a script to pull the longtitude and lattitudes and turn them into a simple KML file.
#/bin/bash

#this is the KML heading
echo '<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>

  <name>youri</name>'
 
#pull the longitude and latitude from sqlite3
for i in $(sqlite3 consolidated.db 'select longitude,latitude from celllocation';)
do coordinate=$(echo $i | sed 's/|/,/g')



echo '<Placemark><name>'$coordinate'</name><Point><coordinates>'$coordinate',0</coordinates></Point></Placemark>'
done;

echo '</Document></kml>'


I added this to my lighttpd.conf and restarted it.

  ".kml"       =>      "application/vnd.google-earth.kml+xml",

Then it's just a matter of passing the kml file to google maps..

http://maps.google.com/maps?q=http://$yourserver/output.kml

I noticed a bunch of towers I never connected to  (far away places) so there are some problems with this.

Monday, April 11, 2011

Gnome-shell annoying bug.

Accidentally hitting the print screen button (which I do a lot because of this stupid keyboard) I get an annoying popup:

Text was empty (or contained only whitespace)

and in /.xsession-errors
Window manager warning: Error on command 33 "": Text was empty (or contained only whitespace)

Went to system settings - > keyboard -> shortcuts and disabled the printscreen shortcut for now.

Update: removing ~/.gconf and ~/.gnome* fixes this.

Friday, March 25, 2011

Convert mp3 to iphone ringtone.

Convert the mp3 too a wav first.

[youri@nemesis ringtone]$ mplayer -ao pcm Loudest_Ringtone.mp3 -ao pcm:file="ringtone.wav"

Then wav to m4r. M4r is the format iphone wants ringtones in.

[youri@nemesis ringtone]$ faac ringtone.wav -o loudest.m4r -w

Transfer file to iphone. I use sftp.


[youri@nemesis ringtone]$ sftp root@yphone:/Library/Ringtones
root@yphone's password:
Connected to yphone.
Changing to: /Library/Ringtones
sftp> put loudest.m4r
Uploading loudestm4r to /private/var/stash/Ringtones.wljzz0/loudest.m4r
loudest.ringtone.m4r                                                           100%  306KB 305.8KB/s   00:01   
sftp> exit

Sunday, February 20, 2011

Avant-window-navigator system notification daemon applet crashed

GStreamer-CRITICAL **: gst_debug_add_log_function: assertion `func != NULL' failed
aborting...

Solution: re-install avant-window-navigator-bzr & awn-extras-applets-bzr

configure: error: The xdg python module is required (pyxdg or python-xdg)
    Aborting...

Stupid python3!

Solution: sudo ln -s /usr/bin/python2 /usr/bin/python

Saturday, February 19, 2011

Joining many AVI files together & changing framerate

convert into one file:

for i in $(ls); do cat $i >> bigavi.avi; done
mencoder -forceidx -oac copy -ovc copy bigavi.avi -o FINAL.avi

framerate (25):

ffmpeg -i FINAL.avi -f yuv4mpegpipe - | yuvfps -s 25:1 -r 25:1 | ffmpeg -f yuv4mpegpipe -i  - -b 1000k  faster.avi

Thursday, February 17, 2011

Remove dead repo (installed by package) from cydia via ssh

Failed to fetch http://ispaziorepository.com/./Packagez.gz HTTP/1.1 404 Not found.

Can't remove the repo through cydia, it was installed by JB tool.


 [youri@nemesis ~]$ ssh root@192.168.1.6 
root@192.168.1.6's password:

yPhone:~ root# rm /etc/apt/sources.list.d/ispazio.net.list


Fixed.

Sunday, February 13, 2011

Upgrading ubuntu 10.10 to natty narwhal

youri@zexlette:~$ sudo do-release-upgrade -d

This hangs at "Calculating the changes"

youri@zexlette:~$ sudo aptitude update
youri@zexlette:~$ sudo aptitude full-upgrade

1164 packages upgraded, 135 newly installed, 78 to remove and 0 not upgraded.
Need to get 623MB of archives. After unpacking 3,940kB will be freed.

E: Couldn't configure pre-depend x11-common for x11-utils, probably a dependency cycle.

youri@zexlette:~$ sudo dpkg --force-depends --remove x11-xkb-utils
[source]

youri@zexlette:~$ sudo aptitude full-upgrade

Monday, February 7, 2011

mjpg-streamer on arch with uvc webcam

[youri@nemesis ~]$ pak -S mjpg-streamer-uvc

[youri@nemesis ~]$ mjpg_streamer
MJPG Streamer Version.: 2.0
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 640 x 480
 i: Frames Per Second.: 5
 i: Format............: MJPEG
Unable to set format: Invalid argument
 Init v4L2 failed !! exit fatal
 i: init_VideoIn failed

[youri@nemesis ~]$ mjpg_streamer -i "input_uvc.so -d /dev/video -y" -o "output_http.so"
MJPG Streamer Version.: 2.0
 i: Using V4L2 device.: /dev/video
 i: Desired Resolution: 640 x 480
 i: Frames Per Second.: 5
 i: Format............: YUV
 i: JPEG Quality......: 80
 o: www-folder-path...: disabled
 o: HTTP TCP port.....: 8080
 o: username:password.: disabled
 o: commands..........: enabled

501: Not Implemented!
no www-folder configured
 
http://localhost:8080/?action=stream works

Monday, January 3, 2011

Cydia: Parsing dependency pre-depends


Cydia shows error: parsing dependency pre-depends


SSH'ing and doing apt-get update shows this:

Reading package lists... Error!
E: Problem parsing dependency Pre-Depends
E: Error occurred while processing com.sinfuliphone.adblocker (NewVersion1)
E: Problem with MergeList /var/lib/apt/lists/www.sinfuliphonerepo.com_._Packages
E: The package lists or status file could not be parsed or opened.


Problem is that Pre-Depends: is empty for some packages.
 Solution until sinful fixes things: 

rm /var/lib/apt/lists/www.sinfuliphonerepo.com_._Packages 

or remove pre-depends from adblocker and tlert in sinfulliphonerepo