FLOSS Project Planets

Steve Loughran: Can I have password for my hotel room's shower?

Planet Apache - Wed, 2014-05-28 06:26
A conversation you never get at a hotel when you check in:
"how many people will be having showers?"
"oh, three of us"
"OK, here are three vouchers for hot water. Keep them handy as you'll need to retype them at random points in the day"
"thank you. Is the login screen in a random EU language and in a font that looks really tiny when I try to enter it, with a random set of characters that are near impossible to type reliably on an on-screen keyboard especially as the UI immediately converts them to * symbols out of a misguided fear that someone will be looking over my shoulder trying to steal some shower-time?"
"Why, yes -how very perceptive of you. Oh, one more thing -hot water quotas"
"hot water quotas?"
"yes, every voucher is good for 100 Litres of water/day. If you go over that rate then you will be billed at 20 c/Litre."
That's a lot!
"Yes, we recommend you only have quick showers. But don't worry, the flow rate of the shower is very low on this hot water scheme, so you can still have three minutes worth of showering without having to worry"
"'this' hot water scheme?"
"yes -you can buy a premium-hot-water-upgrade that not only gives you 500L/day, it doubles the flow rate of the shower.
"oh, I think I will just go to the cafe round the corner -they have free hot water without any need for a login"
"if that is what you want. Is there anything else?"
"Yes, where is my room?"
"It's on the 17 floor -the stairs are over there. With your luggage you could get everything up in two goes -it will only take about fifteen minutes"
"17 floors! Fifteen Minutes! Don't you have a lift?"
"Ah -do you mean our premium automated floor-transport service?  Why yes, we do have one. It won't even add much to your bill. Would you like to buy a login? First -how many people will plan on using the lift every day -and how many times?
Categories: FLOSS Project Planets

Tanguy Ortolo: GNU/Linux graphic sessions: allowing computer suspend and disabling a monitor

Planet Debian - Wed, 2014-05-28 05:55
Allowing computer suspend

Major desktop environments such as Xfce or KDE have a built-in computer suspend feature, but when you use a lighter alternative, things are a bit more complicated, because basically: only root can suspend the computer. Possible solutions include:

  • using sudo to allow members of a given group to run a suspend command, e.g. pm-suspend as root;
  • using a D-Bus UPower thingy, which communicates with a running daemon upowerd: $ dbus-send --system --print-reply \ --dest='org.freedesktop.UPower' \ /org/freedesktop/UPower org.freedesktop.UPower.Suspend

With recent updates of the related Debian packages — no idea of which one exactly — the latter solution may not work any more, in which case it will only return the following error:

Error org.freedesktop.UPower.GeneralError: not authorized

It appears that this error is linked to ConsoleKit, a part of all this modern *Kit gizmo pile. If you are in this case, try prefixing your session launcher with the undocumented dark magic call ck-launch-session. For instance, this is what I have in my .xsession to launch my window manager i3:

exec ck-launch-session i3

Note: I do not know what ck-launch-session does exactly, why it is needed, and I do not want to know. To me, all that WhatsitKit pile is just some opaque, under-documented — as in: no man page — crap, that no one but their author really understand, designed to solve theoretical problems no one really cares about — like: how to allow locally connected users to use the sound card while forbidding it to remote users — while creating new issues such as this one. This stuff is too complex and under-documented for me to dive into it, so if it does not work out of the box, it is just some crap that gets in my way to using my computer as I wish.

Disabling a monitor

In some configurations, you have two monitors and want to disable one. For instance, in addition to my LCD monitor, I have a projector which I only use for movies. According to xorg.conf's man page, it can be disabled this way:

Section "Device" Identifier "Internal graphic card" Option "Monitor-DVI" "LCD Monitor" Option "Monitor-VGA" "Projector" EndSection Section "Monitor" Identifier "LCD Monitor" EndSection Section "Monitor" Identifier "Projector" Option "Enable" "false" EndSection

Except that does not work, because contrary to what the man page says the real option to use is not Enable but Disable! So here is the correct configuration to disable that monitor at start-up:

