2016-11-14

Remove password from PDF files (protected from printing)

Who knows why but I have a bulk of password protected file received from an an administration. Of course these are my files and I have the password.
I can only read the files with acroread or other pdf viewers but I cannot print these or save without password.

The problem is that I need to print these file for another administration... Here is how I solved the problem :

for f in *.pdf; do pdftk "$f" input_pw passowrdHere output "nopw_$f"; done



This line of bash will, for each *.pdf file of the folder, open the pdf using the password and save the non protected file with nopw_ as prefix.
 



2012-03-09

The best script...

... at least the one I use the most :

for i in *.jpg; do echo "$i"; convert "$i" -resize x50 "$i"; done

2011-12-27

gtk and other graphical configuration under fluxbox

For some reasons, after a fresh install of fluxbox and fine tuning of the configuration, I had one issue with the icons set and font size in most of the applications.

I solved the problem by using a simple tool (not in command line, for once, in order to get the preview of the modifications): lxappearance

In few actions, I got what I need, icons are now back in thunar







I post this as a note for my next install and it might help others.

links :
http://fluxbox.org/
http://thunar.xfce.org/
http://sourceforge.net/projects/lxde/files/LXAppearance/



Labels: ,

2011-12-08

The end of the X movie

That's it,

I finally got my X server configured correctly, with a neat dual screen set-up ! This is a good sign, an evidence :  
~$cat .bash_history | grep xorg | wc -l
...returns "only" 22 entries today...

I have been struggling with the beast for almost two years now. And yes, I have read the manual and all the $*%ø tutorials on the topic; with no hope. I even gave up my free mind an downloaded the nvidia closed driver, tried the graphical configuration interface with very limited results. After hours of trials and errors, could eventually get the $£µ%ù dual screen working until the next reboot...

Finally, I moved again (my last post was also about moving 3 years ago), while unpacking in the new flat, I found the nice and brand new screen VGA cable and I had a flash, damn it !

My  video card is a nvidia geforce 5700 FX (from mathusalem), with a double output, a DVI plug and an standard analog VGA plug. I have a huyndai 17' L70S imagequest, plugged on the VGA and a LG 24' plugged as DVI. There was the problem ! The %µù*$^  DVI was switching to sleep mode and the £ù*%µ driver would eventually forget about it, simply considering it was disconnected and somehow switching only on the VGA screen, ... This is the reason why I could get it working but during limited time and in awkward circumstances.

It took time, but I had finally the idea to come back to the old school analog cables and bought a DVI_to_VGA plug and connected the two screens as VGA. Do you know what ? It worked like a charm in few minutes.

I choose the "separate X screen" configuration instead of a real dual screen. I prefer to have two independent X screen, to allocate applications and to have proper screen calibration set-up (through the nvidia-settings application).

