20 December, 2014

Yousee - Linux? No webtv.

Yousee really sucks big time. No Linux support for the web tv. Perhaps I should look for an alternative TV provider.

13 December, 2014

Boot problems

A Debian system would not boot. A file system check failed. The PC is around 6-7 years old. So perhaps the disk is old and sore.

Perhaps the whole system need a total makeover. I bought Linux Format downtown, and fired up a Slax in the RAM. The Slax file manager had mounted the local drives of the system. So by now my data could be saved.
  1. Format a USB drive for the backup.
  2. Back up all data in /home/ via rsync 
  3. Install Ubuntu U.U. - KDE version.
  4. Restore via rsync.
Worked like a charm. It seems that my very old PC just needed a brush up.

02 November, 2014

CSV import problem



I could not open the .csv files from my bank. For some reason Libre Office did not get the correct file format. So I opened the file in gedit. The formatting looked all right. Then I tried a save as - and then the problem became obvious.

The image above demonstrates the problem. The file was exported as a iso-something file with Windows new-lines.

Recipe:

  1. Open the file in an editor.
  2. Choose save as
  3. Save as utf-8 with linux/unix new-lines
Then it's possible to open the file in Libre Office & friends.

22 October, 2014

Bluefish errors on Linux Mint

The Bluefish editor won't run. Tried a terminal start, just to see whether there were some error messages.

The Bluefish Error from Terminal:
error reading list 1 Error opening file: No such file or directory ** (bluefish:8863): WARNING **: no configfile rcfile-2.0, try to convert config files from older versions config file migration error 1:Error opening file: No such file or directoryerror reading list 1 Error opening file: No such file or directory (bluefish:8863): GLib-ERROR **: /build/buildd/glib2.0-2.40.0/./glib/gmem.c:103: failed to allocate 18446744073662306226 bytes
Trying this approach. So:
  • cd ~ 
  • rm .bluefish
  • Then I clicked Bluefish in the Menu and everything worked all right.
Probatum est.

09 October, 2014

10 September, 2014

Bitnami - where are the app files?



I installed WordPress via Bitnami, and naturally proceeded to work with a child theme. But where are the files? Normally they should be in the same folder as WordPress. They are not. On Linux the path to these files is:

  /opt/lampp/apps/htdocs/wordpress/wp-content/plugins

The directory is only for sudoers, så you may have to change the permissions to the folder, or edit as sudo / root. OS X may as well have to change permissions or work as the sudo.

On a linux system the quick and dirty solution is:

# sudo chmod -R 777 htdocs

On a Windows / OS X some bloggers suggest a rightclick - and then to give users read / write access. Then you're able to edit the files.

09 September, 2014

Dualboot Linux Mint on Windows 7


  1. Boot from external USB drive with DVD version installed. 
  2. All seemed ok.
In Windows 7

  • Shrinked NTFS partition with 19GB
