laptop does not suspend when lid is closed

suddenly my laptop did not suspend when i closed the lid. i checked all settings of my linux mint 17 installation and all settings where correct. a quick search pointed me to http://askubuntu.com/questions/395428/laptop-does-not-suspend-when-lid-is-closed.

the solution for me was to edit /etc/systemd/logind.conf, changing the option HandleLidSwitch to suspend (valid options are suspend, hibernate and poweroff) and reboot the machine.

installing linux mint 13 (mate) on a fit-pc3 – xserver no screens found

i set up my fit-pc3 and had some trouble getting my xserver working .. here is how it went …

i was pleased to see a page in the wiki from compuLab but IMHO there are some points missing:

boot from usb flash drive

i changed the boot order in the bios (which you can enter via pressing “F2” during boot) but the screen was nothing but black. turned out that pressing “F1” randomly right after powering the machine it was booting from the usb flash drive.

linux mint 13 fails to boot

i also had to select “start in compatibility mode” to successfully boot the livecd

resolving xserver error – no screens found

after the installation finished the xserver would not start. some sites mentioned to simply update linux so i ran (after commenting “medibuntu” out in /etc/apt/sources.list)

sudo aptitude update
sudo aptitude upgrade

accepted any modified file to the maintainer’s version and restarted .. but nothing changed. so i follow the instructions from compuLab and installed the ati catalyst drivers using:

sudo aptitude install fglrx-updates xvba-va-driver vainfo

and restarted .. but still the xserver failed to start …

i finally cam across a forum post where the following command was mentioned

sudo aticonfig --initial

rebooted and the xserver was back again …

bash script to rip a DVD to XviD – auto-rip when insert media (gnome)

introduction – or why post so late?

as you will see in the script header comments i initially created it back in august 2012 .. as i saw the article on how to autorip dvds with windows on lifehacker i just had to reply …

the problem/challenge

i started writing this script because i wanted a ripping-solution which anybody could use. i did not want to write a howto for windows/linux but a solution that is truly auto-magic .. and then sends you an email when it’s done …

the solution

my approach for linux is a bash-script (now hosted on github) which can take one parameter for the dvd mount point. if no parameter is given it will go for “/dev/dvd”. it uses “mencoder” for the ripping, “mail” to send an email and “volname” to get the dvd volume name.

i then set this script to run as default action whenever a dvd video is inserted on my (atom) server, which is still running linux mint 9 with gnome. i did not have the time yet to set it up with LMDE but will post an update when i’ve done that.

the script

unfortunately i could not find an easy way to embed the source .. therefore please go check it out over at github

gnome: set a script to be run whenever a dvd video is inserted

in nautilus selecet “edit > preferences”

ripDVDtoXvid-1

then select the “Media” tab and set the script as default action for “DVD Video”

ripDVDtoXvid-2

 

changing the title, metadata and other properties of a password protected pdf

i bought an ebook reader (sony prs-t1 [which i rooted following this instructions]) and wanted to add all manuals of my house hold to it … so i could look up any setting quickly … so i downloaded the manual for my stereo system “TEAC TC-X350i” (from TEAC) and uploaded it to my ebook reader …

i had the idea that all manuals appear in the order %MANUFACTURER% %MODEL% …

i was confused that the manual on the ebook reader had the title “TC-X350I_OM_EF_…” and first thought of it beeing the filename .. but was wrong there … it turned out that this was some pdf-title …

i could not edit the manual as it was password protected … so i found the following solution to edit the pdf-title (and add other pdf properties):

run the following command to “print” a pdf named “temp.pdf” from the orginal pdf (named “original.pdf”) using ghostscript …

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=temp.pdf -c .setpdfwrite -f original.pdf

install pdftk if you don’t have it installed:

sudo apt-get install pdftk

now run the follwing command to get a file (named “result.txt” containing all the pdf-properties aka metadata) …

pdftk temp.pdf dump_data output report.txt