As a result, my first screen :0:0 is in 1900x1080 and the screen :0:1 is in 1280x1024.
I am not using Xinerama (I don't need to extend some applications from one screen to another.

Screen :0:0 is the wide and new one for photo editing and work, the smaller one :0:1 is for monitoring, parallel videos, music player, chat, etc...

Bellow is my file, quite simple indeed, probably not perfectly optimised, but it works !

Next post is about my awsome nerdy conky configuration...

~$ cat /etc/X11/xorg.conf

# relative positions of the two screens, my big screen (screen 0), has absolute position x,y of 1280,0
# screen 1, is located on the left of screen 0
Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 1280 0
    Screen      1  "Screen1" LeftOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection
# I disabled Xinerama, I didn't want to extend my desktop on a large virtual screen, I prefer to keep separated screens, it's also better for calibration I think
Section "ServerFlags"
    Option         "Xinerama" "0"
EndSection
# mouse stuff, I hate mac, and yes 3 buttons is cool, I wish I had more
Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

# need to type, this is not an iPad !
Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

# wide screen, main screen
Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "LG C243"
    HorizSync       30.0 - 83.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection


# smaller screen, side screen
Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "IQT L70S"
    HorizSync       31.0 - 79.0
    VertRefresh     60.0 - 75.0
    Option         "DPMS"
EndSection


#video card for the first screen, first output
Section "Device"
    Identifier     "Videocard0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce FX 5700"
    BusID          "PCI:1:0:0"
    Screen          0
EndSection


#video card for the second screen, second output
Section "Device"
    Identifier     "Videocard1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce FX 5700"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection


# allocation to video cards to screen, depth and meta modes, kind of auto mode, it works like this, I will not fine tune more...
Section "Screen"
    Identifier     "Screen0"
    Device         "Videocard0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "TwinViewXineramaInfoOrder" "CRT-0"
    Option         "metamodes" "CRT-0: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

 # allocation to video cards to screen, depth and meta modes, kind of auto mode, it works like this, I will not fine tune more...
Section "Screen"
    Identifier     "Screen1"
    Device         "Videocard1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "CRT-1: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection




2009-01-25

Desperated

New job, new computer, new phone... windows mobile, windows XP... my linux box is in the boat, will get it in one month...Arg

2008-03-05

New machine in town...

So my trustful old laptop from the lab is going to be sent down the drain... Well, can't say I'll cry as I've been using the thing for 3 years and the pas 4 months without a working lcd.
A new machine is currently being built and shipped my way by, ekk, Dell again. Cannot change it, IT policy from my university, that sucks but we cannot do anything about it. Or at least I prefer to put the fight on double booting rather than on machine type.
And I fought...
And I won the right of having a double boot on the damned new machine, if and only if, they provide no support whatsoever for me. Hell! You touch the freebsd partition of my machine and you are a leaving the lab in a body bag, that's how I care about your support!!

So... Dell D430. That what it's going to be...
Freebsd 7.0 is going to be installed on it by me.
I managed to get them to partition the HD in 3 separate bits: one for XP (and *not* Vista which is somehow a good thing as I heard...), one fat32 for data so I can access it from both side, and the last one empty.

We'll see how it turns out...
Can't wait to test freebsd 7.0!!! More soon then...

2008-03-01

eeepc powered

Ok, sometimes I often like to buy stuffs which are not really useful, but this time, I promise, I might have bought the most necessary device... A damn small linux powered laptop...A5 size, 4G of disk, 300€.

The computer is delivered with a custom Xandros distribution which is really optimised for this material, the boot time is really short and the CPU / RAM strong enough to run googlearth, gimp, inkscape, firefox and vim (ah ah).

Nevertheless, I must have played less than ten minutes with the easy mode interface and switch to the "advanced" interface which is kde (beark). After two weeks, i've decided to install fluxbox which was really easy (xandros is debian based and apt-get install was my friend). After I have optimised the screen usage as this computer screeen is only 7''.

I had to install few extensions for firefox (little-fox theme and fullscreen extension) and then I have reduced the menu fonts by editing the userChrome.css and change to a smaller size the fonts.

/home/user/.mozilla/firefox/95olpcar.default/chrome> vim userChrome.css


After this, I played a lot with the fluxbox themes, and decided to customise the "Lait" theme and reduce all the fonts and borders to the minimum.

Ok, this post is not really detailed, it was just a short message from the free world. I happy about this new toy but a little bit desperate when I read the blogs and forum about the eeepc, it seems some guys are willing to install windows on it...wtf..but what for?


2008-02-15

Saving time ?

Good to be back, long time without post here !

Damn day, I have 30 000 thousands text files and I need quickly to change some informations contained in the files. In fact I have to update some dates in these files....

Some time it's longer to think about about to do it a clever way than doing by brute force !



Option one
: if I was a windows user I would open file by file, I would use MS word for this and then use the replace function, type each time the text to find and to replace



Option two : back home, log on linux and in two minutes refresh my sed basic knowledge a make a script



Option three : why not having more fun with sed and vim ??? Why? Because vi is rigolo !!



Here is the Option 3 :
for i in *.txt; do vim -c '%s/08\/02\/07/22\/02\/07/g' -c 'wq!' $i; done




Done !

2007-09-14

Coming back from the dead. A FAT32’s story.

I’ve forgotten why but it appears that I still had an old FAT32 partition on my (windows) computer (primary is NTFS). Last week, it crashed taking down all my photos, DL, and so on at the same time :) (Since Murphy’s law is the great rule that unified them all, let’s say I’d never heard of such things as backup !) The only things left was this dull message : The disk in drive D is not formatted. Do you want to format it now ? - NO !

