iklan

Sunday, 10 April 2011

free download google chrome

the link download:download

free download flash player

the link download ..download

free download firefox


to download free firefox

download link......download

Another Emacs TRAMP problem, another solution

The problem

This is documented for posterity because it’s not the first time this has happend to me. The symptom of this problem happened to me when trying to access a remote system, any remote system, through a method like ssh or sftp.
Whenever I tried to access a remote system, I would get an error from TRAMP saying that it can’t find a working /bin/ls, despite the file being obviously in its right place.
The precise error message is the following:

Tramp: Found remote shell prompt on `vattu'
Omitting...
(Nothing to omit)
File error: Couldn't find a proper `ls' command
tramp-get-ls-command: Couldn't find a proper `ls' command

Once you find out that /bin/ls is actually there, there is little left to do but try to see what is wrong with TRAMP. TRAMP is a fickle library and getting it to work might require serious configuration in some case. You can make TRAMP more verbose by setting the tramp-verbose to a 5 or 6, instead of the default.
Once tramp-verbose is set, an Emacs buffer will contain a lot of informations.

20:57:11 tramp-send-command (6) # while read d; do if [...]<<'EOF'
/bin
/usr/bin
/usr/sbin
/usr/local/bin
EOF
20:57:11 tramp-wait-for-regexp (6) #
^M
///fec710f011d52e3acebe364b9088c96e^M
20:57:11 tramp-get-ls-command (1) # File error: Couldn't find a proper `ls' command