Section "Device" Identifier "Internal graphic card" Option "Monitor-DVI" "LCD Monitor" Option "Monitor-VGA" "Projector" EndSection Section "Monitor" Identifier "LCD Monitor" EndSection Section "Monitor" Identifier "Projector" Option "Disable" "true" EndSection

Note: yes, I will send a bug report with a patch against xorg.conf's man page.

Categories: FLOSS Project Planets

Francesco Chicchiricco: Apache Syncope at GitHub

Planet Apache - Wed, 2014-05-28 05:33
Besides "official" resources GitHub shows interesting Syncope derivative projects
Categories: FLOSS Project Planets

FSF Blogs: May 2014 - Hsinchu City, Taiwan - At NTHU

GNU Planet! - Wed, 2014-05-28 05:15
The speech recording will soon be available in our video archive.

(Photos courtesy of National Tsing Hua University.)

Please fill out our contact form, so that we can inform you about future events in and around Hsinchu City, Taipei, Puli Township, and Kaohsiung, each of which RMS visited while he was in Taiwan on this last trip.

Please see www.fsf.org/events for a full list of all of RMS's confirmed engagements, and contact rms-assist@gnu.org if you'd like him to come speak.

Categories: FLOSS Project Planets

May 2014 - Hsinchu City, Taiwan - At NTHU

FSF Blogs - Wed, 2014-05-28 05:15
The speech recording will soon be available in our video archive.

(Photos courtesy of National Tsing Hua University.)

Please fill out our contact form, so that we can inform you about future events in and around Hsinchu City, Taipei, Puli Township, and Kaohsiung, each of which RMS visited while he was in Taiwan on this last trip.

Please see www.fsf.org/events for a full list of all of RMS's confirmed engagements, and contact rms-assist@gnu.org if you'd like him to come speak.

Categories: FLOSS Project Planets

Mogdesign: 2/3 Using custom fields in the feed/csv

Planet Drupal - Wed, 2014-05-28 05:00

This is part 2 of Aegir mini-series.

Categories: FLOSS Project Planets

eGenix.com: eGenix mxODBC Connect 2.1.0 GA

Planet Python - Wed, 2014-05-28 04:00
Introduction

The mxODBC Connect Database Interface for Python allows users to easily connect Python applications to all major databases on the market today in a highly portable, convenient and secure way.

Python Database Connectivity the Easy Way

Unlike our mxODBC Python extension, mxODBC Connect is designed as client-server application, so you no longer need to find production quality ODBC drivers for all the platforms you target with your Python application.

Instead you use an easy to install royalty-free Python client library which connects directly to the mxODBC Connect database server over the network.

This makes mxODBC Connect a great basis for writing cross-platform multi-tier database applications and utilities in Python, especially if you run applications that need to communicate with databases such as MS SQL Server and MS Access, Oracle Database, IBM DB2 and Informix, Sybase ASE and Sybase Anywhere, MySQL, PostgreSQL, SAP MaxDB and many more, that run on Windows or Linux machines.

Ideal for Database Driven Client Applications

By removing the need to install and configure ODBC drivers on the client side and dealing with complicated network setups for each set of drivers, mxODBC Connect greatly simplifies deployment of database driven client applications, while at the same time making the network communication between client and database server more efficient and more secure.

For more information, please have a look at the mxODBC Connect product page, in particular, the full list of available features.

News

mxODBC Connect 2.1.0 is a new minor release of our successful mxODBC Connect product. These are the changes compared to mxODBC Connect 2.0.5.

Update to the mxODBC 3.3 API

mxODBC Connect 2.1 upgrades the mxODBC Connect Client to the new mxODBC 3.3. APIs and enhancements.

Stored Procedures
  • mxODBC Connect now has full support for input, output and input/output parameters in stored procedures and stored functions, allowing easy integration with existing databases systems.
User Customizable Row Objects
  • Added support for user customizable row objects by adding cursor/connection .rowfactory and .row constructor attributes. When set, these are used to wrap the normal row tuples returned by the .fetch*() methods into dynamically created row objects.
  • Added new RowFactory classes to support cursor.rowfactory and cursor.row. These allow dynamically creating row classes that provide sequence as well as mapping and attribute access to row fields - similar to what namedtuples  implements, but more efficient and specific to result sets.