Sadly when it comes to windows, software often rimes with money (or with astalathings – you’re evil !). Fortunately, I found TestDisk(1) which, one more time, prove that there IS a true god out there on the internet. Bless the GNU God.

This nice tool try to reconstruct the boot sector (look in the advanced menu) and find the root directory. I suggest that you let it find the root directory by itself if the first candidate seems not valid (use Abort, it’ll look for the best match).

If it succeeded, you can check the validity of its solution with List and write a brand new boot sector. Life can be beautiful, isn’t it !

Tools:

(1) http://www.cgsecurity.org/wiki/TestDisk

Virtualisation 2. The free world’s revenge.

Some time has passed since the last time I build a virtual box from scratch with vmware… Now, time has come to use some pretty GNU stuff: VirtualBox(1) is all you need.

Before anything else, I have to warn you that despite being outrageously easy to install, I only used it has a client with NAT configuration. Has I’ve seen on the web, you can configure it with host interface. It seems only a little bit more tiresome than vmware configuration.

Like I’d said, it’s really easy : download VirtualBox (1.5), Download the ISO image of your preferred OS (I’d choose the Debian Etch.)

Step 1: Basic installation (with X)

Step 2: Installation of the guest additions.
Download the kernel header files, the default gcc version (which appears to be the one needed to recompile the kernel). Mount guest additions ISO image and run the installation script.

Step 3: Pb…
- I had to change the X configuration file manually to enable the new video driver in the Device section : Driver “vboxvideo”. (In fact, I do not remember if I’ve done this by editing this file or by running a dpkg-reconfigure xserver-xorg command)

- Once done, I loose the mouse cursor (but the mouse was still active). This time, you really had to edit xorg.conf and change the InputDevice’s driver to vboxmouse. It seems to be a known bug.

Step 4: Enjoy.

Tools:
(1) http://www.virtualbox.org/

2007-03-20

Virtualization

Let’s face it : windows is still the best OS for doing pretty cheap/bad things in the minimum amount of effort (non exhaustive list : printing document on a un-collaborative shared printer, making a presentation (Powerpoint rules !), and so on.) Nonetheless, when it comes to serious computing you’ll want a real partner ! Someone you had faith in, like a unix/linux box ! You can do it a) with efficiency b) with panache


A) The vmware approach ( some variation might reside on the dark side of the legal frontier)

- Solution 1 (maximal efficiency - require a registration step):

Tools of the trade (I had to stop reading hacker’s stories):
vmware player (free) :
http://www.vmware.com/products/player/
vmware workstation (evaluation copy) : http://www.vmware.com/download/ws/ and http://www.vmware.com/download/ws/eval.html
Note: currently there is the beta 6 out there for testing purpose here : http://register.vmware.com/content/beta/ws/registration.html

Your unix/linux installation cd

Here are the process for a Debian Sarge (Note : I had to choose the default 2.4 kernel to install vmtool or I had to cope with compilation pb - and no time to solve them.)

Step a. install workstation, create a new virtual guest (at least 256Mo of RAM) with bridged network if your on a lan with a dhcp server somewhere or nat if you want a stealth mode :). Choose a adequate storage space you can not alter it afterward (3-4 Go for a functional debian). Fortunately, vmware is smart enough to adapt the size of the corresponding file to what is really needed.

Step b. insert the install cd

Step c. boot your new guest and follow the installation process. Install the kernel headers (if you do this after this step use : apt-get install kernel-headers-`uname -r`).

