Posts mit dem Label Linux werden angezeigt. Alle Posts anzeigen
Posts mit dem Label Linux werden angezeigt. Alle Posts anzeigen

Freitag, 22. August 2008

How to split MPEG files on GNU/Linux

You can easily split MPEG files on GNU/Linux with mpgtx. (yum install mpgtx on Fedora Core 9):

[root@sundaysister lennart]# mpgtx -2 /tmp/happ.mpg -b m
Now processing /tmp/happ.mpg [1/2] ... 100.00%
Now processing /tmp/happ.mpg [2/2] ... 100.00%

After this you will have the first parameter defines how many parts you want to split the second parameter (the MPEG file) to. After the process has finished you will have the splitted files in the directory you executed mpgtx from.

Have fun! Great for VCDS (Video-CDs) ;)

Montag, 14. Juli 2008

Twitux - A GNOME Twitter client

I recently re-activated my Twitter account and searched for a desktop client. Twitux integrates well into GNOME and seems to be the best client out there:


Twitux is available in the Fedora repository and should be in others too.

http://sourceforge.net/projects/twitux

Have fun! And add me - I need some Twitter friends ;)

Freitag, 6. Juni 2008

Fedora 9: No sound with flash?

This blog post has moved to the new blog: http://blog.scopeport.org/fedora/fedora-core-9-sound-flash/

Freitag, 7. März 2008

Eclipse: PHPEclipse editor does not open?

When your PHPEclipse Editor does not open and tells you to look at the error log it is likely because you use the wrong JVM.

How to set the right JVM:
  • Install the Sun Java JRE ((k)ubuntu: sudo apt-get install sun-java6-jre)
  • In the file /etc/eclipse/java_home insert /usr/lib/jvm/java-6-sun on the line right above /usr/lib/jvm/java-gcj
  • Start eclipse. It might find a new workspace - Just select the workspace you used with the old JVM.

Mittwoch, 5. März 2008

How to use your KDE QT style in GTK applications like Firefox

When you want to use your QT Style in Firefox on Kubuntu you will have to install QT GTK Engine.
lennart@sundaysister:~$ sudo aptitude install gtk2-engines-gtk-qt

Montag, 3. März 2008

Found the mysterious memory leak in the ScopePort server

Never forget to use mysql_free_result(MYSQL_RES*)!

I found the leak with the help of the wonderful Valgrind. ( valgrind --tool=memcheck --leak-check=full ./scopeport-server)



Samstag, 23. Februar 2008

How to mount an ISO image in linux

You can mount a standard ISO image using this command (as root):

mount -o loop image.iso /mnt/myisoedcd

Note that /mnt/myisoedcd must exist. (mkdir /mnt/myisoedcd)

The content of the ISO image is now available at /mnt/myisoecdc (as your deskop environment may already have informed you about)

Freitag, 22. Februar 2008

ScopePort development debug data

Currently hacking the "Warnings" module...

Donnerstag, 21. Februar 2008

No fonts in Steam/Half Life 1 on Wine

When Half Life 1 on Wine is running but does not display any menu entries you need to install the Microsoft TTF fonts. On Ubuntu/Debian you can install them with "aptitude install msttcorefonts". You also need to place the Tahoma font into "~/.wine/drive_c/windows/fonts" - Don't know where to get the Tahoma TTF file? Google is your friend.

Sonntag, 10. Februar 2008

The first ScopePort console is ready!

I am currently finishing hacking the first ScopePort console! It's a ncurses-based C++ console that uses the ScopePort remote.php:


Useful ncurses tutorials/examples:
  • http://web.cs.mun.ca/~rod/ncurses/ncurses.html
  • http://www.captain.at/howto-curses-example.php
  • http://www.apmaths.uwo.ca/~xli/ncurses.html

Freitag, 8. Februar 2008

Developing C++ QT applications using Eclipse

You can easily develop C++ QT applications with Eclipse CDT! There is no need for another plugin.

It is important to define the correct libs in the Eclipse project settings. You can find out the correct g++ command string by using qmake(-qt4).
  1. Create a new C++ project.
  2. Add a source file (e.g. the hello world program from the QT4 tutorial)
  3. Use a shell to navigate to the source folder of your hello world program.
  4. Execute "qmake -project && qmake && make" (or qmake-qt4 if you want to use QT4)
  5. You should see the correct g++ line.
  6. Configure your Eclipse project to use the g++ settings.
My project settings (Kubuntu Gutsy, QT4):




You can now delete the files that were created by qtmake and use Eclipse CDT for developing your QT applications. Have fun!

