- VLC Multimedia player can uses LUA playlist.
- Awesome Window Manager can be extended with LUA:
- SciTE source code editor can be extended with LUA.
- Rockbox firmware for mp3 players can be configured with LUA too, even if I cannot find a good official link.
- Grub 2 the boot manager has integrated lua as an alternative script engine.
2009-08-17
LUA, commun point for VLC, Awesome, SciTE ...
It is amazing to see that most of the software I like and use embed LUA, the "powerful, fast, lightweight, embeddable scripting language" :
2009-08-09
Getting rid of the DisplayManager, Choose your run level
The Display Manager (generally: GDM, KDM, or XDM, Slim ...) is there for historical reason, but it isn't useful unless you need special features.
Now the problem is that Ubuntu restricted the uses of Run Levels ! So you have to tweak the system a little bit if you want to start in text mode.
So lets read:
Add a text-only runlevel to Ubuntu Gutsy and
Boot time RunLevel
Then modify your /etc/event.d/rc-default:
Then knowing that I use Grub 2, the following file has to be modified /etc/grub.d/10_linux (no more menu.lst). Just add the bold part:
That worked for me, but be careful as it can screw your system !
Now just log in and type: $ startx awesome
Now the problem is that Ubuntu restricted the uses of Run Levels ! So you have to tweak the system a little bit if you want to start in text mode.
So lets read:
Add a text-only runlevel to Ubuntu Gutsy and
Boot time RunLevel
Then modify your /etc/event.d/rc-default:
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on stopped rcS
script
runlevel --reboot || true
if grep -q -w -- "-s\|single\|S" /proc/cmdline; then
telinit S
elif RL="$(grep -o "[[:blank:]][2345]$" /proc/cmdline || true)"; then
if [ -n "$RL" ]; then
telinit $RL
else
telinit 2
fi
elif [ -r /etc/inittab ]; then
RL="$(sed -n -e "/^id:[0-9]*:initdefault:/{s/^id://;s/:.*//;p}" /etc/inittab || true)"
if [ -n "$RL" ]; then
telinit $RL
else
telinit 2
fi
else
telinit 2
fi
end script
Then knowing that I use Grub 2, the following file has to be modified /etc/grub.d/10_linux (no more menu.lst). Just add the bold part:
...
cat << EOF
menuentry "${OS}, linux ${version}" {
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}
EOF
if test -n "${initrd}" ; then
cat << EOF
initrd ${rel_dirname}/${initrd}
EOF
fi
cat << EOF
}
EOF
cat << EOF
menuentry "${OS}, linux ${version} (text mode)" {
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro 3 ${GRUB_CMDLINE_LINUX}
EOF
if test -n "${initrd}" ; then
cat << EOF
initrd ${rel_dirname}/${initrd}
EOF
fi
cat << EOF
}
EOF
cat << EOF
menuentry "${OS}, linux ${version} (single-user mode)" {
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro single ${GRUB_CMDLINE_LINUX}
EOF
if test -n "${initrd}" ; then
cat << EOF
initrd ${rel_dirname}/${initrd}
EOF
fi
cat << EOF
}
EOF
...
That worked for me, but be careful as it can screw your system !
Now just log in and type: $ startx awesome
2009-07-30
Set up wireless without KDE nor Gnome
One of the first problem faced when going away from KDE, Gnome or XFCE is that you have to set up your wireless connection manually.
If you have 10 minutes, it can be done once and for all: just follow this how to HOWTO: Wireless Security - WPA1, WPA2, LEAP, etc..
Then you can remove the NetworkManager startup script : "sudo update-rc.d -f NetworkManager remove".
Keep in mind to launch a "sudo /etc/init.d/networking restart" in case of problem.
Update: I just found a solution to automatically start Network Monitor Applet (nm-applet) with Awesome Window Manager. But I am quite happy with my current setting, it just connect when it starts.
If you have 10 minutes, it can be done once and for all: just follow this how to HOWTO: Wireless Security - WPA1, WPA2, LEAP, etc..
Then you can remove the NetworkManager startup script : "sudo update-rc.d -f NetworkManager remove".
Keep in mind to launch a "sudo /etc/init.d/networking restart" in case of problem.
Update: I just found a solution to automatically start Network Monitor Applet (nm-applet) with Awesome Window Manager. But I am quite happy with my current setting, it just connect when it starts.
Java GUI application in Awesome Window Manager
There is a known problem with Java and the non-reparenting Window Managers like for example Awesome.
There are a number of places where this is described:
To sum up:
Java applications which use the XToolkit/XAWT backend may draw gray windows only. The XToolkit/XAWT backend breaks ICCCM-compliance in JDK 5 and 6 because it assumes a reparenting window manager.
There are a number of places where this is described:
- in the FAQ : GUI Java apps appear as a gray screen!
- in the wiki Problems with Java
- in the Man page
To sum up:
- it doesn't affect version Java 1.4.2 and before.
- it doesn't affect version Java 1.7 and hopefully after.
- the best workaround by far, is to set a name to the Window Manager, so it is recognise by Java as a non-reparenting Window Manager. A simple utility allow to set this name. Just add 'wmname LG3D' to your .xinitrc or simply run it.
- Here are other workarounds left here for reference:
- launch another X server, like Xephyr
- set the following environment variable (to use the older Motif back-end instead): AWT_TOOLKIT=MToolkit. But this won't work in the following cases :
- OpenJDK/IcedTea doesn't include the Motif toolkit.
- doesn't work for x86_64 Java, for whatever reason.
Lightweight OS : Awesome Window Manager
Some year ago I used to try all kind of Window Managers on Linux and basically loosed a lot of time for nothing. I never though that I would fall back again, but having just 1Go RAM and running JetBrains MPS forced me to consider lighter alternatives than KDE.
First I tried XFCE, but it wasn't enough: too close to Gnome, too traditional. So I tried Fluxbox, didn't like the menu, RatPoison too simple and finally: Awesome. As usual, I found the Wikipedia list very useful.
And so far it is the best Window Manager I ever used.
- Fast, clean and simple, even their Web site is well designed.
- No more loosing time resizing the windows ! At about 98% I just need to have the applications full screen.
- But still it is easy to resize, typically popup window are often too small.
- No waisted screen space : no desktop.
- an unified way to close applications (no more Ctrl-Q, Ctrl-E, Ctrl-X ... one Mod4-Shift-c for all !)
- easy shortcuts
- search through the menu. It is not as good as Spotlight on a Mac or the KDE4 launcher, but I guess it can be configured.
It may sound enough, but there is more:
- highly and simply configurable with a scripting language: LUA. I already known LUA for being used in SciTE a very good code editor.
- it isn't a general purpose Window Manager, it targets my profile. It suits me: a bit cutting edge but not bleeding.
I always though that the "Desktop" was not a good abstraction, unless you have at least three 22' monitors. It becomes often a trash bin and is almost always covered with the application you are working with anyway. That is why I kind of like the KDE4 approach of a desktop that is more than a folder.
First I tried XFCE, but it wasn't enough: too close to Gnome, too traditional. So I tried Fluxbox, didn't like the menu, RatPoison too simple and finally: Awesome. As usual, I found the Wikipedia list very useful.
And so far it is the best Window Manager I ever used.
- Fast, clean and simple, even their Web site is well designed.
- No more loosing time resizing the windows ! At about 98% I just need to have the applications full screen.
- But still it is easy to resize, typically popup window are often too small.
- No waisted screen space : no desktop.
- an unified way to close applications (no more Ctrl-Q, Ctrl-E, Ctrl-X ... one Mod4-Shift-c for all !)
- easy shortcuts
- search through the menu. It is not as good as Spotlight on a Mac or the KDE4 launcher, but I guess it can be configured.
It may sound enough, but there is more:
- highly and simply configurable with a scripting language: LUA. I already known LUA for being used in SciTE a very good code editor.
- it isn't a general purpose Window Manager, it targets my profile. It suits me: a bit cutting edge but not bleeding.
I always though that the "Desktop" was not a good abstraction, unless you have at least three 22' monitors. It becomes often a trash bin and is almost always covered with the application you are working with anyway. That is why I kind of like the KDE4 approach of a desktop that is more than a folder.
2009-07-29
DSL and Meta Programing System
As a regular Software Engineering Radio listener, JetBrains MPS 1.0 release came to my attention.
I read articles, watched the screen-casts and downloaded the beast to put my hands on.
I have a mixed feeling: on one hand, it is a step towards higher abstractions. From bare metal to assembly to C to C++ to Java, this is where we are doomed to go.
But on the other hand, the tool and the concepts are really complex. It is not the kind of tool that you download and play with before digging the manual ! With MPS, I have been following the tutorial carefully, step by step. It won't be mainstream yet.
Nonetheless, it opens a whole new landscape. I guess that there will be DSL users, DSL developers and of course DSL architect !? The tool is already very powerful. The samples with complex numbers and mathematical notation are impressive: the readability is way better.
It remind me the idea that code isn't meant only to compile, but its most important purpose is to communicate its intent to other developers and designers. I could not find back the reference to the specific article where this idea was exposed, but anyway, this concept concern all DSL.
It remind me of the JBoss approach to BPML: they didn't try to do everything with the "graphical designer". They kept it simple and provided a way for the developer to deal with the implementation details. So "Graphical DSL" is more a collaboration tool between the analyst and the developers, than a bloated UML/OCL do it all thing. (Note: I like UML.)
No doubt that there is a strong need to reduce the gap between functional/business analysts and developers. Even worse with offshore developments. Agile is mostly about getting developers closer to the client, DSL are coming along. Will linguistic be the next buzz ?
I read articles, watched the screen-casts and downloaded the beast to put my hands on.
I have a mixed feeling: on one hand, it is a step towards higher abstractions. From bare metal to assembly to C to C++ to Java, this is where we are doomed to go.
But on the other hand, the tool and the concepts are really complex. It is not the kind of tool that you download and play with before digging the manual ! With MPS, I have been following the tutorial carefully, step by step. It won't be mainstream yet.
Nonetheless, it opens a whole new landscape. I guess that there will be DSL users, DSL developers and of course DSL architect !? The tool is already very powerful. The samples with complex numbers and mathematical notation are impressive: the readability is way better.
It remind me the idea that code isn't meant only to compile, but its most important purpose is to communicate its intent to other developers and designers. I could not find back the reference to the specific article where this idea was exposed, but anyway, this concept concern all DSL.
It remind me of the JBoss approach to BPML: they didn't try to do everything with the "graphical designer". They kept it simple and provided a way for the developer to deal with the implementation details. So "Graphical DSL" is more a collaboration tool between the analyst and the developers, than a bloated UML/OCL do it all thing. (Note: I like UML.)
No doubt that there is a strong need to reduce the gap between functional/business analysts and developers. Even worse with offshore developments. Agile is mostly about getting developers closer to the client, DSL are coming along. Will linguistic be the next buzz ?
2009-07-21
UMLgraph and Maven
Just a quick note on how to setup UML Graph in Maven.
There is a tiny example in the Maven documentation about Using Alternate Doclet.
{plugin}
{groupId>org.apache.maven.plugins{/groupId}
{artifactId>maven-javadoc-plugin{/artifactId}
{configuration}
{excludePackageNames>com.comp.proj.internal.stuf{/excludePackageNames}
{doclet>org.umlgraph.doclet.UmlGraphDoc{/doclet}
{docletArtifact}
{groupId>org.umlgraph{/groupId}
{artifactId>doclet{/artifactId}
{version>5.1{/version}
{/docletArtifact}
{additionalparam>-attributes -enumconstants -enumerations -operations -types -visibility -inferrel -inferdep -hide java.*{/additionalparam}
{destDir>withUML{/destDir}
{show>public{/show}
{/configuration}
{/plugin}The only trick is that all the additional parameters must be set on one line ! This doesn't appear in the documentation nor on the web. Quite the contrary, I found a lot of bad examples on the web !
This POM configuration simply works great. I noticed a new UMLGraph version 5.2. I didn't try but it should work also.
There is a tiny example in the Maven documentation about Using Alternate Doclet.
There is a dead project to create a plugin for Maven: DotUML. No updates since 2007.
Subscribe to:
Posts (Atom)
Festival de la Cooperative OASIS - 2026
https://Cooperative-OASIS.org/ Abonnement la revue Passerelle Eco Papier . Mais les annonces sont dispo: Revue trimestrielle de l’ Ecov...