Boot Linux Mint on USB drive.

  1. Choose Install Linux Mint "alongside them"
    (this option was'nt available when there was no empty partition available).
  2. Install (as usual language, password etc. chosen)
  3. And liftoff ....

04 September, 2014

MySQL start problems WAMPP (Xampp)

Several students had a problem with their Xampp. MySQL would not start. After some googling we found a thread on Stackoverflow with this workaround:


  • delete ibdata1
Whether this is sound advice or not I don't know. However MySQL was able to run. But I suspect that the file held information about all tables, so perhaps a repair of the entire database would be a good idea.

28 August, 2014

Instagram authentiation loop problem

If the code contains a

header(url-to-auth-instagram);

the file will try to go to the authentiation every time the file loops. Therefore the error message about the perpetual loop is correct. In pseudocode the solutions may be a condition, along these lines:

A solution:

if (!issset((get - code)) { header(url-to-auth-instagram) }
else --> step two etc.

14 August, 2014

01 August, 2014

Lyx - engelske overskrifter på indholdsfortegnelsen

Løsning: "always babel" i dokument / indstillinger / sprog / sprogpakke

Husk at installere den danske latexpakke:

# sudo apt-get install texlive-lang-danish

02 July, 2014

Brightness on Acer E1-570

In a thread on http://www.linlap.com/acer_aspire_e1-571 Jan gives this solution:

 I had the same problem and found this solution in “http://www.askubuntu.com”:

Try editing /etc/default/grub with the following values:

Open a terminal and type sudo gedit /etc/default/grub.

First try changing the line that reads:

GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash” to

GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash acpi_backlight=vendor”

Then save, close gedit and type sudo update-grub and reboot the computer.

01 July, 2014

Linux Mint up and running on Acer E1-570



Installing linux on the Acer was not exactly easy. Apparantly there was some kind of error on the harddisk. The steps in order to install Linux Mint were:

  1. Download SystemRescueCD.
  2. Boot Acer e1-570 in Legacy mode (change the bios settings. When you see the "Acer" during boot press F2. Then change the boot mode to Legacy.)
  3. Delete all partitions on the harddisk and make some new ones: boot / home and swap.
  4. Download Linux Mint .iso - I have chosen the 64bit Cinnamon version.
  5. Install the .iso to a USB drive via dd.
  6. Boot and install Linux Mint from the external harddisk.
  7. I have chosen to install Linux Mint on the entire harddisk. 
And then ... everything worked. Even the ethernet and the wifi and the trackpad. After all Linux seems to work like a charm on this system. Well that is everything apart from the brightness of the screen. And I'd like an option like killing the oversentitive trackpad. I guess these minor things are a matter of tweaks.

But killing Windows 8 was not easy.

By bye Windows ... ;-)

30 June, 2014

Create linux boot disk from .iso

dd bs=4M if=/media/TOURO\ Mobile\ 3.0/Peppermint-5-20140623-amd64.iso of=/dev/sdc && sync

dd is a nice tool, and relatively easy to use. Remember that the of = sdc and not eg sdc1.

29 June, 2014

Research on Install Linux on Acer E1-570

Reading:
Trying
Multiboot is very nice, since QEMU is incorporated, you can check the .iso files on the system.
After 5-6 attempts this approach did not work either.

28 June, 2014

Installing Linux on Acer Aspire E1-570

Here are  some notes made during my fight with the Acer E1-570 in order to get a Linux system. Eventually I succeded after three days of experimenting.

So I bought this PC. It's filled with irritating crapware. So the best solution I guess is to create a Linux system.

That's more easy to say than do. Installing Linux on this laptop is still work in progress. If somebody writes "works out of the box" ... I'd like to see it.

After two days of concentrated word: no success.

Perhaps the failed installs are caused by a defect on my USB. I'll try another install medium later on today. During the night I had Peppermint up and running - but only on the usb. The install however was not possible.

PARTITION
I have chosen to split the partition in two. Just in case my Tomtom GPS cannot update without windows. So the MS thing seems to survive.

DISTROS
So far I had no success I'm afraid ... below you may see what I tried in vain.

These were created by Pendrive:

Ubuntu

UEFI
The E1-570 will boot in Uefi. When you see ACER during boot press F2. Then you can change the boot order and choose to boot from a USB drive before the Windows partition.

I will try to boot via Legacy - that should solve any problems with the MS boot crap. I hope.

PENDRIVE
I used pendrive in order to create a boot usb.


  1. Ubuntu Gnome - crash: "Kernel Panic". Dropped.
  2. Same iso as above - tried to add persistent space (since the error said something about not being able to create drive or similar).
  3. Same as above - Linux is ok, but Gnome stalls. Some decompression error.
  4. Trying out Debian Live 7-5-0.
  5. Boot ok. Log into Debian ok. Some write error on the USB. Network and trackpad does not work out of the box. Apart from that all seems ok. This distro might work on a properly formatted drive. 

Debian
This install failed. Partially because Debian had no drivers for the Atheros ethernet. After some research, I found this post giving hints to a better bootorder.

This article gives some advice. Promising it seems. Perhaps my problems are due to some error on the USB. It seeems that Debian is not able to write to the disk for some reason. The article explains how to boot Windows in legacy mode:

Boot the computer on Windows, insert your password and as you arrive on the so called “metro” screen with all the tiles just go with the mouse on the upper right corner of the screen until a small window appears on the right side of the screen and select “Settings” go to the bottom of the new window that appears and select “Change the settings of the PC”.
Then select “General” and then “Advanced boot” and click on “Reboot now”. Check “Problem solving” in the new menu and then “advanced options”. Go to the “UEFI firmware options” tile and click on the “reboot” button
In the nez screen select the top menu “Boot” and switch to “Legacy mode”.



So I have an unclean system, that must be deleted.

Live USB cannot boot in uefi.
Live USB cannot use the ethernet and wifi.

Dropped the system.

Ubuntu
Can boot live usb - but when you try to use Ubuntu ... kernel panic. Dropped after several attempts.

Fedora
I had no luck with Debian & friends. Trying Fedora now.
Livedisk cannot boot.

SuSE
Hang on boot.

Peppermint Day I
Hangs.
Harddisk error.
Totally fucked up the system.
Cannot boot in Legacy.
Can boot in UEFI but cannot install.
Error: "No boot disk found"

Hang on trying to get the time from an internet server.

Changed hd  mode to IDE in bios.

Plugged in the network cable.
Ubi-partman crashed.

No luck here. Suspected that there was a fault on the install media.

Peppermint Day II
I can boot the live USB. And that's something, ain't it?
Tried to install - but "encountered ... error".

Trying the same recipe with ...

Debian Day II
Disk formatted via dd
Boot is possible in a live system.
Boot in Legacy mode.

Trackpad does not work.
Ethernet drivers are missing.
Wifi not found.

Seems that the Debian family should be able to run on this Acer.
Trying to find a flavour with drivers ...



Linpus
Not tried yet. Perhaps that distro might work, since the Acer One series used that distro.

Trying again with LiLi USB Generator



26 June, 2014

And so the battle begins

I'd like a dual boot system. So Windows has to behave. Now and then I need a game or even an update to our Tomtom. So ...
  1. Decrapifier

Symptom: Random windows pop up. Annoying.
Symptom: Skype needs MS login. Crap!
Symptom: Program focus changes randomly. Strange and annoying.

Windows 8 really sucks

That I do not like MS Windows is not exactly news. But Windows 8 really pisses me off. Sorry for my French. But why the Hell and in the name of Sir Belzebub do I have to log on to a MS account in order to log into Skype. There is NO way in Pensylvania (or a hot place below) that will make me do this.

Why in the name of the Prince of Darkness does the OS interrupt med with suggestions, strage screens from the startup that I do not want. I cannot work when interrupted by the OS all of the time.

Since many programmes become wothless on Windows 8 the verdict is yet again:

Format C:
Install Linux.

18 May, 2014

Hvordan man får billederne ud af iPhoto

I ~/Pictures ligger en fil med navnet *.photolibrary. Det er ikke en fil; men derimod en mappe; men Macen åbner mappen med iPhoto. Billederne kan sikkerhedskopieres sådan:

# find . -name "*.JPG" -exec cp {} /backUpDisk ;


02 May, 2014

Lyx - ville ikke vise PDF

Lyx - kan eksportere .pdf efter opdatering af ... Tex.


Sært problem. Lyx ville ikke "trykke" .pdf - efter megen googlen fandt jeg denne simple løsning:


  1. Åbn Applications / Tex
  2. Kør Tex Live Utility
  3. Opdater Tex
Herefter kan man vise en PDF (LuaTex).

30 April, 2014

Manuelt foto - F16 reglen

Lidt undereksponeret (formiddag, april 2014)


Tommelfingerregel til billeder i solskin:

  • F16
  • ISO 100
  • S 100
Den hamrende dovne tommelfingerregel er for ISO og S er:

  • ISO 100 = S 1/100 - ved solskin F16
  • ISO 400 = S 1/400 - ved solskin F16 etc.
Wikipedia har en fin artikel om emnet: http://en.wikipedia.org/wiki/Sunny_16_rule:

ApertureLighting conditionsShadow detail
f/22Snow/sandDark with sharp edges
f/16SunnyDistinct
f/11Slight overcastSoft around edges
f/8OvercastBarely visible
f/5.6Heavy overcastNo shadows
f/4Open shade/sunsetNo shadows
Add one stopBacklightingn/a

27 April, 2014

Android - flyt filer til SDcard


Fin guide til at flytte mediefiler til SD-card.

Filer fra Android til Mac


Jeg bruger Android File Transfer. Programmet giver et fint overblik over det som ligger på kort og mobilen.

iPhoto eksporter samtlige fotos

Jeg dropper iPhoto - desværre...

iPhoto er ellers et herligt redskab, når man bruger det; men hamrende irriterende, når flere brugere skal dele billeder. Her savner jeg, at Apple tænker billeder, som noget en familie deler. Jeg har i hvert fald brug for at dele vores billeder fra én mappe på Macen. Ellers skal vores 3.000++ billeder jo fylde to gange - og det er ikke hensigtsmæssigt.

Installer Photoshare fra code.google:

Hvis din Mac protesterer over at programmet er fra en usikker kilde:

  1. > System Preferences
  2. > Security
Låses op - og derefter skal Macen have lov til at bruge programmer fra enhver kilde.

Der er dog en hage ved programmet - udviklerne har stoppet arbejdet for to år siden i 2012. Derfor kan dette redskab være problematisk.


Jeg har prøvet en "dry run", der umiddelbart så fornuftig ud. Måske virker sagerne stadig nogenlunde.

Eksport fra iPhoto
Her er der flere muligheder. Man kan vælge > File > Export - og vælge at billederne skal komme ud i det originale format.



19 April, 2014

Python - start a webserver in any dir

Miniserver - en Debian netbook med ekstern harddisk.


LAN-server
# python -m SimpleHTTPServer 8000

Start så en browser ... sådan:

# http://localhost:8000/index.htm

WAN-server på WWW
Miniserveren kan i øvrigt åbnes for internettet. Det kræver at http porten åbnes. På routeren kan det være nødvendigt at åbne port 80 og at knytte porten til en bestemt computers ip. Serveren startes fx sådan:

# cd /media/myDisk/someDir/
# sudo python -m SimpleHTTPServer 80

Herefter er en simpel webserver klar - og online. 

Sikkerhedsmæssigt vil det være klogt at lukke for port 80 igen, når den ikke bruges.

04 April, 2014

json og ÆØÅæøå

Løsningen er at formattere strengen til utf-8. Se dette eksempel. Først sættes karaktersættet til utf-8, så udføres en query:

// utf-8
mysqli_query($mysqli, 'SET CHARACTER SET utf8');

// A QUICK QUERY
$query = "SELECT * FROM `Albums`";
$result = $mysqli->query($query) or die($mysqli->error.__LINE__);

01 March, 2014

Sqlite - import af eksport fra MySql



Umiddelbart er det vanskeligt at importere filen direkte, fordi Sqlite ikke bruger ` og ligenende tegn. Løsningen kræver lidt editering i filen.

Jeg fjernede modellen for en tabel; men beholdt data fra INSERT INTO ... - altså noget i stil med dette:

INSERT INTO `Albums` (`Id`, `Title`, `Who`, `Year`, `Price`, `Note`) VALUES
(1, 'The Photographer', 'Philip Glass', 1983, 50, 'Minimalism'),
(2, 'Den Blå Hund', 'Gnags', 1984, 50, 'Reggae. flip'),
(3, 'London Calling', 'The Clash', 1979, 60, 'Punk, New Wave'),
(4, 'Dreamtime', 'The Stranglers', 1986, 50, 'Alternative'),
(5, 'Under a Bloody Red Sky', 'U2', 1983, 60, 'Rock'),
(6, 'Gasolin'' 3', 'Gasolin', 1973, 200, 'Pop');
Derefter oprettede jeg tablellen manuelt (men det må kunne gøres mere elegant) med udgangspunkt i dette fra MySql:

CREATE TABLE `Albums` (
  `Id` int(4) NOT NULL AUTO_INCREMENT COMMENT 'Id',
  `Title` tinytext ,
  `Who` text ,
  `Year` year(4) ,
  `Price` int(11) ,
  `Note` varchar(2000),
  PRIMARY KEY (`Id`)

Eftersom Sqlite ikke forstår  ` og andre detaljer i MySQL syntaksen fjernede jeg dette, og oprettede tabellen manuelt. Da tabellen var klar prøvede jeg en import. Det kan enten gøres i terminalen eller ved at vælge import i Sqlitebrowser (et udmærket GUI, der virker i Linux).

Og det virkede så helt uden problemer.

03 January, 2014

Mac: Maximize Window to Full Screen

This is a secrete long sought for by the wise. Some even find it impossible. However ye greate secrete iss: shift + click green button in the menu bar.

Probatum Est.

02 January, 2014

Arbejdstid

Horus - timernes gud.
- Er jeg i overtid eller undertid? Hvordan beregner man det?

Julianske dage - eller den nemme måde
En enkel måde at følge sin arbejdstid er via den julianske dag. Julianske dage er en simpel optælling af dagene. 1. januar = 1 og de fleste år er dag 365 = 31.12. I en Terminal kan kalenderfunktioner nemt beregne den julianske dag.

Bruttoarbejdsår = 1924 timer
Bruttoarbejdsåret defineres som 1924 timer - inklusive helligdage og feriedage (man - fre hver 7.4 timer). Beregning af nettoarbejdstiden kræver så at man trækker 5 ugers ferie samt div. helligdage fra. Tallet fremkommer nok sådan:

1924 - hvorfor?
52 uger x 5 arbejdsdage x 7.4 timer = 1924.
En arbejdsuge = 37 timer.

Sådan gør du

>> Dagens julianske nummer x 5.271.

Fordi: 1924 / 365 = 5.271 timer pr. dag (med mindre der er tale om skudår)

Terminalen og den julianske dag
Skriv sådan:

# ncal -jw 2014

eller fx April måned i år:

# cal -jm 4

Resultat:

# per$ cal -jm4
        April 2014
 Su  Mo  Tu  We  Th  Fr  Sa
         91  92  93  94  95
 96  97  98  99 100 101 102
103 104 105 106 107 108 109
110 111 112 113 114 115 116
117 118 119 120

Eksempel: hvor mange timer skal jeg ha arbejdet 1. april?
Regnestykket ser sådan ud:

91 x 5.271 = 480 timer (afrundet). 

Og så er det nemt at se, om den faktiske arbejdstid er i plus eller minus.


Nettoarbejdsåret


Kan beregnes ved at trække ferier og helligdage fra bruttoarbejdsåret. Det ser sådan ud:

Ferie
5 ugers ferie: 5 x 37 timer = 185,0 timer 

Faste søgnehelligdage: 
- Skærtorsdag 
- Langfredag 
- 2. Påskedag 
- St. Bededag 
- Kr. Himmelfartsdag 
- 2. Pinsedag 

= 6 dage a 7.4 timer = 44.4 timer.

Forskydelige søgnehelligdage: 
- 1. juledag
- 2. juledag
- nytårsdag

max 3 x 7.4 = 22.2 timer (afhængigt af om disse dage falder i weekenden eller ej).

Ferie og helligdage udgør altså ca. 251.6 timer
Regnestykket med ferier og forskydelige helligdage er lidt bøvlet - derfor er det lettere at arbejde med bruttoarbejdstid: dagens julianske nummer x 5.271.


01 January, 2014

Rsync

# rsync -avz aUser@192.168.0.X:/home/Documents/ /Users/aUser/myBackupDir

Eksempel på synkronisering af drev på Linux og Mac OS X.

q.e.d.