Fast Cursor Types
  • Switched to forward-only cursor types for all database backends, since this provides a much better performance for MS SQL Server and IBM DB2 drivers.
  • Added a new .cursortype attribute to allow adjusting and inspecting the ODBC cursor type to be used for an mxODBC Connect cursor object. Default is to use forward-only cursors, but mxODBC also support several other useful cursor types such as static cursors with full support for result set scrolling.
More new Features
  • Enhanced cursor.prepare() to allow querying cursor.description right after the prepare step and not only after calling a cursor.execute*() method.
  • Added iterator/generator support to .executemany(). The parameters list can now be an iterator/generator, if needed.
  • Added new connection.dbapi property to easily access module level symbols from the connection object.
  • Timestamp seconds fraction resolution is now determined from the scale of a datetime/timestamp SQL column, using the connection.timestampresolution as lower bound, when using SQL type binding. In Python type binding mode, the connection.timestampresolution determines the scale with which a variable is bound. This allows for greater flexibility when dealing with database backends that don't provide full nano-second second resolution, such as e.g. MS SQL Server.
  • mxODBC Connect accepts Unicode string values for date/time/datetime/timestamp column types in SQL type binding mode. Previous versions already did in Python type binding mode.
  • mxODBC Connect uses unicode(obj, encoding) semantics when binding Python objects to SQLWCHAR Unicode database parameters to provide better compatibility with Python objects. Additionally, it ignores the encoding in case obj is a number, to avoid conversion errors.
  • Added new cursor.encoding attribute. This gets its default values from the connection the cursor was created on and allows for per-cursor encoding settings.
  • Added cursor.bindmethod which inherits from connection.bindmethod when creating the cursor. This allows adjusting the variable bind method on a per-cursor basis, rather than only on a per connection basis as in previous mxODBC Connect versions.
mxODBC Connect API Enhancements
  • The SQL lookup object is cached on the client side to avoid frequent roundtrips when using symbols which are needed for stored procedures with input/output parameters.
  • The SQL lookup object received support for new ODBC 3.8 symbols and values, including driver specific symbols used by the MS SQL Server Native Client and IBM DB2 ODBC drivers.
  • Improved the server side object management to simplify client side garbage collection considerations. Even though we still encourage using explicit garbage collection of cursors, connections and server sessions on the client side, mxODBC Connect Server will now handle most situations even without these explicit calls.
Asynchronous Processing
  • Tested with the latest gevent and greenlet packages. mxODBC Connect Client will happily work together with the asynchronous libraries gevent. All it takes is a single configuration entry in the client side config file.
Security Enhancements
  • Changed the way passwords are stored in the server's authorized-users.txt file in order to make password storage more secure.
  • User authentication now uses salted SHA-256 password hashes when transferring the login data from the client to the server. This provides better protection when using plain text client server setups and additional security over SSL network connections.
ODBC Driver/Manager Compatibility Enhancements unixODBC
  • mxODBC Connect Server is now built against unixODBC 2.3.2 on Linux.
DataDirect
  • Updated the DataDirect binding to version 7.1.2 of the DataDirect ODBC manager on Linux.
Oracle
  • Added work-around for Oracle Instant Client to be able to use integer output parameters.
  • Added a work-around for Oracle Instant Client to have it return output parameters based on the input placeholder Python parameter types. It would otherwise return all parameters as strings.
  • Disabled a test for Oracle Instant Client which tries to set a pre-connect connection option for timeouts, since the ODBC driver segfaults with this option.
MS SQL Server
  • mxODBC Connect Server 2.1 defaults to 100ns connection.timestampresolution for MS SQL Server 2008 and later, and 1ms resolution for MS SQL server 2005 and earlier. This simplifies interfacing to SQL Server timestamp columns by preventing occasional precision errors.
  • Tested mxODBC Connect Server successfully with new MS SQL Server Native Client 11 for Linux. Unicode connection strings still don't work, but everything else does.
  • Added documentation on how to use Kerberos with mxODBC and SQL Server for authentication on both Windows and Linux to the mxODBC User Manual.
  • Added note about problems of the FreeTDS ODBC driver dealing with TIME and DATE columns.