open it in gedit or any other text editor and edit the line after “InfoKey: Title” (right after “InfoValue: “) … the following image shows my edited “result.txt” (i also added the author “TEAC” and a subject “Manual”) …

changing the title, metadata and other properties of a password protected pdf

you then have to merge the new properties/metadata (the “result.txt”) to the “temp.pdf” using the following command which results in a new pdf “ebook_with_new_properties.pdf”:

pdftk temp.pdf update_info report.txt output ebook_with_new_properties.pdf

… that’s it .. you may delete the file “original.pdf” and “temp.pdf” now and use “ebook_with_new_properties.pdf” …

libdvdread4 error – no VTS_TMAPT ?? on linux mint using mplayer or mencoder

when trying to rip a video dvd using mencoder i got the error:

...
Please send bug report - no VTS_TMAPT ??

after a bit of googling it turnes out this is a well known bug .. and that it’s fixed in “libdvdread 4.1.3-10ubuntu3” so i double checked that the version i was using was the latest via aptitude …

as i did not get an update i searched for a new version and found this one for ubuntu precise:

https://launchpad.net/ubuntu/precise/+package/libdvdread4

so i just downloaded the .deb-file (to both my linux mint 10 and linux mint 9 boxes) and installed it with GDebi …

after this ripping and playback works again …

script for updating ip address on dyndns with ddclient if public ip changed

long time ago (very long) i set up a script which wrote the current date into a file and checked every hour whether the current date is different to that from the file .. and if so update dyndns …

pretty stupid .. right!

so i set up a new .. more reasonable one …

this one checks the current public ip address with the one set on dyndns ip (thanks!) ..

if it differs the dyndns ip is updated with the current public ip address …

you can find it (dyndnsCheckUpdate.sh)  on github within my bash_scripts repository …

i now added this script as cron job to run every 15 minutes …

zend debugger stopped working – apache errorlog [Zend Debugger] Debugger compile handler overriden

when trying to use the zend debugger today it just would not work …

looking into “window > preferences > debug > installed debugger” it showed me that i have xdebug and zend debugger installed …

a page suggested to remove xdebug … but when running phpinfo() it did not show anything about xdebug .. so that could not be the problem …

another page suggested to look into the error.log from apache where i read:

[Zend Debugger] Debugger compile handler overriden, will not be active in this request

when searching for this i found another page pointed me into the right direction .. (this one: http://www.phil-taylor.com/2006/04/05/debugger-compile-handler-overriden-cannot-continue/)

phil mentions that the problem is with running both zend debugger and the ioncube loader .. made me remember that i did install the ioncube loader last week …

his suggestion to remove the following line from php.ini did not work for me …

zend_debugger.expose_remotely=allowed_hosts

therefore i removed the zend loader … will set it up again when needed …

thanks phil!

howto format a usb thumb flash drive

to format a usb thumb drive you need a software called “gparted”.

installing gparted

to install it use the following command:

sudo aptitude install gparted

or you may also use the “Software Manager”,

howto format a usb thumb flash drive

search for “gparted” and install it.

howto format a usb thumb flash drive

run gparted

after the installation run it either by starting it with the command

gparted &

using the terminal or you may also find it in the mint menu listed in the group “Administration”

howto format a usb thumb flash drive

or just type “gparted” into the search box.

formatting

select the device you want to format from the dropdown list in the top right corner

howto format a usb thumb flash drive

when you made sure you have selected the correct device right-click the partition and select “Unmount”

howto format a usb thumb flash drive

then right-click the partition again and select the format you want the thumb drive to have from the sub-menu “Format to”

howto format a usb thumb flash drive

apply the changes by clicking on the ‘return’-button “Apply All Operations”

howto format a usb thumb flash drive

you have to confirm the operations to take effect

howto format a usb thumb flash drive

once the thumb drive is formatted you may close all windows and mount it by clicking on it in a nautilus window.