Skip to main content

Posts

Showing posts with the label Linux

How to fix Emacs 23 Huge ungly font on Lucid

Since I've upgraded to Ubuntu 10.04 (Lucid) Emacs 23 now has beautiful antialiased fonts, but I like the old bitmaped X11 "fixed" font. I do use a .Xresources file to setup emacs default font. This is my emacs section at .Xresources !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! emacs, xemacs !emacs*Background: DarkSlateGray emacs*Background: Black !!!emacs*Foreground: Wheat emacs*Foreground: White emacs*pointerColor: Red emacs*cursorColor: Red emacs*bitmapIcon: on emacs*font: fixed !!!emacs*font: 9x15bold !!emacs*geometry: 100x40+20+20 But for my surprise using this setup emacs launches with a ugly huge serif font. I tried to launch emacs with -fn fixed but the ugly font did still there. So I checked at my /etc/X11/fonts/misc/xfonts-base.alias, which is the file where fixed font is declared. And it was there: fixed -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1 And which had called my attention, was that 6x13 font alias had the same properties as the fixed:...

Extended desktop at the login screen in ubuntu

I have an ATI Raden dual head at my desktop here at my job. I like to use WindowMaker as my window manager of choice, but since I had upgraded to Ubuntu 10.04 Lucid, WindowMaker is showing some issues regarding the dual monitor setup. WindowMaker follows the login screen (GDM) monitor setup and when I launch a gnome-session, things get messed up. The first solution which came to my mind is to make gdm aware of the two monitors. "Googling" around I've found two usefull links: https://help.ubuntu.com/community/MultiseatOneCard http://ubuntuforums.org/showthread.php?t=1611704 Following the first section of the first link ("Extended desktop through both monitors") I've wrote my new xorg.conf file: Section "Monitor" Identifier "monitor0" EndSection Section "Monitor" Identifier "monitor1" Option "RightOf" "monitor0" EndSection Section "Device" Identifier "card0...

SVox PicoTTS (from Android) is available on Ubuntu 10.10

Another repost. This pos, form acassis is special for my quest to Voice Picking with freesoftware. More resources on SVox can be found at Open Hand Set Alliance www.openhandsetalliance.com . acassis : " Finally SVox PicoTTS (from Android) is available on Ubuntu 10.10. To install it execute: $ sudo apt-get install libttspico-utils To test execute it: $ pico2wave -w /tmp/test.wav 'Hello World' $ aplay /tmp/test.wav

wxTerm

IFTools has an free/libre open source (wxWindows license) communication terminal which uses a multi platform communications library. Worth to take a look at: https://iftools.com/opensource/download.en.php

Gaming

Looking for some other software to load wavefront obj files I've found some interesting things on the gaming field: http://tfc.duke.free.fr/ How to load Quane, Quake 2 and Doom3 characters with OpenGL and https://help.ubuntu.com/community/Doom3 How to setup Doom 3 on Ubuntu Linux

Internal Projects

We can't open much about our internal projects here at IDEIA. But now that University students and and professors, our main customers are on vacation, we have more time to spend on some internal projects which were put aside during the year. One of them, in cooperation with the IDEIA's Optics Lab, is related to digitize images captured with a regular composite video camera. The guy from the Optics Lab have a EasyCAP USB device, which I have to put to work with my linux box. I didn't find an out of the box solution, or a few steps tutorial to put it to work during the year. Looking again, I've found a couple of forums, tutorials, and links: http://ubuntuforums.org/showthread.php?t=662531 http://www.unicap-imaging.org/download.htm http://sourceforge.net/projects/syntekdriver/files/syntekdriver/Release%202.1.0/stk11xx-2.1.0.tar.gz/download http://ubuntuforums.org/showthread.php?t=451200&highlight=Syntek+Semiconductor I hope these might be useful to others trying to mak...

Cross-compiling windows applications under linux with wine and DevC++

This post has the same title as this , from Violin Iliev because it is almost a "repost". I had an old post on compiling win32 binaries on linux , but the technique I had shown lack the windows resource file compiling. Violin had written his wrapper to the windres resource compiler, but one good "emergency option" if one couldn't, or don't want, or hasn't time to, write a wrapper or compile Violin'd wrapper, is to follow what was commented on Violin's blog by someone who signed as Andy. Andy said: "I had the same problems with windres and mingw32-make under wine 1.0.1 I solved the problems by putting an original copy of msvcrt.dll in the bin subfolder of mingw32 and telling wine to load it first instead of its own msvcrt emulation. hope it can be useful Andy"