How to download entire websites using wget (Linux [,*NIX])

You can download a whole website with the handy wget program:
wget -r http://example.org/somefolder
This is very useful for downloading documentations which are not available as a tarball or PDF.

Freitag, 19. Oktober 2007

Desktop effects with Ubuntu 7.10 (Gutsy Gibbon)

I wanted to try out the new desktop effect features of Ubuntu Gutsy but i got the following error message:
Desktop effects could not be enabled
So i started compiz from shell to see a possible error message. I found this message:
Checking for Xgl: not present.
I thought that Ubuntu already installed all packages i needed to run compiz, but it seems like i had no XGL installed.
So i started aptitude, searched for "xgl", found "xserver-xgl" and installed it.

You can do that by using aptitude directly from shell:
sudo aptitude install xserver-xgl
Now restart X (ALT + CTRL + Backspace), login again and enable the desktop effects! It does work without any modifications to your xorg.conf because Ubuntu did that for you after installing xserver-xgl.

Have fun! :)

My keyboard layout was changed after the restart of X. You can easily change it to your preferred keyboard layout in the Ubuntu settings menu.

Donnerstag, 18. Oktober 2007

DON'T download Ubuntu Gutsy yet

Please don't download Ubuntu Gutsy from any mirrors anybody sent you!
The mirroring process is still in progress.
You slow down the final release process by downloading from those mirrors. (Any you might get partial downloads)

Wait until Gutsy is officially released on ubuntu.com and use Torrent if you can.

Montag, 24. September 2007

Latest KDE4 Beta (2+) impressions

I just finished trying out the latest KDE4 Beta LiveCD in VMWare Server. It is still very (very!) buggy and seems to support only 256 colours, but it gives a lot of impressions of the upcoming KDE4 stable. I noticed that it is surprisingly fast (even in the VM) even though it has a few effects enabled.

You can download the LiveCD here.

Here are my screenshots:

The dialog in the upper left corner appears when moving over a symbol. You can control the Desktop here.


Dolphin - The new standard file manager.







The new sound system seems to be just great!

Desktop effects.




Umm.. Yeah... Buggy! :)

Sonntag, 23. September 2007

How to permanently mount a samba share on Linux

This blog post has been moved to the new blog: http://blog.scopeport.org/nix/permanently-mount-samba-share-gnulinux/

Freitag, 21. September 2007

How to save energy with Linux

I just discovered this great Intel website: http://www.lesswatts.org/

It gives you useful tips and guides how to save energy on Linux powered machines. In addition to the usual tips like "reduce LCD backlight power" there are some hints i would have never thought of - Did you know that you can save energy by editing your syslog configuration?

There is also a tool to detect programs that "misbehave" when your computer is in idle mode and cause a higher consumption of energy: http://www.lesswatts.org/projects/powertop/

I think it is very useful or even necessary to save as much energy as we can. Not just for your notebook batteries or your electricity bill but also for the climate.

Sonntag, 16. September 2007

Microsoft ads on linux.com

I was a little confused when i saw this Microsoft® ad on linux.com:

They should definitely improve their doubleclick.com blacklist. Even though the "Compare" site of Microsoft® is funny when you are familiar with Linux... Did you know that Windows has less downtimes and is more secure than Linux? They do also only compare to Red Hat Linux.
They must be really frightened of Linux and OpenSource in general when they compare Windows servers in the way they do on "Compare".

Mittwoch, 12. September 2007

Use Jabber!

