Archive

Archive for the ‘linux’ Category

screen scroll back

November 10th, 2011 1 comment

Ich wusste bis gerade eben nicht dass man in “screen” sogar scrollen kann – hier ein kurzer Abriss wie es geht.
Zuerst in den copy modus wechseln:

ctrl-a [

Dann sollte in der Status Zeile kurz sowas wie “Copy Mode” erscheinen. Danach kann man mit den “vi” Kommandos scrollen. Am sinnvollsten sind ctrl-f (forward) und ctrl-b (backward) um Seitenweise zu scrollen, Pfeiltasten sollten auch gehen.

Einziges Problem – per default werden nur 100 Zeilen gespeichert. Das kann man mit einem Eintrag in die $HOME/.screenrc ändern:

defscrollback 10000

Suchen geht auch:

/ (forward search)
? (backward search)

Man kann sogar kopieren – deswegen copymode:

ctrl-a [
#navigigieren zur gewünschten zeile
leertaste
#markieren der zu kopierenden zeilen
leertaste
ctrl-a ] #fügt den Inhalt der puffers dann auf der kommandozeile ein . . .

Categories: linux, software Tags:

Apache with Python on Linux in 2 minutes

September 20th, 2011 1 comment

After 2 hourse of googleing and reading outdated threads, I got it working and want you to save time.

  1. Install Apache2 and Python
  2. CGI-path is /usr/lib/cgi-bin so this is where to put your Python scripts
  3. To use the scripts in your HTML files you have to prefix the path to the .py files with /cgi-bin/
  4. To generate proper output the first print call in your script has to be
    print "Content-type: text/html\n\n"
  5. With the python module cgi you are able to access content of the calling HTML form
  6. If something went wrong /var/log/apache2/error.log is your friend!

For more information see: http://httpd.apache.org/docs/2.0/howto/cgi.html But not everything in there worked for me…
For usage of Pythons CGI module see: http://docs.python.org/library/cgi.html

Have Fun!

Categories: linux, software Tags: , ,

Ubuntu Unity netspeed indicator

July 8th, 2011 No comments

One of my favorite applets in gnome is netspeed which of course wont work in unity (damn you, unity). But using the indicator version of sysmon, dstat (cool tool – check it out if you haven’t already) and some bash magic you can get something similar to work anyways.

http://www.pcurtis.com/ubuntu-unity.htm#netspeed_appindicator

The above link explains everything needed and you’ll end up with your netspeed being displayed in the panel . . .

Categories: bashism, linux Tags: , ,

Colorfull man pages

July 8th, 2011 6 comments

Ubuntu server installation provides colored man pages – nifty ;)
This is what has to be done to get it working in a X session terminal:

sudo aptitude install most
sudo update-alternatives --config pager

Choose “most” from the list and test it with a man pagge “man test”.

Have fun . . .

[update] As always, bert nows more ;) :
I have found a major and a minor flaw in using most as the man pager:

Major: I use the -X option for less (by putting them into the LESS env variable [1]). This does not clear the terminal on exit of less. Thus, you see the last viewed page of the manual. This is particular helpful when looking-up a command line option, so I can copy’n’paste the option to the command line after quitting less. I can’t find a similar option for most.

Minor: less shows the name of the manual page in the bottom prompt, while most just shows ‘*stdin*’.

Footnote [1]: For the curious reader, this is the content of my $LESS: -MSiRXF. Feel free to look them up in the manual.

Categories: bashism, fun, linux, Uncategorized Tags: ,

PathScale gibt 64-Bit Compiler Suite frei

June 15th, 2011 No comments

Die aus Compilern für C/C++ und Fortran für x86 Prozessoren, dem Debugger PathDB, sowie Bibliotheken und Dokumentationen bestehende Suite EKOPath 4, wurde unter liberale bzw. freie Lizenzen gestellt. Die Anwendungen sind für Linux, FreeBSD und Solaris erhältlich.

Read more at ProLinux and PathScale

WinXP Epic Fail or how a penguin made my day

June 12th, 2011 No comments

Well, all work and no fun make Jack a dull boy. That’s why at my PC at home, there’s a Windows XP installed besides my usual Linux installation. With it I do the in my opinion only thing Windows is better in than Linux, gaming. One can have other opinions, but for now that’s not the point.