How many times each user has logged in

With this line, we can check how many times our users had logged in with SSH: cat /etc/passwd | cut -d ":" -f 1 | sort | uniq | while read line ; do echo -n $line" "; zgrep "user $line" /var/log/auth.log* | grep -i ssh | grep -vi fail | grep -vi invalid | wc -l; done | sort -n -r -k 2 On my system, the only user which has logged in was my own user: filipi 52 And for non SSH logins: cat /etc/passwd | cut -d ":" -f 1 | sort | uniq | while read line ; do echo -n $line" "; zgrep "user $line" /var/log/auth.log* | grep -vi fail | grep -vi invalid | wc -l; done | sort -n -r -k 2

Checking auth.log for ssh brute force attacks

As I am letting my personal computer always on, as a homelinux server, I decided to check if someone is trying to breaking in with SSH brute force attacks. First I did a grep for fail at the /var/log/auth.log. ( grep -i /var/log/auth.log ) And I got lots of lines with the string "fail". With [ grep -i /var/log/auth.log | wc -l ] I figured out that were 1164 fail entries at auth.log With an [ grep -i fail auth.log | cut -d " " -f 6 | sort | uniq ] I checked that were two kind of failed attempts: Failed pam_unix(sshd:auth): So I wrote the following line to check with which users they were attempting to log: grep Failed auth.log | cut -d " " -f 11 | sort | uniq | while read line ; do echo -n $line" "; grep $line auth.log | wc -l; done | sort -n -k 2 Here, the field position (the number 11 at the above command lines [-f 11]) may change in some systems. At my desktop at work, the username came at the position 9. Here are the "top ten": ro...

Experiences with Tecgraf Libraries

My advisor is always right. So I have decided to take a look at Im lib , from Tecgraf . As a learner by example, I first tried to compile and run the examples provided with Im lib, but most of their examples came written in lua and I need to write my code in C (or C++). Fortunately there were 6 examples written in C++: glut_capture.c im_copy.cpp im_info.cpp im_view.c iupglview.c proc_fourier.cpp But, I wans't use glut (discarted glut_capture.c and iupglview.c) So I've choosen im_view.c to try to compile, and the torture has started. There wans't any doc, readme or anything which tells something on how to compile the examples. The only clue was the comments written on the source header: /* IM 3 sample that shows an image. Needs "im.lib", "iup.lib", "cd.lib" and "cdiup.lib". Usage: im_view Example: im_view test.tif Click on image to open another file. */ Well, I had discovered that I was needing three more...

Compiling win32 binaries on linux

Old habits are hard to be dropped. As a long term linux user I fell much more comfortable using my old emacs text editor with a good old "green on black" Xterm terminal console window. So we have some legacy code here on my current job, those which must run also on windows. I was making some improvements on it, porting to use wx-widgets, compiling and using it on linux. But some windows users started to want those improvements on their widows versions. As the only WX programmer around, I was the only person able to compile the windows version. As I think future improvements would also be wanted by the windows users, I decided to deploy a windows wxDevCPP installation on wine on my linux workstation. Well the first steps are simple: First get a wx-DevCPP installation executable on Install it using wine Open your .dev files on wxDev Build it Now you have a Makefile.win, which can be used to directly compile win32 binaries. A batch file could also be written to make things easy:...

Here's a Nickel, Kid

Ryan Tomayko has a blog entry on an old comic strip used as the cover of the book " Advanced Programming in the UNIX® Environment ".

Speech recognition, first step to "Voice Picking"

When I was starting the Mindelo WMS project , I had read something about "voice picking". Since there, I was wondering how to build a linux distribution for warehouse management. At faqs.org , there is a " Speech Recognition Howto ", but perhaps I should found something more specific at the " Speech Recognition in Linux " at the wikipedia

GLGlobe - free OpenGl Globe-Earth simulation for linux

I was googling around for some code to use on my next work for the visualization class at grad school, and I found this interesting code. http://www.geocities.com/harpin_floh/glglobe_page. html The web site says it could not compile on my machine, but it did! The code is not too much complex and this could be used in a variety of ways. Here is what I've got:

wxWidgets

Note to learn how to use wxWidgets: http://zetcode.com/tutorials/wxwidgetstutorial/thetetrisgame/ http://www.vconrado.com/wx/ http://wiki.wxwidgets.org/Makefile On windows (and on wine ;-) we can use wxDev-C++ On Ubuntu, install the libwxgtk2.8-dev deb.