What is string there is the presence of the dreaded ^M character. It took me some time to realize that TRAMP may have been trying to look for /bin/ls^M.
The offending option in my configuration was (setq inhibit-eol-conversion 't) which I set to deal with files which may have mixed newline characters. Unsetting this option made TRAMP work just fine.

Reproducing the problem

I had troubles reproducing this problem in order to write this article because TRAMP actually caches the information it obtains from the remote system it connects to. I needed to erase the file $HOME/.emacs.d/tramp and restart Emacs. Once this was done, and inhibit-eol-conversion set, the problem happened again.

Using a POSIX directory schema with Nuxeo




Nuxeo patch

Nuxeo doesn’t support RFC 2307 POSIX LDAP schemas out of the box. Even if the configuration options for LDAP directories in Nuxeo are extremely flexible, a small patch is required for POSIX group to work. The patch makes Nuxeo search for group members using an ID instead of a DN (DistinguishedName). The last version of the patch is available in the Nuxeo JIRA bug tracker as bug 6430. The patch requires very limited change to the LDAP directory configuration.
For your convenience, I have provided a pre-compiled binary .jar including the patch. This will work on Nuxeo 5.4.0.1 and probably Nuxeo 5.4.0 but it may already be outdated as you read this article. In the download links below, you will also find the integral version of some relevant configuration files. I can’t post all the configuration files I have used because they include private informations.
The following block of XML is an excerpt of the group directory configuration in Nuxeo. I can’t provided this file in its entirety but I can show just the section that needs to be modified. To properly support POSIX groups, you first don’t need references for subGroups and parentGroups. You only need a ldapReference for the group members but they need to be searched in way different than what Nuxeo usually does.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<component name="com.rlnx.nuxeo.ldap.group">
  <implementation class="org.nuxeo.ecm.directory.ldap.LDAPDirectoryDescriptor"/>
  <implementation class="org.nuxeo.ecm.directory.ldap.LDAPServerDescriptor"/>
 
  <require>org.nuxeo.ecm.directory.ldap.LDAPDirectoryFactory</require>
  <require>com.rlnx.nuxeo.posix.schema</require>
 
  <extension target="org.nuxeo.ecm.directory.ldap.LDAPDirectoryFactory" point="directories">
    <directory name="groupDirectory">
...
      <references>
        <ldapReference field="members"
                       directory="userDirectory"
                       forceDnConsistencyCheck="false"
                       staticAttributeId="memberUID"
                       staticAttributeIsId="true" />
      </references>
    </directory>
  </extension>
</component>
The magic happens in the new staticAttributeIsId configuration which tells Nuxeo that the content of  staticAttribute is an ID and not a DN. The patch then makes Nuxeo search for the members of groups accordingly.
After this simple change with the patch, the new schema can be used in read-only mode. To use the POSIX schema in read/write mode you need modify several more things because the POSIX schema requires to input things like UIDs and GIDs when creating a new user account or a new group.
The rest of what is required is based on the information available in the Nuxeo documentation: Adding custom LDAP fields to the UI. For my own use, I just decided to do the minimum that is required to properly create a new user and new groups in the directory: add UID and GID fields and remove subGroups and parentGroups which are not supported by the schema. You might need to add or remove more fields to and from the UI to support your schema but the process will stay mostly the same as with those fields.

Schema extension

Since Nuxeo is accessing the user and group accounts data through Document objects, you need to redefine the user and group schemas so they are able to provide the right informations to Nuxeo.
Here is an excerpt of the user schema definition (posix-ldap-user-schema.xsd).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:nxs="http://www.revolutionlinux.com/nuxeo/posix-user"
            targetNamespace="http://www.revolutionlinux.com/nuxeo/posix-user">
 
...
 
  <xs:element name="username" type="xs:string" />
  <xs:element name="password" type="xs:string" />
  <xs:element name="email" type="xs:string" />
  <xs:element name="firstName" type="xs:string" />
  <xs:element name="lastName" type="xs:string" />
  <xs:element name="company" type="xs:string" />
 
  <xs:element name="uidNumber" type="xs:int" />
  <xs:element name="gidNumber" type="xs:int" />
 
  <xs:element name="groups" type="nxs:stringList" />
 
</xs:schema>
This is an excerpt of the group schema definition (posix-ldap-group-schema.xsd).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?xml version="1.0"?>
           xmlns:nxs="http://www.revolutionlinux.com/nuxeo/posix-group"
           xmlns:xs="http://www.w3.org/2001/XMLSchema">
 
...
 
  <xs:element name="groupname" type="xs:string" />
  <xs:element name="description" type="xs:string" />
 
  <!-- references -->
  <xs:element name="members" type="nxs:stringList" />
 
  <xs:element name="gidNumber" type="xs:int" />
</xs:schema>
Extension of the type service with the new schemas.
1
2
3
4
5
6
7
<?xml version="1.0"?>
<component name="com.rlnx.nuxeo.posix.schema">
  <extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
    <schema name="posix-user" src="posix-ldap-user-schema.xsd" />
    <schema name="posix-group" src="posix-ldap-group-schema.xsd" />
  </extension>
</component>

Layout extension

Finally, you need to redefine the UI used to create users and groups. Here is a small excerpt of what was added to the default layout.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<layout ...
...
  <row>
    <widget>uidNumber</widget>
  </row>
  <row>
    <widget>gidNumber</widget>
  </row>
...
  <widget name="uidNumber" type="text">
    <labels>
      <label mode="any">UID</label>
    </labels>
    <fields>
      <field schema="posix-user">uidNumber</field>
    </fields>
    <widgetModes>
      <mode value="create">edit</mode>
      <mode value="editPassword">hidden</mode>
      <mode value="any">view</mode>
    </widgetModes>
    <properties widgetMode="edit">
      <property name="required">true</property>
      <property name="styleClass">dataInputText</property>
    </properties>
  </widget>
  <widget name="gidNumber" type="text">
    <labels>
      <label mode="any">GID</label>
    </labels>
    <fields>
      <field schema="posix-user">gidNumber</field>
    </fields>
    <widgetModes>
      <mode value="create">edit</mode>
      <mode value="editPassword">hidden</mode>
      <mode value="any">view</mode>
    </widgetModes>
    <properties widgetMode="edit">
      <property name="required">true</property>
      <property name="styleClass">dataInputText</property>
    </properties>
  </widget>
...
</layout>
You should follow the instructions in the Nuxeo documentation page I linked to properly configure your repository. I can’t expose my directory configuration files to the world and the other files I linked may not be suited to your organisation.

Configuration files

Patched component

Copy this file in the bundles directory of your Nuxeo installation, replacing the file of the same name. Erase the earlier version of the file (5.4.0) if you are running with an older version of Nuxeo.
Written by François-Denis Gonthier
March 21st, 2011 at 12:37 am
Posted in Java,Nuxeo,Programming
Tagged with , , ,

A Wizard to FAIL




I’m doing one of my daily system upgrade when I got to this pair of wizard dialog. This happens when I’m trying to upgrade the flashplugin-installer package.

This gives you no choices but to click Forward to move to the next screen. Hoping for a way out, here is where you end up.

Note that there is no way to close the window. This window will need to be killed. This is unfortunate because while I know how to get out of this, a ordinary user would not. Even if it turns out I have accidentally got myself in this situation by unknowingly clicking the incorrect option (I don’t

A New Powerful Rocket Can Send Man to The Moon or Mars



The California based company SpaceX announced their plan to build a rocket more powerful than any rocket that has ever been built so far to this day. The huge rocket will be called Falcon Heavy which is an upgrade to the Falcon 9 rocket.

SpaceX plans to upgrade its Falcon 9 rockets with twin strap-on boosters and other systems to make them capable of launching larger payloads into space. With this increase in power, SpaceX feels this rocket can travel beyond low-Earth range and possibly travel into our solar system using less capability then most rockers built today. The Falcon Heavy rocket will also be powerful enough to bring man back to the moon and possibly Mars. In order to travel that far, Falcon Heavy will require more lift than even NASA’s Space Shuttle. Designed to generate 3.8 million pounds or 1,700 metric tons of thrust, the rocket will be able to do the job. Test flights can happen as soon at 2013.
If another trip to the moon is planned in the future, the Falcon Heavy would not be capable to deliver all the necessary components to make the trip happen. One thought is to launch the astronauts and moon lander in one trip, then a second liftoff would follow to deliver the vehicle to bring the crew back home.
In addition to possible flights to Mars and the moon, the Falcon Heavy can serve other purposes as well. A Las Vegas-based company, Bigelow Aerospace, is designing a commercial space station, and trying to establish a private moon base. A destination this far would require a vehicle to help build it, as well as a rocket to carry space tourists to and from the base.
SpaceX is not settling with just building the Falcon Heavy. Their sights are set on an even more powerful rocket called the super heavy-Lift, which will have three times more the capability than the Falcon Heavy. This vehicle will have no problem traveling far beyond Mars. SpaceX currently has a small contract with NASA to explore the possibility of building the super heavy-lift rocket.
 

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Blogger Templates