26 March, 2015

xampp cannot use wordpress theme images

A localhost WordPress could not display images from the themes folder in Xampp on a Linux Mint system.

Solution: all folders must be owned by the Apache user and group (daemon:daemon), or:

# chown -R daemon:daemon [theWordPressThemenameFolder/]
# chmod -R 777 [theWordPressThemenameFolder/]

However this is only for development purposes. On a server work by these guidelines.

23 March, 2015

Install themes on WordPress (Xampp on Linux)

Do this:

# cd /opt/lampp/
# sudo chown -R daemon htdocs
# sudo chmod -R g+w htdocs

On Apache the user is called daemon, therefore chown -R daemon htdocs.

Thanx to this post (my solution is for Linux the former was for Mac).

Now you can install whatever themes on the fly from the WordPress Dashboard.

16 March, 2015

Start the Xampp panel on linux

(64bit) # sudo /opt/lampp/manager-linux-x64.run
(32bit) # sudo /opt/lampp/manager-linux.run

03 March, 2015

Jquery - run it on localhost

Sometimes Jquery needs to run on a server. The accordion plugin is a sample. If you run the code directly from a directory, the darn thing does not work. If you run the same code on your localserver it works fine.

Below: Jquery accordion from a file


Below: Jquery from localhost

Ergo: run Jquery scripts on your localhost or on a server.

11 February, 2015

Drupal Install

In the new version the default settings could not be created. This seems to work:

$ mv default.settings.php settings.php
$ touch default.settings.php

08 February, 2015

Raspberry Pi - thoughts

I love the idea of the Raspberry Pi. But often I tend to just do the exercises on one of my several Linux systems. The creative ideas for projects of the many hands on projects in the community is a source of great inspiration. I have made a smart-TV, and reused an old telle for that purpose. Xbmc runs like a charm on it. Perhaps I'll use the smart-tv in the kitchen for todolists, recipe browsing and similar.

31 January, 2015

Galaxy S3 Cannot Use SD card

For a week or so my Galaxy S3 use, see or format the SD-card. Tried restart, taking SD out etc. but nothing worked. Empty slots for notworking programs are all over the phone. Could not remove the non-existing apps - which is messy and weird.

Log ...
  • Software update - did not help.
  • Reset to factory settings - 
One week later

So far no progress. By now I just use the phone for talk and sms. So not-smartphone. Trying another update.

Found this - it seems that the SanDisk app is the cause of the problem.

27 January, 2015

Comtrol DSLR camera via USB from commandline in Linux

My first gphoto2 image


Install gphoto2

# sudo apt-get install gphoto2
Run gphoto2 from the commandline. Here are some options:

# gphoto2 --capture-image-and-download

The camera will take a picture, and save it to the active folder.

# gphoto2 --list-device

Will tell the name of your camera.

On my SONY A58 the USB-setting in the menu must be "remote PC".

For samples see the man file, or "Using gphoto2".



After installing gphoto2 you can write a bashscript and call it automaticly via anacron or crontab.

In order to see whether your PC is able to connect to the cam, try this:

# gphoto2 --auto-detect

Model                          Port                                           
----------------------------------------------------------
Sony SLT-A58 (Control)         usb:001,015    

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

Xampp - How to imort the Sakila data - if the file size is a problem

The student T- at the third semester multimedia design zipped the datafile. Then the import worked like a charm.

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