Jabber is an free (as in free speech) instant messaging technology, like ICQ or MSN - It uses XMPP (an XML like protocol) which is highly extensible. Anybody can join the Jabber network and set up own jabber servers which are able to connect to any other jabber server. The whole Jabber infrastructure slightly equals the email (SMTP) system which can also be joined by everyone.
There is no central server which handles the whole communication of all members! If you have your own Jabber server (there are many OpenSource Jabber servers available) there is nobody who can unauthorized read your messages or claim any copyright (see http://en.wikipedia.org/wiki/ICQ#Criticism) on them.

I run my own Jabber server (ejabberd, http://en.wikipedia.org/wiki/Ejabberd) and it does not produce any notable CPU or memory load. It connects perfectly to the servers of my contacts - The setup took about 1 hour and i have not had any problems so far.

Check out http://en.wikipedia.org/wiki/List_of_Jabber_server_software for a list of Jabber servers.
As you can see there are a lot of servers available. Many of them will be in the repository of your favorite Linux distribution (though there a jabber servers for many more operation systems) - Check them out. I prefer ejabberd. It has an easy to use web interface.

Of course there are a lot of public Jabber servers if you don't want to run you own one. Ask Google or use the probably biggest one: http://jabber.org/ - The registration process may be unfamiliar to you: You don't have to sign up on the website. As on many public Jabber servers you can just point your Jabber client to jabber.org and register directly with your client. You will then immediately have your own e.g. @jabber.org or @example.com address. Friends can now add you with this address. Every Jabber client should be able to register you to public Jabber servers!

See http://en.wikipedia.org/wiki/List_of_Jabber_client_software for a list of Jabber clients. I use Gajim (not Gaim) on Ubuntu. It is easy to use, fast and supports PGP/GPG for client to client encryption of your messages. (Which is also a key feature of Jabber. Server to server encryption is also possible)

All in all Jabber is a great alternative to ICQ or MSN. There are so many extensions to the XMPP protocol that make Jabber unbelievable versatile. Check out http://www.xmpp.org/extensions/ for more information.

Check out http://chaosradio.ccc.de/23c3_m4v_1667.html if you speak German and want to know more about the versatility XMPP and Jabber.

Use Jabber!

Samstag, 1. September 2007

ABGraph v.1.0 is out

I just wrote a script called "ABGraph". It is free software, licensed under the GNU General Public License (GPL).
ABGraph is a simple tool to benchmark webservers. The program uses ab (apache benchmark) to actually benchmark the selected remote host. A graph in PNG format is generated with gnuplot and saved to the selected path/file.

http://sourceforge.net/projects/abgraph

Here is the source code:

#!/bin/sh

## Copyright 2007 Lennart Koopmann [lennart@dev-my.org]
##
## This program is distributed under the terms of the GNU General Public License (GPL)

VERSION="Version 1.0 (01.09.2007) \n"

## TODO: check if host is up |


########
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or

## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License

## along with this program. If not, see .
########

# $1 = hostname to benchmark
# $2 = where to output the PNG file

# $3 = number of requests (must be over 100)

# find out location of ab
ABLOC=`which ab`

#find out location if gnuplot
PLOTLOC=`which gnuplot`

echo "This is ABGraph $VERSION";

# check if all needed parameters are given
if [ -n "$1" -a -n "$2" -a -n "$3" ]


then

# move the gnuplot instructions to /tmp/abgraph-plotme
echo "set terminal png
set output '$2'
set title 'Benchmark results of $1'
set size 2,1
set key left top
set xlabel 'request'

set ylabel 'ms'
plot '/tmp/abgraph-data1' using 10 with lines title 'Benchmark 1 ($3/1)', '/tmp/abgraph-data2' using 10 with lines title 'Benchmark 2 ($3/25)', '/tmp/abgraph-data3' using 10 with lines title 'Benchmark 3 ($3/50)'
" > /tmp/abgraph-plotme


# first benchmark

echo "Benchmarking... 1/3 ($3 HTTP requests)";
$ABLOC -n $3 -g /tmp/abgraph-data1 $1 > /dev/null
echo "Great.\nContinuing...";

# sleep 5 seconds
echo "\nsleeping 5 seconds...\n"
sleep 5

# second benchmark
echo "Benchmarking... 2/3 ($3 HTTP requests, simulating 25 concurrent users)";
$ABLOC -n $3 -c 25 -g /tmp/abgraph-data2 $1 > /dev/null

echo "Okay.\nContinuing...";

# sleep 5 seconds
echo "\nsleeping 5 seconds...\n"
sleep 5


# third benchmark
echo "Benchmarking... 3/3 ($3 HTTP requests, simulating 50 concurrent users)";
$ABLOC -n $3 -c 50 -g /tmp/abgraph-data3 $1 > /dev/null

echo "Looks good. Finished!\n";

# generate graph (png saved to user selected path by gnuplot)

$PLOTLOC /tmp/abgraph-plotme > /dev/null

echo "The graph has been saved to $2";

# tidy up

rm /tmp/abgraph-data1
rm /tmp/abgraph-data2
rm /tmp/abgraph-data3

rm /tmp/abgraph-plotme

else

# display error message on wrong usage
echo "Usage: abgraph [hostname to benchmark with http:// and trailing /] [output file .png] [number of requests]"
echo "e.g: ./abgraph http://example.com/ /home/myhome/graph.png 500"

fi
The main requirements are an installed ab (apache benchmark) and a installed version of gnuplot.

the output of abgraph

a generated graph

The script is very useful for web developers and administrators to tune up their applications and servers.