Debian Ubuntu: Openbox Lxpanel Bug “Abmeldebefehl ist nicht definiert” “Logout command is not set”

Problem: If you install Openbox with lxpanel instead of LXDE and the User Profile is created after first logon, lxpanel config files are not created

lxpanel-logout-openbox-bug
lxpanel-logout-openbox-bug

Solution: Klick right with the Mouse on the lxpanel-settings, go tab advanced, set exit command =

 openbox --exit
, save and close

Debian Ubuntu: Delete Packages which are marked as “rc”

Problem: If you up/downgrade a Debian most of unneeded files are always on your disk

Solution:
To check:

$sudo dpkg -l | more

To cleanup:
dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge

If you like run the command twice cause sometimes deps are new taken
or install deporphan to:
$sudo deborphan | xargs sudo apt-get -y remove --purge

If you like run the command twice cause sometimes deps are new taken

Debian Squeeze: Which is current the best Debian for Laptops?

Problem: There is no difference between new and old Laptops, they always need the best Drivers on Linux to operate safe.

Solution: For this you should take Sqeeze Debian Version. To get a fast Desktop on a older Laptop like a Thinkpad R50p or T30 you can use LXDE Desktop.

/etc/apt/sources.list

deb http://ftp2.de.debian.org/debian/ squeeze main non-free contrib
deb-src http://ftp2.de.debian.org/debian/ squeeze main non-free contrib
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free

for upgrade, or take the LXDE-Debian-testing iso of the Debian Mirrors.
To install with a Install netinst – CD do:
aptitude install xdm lxde xserver-xorg pcman leafpad gpicview evince openoffice-org gimp iceweasel icedove vlc

to explain for new Linux Users:
xdm = Login Window
lxde = Desktop Window
xserver-xorg = Desktop Base
pcmanfm = fast Filemanager with smb and sftp options
leafpad = nice Editor
gpicview = view Images
evince = view PDF Documents
openoffice = free Office
Gimp = Image Editing
iceweasel = Browser
icedove= eMail
vlc = View Videos or News online
Remark: Base Memory usage of all near 120MB Ram only !!
If you want to get a very fast Browser you can install Google Chrome

MySQL : Backup and Restore Database without phpmyadmin (commandline)

Problem: phpmyadmin interfaces are slow and often attacked by script kids, if you can don’t use it!

Solution: To backup and restore use command line

To Backup a database:

 
$mysqldump -u root -p  wordpressdb > /backups/wordpressdb-dump.sql [Enter root password]

To restore:

$mysql -u root -p wordpressdb < /backups/wordpressdb-dump.sql[Enter root password]

Remark: this is not recogized by the ONLINE SYSTEM if users visits you pages to read! There must be no shutdown of the mysql or apache webserver, its a online HOT-Dump. If you like put it into a script and set cron to backup every night.
Sample Bash MySQL Script for full automatic dumps:
#!/bin/bash
## automatic dump database and add time and date stamp ##
date=`date +%d%m%Y-%H%M`                       # set current date value
mysqldump wordpressdb > /backups/wordpressdb-$date.sql  # save+date
exit  # close script after work

To save all Databases on one MySQL-Server change
mysqldump --all-databases > /backups/server-all-$date.sql

now run
 #crontab -e

set time to run:
@daily   sh /scriptpath/backup-databases.sh > /dev/null 2>&1

This runs daily backup at 00:00AM and post no message to Admin (root) if you need mails remove (>…1)

WordPress MySQL: Cleanup old revisions old posts old entrys

Problem: If you use wordpress and edit often your posts a high count of old revisions are backuped inside the mysql database:

Solution:
Login mysql

$mysql -u root -p [Enter root password]

at mysql command line select wordpress your database
mysql>use wordpressdb; [Enter]
System echo=Database changed..

delete old backups of posts
mysql>DELETE FROM wp_posts WHERE post_type = "revision"; [Enter]
System echo=..Entry affected time..

logout database and revisit pages, if you have made a database backup with mysqldump before and after cleanup you see how much size the database lost (du -h wordpress.sql)
often 80% of the size.

Ubuntu Debian: Replace Oracle OpenOffice with Free LibreOffice

Problem: Last weeks most of the free OpenOffice (Oracle owned) workers moves to the new free version LibreOffice
http://www.documentfoundation.org
Solution: To use free Software do:

on 32bit:
download files..

cd /tmp
wget http://ftp5.gwdg.de/pub/tdf/libreoffice/testing/3.3.0-beta2/deb/x86/LibO_3.3.0_beta2_Linux_x86_install-deb_en-US.tar.gz
wget http://ftp5.gwdg.de/pub/tdf/libreoffice/testing/3.3.0-beta2/deb/x86/LibO_3.3.0_beta2_Linux_x86_langpack-deb_de.tar.gz

unpack..
tar -xzvf LibO_3.3.0_beta2_Linux_x86_install-deb_en-US.tar.gz
tar -xzvf LibO_3.3.0_beta2_Linux_x86_langpack-deb_de.tar.gz

go into file to install..
cd DEBS
sudo dpkg -i *.deb
sudo dpkg -i desktop-integration/*menus*.deb
cd /tmp/DE/DEBS
sudo dpkg -i *.deb

ENJOY THE NEW FREEDOM…

on 64bit:
download files..

cd /tmp
wget http://download.documentfoundation.org/libreoffice/testing/3.3.0-beta2/deb/x86_64/LibO_3.3.0_beta2_Linux_x86-64_install-deb_en-US.tar.gz
wget http://download.documentfoundation.org/libreoffice/testing/3.3.0-beta2/deb/x86_64/LibO_3.3.0_beta2_Linux_x86-64_langpack-deb_de.tar.gz

unpack files..
tar -xzvf LibO_3.3.0_beta2_Linux_x86_install-deb_en-US.tar.gz
tar -xzvf LibO_3.3.0_beta2_Linux_x86_langpack-deb_de.tar.gz

go into file to install..
cd DEBS
sudo dpkg -i *.deb
sudo dpkg -i desktop-integration/*menus*.deb
cd /tmp/DE/DEBS
sudo dpkg -i *.deb

ENJOY THE NEW FREEDOM…

if preinstalled Libre office (update Libre Office) after tar command!

cd en-US
sudo ./update
cd DEBS
sudo dpkg -i *.deb
sudo dpkg -i desktop-integration/*menus*.deb
cd /tmp/DE/DEBS
sudo dpkg -i *.deb