Sybase ASE
  • Added work-around for the Sybase ASE ODBC driver, which doesn't always pass back NULL correctly to mxODBC Connect Server on 64-bit Unix systems.
  • Changed the variable type binding mode default for the Sybase ASE ODBC driver from Python type binding to SQL type binding, which resolves issues with e.g. the Unicode support for that driver.
  • Added note about a segfault problem with the Sybase ASE 15.7 ODBC driver which is caused by the driver corrupting the heap.
IBM DB2
  • Added work-around for the IBM DB2 ODBC driver, which doesn't always pass back NULL correctly to mxODBC Connect Server on 64-bit Unix systems.
PostgreSQL
  • Added work-around to force Python type binding for the PostgreSQL ODBC drivers. More recent versions of the driver report supporting SQL type binding, but they don't implement it.
  • Added work-around to have PostgreSQL ODBC drivers properly work with binary data for BYTEA columns.
MySQL
  • mxODBC Connect Server now supports native Unicode with the recent MySQL ODBC drivers - provided you use the Unicode variants of the drivers.
  • Changed the default binding mode for MySQL ODBC drivers to Python type binding. This works around a problem with date/time values when talking to MySQL 5.6 servers.
For the full set of changes, including those of the 2.0 series of mxODBC Connect, please check the mxODBC Connect change log. Upgrading

You are encouraged to upgrade to this latest mxODBC Connect release. When upgrading, please always upgrade both the server and the client installations to the same version - even for patch level releases.

We will give out 20% discount coupons for upgrade purchases going from mxODBC Connect Server 1.x to 2.1 and 50% coupons for upgrades from mxODBC 2.x to 2.1. Please contact the eGenix.com Sales Team with your existing license serials for details.

Users of our stand-alone mxODBC product will have to purchase new licenses from our online shop in order to use mxODBC Connect.

You can request free 30-day evaluation licenses via our web-site or writing to sales@egenix.com, stating your name (or the name of the company) and the number of eval licenses that you need.

Downloads

Please visit the eGenix mxODBC Connect product page for downloads, instructions on installation and documentation of the client and the server package.

If you want to try the package, please jump straight to the download instructions.

Fully functional evaluation licenses for the mxODBC Connect Server are available free of charge.

mxODBC Connect Client is always free of charge.

Support

Commercial support for this product is available directly from eGenix.com.

Please see the support section of our website for details.

More Information

For more information on the eGenix mxODBC Connect, licensing and download instructions, please write to sales@egenix.com.

Enjoy !

Marc-Andre Lemburg, eGenix.com

Categories: FLOSS Project Planets

Configure and connect tata photon plus in debian 7

LinuxPlanet - Tue, 2014-05-27 05:12
The 3G dongle of tata photon+ (Huwaei EC1260) might not work by default in debian 7, and other linux distros. Here is how to get it working.

The first step is to install the packages, if not already installed.

usb-modeswitch usb-modeswitch-data

sudo dpkg -i usb-modeswitch sudo dpkg -i usb-modeswitch-data

Once the two packages have been installed successfully, next we need to install wvdial

sudo dpkg -i wvdial

After installing the pakcage, insert the dongle.

Now open a terminal and type the command

$ sudo wvdialconf /etc/wvdial.conf

We will see an output as below

