These days it seems that the 'flaming Mono war' has raised to a new DEFCON level. For me, I think that it's silly to avoid this very good framework.
Anyway, it's also good to discuss it and go deep into legal diatribes... if they remains polite.
I had read thousands of words(yes, sometimes good and honest) against the framework, but today I've finally read this excellent post titled Here we go again – why Mono doesn’t suck.
I can only suggest you to read it too, now.
Monday, June 29, 2009
Tuesday, January 20, 2009
JavaScript for GNOME
As reported by Slashdot, Seed and Gjs are two new projects that try to provide support for building and extending Gnome applications with JavaScript.
In this way, in the near future, those projects could take dozens of small applications and plugins into Gnome. A nice step towards.
For more info read this well written Seed tutorial.
In this way, in the near future, those projects could take dozens of small applications and plugins into Gnome. A nice step towards.
For more info read this well written Seed tutorial.
Tuesday, December 23, 2008
Merry Christmas
Wednesday, December 17, 2008
Compiling Wine 0.9.*
Just a short note.
If you have to compile oldest versions of Wine (0.9.49,0.9.50 and similar), you could encounter a compiler error in signal_i386.c.
If gcc says that VIF_MASK and VIP_MASK are undefined, you can easily solve your problem by editing signal_i386.c and adding the following two lines at the beginning (next to the others define):
#define VIF_MASK 0x00080000
#define VIP_MASK 0x00100000
Put them, save it, and make again.
If your are lucky (like me, of course), you'll end with your hot wine ready to use.
That's all folks!
If you have to compile oldest versions of Wine (0.9.49,0.9.50 and similar), you could encounter a compiler error in signal_i386.c.
If gcc says that VIF_MASK and VIP_MASK are undefined, you can easily solve your problem by editing signal_i386.c and adding the following two lines at the beginning (next to the others define):
#define VIF_MASK 0x00080000
#define VIP_MASK 0x00100000
Put them, save it, and make again.
If your are lucky (like me, of course), you'll end with your hot wine ready to use.
That's all folks!
Tuesday, December 2, 2008
ASP.NET 2 with Mono, a success story
Sorry for the long delay from the last post, but I've been very busy doing my first commercial web site. Not so complicated, only a reserved portal where customers and agents can control
their situation by viewing invoices, orders and so on...
It took me two weeks to have that portal ready, but now I can say that I'm almost satisfied.
Three weeks ago, after a lot of study on many frameworks (including Zope and Plone of course), I've decided to take a look at ASP.NET. Mono 2.0 was released and now it supports ASP.NET 2, so ASP.NET 2 could be an open choice.
Unfortunately, the Mono website does not provide too much documentation so I've browsed the Microsoft's web pages where I've found a lot of videos with good tutorials on many aspects of this framework. The next step was: ok, it seems to be the right choice, now, what system I have to use to develop? What IDE?
MonoDevelop does not provide a visual designer for asp pages: bad point. Finally I've opted for a mixed solution using the free Microsoft IDE called Visual Web Developer 2005
(no, not the 2008 one, because it supports .NET 3.5, which isn't officially supported by Mono: first stages, first experience, my little brain fiend suggested me to reduce troubles with an older IDE ).
After viewing a dozen of video tutorials I've installed Visual Web Developer 2005 and opened many sample projects downloaded from the ASP.NET site.
Two weeks later I've finished my first web site using this technique:
their situation by viewing invoices, orders and so on...
It took me two weeks to have that portal ready, but now I can say that I'm almost satisfied.
Three weeks ago, after a lot of study on many frameworks (including Zope and Plone of course), I've decided to take a look at ASP.NET. Mono 2.0 was released and now it supports ASP.NET 2, so ASP.NET 2 could be an open choice.
Unfortunately, the Mono website does not provide too much documentation so I've browsed the Microsoft's web pages where I've found a lot of videos with good tutorials on many aspects of this framework. The next step was: ok, it seems to be the right choice, now, what system I have to use to develop? What IDE?
MonoDevelop does not provide a visual designer for asp pages: bad point. Finally I've opted for a mixed solution using the free Microsoft IDE called Visual Web Developer 2005
(no, not the 2008 one, because it supports .NET 3.5, which isn't officially supported by Mono: first stages, first experience, my little brain fiend suggested me to reduce troubles with an older IDE ).
After viewing a dozen of video tutorials I've installed Visual Web Developer 2005 and opened many sample projects downloaded from the ASP.NET site.
Two weeks later I've finished my first web site using this technique:
- Develop on Windows with Visual Web Developer 2005.
- Test it immediately with Mono (installing the Mono framework on the same Windows machine).
- Deploy the whole thing on a Debian test server where I can see it in action with a real Apache web server environment.
Labels:
asp.net,
asp.net 2.0,
mono,
mono 2,
visual web developer 2005
Tuesday, October 7, 2008
Mounting a remote folder with ssh
Mounting a remote folder via ssh is not simple and clear as it should be, so I wrote down the main points to get work the whole thing.
- install sshfs ( with debian/ubuntu: apt-get install sshfs )
- add the user that will do the mount to the fuse group ( ex: 'fuse:x:106:simone' in /etc/group )
- create the folder where you want to mount (ex: mkdir /mnt/ssh_folder )
- remember to set correct permissions to the folder you've created
- mount the remote folder using sshfs ( ex: sshfs root@10.1.1.1:/var/opt/shared /mnt/ssh_folder -o allow_other )
In order to have a permanent connection you can use fstab:
- Add the ssh key of your user to the remote machine, in order to remove password request during the connection. The key must be generated with ssh-keygen and the id_rsa.pub file (normally located in the ~/.ssh/ folder) must be copied to the remote machine and added under the home dir of the remote user used for the connection: ~/.ssh/authorized_keys ( ex: 'cat id_rsa.pub >> /home/john/.ssh/authorized_keys' if you connect to the remote machine with john@machine )
- Add a new line to fstab, for example:
sshfs#root@10.1.1.1:/var/opt/shared /mnt/ssh_folder fuse defaults,allow_other 0 0
You can try fstab without restarting using 'mount -a'
That's all folks! ... maybe...
- install sshfs ( with debian/ubuntu: apt-get install sshfs )
- add the user that will do the mount to the fuse group ( ex: 'fuse:x:106:simone' in /etc/group )
- create the folder where you want to mount (ex: mkdir /mnt/ssh_folder )
- remember to set correct permissions to the folder you've created
- mount the remote folder using sshfs ( ex: sshfs root@10.1.1.1:/var/opt/shared /mnt/ssh_folder -o allow_other )
In order to have a permanent connection you can use fstab:
- Add the ssh key of your user to the remote machine, in order to remove password request during the connection. The key must be generated with ssh-keygen and the id_rsa.pub file (normally located in the ~/.ssh/ folder) must be copied to the remote machine and added under the home dir of the remote user used for the connection: ~/.ssh/authorized_keys ( ex: 'cat id_rsa.pub >> /home/john/.ssh/authorized_keys' if you connect to the remote machine with john@machine )
- Add a new line to fstab, for example:
sshfs#root@10.1.1.1:/var/opt/shared /mnt/ssh_folder fuse defaults,allow_other 0 0
You can try fstab without restarting using 'mount -a'
That's all folks! ... maybe...
Thursday, September 18, 2008
Log ssh accesses
After that our mail server was hacked I've worked in order to increase security and controls of all our public servers.
One of the ideas that popped into my head was an alert that could notifies me every time someone successfully login into a public server. Searching the web I'd found a useful idea to put a line in bashrc that sends an email every time someone opens a session.
I've improved that line a bit and the result is a script that reads from an external file the patterns of addresses for which not to send emails (such as the IP of your desktop, for example).
The script is something like that:
#!/bin/sh
# Send login alert
#
# This script is useful to send an alert email when someone log in with
# the monitored user
# Remember to alias the root account to a valid mail box
#
# Thinked by Simone Tregnago (simonetregnago@grivaonline.com)
#this file provides the patterns of hosts for which you don't want to send messages
acl_patterns="./acl_patterns"
whologged=$(who -m | cut -d"(" -f2 | cut -d")" -f1)
if [ -z "$(echo $whologged | grep -f $acl_patterns )" ]; then
(echo "ALERT - Access to "$(hostname -f)" on:" $(date);echo;echo "who output:
";echo $(who -T)) | mail -s "Subject: Alert: access from "$whologged root
fi
The acl_patterns is the file that contains the patterns parsed by grep. If the pattern matches the script exits without the alert.
For example:
myadress.com
"^10.1"
will match for accesses made from myaddress.com or from ip under 10.1.x.x , so it doesn't sends alerts for this origins.
With those two files, following those simple steps, you can have emails alerts for every user:
- Put the script and the patterns files in a place accessible by the user that you want to monitor
- Set the script as executable
- Add a line in the .bashrc of the monitored user. This line will call the script, nothing else:
for example: ./sendalert.sh
- Be sure that emails sent to root are forwarded to a valid user
Enjoy
One of the ideas that popped into my head was an alert that could notifies me every time someone successfully login into a public server. Searching the web I'd found a useful idea to put a line in bashrc that sends an email every time someone opens a session.
I've improved that line a bit and the result is a script that reads from an external file the patterns of addresses for which not to send emails (such as the IP of your desktop, for example).
The script is something like that:
#!/bin/sh
# Send login alert
#
# This script is useful to send an alert email when someone log in with
# the monitored user
# Remember to alias the root account to a valid mail box
#
# Thinked by Simone Tregnago (simonetregnago@grivaonline.com)
#this file provides the patterns of hosts for which you don't want to send messages
acl_patterns="./acl_patterns"
whologged=$(who -m | cut -d"(" -f2 | cut -d")" -f1)
if [ -z "$(echo $whologged | grep -f $acl_patterns )" ]; then
(echo "ALERT - Access to "$(hostname -f)" on:" $(date);echo;echo "who output:
";echo $(who -T)) | mail -s "Subject: Alert: access from "$whologged root
fi
The acl_patterns is the file that contains the patterns parsed by grep. If the pattern matches the script exits without the alert.
For example:
myadress.com
"^10.1"
will match for accesses made from myaddress.com or from ip under 10.1.x.x , so it doesn't sends alerts for this origins.
With those two files, following those simple steps, you can have emails alerts for every user:
- Put the script and the patterns files in a place accessible by the user that you want to monitor
- Set the script as executable
- Add a line in the .bashrc of the monitored user. This line will call the script, nothing else:
for example: ./sendalert.sh
- Be sure that emails sent to root are forwarded to a valid user
Enjoy
Subscribe to:
Posts (Atom)
