setting PHP Server Header


you get warning in your browser that the js data are transfered as MIME type text/xs-javascript,
Or you have delared in your html meta:

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />

but you can still not read utf-8 charactor in your browser.

It is all because your server header is sending in a different definition.
I am using a lot Appache and PHP. So the definition in your html meta is not enough for a UTF-8

I need to set the Server header manually. It is possible to change the setting in Appache config file.
But mostly you don’t have the possibility to access this file.
In PHP you can set the server header with “header()” function.

For example:

// set server content header
header('Content-Type: text/html; charset=UTF-8');

at the very first line of your php file. If the php file has include, you should
insert the header call at the very first line of your include file so that this
Server header modification always take effect first.



A bash script for WindowsDFS mount in Linux

Since the Kerberos Tickets only works for 24 hours in our system,
i wrote a bash script for crontab to automatically remount a windows DFS
directory in our linux system.

Please sieh my post: Mount Windows DFS in Linux with Kerberos

You should run this bash as “root” or root user. If you want to use it for other users,
your should check the rights for your users.

this script only need to be called once, even the kerberos tickets is invalid after
24hours the mount  point is still working. you still have write and read access
to the mounting point (Windows DFS Directory).
Just make sure after server reboot,
this script will be called.


#Editted in 10.05.2012
mountDIR=<your mount point in linux system>
mountingDIR=<your directory in windows DFS //windows/directory >
# AD User and AD password
ad_user=<your Active Directory user, who can be authenticated in AD>
ad_password=<AD user password>
# Access User for Mounting Directory in DFS
user=< User who has the access and write rights in Windows DFS directory, $ad_use >
password=< User password for DFS directory ,$ad_password >
# DFS Domain
dom=<Your DFS directory Domain, XXX >
# Access Richts Setting for Mount Point
uid=< The user who should have access from Linux to access the Mount Point, 
      your DFS after mounting >
gid=< The Group who should have access from Linux to access the Mount Point >

#creat mount point directory
if [ ! -d $mountDIR ]
        echo "Directory doesn't exist"
        mkdir $mountDIR       
        echo "Directory exist, it will be unmounted"
        /sbin/umount.cifs $mountDIR

# get kerbos granting ticket from AD, the user must be a memeber of AD
kinit $ad_user $ad_password;

# after the ticket successfully granted, mount nas Directory to mount point
# use uid and gid option to specify the user id and group id'
# for mount point access rights
/sbin/mount.cifs $mountingDIR $mountDIR -o user=$user,dom=$dom,

Activate Screenlock for Lxde

if i am away from my lxde session, i can not find a easy way to lock my screen by means of Screensaver application.

i have tried to make a short cut of Screensaver in my desktop, and than start Screensaver.
In menu ->”File”->”lock screen now”. But this procedure is still too complicated

Edit your lxde configuration file to enable key combination to lock screen.

vi  ~/.config/openbox/lxde-rc.xml

And then add the following codes within the <keyboard> tag

<!– Launch Screensaver by user  –>
<keybind key=”C-A-l”>
<action name=”Execute”>
<command>xscreensaver-command -lock</command>

After the modification, you should log off from your lxde session, if you start your session
again, you can lock your screen with “Ctrl-Alt-L”

Please make sure that there is a “space” between the “xscreensaver-command”
and the option “-lock” within the <command> tag, otherwise this will not work.


[Problem background]

ich made a new user for my Opensuse System. Want to use libre Office.


The application cannot be started. LibreOffice user installation could not be processed due to missing access rights. Please make sure that you have sufficient access rights for the following location and restart LibreOffice: /home/<username>/.config/.libreoffice/3-suse


The Issue means libreoffice can not access the .config/.libreoffice directory

As i looked to the rights it is made only for root access

so just execute

“sudo chown -R <username>:users /home/<username>/.config/.libreoffice/”

to change the permission of this .config directory


After permission change, libre Office runs for the appropriate user. I am just still wondering how it comes, the .libreoffice directory has root as owner at the very beginning.


Libre Office is a good alternativ to microsoft office sets, but why cannot opensource just work without any professional skills? 🙂 life is still hard for a normal people in linux worlds.

Convert vmx data from version 4 to version 3.1.5


I have created a linux vmware guest system in a vmplayer 4 and want to

play this vmware guest in a vmware player 3.1.5

Since i can’t upgrade my pc from vmware player 3.1.5 to version 4,

i have to modify the vmx config data.


While playing the vmware guest in vmplayer 3.1.5 , i got this error message

“Invalid configuration file. File “D:\virtualmachines\Opensuse12.1-1\Opensuse12.1.vmx” was created by a VMware product with more features than this version of VMware Player and cannot be used with this version of VMware Player.
Cannot open configuration file D:\virtualmachines\Opensuse12.1-1\Opensuse12.1.vmx.”


Edit the xxx.vmx file

Change line: virtualHW.version = “8”

to : virtualHW.version = “7”


After this Modification , the guest is running in player 3.1.5