Monday 15 August 2011

Enlightenment Window Manager Alt F2 key assignment

I really loved Enlightenment WM in the old days sort of pre 13.x if I remember correctly in the days of Mandrake, not that anything is wrong with the current maintainer, I thought I'd give it a try since we seem to be caught in barbed-wire (sorry should be a quagmire) with Gnome3, Unity and the like. I sort of like e17 but soon found it wanting in that no Alt F2 to run commands without accessing the menu.
Here's a fix if you have that problem;
We are going to install gexec and bind the Alt F2 keystroke to that command so here
goes:(Actually this seems to give you g3 + uni T functionality) nah g3 does more.
If you don't already have gexec installed just type agi gexec (agi stands for apt-get install a short cut/alias you should add to your .bashrc see my previous posts with loads of other apt-get short cuts/aliases you can add to your /root/.bashrc unless you want to mod them and add a sudo in front of all the aliases in your $HOME/.bashrc Once gexec is installed, from your terminal run gexec notice the other options funky huh? or was that fun key, ok ok that wasn't funny. I was only trying to get you to notice the 'run in terminal' and 'run as root' options, back to the prg.
Key
-> = goto

From your menu -> Settings -> Settings Panel That should start your Settings (App)lication
In the Scrollable menu options at the top of the Settings App select Key Bindings
In the left pane (Key Bindings) Scroll Down to Alt + F2
In the right pane (Action) scroll down to Launch then Select Command
(just below Launch)
then at the bottom of the right hand pane you will see Action Params
delete whatever is in that field and type in the location of your freshly installed gexec which in my case was /usr/bin/gexec. To find yours at the terminal type which gexec return, that will give you the location.
This seems simple enough in one of the very early Linux Window Managers hopefully this procedure is not limited to Enlightenment might be slightly different in the other Window Managers.
Hope this helps or keeps you happy whilst they make their minds up about Gnome3/Unity/?!?.
Remember send me mail to let me know your $views help required etc. etc. etc.

Tuesday 10 May 2011

Using Linux to clean a virus from Windows

Yeah this is a bit of a headache so here's some aspirin pre-requisites
Infected Windows drive:
A bootable linux system either fully installed or from USB
If not already installed install clamav and any dependences.
Install a debian type distro for easy package management

apt-get update && apt-get upgrade -y && apt-get install clamav-freshclam clamav-dbg clamav-base clamav

you may have to set up the proxy
export http_proxy='<ip-address>:3128/'
or authenticate
export http_proxy=http://username:password@proxy.thing.com:8080/

#!/bin/sh
And a sample command is:
sudo clamscan -r /COSA_CAZZO_SCANSIONARE
Well, Once the scanning, Remove infected files with this command:
sudo clamscan -r --remove /COSA_CAZZO_SCANSIONARE
To start the GUI, type:
sudo clamtk
Hello and good scan :)

cd /tmp
1st attempt to run clamavscan -r --repair /dev/sda1
complained cannot find clamav "No supported database files"
clamav stores virus signatures in dBs in /var/lib/clamav
results
----------- SCAN SUMMARY -----------
05 Known viruses: 0
06 Engine version: 0.95.1
07 Scanned directories: 0
08 Scanned files: 0
09 Infected files: 0
10 Data scanned: 0.00 MB
11 Data read: 0.00 MB (ratio 0.00:1)
12 Time: 0.001 sec (0 m 0 s)
It means that you have no virus signatures stored in database files.

so let's get some dB scan files
wget http://database.clamav.net/daily.cvd
wget http://database.clamav.net/main.cvd
mv main.cvd /var/lib/clamav/
mv daily.cvd /var/lib/clamav/
I mounted the drive before running the scan not sure if that is necessary so
mount the drive
first make the destination
mkdir /media/sda1
mount
mount /dev/sda1 /media/sda1
run av
after mounting I run clamavscan -r --repair /media/sda1
4 hrs later results

----------- SCAN SUMMARY -----------
Known viruses: 953056
Engine version: 0.97
Scanned directories: 25256
Scanned files: 197630
Infected files: 22583
Data scanned: 55633.72 MB
Data read: 41429.39 MB (ratio 1.34:1)
Time: 10775.542 sec (179 m 35 s)
root@ubuntu:/var/lib/clamav#

clamscan -r --remove /media/sda1/
:)

Thursday 14 April 2011

Copy flv files from firefox 4