Editing `/etc/wvdial.conf'. Scanning your serial ports for a modem. Modem Port Scan<*1>: S0 S1 S2 S3 ttyUSB0<*1>: ATQ0 V1 E1 -- OK ttyUSB0<*1>: ATQ0 V1 E1 Z -- OK ttyUSB0<*1>: ATQ0 V1 E1 S0=0 -- ATQ0 V1 E1 S0=0 ttyUSB0<*1>: ATQ0 V1 E1 &C1 -- OK ttyUSB0<*1>: ATQ0 V1 E1 &C1 &D2 -- OK ttyUSB0<*1>: ATQ0 V1 E1 &C1 &D2 +FCLASS=0 -- OK ttyUSB0<*1>: Modem Identifier: ATI -- Manufacturer: +GMI: HUAWEI TECHNOLOGIES CO., LTD ttyUSB0<*1>: Speed 9600: AT -- OK ttyUSB0<*1>: Max speed is 9600; that should be safe. ttyUSB0<*1>: ATQ0 V1 E1 &C1 &D2 +FCLASS=0 -- ATQ0 V1 E1 &C1 &D2 +FCLASS=0 ttyUSB0<*1>: failed with 9600 baud, next try: 9600 baud ttyUSB0<*1>: ATQ0 V1 E1 &C1 &D2 +FCLASS=0 -- OK ttyUSB1<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud ttyUSB1<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud ttyUSB1<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up. ttyUSB2<*1>: ATQ0 V1 E1 -- OK ttyUSB2<*1>: ATQ0 V1 E1 Z -- OK ttyUSB2<*1>: ATQ0 V1 E1 S0=0 -- OK ttyUSB2<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK ttyUSB2<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK ttyUSB2<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK ttyUSB2<*1>: Modem Identifier: ATI -- Manufacturer: +GMI: HUAWEI TECHNOLOGIES CO., LTD ttyUSB2<*1>: Speed 9600: AT -- OK ttyUSB2<*1>: Max speed is 9600; that should be safe. ttyUSB2<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK Found a modem on /dev/ttyUSB0. Modem configuration written to /etc/wvdial.conf. ttyUSB0: Speed 9600; init "ATQ0 V1 E1 &C1 &D2 +FCLASS=0" ttyUSB2: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

The fourth line from below recognizes our dongle as the device /dev/ttyUSB0

Next we need to configure the wvdial application to allow it use the dongle to connect to the internet.

For doing this we need to open the wvdial.conf file located in /etc/wvdial.conf

$ gedit /etc/wvdial.conf’

By default the file will look some thing like below

[Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 &C1 &D2 +FCLASS=0 Modem Type = Analog Modem ISDN = 0 New PPPD = yes ; Phone = < Target phone number> Modem = /dev/ttyUSB0 ;Username = ;Password = Baud = 9600

Delete the ";" at the beginning of the lines "Phone","Username", and "Password". and replace the three lines with

Phone = #777 Username = internet Password = internet

Then add the following lines to the file at the end.

Init3 = AT+CRM=1 Stupid Mode = 1

The edited wvdial.conf looks as below.

[Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 &C1 &D2 +FCLASS=0 Modem Type = Analog Modem ISDN = 0 New PPPD = yes Phone = #777 Modem = /dev/ttyUSB0 Username = internet Password = internet Baud = 9600 Init3 = AT+CRM=1 Stupid Mode = 1

Save the file and close it. Now go back to the terminal and type the command

$ wvdial --> WvDial: Internet dialer version 1.61 --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: ATQ0 V1 E1 &C1 &D2 +FCLASS=0 ATQ0 V1 E1 &C1 &D2 +FCLASS=0 OK --> Sending: AT+CRM=1 AT+CRM=1 OK --> Modem initialized. --> Sending: ATDT#777 --> Waiting for carrier. ATDT#777 CONNECT ^HRSSILVL:80 ~[7f]}#@!}!})} }9}"}&} } } } }#}%B#}%}%}&@}*vO}'}"}(}"m.~~[7f]}#@!}!}*} }9}"}&} } } } }#}%B#}%}%}&@}*vO}'}"}(}"!C~ --> Carrier detected. Starting PPP immediately. --> Starting pppd at Tue May 27 14:06:08 2014 --> Pid of pppd: 13443 --> Using interface ppp0 --> pppd: (��[08]@��[08][08]��[08] --> pppd: (��[08]@��[08][08]��[08] --> pppd: (��[08]@��[08][08]��[08] --> pppd: (��[08]@��[08][08]��[08] --> pppd: (��[08]@��[08][08]��[08] --> local IP address 14.96.94.229 --> pppd: (��[08]@��[08][08]��[08] --> remote IP address 172.23.130.4 --> pppd: (��[08]@��[08][08]��[08] --> primary DNS address 103.8.46.5 --> pppd: (��[08]@��[08][08]��[08] --> secondary DNS address 103.8.45.5 --> pppd: (��[08]@��[08][08]��[08]

Now open a browser and start browsing.

Note that before running the command wvdial in the last step, turn off mobile broadband in the gui mode.
Categories: FLOSS Project Planets
Syndicate content