In my experience a Windows system needs just a little bit of time to get slower and slower and start behaving crazy which leads to getting unusable and to a reinstallation. I had to say I was a little bit proud of this special installation, because I had no real difficulties within the last 6 month. Maybe it is because I just installed a Firewall, a Software to detect viruses and the single game I usually play … or it just waited until I was unsuspecting. But today it greets me with a nice black screen and the following white letters on it:

Windows could not start because the following file is missing or corrupt:

<Windows-root>system32\hal.dll.
Please re-install a copy of the above file.

Ok I do not exactly know what this file does (Managing Hardware access if I have to guess), but I’m sure I never touched her, seriously!

After th obligatory reboot a little bit of panic, anger and sadness followed. In the next second I started searching the web for a solution, or to get a copy of this hal.dll file. I read a bit in crappy forums and decided to find a file download with the dull feeling in my mind, that it can’t be a good idea to get a system-essential file from a source I don’t trust. In this moment a little penguin in my mind whispered “wine”… First I was confused, I more like beer but then I understand – WINE!

Excited typing began, for the hunt of hal.dll in my wine source directory. I smiled when I found it at the expected position. “Too easy to work!”, I thought… Next I mounted my NTFS partition and copied the file to where it whould be if my stupid Win*** didn’t lost it. Unmount, Reboot and crosses fingers followed. And what should I say? SUCCESS!

At the end I need to say, it is a nice job for (not) an emulator to fix the stuff it (not) emulates! ;)

Categories: DOS, fun, linux, nerdcore, software, wtf Tags: , , ,

syncing to a vfat partition

June 8th, 2011 No comments

I had to move my data from an ext3 partition to a existing vfat that already had some data on it. I soon hit the 4 GB wall and also the limitations regarding the naming conventions and allowed characters. More as a note to myself, these are the commands i used the most:

# create 4000MB blocks
split -b 4000m /old/ISO/Big/8GB.iso /new/ISO/8GB.iso.
 
# tar up the Backup folder and split the resulting tar into 4000MB blocks
tar cf - /old/Backup | split -b 4000m - /new/Backup.tar.
 
# sync recursively, keep newer files on destination 
rsync --progress --modify-window=1 --update --recursive --times /old/Music /new/

I used the split on (DL)DVD ISO’s. My Backup folder already consisted of large tar.bz2 and as i used my amd-geode router to copy the data i opted for the tar|split option as i dont intend to use this data (I would have to cat everything back together on a different disk to be able to use the backup data). Rsync helped in merging to versions of my music folder into one . . .

Categories: linux Tags: ,

Cluster with Apple TV Boxes

March 25th, 2011 No comments

Yesterday I talked to a colleague from Munich, and he told me about one of his research projects http://appletvcluster.com/

This could be interesting for everyone, who wants a cheap/small cluster to play with, especially our LCTP group.

Categories: linux, nerdcore Tags: , ,

CLT2011

March 19th, 2011 No comments

[12:15]

Sitze im 2. Vortrag. Showfloor sah heute sehr gefüllt aus.

Erster Vortrag von Mario Haustein zur WLAN Entfernungsmessung war sehr spannend und wissenschaftlich.

Zweiter Vortrag von Andreas Krennmair ist vom Thema (STFL Text GUIs) her spannend allerdings etwas offesichtlich (das ein GUI Framework verschiedene Widgets/Formulare besitzt sollte selbstverständlich sein). Vielleicht wird er in der nächsten halben Stunde noch etwas spannender.

[14:30]

CMake Vortrag war eher langweilig. Was allerdings lustig und (für mich neu) war ist die Windows Installer Funktionalität von CMake. Ist schon erstaunlich das man in einer Live Demo mingw benutzt um unter Linux ein Windows Binary zu Kompilieren und dann wine benutzt um es zu installieren und zu demonstrieren. Sind noch am überlegen ob wir in einen Kernel oder einen Security Vortrag gehen.

Graphic glitch on Lenovo T500 w/ ATI

February 1st, 2011 No comments

I had a graphic error on this notebook with vertical strips of senseless coloring (use Ubuntu 10.10; only a reboot fixed this problem). The problem occurred randomly. This seems related to the “Kernel mode-setting” of new Linux versions for the radeon driver. After I had turned off the KMS the problem was gone:

echo "options radeon modeset=0" > /etc/modprobe.d/radeon-kms.conf

Categories: linux Tags: , , ,