Disclaimer
Downloading copyrighted material is illegal in some places which could include where you live, so make sure you only use this technique to download videos which are legal for YOU to download this would include getting the author's permission or say you lost your user details for a video upload site like YouTube, and there is no facility to retrieve YOUR videos . OK?


That was the disclaimer stuff, well let's start. It would seem in versions > 10.x the flash plugin is actually playing an already deleted file so... lets track down that file.
1) Load the video in a browser, and check the output of the following command @terminal:
$ lsof | grep -i flash
Result:
single line:
plugin-co 25546 alvin 17u REG 8,2 31286337 787220 /tmp/FlashXXepl8fa (deleted)
The output of the cmd gives a file descriptor open to a “deleted” file, /tmp/FlashXXepl8fa so the flash plugin plays the file and immediately deletes the file thus normal nix tools will not be able to access the file in /tmp notice the 17u in your flv file location so here goes.

2) To confirm again type @terminal:
$ ls -l /proc/16864/fd/* | grep -i /tmp/Flash
Result:
single line:
lrwx------ al al 64 2011-04-14 14:08 /proc/16864/fd/17 -> /tmp/FlashXXTep18fa (deleted)

3) To get your freshly cooked flv file again type @terminal:
$ cat /proc/16864/fd/17 > <filenameofyourchoice>.flv
That's it copy the output of the proc file process to a filename and location of your choice.
Hope this helps and does not get anyone in trouble but out of trouble.

4) To speed things put it all in a script.
Idea of script: output the flv file type @terminal:
outflv.sh <yourfilename.flv>

Contents of outflv.sh:

#!/usr/bin/env bash

## syntax: outflv.sh $HOME/Videos/somefile.flv


for flashpid in $(pgrep -f flashplayer.so); do
cd "/proc/$flashpid/fd"
for video in $(file * | grep '/tmp/Flash' | sed 's/\(^[0-9]*\).*/\1/g'); do
cat /proc/$flashpid/fd/$video > $1
done
done

Tuesday 12 April 2011

CUPs error client-error-not-possible fix

When I upgraded my Ubuntu to 10.10 also Debian to 6.0 I experienced this cups error so herre's the fix. - OK it would seem that there is a problem with the samba windows client, any attempt to add an smb unc path e.g
smb://<servername>\<printername>

for the printer, gives a system error or cups error message "client-error-not-possible" this I think is caused because the smb client is now samba4-client, when the system is looking for sambaclient all you need do is install the smbclient which will uninstall your samba4-clients and voila problem no more or should we say problem fixed so again apt-get install smbclient it will remove samba4-clients which is ok if you don't specifically use it. Hope this helps... ;)

Monday 14 March 2011

Android TiPz