Step d. install X. choose the vmware drivers for the screen. The mouse is an ibm/ps2 (/dev/psaux). Choose 24 bits 1280x1024 and lower resolutions. Here is a sample of my X11 configuration file prior to vmtools:

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "fr"

EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons" "true"
Option "ZAxisMapping" "4 5"

EndSection
Section "Device"
Identifier "VMWare Inc [VMWare SVGA II] PCI Display Adapter"
Driver "vmware"

EndSection
Section "Monitor"
Identifier "Écran générique"
HorizSync 28-50
VertRefresh 43-75
Option "DPMS"
EndSection
Section
"Screen"

SubSection "Display"
Depth 24
Modes "1280x1024" "800x600" "640x480"
EndSubSection

Step e. once the installation is complete, choose to install vmtools (this option is available in one of the menu. Once actuve it create a CD) [it improves the graphic performance and so on. It is not mandatory but it’s way cool !) See http://www.vmware.com/support/ws55/doc/new_guest_tools_ws.html for additional détails. Mount the CD; find the vmtoolsxxx.tar.gz; gunzip; untar; launch the installer. It will compile vmtools for your kernel. A sample of X11 post installation:

Section "Monitor"
Identifier "Écran générique"
HorizSync 1-10000
VertRefresh 1-10000
Option "DPMS"
ModeLine "800x600" 100 800 900 1000 1100 600 700 800 900
ModeLine "1280x768" 100 1024 1100 1200 1300 768 800 900 1000
# ModeLine "1280x1024" 100 1280 1300 1400 1500 800 900 1000 1100
ModeLine "1280x1024" 135 1280 1312 1416 1664 1024 1027 1030 1064
ModeLine "1600x1200" 100 1600 1700 1800 1900 1050 1100 1200 1300
EndSection

Use the rest of your evaluation period to install other guests OS :)

Step f. When your done uninstall workstation and install vwmplayer instead.

Job complete !

The only purposes of the workstation was to a) create all the file requested to install the guest OS b) provide vmtools. Solution 2 get rid of a). Note : it seems that keeping vmtools after step f is legal (I’ve read somewhere that vmtools comes from vmware server which if freely available). . .

- Solution 2:

Tools of the trade:

Qemu : “a generic open source machine emulator and virtualizer” http://fabrice.bellard.free.fr/qemu/
Qemu Accelerator module : same url
vmtools (if you consider that keeping it when using the player is legal) : http://taltan.free.fr/index/2007/02/06/61-vmware-tool-toujours-sur-la-main
vmplayer

The goal is to build all the files needed by vmplayer without workstation. The process comes form i) http://johnbokma.com/mexit/2005/10/26/vmware-player-windows-xp.html, ii) http://cri.ch/linux/docs/sk0020.html, iii) http://www.hackaday.com/2005/10/24/how-to-vmware-player-modification

Step a. create a storage file with qemu :
qemu-img.exe create -f vmdk .vmdk 4G

Step b. Create a file .vmk like this one :
config.version = "8"
virtualHW.version = "3"
#scsi0.present = "TRUE"
ide0:0.present = "TRUE"
ide0:0.filename = "Rheas.vmdk"
memsize = "256"
MemAllowAutoScaleDown = "FALSE"
#scsi0:0.present = "TRUE"
#scsi0:0.fileName = "Rheas.vmdk"
ide1:0.present = "TRUE"
ide1:0.fileName = "D:\Tmp\master.rheas3.0.iso"

ide1:0.deviceType = "cdrom-image"
#ide1 :0.fileName= "auto detect"
#ide1:0.deviceType = "cdrom-raw"
#ide1:0.autodetect = "TRUE"

