Difference between pages "Res ldap.conf" and "X11 configuration"

From Wikislax
(Difference between pages)
Jump to: navigation, search
(res_ldap.conf)
 
(Local language)
 
Line 1: Line 1:
 
{{RightTOC}}
 
{{RightTOC}}
  
== LDAP configuration ==
+
'''X11R7''' and later eliminate the need for manual configuration of '''X11''' during Linux installation. The correct graphic card, screen, keyboard and mouse are recognized automatically and stored in '''/etc/X11/xorg.conf''' (that you can still edit manually).
  
The [http://studioware.com/wikislax/index.php?title=OpenLDAP OpenLDAP] directory built earlier must be modified to include the asterisk schema, that can be copied from '''/usr/local/asterisk-x.y.z.t/contrib/scripts/asterisk.ldap-schema''' into '''/usr/local/etc/openldap/schema'''. The schema must then be included from '''/usr/local/etc/openldap/slapd.conf''':
+
== Local language ==
  
#
+
The Language at Slackware level is chosen as part of system installation. '''pkgtool''' affords re-running startup scripts later. Also, files '''/etc/profile.d/lang.csh''' and '''/etc/profile.d/lang.sh''' can be edited manually to update the shell environment with the correct language settings. However after doing this in Slackware 15.0 launching Kde will crash the system.
# See slapd.conf(5) for details on configuration options.
 
# This file should NOT be world readable.
 
#
 
include        /usr/local/etc/openldap/schema/core.schema
 
include        /usr/local/etc/openldap/schema/cosine.schema
 
include        /usr/local/etc/openldap/schema/inetorgperson.schema
 
'''include        /usr/local/etc/openldap/schema/asterisk.schema'''
 
. . .
 
  
A restart is required:
+
Choosing the language in X requires additional steps. From within KDE, choose the '''Settings''', '''System Settings''' application. Choose the display languages using '''Common apparence and behaviour''', '''Locale''', then choose the keyboard layout using '''Hardware''', '''Input devices''', '''Layout'''.
  
# /etc/rc.d/rc.slapd restart
+
Last but not least, in Slackware '''14''', the logon screen requires copying '''/usr/share/X11/xorg.conf.d/90-keyboard-layout.conf''' to '''/etc/X11/xorg.conf.d''' then manual editing, replacing '''us''' by your locale.
  
We need to define a structure in the OpenLDAP directory where to store the asterisk information. For example we can put our '''users''' and '''extentions''' under entries by the same name just below the root of the directory. This can be done with the following LDIF file that we add to the directory using the '''ldapadd''' command:
+
cp /usr/share/X11/xorg.conf.d/90-keyboard-layout.conf /etc/X11/xorg.conf.d
 +
vi /etc/X11/xorg.conf.d/90-keyboard-layout.conf
  
#OU users
+
For other Slackware versions, please refer to this [http://docs.slackware.com/howtos:window_managers:keyboard_layout page].
dn: ou=users,dc=studioware,dc=com
 
objectClass: top
 
objectClass: organizationalUnit
 
ou: users
 
# OU extensions
 
dn: ou=extensions,dc=studioware,dc=com
 
objectClass: top
 
objectClass: organizationalUnit
 
ou: extensions
 
 
# '''ldapadd -x -D "cn=Manager,dc=studioware,dc=com" -W -f yourLDIFpath'''
 
  
* '''-x''' : affords using a simple authentication (as opposed to SASL tricky schemes)
+
== X11 legacy configuration ==
* '''-D''' : affords defining the user (here cn=Manager,dc=studioware,dc=com)
 
* '''-W''' : affords being prompted to enter the password
 
* '''-f''' : affords specifying the LDIF file name
 
  
== res_ldap.conf ==
+
As the title suggests, it is normally no longer needed to effect these settings that are left here for reference. So please proceed to the next paragraph.
  
The '''res_ldap.conf''' file affords detailing how to access the LDAP database and which schema variables to use. Let's start with the LDAP connection information, located in the '''[_general]''' context:
+
'''X11R6''' makes you run '''Xorg -configure''' to generate the '''/etc/X11/xorg.conf''' file based on the results of autoconfiguration, or let  '''/usr/X11R6/bin/xorgconfig''' produce a base '''/etc/X11/xorg.conf''' file for your configuration and fine-tune it.
  
[_general]
+
If using the latter, a key point is the graphical board. If it is not in the list of compatible hardware then it is not managed. <u>A solution is to use the '''Vesa''' driver (number 0)</u> but the maximal resolution is 1280 x 1024, which will probably be under the possibilities of your screen. <u>A workaround is to use an X terminal</u> on another machine. See «using Xdm» on the next page.
;
 
; Specify one of either host and port OR url. URL is preferred, as you can
 
; use more options.
 
host=localhost                      ; LDAP host
 
port=389
 
url=ldap://localhost
 
protocol=3                          ; Version of the LDAP protocol to use; default is 3.
 
basedn=dc=studioware,dc=com          ; Base DN
 
user=cn=Manager,dc=studioware,dc=com ; Bind DN
 
pass=mysecret                        ; Bind password
 
  
The other contexts, '''[extensions]''', '''[sip]''', and '''[IAX]''', afford defining the correspondance between the variable names in Asterisk (on the left) and the variable names in the LDAP schema (on the right). Here is an example for the '''[extensions]''' context:
+
For the mouse, try to use '''auto [Auto detect]''' and the '''/dev/input/mice''' default device.
  
  ;
+
Also important are the horizontal and vertical frequencies. This information is probably located in the documentation of your screen. If not, word goes that a program named '''SuperProbe''' would be able to determine the values, but I have no additional information about this. Beware, a configuration mistake can definitely damage your screen! Otherwise the resolution can be edited manually in '''/etc/X11/xorg.conf'''.
; Extensions Table
 
;
 
[extensions]
 
;context  =  AstExtensionContext
 
;exten  =  AstExtensionExten
 
;priority = AstExtensionPriority
 
;app = AstExtensionApplication
 
;appdata = AstExtensionApplicationData
 
;additionalFilter=(objectClass=AstExtension)
 
context  =  AstContext
 
exten  =  AstExtension
 
priority = AstPriority
 
app = AstApplication
 
appdata = AstApplicationData
 
additionalFilter=(objectClass=AsteriskExtension)
 
  
For a full content example of the res_ldap.conf file please click [{{SERVER}}/wikislax/download/res_ldap.conf here]. But please note that some names in your particular situation might differ from the names listed in this file and you could have to fix it.
+
== X11 usage ==
  
== extconfig.conf ==
+
To start X, use the '''startx command'''. To stop X, use '''ctrl+alt+backspace'''. It’s good to know as if your screen freezes this avoids rebooting. On '''i386''', you can switch among consoles using '''ctrl+alt+Fn''', but if you have a screen under X, you need to go back using '''ctrl+alt+F7''' (or another Fn function key depending on the number of virtual consoles configured in your kernel).
  
The '''[settings]''' context of '''extconfig.conf''' affords defining in which subtrees Asterisk should get the '''users''' and '''extension''' entries:
+
By defaut, Slackware configures a single console on '''ctrl+alt+F6''' to use in addition to the X console on '''ctrl+alt+F7'''. It's possible to configure more by choosing the run level 4 for consoles c1 to c6 in '''/etc/inittab''' :
  
  ;
+
  # These are the standard console login getties in multiuser mode:
  ; Static and realtime external configuration
+
  c1:12345:respawn:/sbin/agetty 38400 tty1 linux
  ; engine configuration
+
  c2:12345:respawn:/sbin/agetty 38400 tty2 linux
  ;
+
  c3:12345:respawn:/sbin/agetty 38400 tty3 linux
  ; See https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration
+
  c4:12345:respawn:/sbin/agetty 38400 tty4 linux
; for basic table formatting information.
+
c5:12345:respawn:/sbin/agetty 38400 tty5 linux
;
+
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
[settings]
 
 
'''sipusers => ldap,"ou=users,dc=studioware,dc=com",sip'''
 
'''sippeers => ldap,"ou=users,dc=studioware,dc=com",sip'''
 
'''extensions => ldap,"ou=extensions,dc=studioware,dc=com",extensions'''
 
. . .
 
  
== sip.conf ==
+
Console mode is run level 3 and graphical mode is run level 4. To switch from console mode to graphical mode and vice versa, use '''telinit 4''' and '''telinit 3'''.
  
For OpenLDAP to properly work these options must be added to the '''[general]''' context of the '''sip.conf''' file:
+
== X11 drivers ==
  
[general]
+
Default drivers are available for the most common boards but might be slow. To speed up, you might go to your chipset provider website and get a recent driver. Of course, it will be a good idea to check beforehand that your chipset provider supports Linux and provides Linux drivers (but this is generally true for all of your hardware). nVidia are Linux-oriented and provide Linux drivers for all their boards. However, at the time of this writing (July 2012), nVidia has not fully taken the virtualization road, and the nVidia drivers are not compatible with Xen (4.1.2). The '''Nouveau driver''' - available in kernel 3.4.2 upstream - is. Although Nouveau is not a very popular driver, due to performances usually deemed insufficient.
rtcachefriends=yes
 
callevents=yes
 
realm=studioware.com
 
. . .
 
  
* rtcachefriends=yes // affords putting in cache the user info (mandatory at it affords keeping in memory the IP address with which the user connected).
+
OK now download and run the install script. Execution requires the presence of development tools and Linux headers, but «taints the kernel» : in case of crash,  the kernel debug information could be unreliable, meaning that if you have an issue with something, you could be denied support until you provide debug information obtained with an untainted kernel.
* callevents=yes // affords raising information about a call
 
* realm=studioware.com // LDAP domain name
 
 
 
== extensions.conf ==
 
 
 
The switch statement can be declared in one or more contexts to include the users or extensions LDAP records that have an '''AstAccountContext''' field matching the context name, for example:
 
 
 
[internal]
 
'''switch => Realtime/@'''
 
. . .
 
 
[freephonie]
 
. . .
 
'''switch => Realtime/@'''
 
. . .
 
 
 
<u>Note</u> : including the extensions LDAP records in several contexts is possible thanks to the fact the the '''AstAccountContext''' field is multivalued.
 
 
 
== Making sure ==
 
 
 
At this point Asterisk should be able to take the new configuration into account (with no user defined). Connect to the asterisk console, reload the modules and the configuration files and display the ldap status:
 
 
 
# '''asterisk -r'''
 
Asterisk 15.0.0, Copyright (C) 1999 - 2016, Digium, Inc. and others.
 
Created by Mark Spencer <markster@digium.com>
 
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
 
This is free software, with components licensed under the GNU General Public
 
License version 2 and other licenses; you are welcome to redistribute it under
 
certain conditions. Type 'core show license' for details.
 
=========================================================================
 
Connected to Asterisk 15.0.0 currently running on inner (pid = 2563)
 
inner*CLI> '''module reload'''
 
[Nov 28 21:29:09] NOTICE[2827]: sorcery.c:1407 sorcery_object_load: Type 'system' is not reloadable, maintaining previous values
 
[Nov 28 21:29:09] WARNING[2818]: res_phoneprov.c:1230 get_defaults: Unable to find a valid server address or name.
 
[Nov 28 21:29:09] NOTICE[2818]: chan_skinny.c:8445 config_load: Configuring skinny from skinny.conf
 
[Nov 28 21:29:09] NOTICE[2818]: cel_custom.c:95 load_config: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
 
[Nov 28 21:29:09] NOTICE[2818]: app_queue.c:8999 reload_queue_rules: queuerules.conf has not changed since it was last loaded. Not taking any action.
 
inner*CLI> '''sip reload'''
 
inner*CLI> '''dialplan reload'''
 
Dialplan reloaded.
 
inner*CLI> '''realtime show ldap status'''
 
Connected to 'ldap://localhost', baseDN dc=studioware,dc=com with username cn=Manager,dc=studioware,dc=com for 40 seconds
 
inner*CLI> quit
 
Asterisk cleanly ending (0).
 
  Executing last minute cleanups
 
root@inner:/usr/local/etc/asterisk#
 
 
 
== Adding Asterisk users ==
 
 
 
A small [{{SERVER}}/slax/download/cu.sh script] will afford adding users to the '''users''' and '''extensions''' subtrees of the directory. In this script we create users in context '''[internal]''' and extensions in contexts '''[internal]''' and '''[freephonie]''', creating two values in multivalued field '''AstAccountContext'''. Once the user created in LDAP,  SIP registration can be checked on the display of the phone and on the Asterisk console:
 
 
 
root@inner:/usr/local/etc/asterisk# '''asterisk -r'''
 
Asterisk 15.0.0, Copyright (C) 1999 - 2016, Digium, Inc. and others.
 
Created by Mark Spencer <markster@digium.com>
 
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
 
This is free software, with components licensed under the GNU General Public
 
License version 2 and other licenses; you are welcome to redistribute it under
 
certain conditions. Type 'core show license' for details.
 
=========================================================================
 
Connected to Asterisk 15.0.0 currently running on inner (pid = 2563)
 
[Nov 28 21:39:46] NOTICE[2678]: chan_sip.c:24648 handle_response_peerpoke: Peer 'jp' is now Reachable. (9ms / 2000ms)
 
inner*CLI> '''quit'''
 
Asterisk cleanly ending (0).
 
Executing last minute cleanups
 
root@inner:/usr/local/etc/asterisk#
 
  
 
<br/>
 
<br/>
  
{{pFoot|[[Sip.conf]]|[[Main Page]]|[[Confbridge.conf]]}}
+
{{pFoot|[[IPTables]]|[[Main Page]]|[[X11 over the network]]}}

Latest revision as of 10:20, 16 December 2022

X11R7 and later eliminate the need for manual configuration of X11 during Linux installation. The correct graphic card, screen, keyboard and mouse are recognized automatically and stored in /etc/X11/xorg.conf (that you can still edit manually).

Local language

The Language at Slackware level is chosen as part of system installation. pkgtool affords re-running startup scripts later. Also, files /etc/profile.d/lang.csh and /etc/profile.d/lang.sh can be edited manually to update the shell environment with the correct language settings. However after doing this in Slackware 15.0 launching Kde will crash the system.

Choosing the language in X requires additional steps. From within KDE, choose the Settings, System Settings application. Choose the display languages using Common apparence and behaviour, Locale, then choose the keyboard layout using Hardware, Input devices, Layout.

Last but not least, in Slackware 14, the logon screen requires copying /usr/share/X11/xorg.conf.d/90-keyboard-layout.conf to /etc/X11/xorg.conf.d then manual editing, replacing us by your locale.

cp /usr/share/X11/xorg.conf.d/90-keyboard-layout.conf /etc/X11/xorg.conf.d
vi /etc/X11/xorg.conf.d/90-keyboard-layout.conf

For other Slackware versions, please refer to this page.

X11 legacy configuration

As the title suggests, it is normally no longer needed to effect these settings that are left here for reference. So please proceed to the next paragraph.

X11R6 makes you run Xorg -configure to generate the /etc/X11/xorg.conf file based on the results of autoconfiguration, or let /usr/X11R6/bin/xorgconfig produce a base /etc/X11/xorg.conf file for your configuration and fine-tune it.

If using the latter, a key point is the graphical board. If it is not in the list of compatible hardware then it is not managed. A solution is to use the Vesa driver (number 0) but the maximal resolution is 1280 x 1024, which will probably be under the possibilities of your screen. A workaround is to use an X terminal on another machine. See «using Xdm» on the next page.

For the mouse, try to use auto [Auto detect] and the /dev/input/mice default device.

Also important are the horizontal and vertical frequencies. This information is probably located in the documentation of your screen. If not, word goes that a program named SuperProbe would be able to determine the values, but I have no additional information about this. Beware, a configuration mistake can definitely damage your screen! Otherwise the resolution can be edited manually in /etc/X11/xorg.conf.

X11 usage

To start X, use the startx command. To stop X, use ctrl+alt+backspace. It’s good to know as if your screen freezes this avoids rebooting. On i386, you can switch among consoles using ctrl+alt+Fn, but if you have a screen under X, you need to go back using ctrl+alt+F7 (or another Fn function key depending on the number of virtual consoles configured in your kernel).

By defaut, Slackware configures a single console on ctrl+alt+F6 to use in addition to the X console on ctrl+alt+F7. It's possible to configure more by choosing the run level 4 for consoles c1 to c6 in /etc/inittab :

# These are the standard console login getties in multiuser mode:
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:12345:respawn:/sbin/agetty 38400 tty2 linux
c3:12345:respawn:/sbin/agetty 38400 tty3 linux
c4:12345:respawn:/sbin/agetty 38400 tty4 linux
c5:12345:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux

Console mode is run level 3 and graphical mode is run level 4. To switch from console mode to graphical mode and vice versa, use telinit 4 and telinit 3.

X11 drivers

Default drivers are available for the most common boards but might be slow. To speed up, you might go to your chipset provider website and get a recent driver. Of course, it will be a good idea to check beforehand that your chipset provider supports Linux and provides Linux drivers (but this is generally true for all of your hardware). nVidia are Linux-oriented and provide Linux drivers for all their boards. However, at the time of this writing (July 2012), nVidia has not fully taken the virtualization road, and the nVidia drivers are not compatible with Xen (4.1.2). The Nouveau driver - available in kernel 3.4.2 upstream - is. Although Nouveau is not a very popular driver, due to performances usually deemed insufficient.

OK now download and run the install script. Execution requires the presence of development tools and Linux headers, but «taints the kernel» : in case of crash, the kernel debug information could be unreliable, meaning that if you have an issue with something, you could be denied support until you provide debug information obtained with an untainted kernel.


IPTables Main Page X11 over the network