OS: Android 2.3.3
Hardware: HTC HD2
Tip
To improve the speed or reponse of your device try moving as many of your Applications as possible to your SD card rather than running them from your phone'a memory.
At the moment I am using Winmo and Android together because belive it or not I have a Winmo legacy application that I need to run so until someone can write an app on Android that allows you to run WinMo apps I kinda have to reboot to WinMo :(
But I am more than impressed with the functioning speed of Android 2.3.3 when you can physcially see the difference in speed as a result of an upgrade it is worth it.

OS: Android 2.3.3
Hardware: HTC HD2
Fix
Android Market NOT downloading!
After installing my shiny new Gingerbread 2.3.3 (Gingerbread's don't shine but...) I went to the Android market of course to re-install all my Apps I'm accustomed to, after a while of downloading from the Market it just would not download any more, to fix I went to:
->Settings
->Applications
->Manage Applications
->Downloaded
You will get a list of all your downloaded Applications if you select an App, Just below the Data information, you will see a button labeled "Move to SD card" if the application is not in use or in memeory (I think) it will allow you to move it to your SD storage once you begin to make some space on your phone's memory you will find you can continue to download Apps from the market again.
Yippee...

Disclaimer:
I have not tested this with all versions of Android or all or various bits of hardware with the Android OS. I take no reponsibility for any results expected or otherwise from YOU attempting the changes on this website. Attempt or implement at your own risk.

Saturday 12 February 2011

Make Firefox Addons Compatible

Or should we say uhhhhHHH... Make FIREFOX ignore compatibility
--8<---Firefox Actions Begins--->8--

Type: http://about:config into Firefox's address bar
Then click the "I'll be careful, I promise!" button.
Right-click anywhere. Choose New>Boolean.
Make the name of your new config value extensions.checkCompatibility and set it to false.
Make another new boolean pair called extensions.checkUpdateSecurity and set the value to false.
Restart Firefox you're ready to rock uh surf.
Tested with Firefox Versions 3.x not tested with 4.x versions yet let me know how you get on with your comments.
--8<---Firefox Actions Ends--->8--

Friday 11 February 2011

Get emacs24 for linux now

--8<---Get EMACS24 Begins--->8--

Using debian so the following may need adjustment for other distros.

** # To install development Version of Emacs install the following
agi is an alias in my .bashrc for apt-get install in your favourite editor edit ~/.bashrc
then type:
alias agi='apt-get install'
saves you I meant me typeing...
agi lsb-rpm lintian binutils-multiarch libtext-template-perl
agi planner-el bbdb blosxom vm w3m-el gnuserv gnus
agi remember-el easypg org-mode
agi libwx-perl-datawalker-perl libwx-perl-dialog-perl libwx-perl-processstream-perl
libwx11-0 libwx11-0-dbg libwx11-dev libwxbase2.6-0 libwxbase2.6-dbg libwxbase2.6-dev
libwxbase2.8-0 libwxbase2.8-dbg libwxbase2.8-dev libwxgtk2.6-0 libwxgtk2.6-dbg
libwxgtk2.6-dev libwxgtk2.8-0 libwxgtk2.8-dbg libwxgtk2.8-dev libwxsmithlib0
libwxsmithlib0-dev libwxsvg-dev libwxsvg0 libwx-perl wx-common libfaad-dev libgsm1-dev
libogg-dev libschroedinger-dev libspeex-dev libtheora-dev libvorbis-dev libraw1394-dev
libdc1394-22-dev wx2.6-doc wx2.8-doc liborc-0.4-doc libraw1394-doc
The following will have to be installed before trying to compile emacs or the trunk.
agi xul-ext-adblock-plus conkeror conkeror-spawn-process-helper
agi imagemagick imagemagick-dbg imagemagick-doc libmagick++-dev libmagick++3 libmagickcore3
libmagickwand3 perlmagick gambas2-gb-image tex4ht tex4ht-common goby
nautilus-image-converter php5-imagick python-pythonmagick python-vipscc
agi libgif-dev libgif4 libgift-dev libgift0 libgiftproto-dev libgiftproto0 giflib-tools
libgif-dev libgif4 libtiff-doc libtiff-tools libtiff4 libtiff4-dev libtiffxx0c2
libtiff-opengl pngtools optipng pngcrush
agi cl-clg cl-launch cl-modlisp cl-swank clisp clisp-dev clisp-doc slime stumpwm bison-doc
db4.8-doc rlwrap sbcl sbcl-doc sbcl-source

# for myconfig install pythonmacs and ropemacs
agi python-ropemacs python-rope python-mysqldb python-pygments python-svn-dbg
python-mysqldb-dbg ttf-bitstream-vera python-gdbm-dbg python-tk-dbg
python-egenix-mxdatetime-dbg qct

From term Type: bzr branch bzr://bzr.savannah.gnu.org/emacs/trunk
this will Download the trunk of the latest Emacs in a folder near YOU then to compile
cp -R /home/<your-home-folder>/trunk /usr/local/emacs-24.0.50/
cd /usr/local/emacs-24.0.50/
Start compile
(a little note you may need to run
sudo sh autogen.sh
or if logged in as root
sh autogen.sh) you should be ready now run or type
./configure
# As I'd already run ./configure I run the following to restart afresh
make distclean && ./configure
make
src/emacs -Q
# to test the freshly installed eMacs24
make install
make clean
# I could no longer find src/emacs I later found it in
ls -l /usr/local/bin/emacs-24.0.50
there you have it from now on run
/usr/local/bin/emacs-24.0.50

This gives you emacs-24.0.50.1 with CEDET, Auto-complete, pymacs, rope-macs,YASnippet, org-mode and the rest of the kitchen sink.


If you get any ERRORs please post the info in your comments I will do my best to help you.



--8<---Get EMACS24 Ends--->8--

Monday 7 February 2011

Migrate Ubuntu 9.04 to 10.10

Warning this is dangerous and should be treated with the utmost caution I would suggest.
1) Backup copy of /etc folder
2) Backup all . folders in home folder
3) Don't forget any folders you might have there for specific apps
4) Check /opt to see what's in there you might need to re-install specific versions
5) For emacs copy .emacs and .emacs.d in home folder and make sure you aware of all you've added to emacs

After install my samba shares are not working as samba is not creating /etc/samba/smbpasswd I've tried touching the file and setting perms to 644 to no avail when I smbpasswd -a no errors.
Searched google etc. but