floppy0.present = "FALSE"
ethernet0.present = "TRUE"
usb.present = "TRUE"
sound.present = "TRUE"
sound.virtualDev = "es1371"
sound.fileName = "-1"
sound.autodetect = "TRUE"
displayName = "RedHat2004"
guestOS = "other24xlinux"
nvram = "Other Linux 2.4.x kernel.nvram"
scsi0:0.redo = ""
ethernet0.addressType = "generated"
uuid.location = "56 4d 9e 34 6d 2f 6b 75-1f be 02 0c 1b a0 e2 7d"
uuid.bios = "56 4d 9e 34 6d 2f 6b 75-1f be 02 0c 1b a0 e2 7d"
ide1:0.autodetect = "TRUE"
tools.remindInstall = "TRUE"
ethernet0.generatedAddress = "00:0c:29:a0:e2:7d"
ethernet0.generatedAddressOffset = "0"
ide1:0.startConnected = "TRUE"
tools.syncTime = "FALSE"
ethernet0.connectionType = "bridged"
checkpoint.vmState = "Other Linux 2.4.x kernel.vmss"
ide0:0.redo = ""

Pay attention to

a)the ide1:0 if you want to install your OS from an ISO or from an real CD.
b)the guestOS must belong to the list describe in ii) but I suspect that this info is not utterly important.

Next steps. follow solution 1

B) The free way : qemu

Qemu : “a generic open source machine emulator and virtualizer” http://fabrice.bellard.free.fr/qemu/
Qemu Accelerator module : same url

Step a. Install both qemu and the accelerator (download the source package and execute the .inf)

Step b. enable the accelerator with the command : net start kqemu

Step c. create a storage file

qemu-img create –f qcow .img G

Step b. Launch qemu

qemu.exe -L . -cdrom "\\.\F:" -hda debian_sarge.img -m 256 -boot d -net nic -net user -redir tcp:5555:10.0.2.15:80 -redir tcp:5556:10.0.2.15:8080

This command tells qemu to boot with the cdrom (you can also specify an iso file) and redirect all the outgoing connections for port 80 and 8080. This way you’ll be able to download all the requested files during installation and surf the web after that ! 10.0.2.15 is the default ip returned by the qemu dhcp server. (Note : I use 8080 since I’m behind an http proxy which is listening to incoming connections on this port)

Step c. If you have to reboot from the hard drive you should stop qemu, and change the -boot parameter from d to c (you can keep the cdrom image if you had to).

Step d. Configure X11. Use the PS/2 with /dev/psaux for the mouse and the cirrus driver for the video (screen : Hsync 30-70 Vrefresh 50-160 option DPMS) I tried 1280x960 but I think I’m stuck with 800x600.

A brief note:

I had to admit that I prefer vmplayer due to it’s flexibility and ease of use:
- the 1280x1024 screen,
- switch full screen with ctrl/alt/return (I don’t remember how but it is possible to make the upper toolbar dockable… the trick is to switch to full screen then find the key combination (like CTRL+ALT) to call the host OS pointer but not exiting the full screen mode ! Then click on the pushpin … that’s all !
- access your usb pen with one click+mount and it’s done

and so on.

Final advice n°1: do not forget to set up a samba client with a windows shared folder (setting a server might look better but do not forget all the possible windows’ delay when the OS try to access your directory and your virtual machine is off (like when you configure an auto-connect shared folder)).

Final advice n°2: do not forget to alter the smb.conf ! Particularly:

domain master = no
local master = no
preferred master = no

I forgot this step and saw 2 sys admins came into my office searching for the owner of the station who continually usurp the domain master browser :(

2007-01-14

It's been a long time...

I've been moving... many things have changed in my life, I've been struggling ?

The point is that I had no time these days to nerd on my computer (soledad). Since I am living in Dijon, I have been using Gnome and Mandriva 2007, arg! I know some guys (to be precise, mainly one who is not far from here) who could die from an heart attack reading this...

Today, after 45 minutes of running around the Lac de Kyr, I decided to bring my linux box back to a normal life and to build a fresh e17 2007 cvs !

2007 will be e17 year !

2006-10-26

1... 2... Daaaaaaaashhhhhhhh!!!

Hej, it's been a while... How are yall doin'?
Mmmm soory I'm getting my US english back on track before going to Boston next week... Anyway, enuf said 'bout my life...

Recently I got a pretty annoying little problem. Some asshole, sorry, I meant some windows user thought it was nice to start a file name by "- ". Come on dude!!!
"- foo -" is NOT a good name for a file.
It is bad, in the sens of contrary to good! It is evil!!! Imagine the whole world as you know it collapsing in a trashing curse, life being wipe clean by tempest of acidic rainy winds... sort of...
Bad!

OK. So how does a Unix guy get around that a rename it, mv-it I should say, into something more reasonable, such as foo.txt for instance. Because - is the option thingy, see.

Easy when you know the trick, like swallowing a burning spear or a sharp curvy sword. Yes, if you know the damn trick!!!!
OK, ok, here it is: start the name of the file by ./ (telling basicaly that you want to act in the present directory, which actually is what you want...) so that you get something like mv ./-\ foo\ -.txt foo.txt and there you are.

I hate you, windows guy... but there is always, *always*, ALWAYS a solution in our Unix command line world...

2006-10-16

Setbacks in Debian land

Another 'reminder' post :
Allright, you're ready to install a Debian distro right from the internet... Things are going well until the program chooses the lan to install itself instead of your standard pppoe ADSL connection! Meaning either you didn't read the info displayed or your modem response to DHCP Discover is privileged... (probably both of them)

Ok, stay calm and wait for the end of the procedure.
pppoeconf will not be sufficient to save the day. You'll have to edit the /etc/network/interfaces, comment out 'iface eth0 inet dhcp' and add 'iface eth0 inet ppp provider . Bring up eth0... That's all :)

Ref: take a look at 10.6.1.6

2006-10-11

Chasing Orpie

Severe brain damage caused by windows left me naked with my debian box.

A. Statements :
Where have they put my calc.exe ?
aka No I don't feel miserable enough to use expr !
aka I don't want to use my cell phone either
aka besides, I don't want to compute square root with the basic operands with the previous methods

B. Encounter deep inside the land of the lost packages.
The first google rule stress that thou shall not seek in vain (at least with no time constraint). Imagine that you meet someone whose very first words are "Because the equals key is for the weak". How could you refrain yourself from falling in love ? Let's face it, the world would never be the same anymore.

By the way, Orpie is a command line scientific calculator using the RPN notation and a visual stack. The chances are high that you could snob all your coworker just like during the hp48 days! (Remember ? When you were the only one willing to lend his/her calculator knowing the awful truth. The world were divided between 2 classes : those who would/could not understand how to use it and those who already own one. Ah! Life were so simple back there!)

Help yourself, go and compile it ! It's here

2006-10-10

The infamous John Smith, the stream ripper...

Some time ago, Longwei shared with us how to record an episode of some monument (he said so) of the French TV in order to go out and have some beer with friends (there)...
Today I was confronted to almost the same issue: some friends of mine are doing a radio show in France on RadioCampusGrenoble, while I am willing to go and juggle in the juggling gathering her, in Copenhagen. The beauty of Internet let me stream the show, albeit at the correct time...

So. Here we go again, the same in color! Or rather the same without image.
To hear the stream I just connect to the website of the radio and use any kind of software which can do that (BeepMediaPlayer on Cafetière for example), to record it on a mp3 or rather ogg file we need something else, in the name of Streamripper... Sounds like a serial killer to me but it might be because I listen to too much deathmetal.

Then it is the same cooking:
- do a script with the correct parameterss
- edit correctly your cron table
- go out and toss some stuff in the air, try to catch it again or run faster than gravity bring it back...

Here comes the script:
#!/bin/sh
#duration in seconds

$TIME=$1
/usr/local/bin/streamripper http://live.campusgrenoble.org:9000/rcg112.m3u -l $TIME -a -A -m 15

Here comes my cron table:
30 21 * * * /home/hern42/scripts/rcg.sh 5400

I know it is some sort of a rip-off Longwei's fantastic work but, hey, his script didn't work out of the box for my radio show...