Difference between revisions of "MythWeb on Lighttpd"

From MythTV Official Wiki
Jump to: navigation, search
m
m (Page needed info about variable translation issue. MythTV 25.2 MythWeb 25.2 Lightttpd 1.4.31)
 
(11 intermediate revisions by 7 users not shown)
Line 1: Line 1:
Ok, this will describe a way to get [[MythWeb]] working on lighttpd. This is not going to be an elegant solution, but at least it should work.
+
{{outdated}}
 +
== MythWeb on Lighttpd ==
  
Ok, lets start.
+
MythWeb provides a frontend for scheduling and managing recordings on your MythBox from a web browser located on any machine.  In addition, it allows for changing key bindings and other settings.
  
PHP has to be compiled with a minimum of:
+
This guide will provide you with a way to run MythWeb on Lighttpd rather then apache. Lighttpd has the benefit of faster page loading times for MythWeb, but comes at the expense of a longer setup time (which should be helped by this guide).
 +
 
 +
 
 +
== Installing ==
 +
 
 +
Before we get anywhere we need to install the programs needed for this. Use your package manager or compile from source.
 +
 
 +
=== PHP ===
 +
 
 +
PHP just needs the following options compiled as a minimum:
  
 
<pre>
 
<pre>
Line 9: Line 19:
 
</pre>
 
</pre>
  
Then in your lighttpd.conf make sure "mod_fastcgi" is uncommented.
+
Gentoo would use the following USE Flags:
 +
cgi cli discard-path force-cgi-redirect mysql ssl pcre
 +
 
 +
 
 +
=== Lighttpd ===
 +
 
 +
A default compile should pull everything needed in and the USE Flags for Gentoo would be: fastcgi mysql pcre php ssl
 +
 
 +
 
 +
=== MythWeb ===
 +
 
 +
You need to copy the MythWeb files over to your web server's path.  On some systems, that is /var/www/localhost/htdocs/
 +
I also put MythWeb into a directory called ''mythweb'' and the rest of the guide will follow the layout of the path being /var/www/localhost/htdocs/mythweb/ and the address being http://localhost/mythweb, change to suit your needs.
 +
 +
 
 +
== Configuring ==
 +
 
 +
With everything installed we next need to configure our software for use.
 +
 
 +
=== PHP ===
 +
 
 +
Only one option here needs changing else you will be seeing the following error quite alot:
 +
'''''
 +
  Error at /var/www/localhost/htdocs/modules/weather/handler.php, line 96:
 +
  file() [function.file]: URL file-access is disabled in the server configuration'''''
 +
 
 +
You need to open your php.ini which in Gentoo's case is /etc/php/cgi-php5/php.ini and change the following:
 +
 
 +
<pre>
 +
allow_url_fopen = On
 +
</pre>
 +
 
 +
The above command allows URLs to be treated as files.
 +
 
 +
 
 +
=== Lighttpd ===
 +
 
 +
There are many options in here that need changing to allow MythWeb to work.
 +
 
 +
==== fastcgi.server ====
 +
 
 +
MythWeb needs a php in cgi mode so we need to enable the module mod_fastcgi in the lighttpd.conf file as so:
 +
 
 +
server.modules = (
 +
mod_fastcgi
 +
)
 +
 
 +
We need to configure fastcgi for PHP use so open the config file for it and leaving the parts which are already there as it may break you install we need to add the following line:
 +
 
 +
<pre>
 +
fastcgi.server            = ( ".php" =>
 +
                              ( "localhost" =>
 +
                                (
 +
                                  "socket" => "/tmp/php-fastcgi.socket",
 +
                                  "bin-path" => "/usr/local/bin/php",
 +
                                  "broken-scriptfilename" => "enable"
 +
                                )
 +
                              )
 +
                          )
 +
</pre>
 +
 
 +
Which should just be the ''broken-scriptfilename'' line
 +
 
 +
Important NOTE: except the last line, every line in the array must end with a comma, or else lighttpd won't start!
  
You will also need to add the fastcgi.server setup for php.  Change the location paths as needed for your environment. [http://www.lighttpd.net/documentation/fastcgi.html Here] is a good page on setting up the FastCGI Interface.
+
Lighttpd doesn't use .htaccess like Apache does so we need a workaround for access to the MythTV database.
  fastcgi.server            = ( ".php" =>
+
 
                              ( "localhost" =>
+
Once again editing the fastcgi.server section place the following:
                                (
+
 
                                  "socket" => "/tmp/php-fastcgi.socket",
+
<pre>
                                  "bin-path" => "/usr/local/bin/php",
+
fastcgi.server            = ( ".php" =>
                                  "broken-scriptfilename" => "enable"
+
                              ( "localhost" =>
 +
                                (
 +
                                  "socket" => "/tmp/php-fastcgi.socket",
 +
                                  "bin-path" => "/usr/local/bin/php",
 +
                                  "broken-scriptfilename" => "enable",
 +
                                  "bin-environment" => ( "db_server" => "localhost",
 +
                                                        "db_name" => "mythconverg",
 +
                                                        "db_login" => "mythtv",
 +
                                                        "db_password" => "mythtv"
 +
                                                        )
 
                                 )
 
                                 )
 
                               )
 
                               )
                            )
+
                              )
Please note the "broken-scriptfilename" option.  If you do not add this then your PATH_INFO will not be passed correctly to the mythweb.php script.
+
</pre>
 +
 
 +
Changing the values to match you install, e.g. if my login was Pompey the line would look like this
 +
 
 +
<pre>
 +
"db_login" => "Pompey",
 +
</pre>
 +
 
 +
MythWeb can now connect to the database.
 +
 
 +
==== Mod_Rewrite ====
 +
 
 +
MythWeb needs a rewrite rule to function properly so we need to enable the module mod_rewrite in the lighttpd.conf file as so:
 +
 
 +
<pre>
 +
server.modules = (
 +
mod_rewrite
 +
)
 +
</pre>
 +
 
 +
We now need to add the rule in the same config file that does the rewriting:
 +
 
 +
<pre>
 +
url.rewrite = (
 +
  "^/mythweb(/tv.*|/music.*|/video.*|/weather.*|/settings.*|/status.*|/backend_log.*)$" =>  "/mythweb/mythweb.php/$1"
 +
  )
 +
</pre>
 +
 
 +
The above rule is following my layout of being in the mythweb directory, If MythWeb was in the root of the web server '/' then we would use the following rule:
 +
 
 +
<pre>
 +
url.rewrite = (
 +
  "^(/tv.*|/music.*|/video.*|/weather.*|/settings.*|/status.*|/backend_log.*)$" =>  "/mythweb.php/$1"
 +
)
 +
</pre>
 +
 
  
Your MythWeb installation wont work on lighttpd because lighttpd doesn't read/understands the .htaccess file which is needed to set the database settings in the webservers environment as well as specifying the rewrite rules which are needed for MythWeb.
+
==== Default Page ====
 +
 
 +
As most of you know when you type in an address such as [http://www.immolo.net http://www.immolo.net] it really loads up the page http://www.immolo.net/index.php but MythWeb's main page is called mythweb.php so lets edit lighttpd.conf to also open mythweb.php as a default page so we can just type http://localhost/mythweb/ to access MythWeb
 +
 
 +
Find the following line:
 +
 
 +
<pre>
 +
server.indexfiles    = ("index.php", "index.html", "index.htm", "default.htm")
 +
</pre>
 +
 
 +
And change to:
 +
 
 +
<pre>
 +
server.indexfiles    = ("mythweb.php", "index.php", "index.html", "index.htm", "default.htm")
 +
</pre>
 +
 
 +
Note : on my version (1.4.13), server.indexfiles should be replaced by index-file.names so it becomes :
 +
 
 +
<pre>
 +
index-file.names          = ("mythweb.php", "index.php", "index.html", "index.htm", "default.htm")
 +
</pre>
 +
Lighttpd is now configure for MythWeb usage but we need to restart Lighttpd for all the changes to take place.
  
Lighttpd does in fact have support for rewriting and as well for environment settings, but the latter didn't work for me.
+
=== MythWeb ===
  
You can try yourself, just put the following into your lighttpd.conf
+
When using MythWeb on Lighttpd you always get the following error:
 +
(Note: this is also applicable if using MythWeb on Apache)
  
  # first you need to load the setenv module
+
<pre>
  server.modules += ( mod_setenv )
+
Fatal error: Call to a member function query() on a non-object in /var/www/localhost/htdocs/mythweb/includes/session.php on line 60
 +
</pre>
  
  # second you specify the the needed variables
+
To fix this we need to apply a few lines of code which I found on the [http://forums.gentoo.org/viewtopic-p-4138309.html?sid=14fba9b62046cf3c4ad8c7027402bc62 Gentoo fourms]
  setenv.add-environment = (
 
    "db_server" => "localhost",
 
    "db_name" => "mythconverg",
 
    "db_login" => "mythtv_user",
 
    "db_password" => "password"
 
  )
 
  
That should work, but doesn't for me, so here is how I did it:
+
<pre>
  
1. Open the file includes/init.php in your MythWeb directory with the editor of your choice.
+
/**
 +
+ * Destructor to save the session  before the database connection dies
 +
/**/
 +
    function __destruct() {
 +
        // Restore global db object reference for session write
 +
        global $db;
 +
        $db = $this;
 +
        // Ask session to write and close now, before we lose the db object forever
 +
        session_write_close();
 +
    }
 +
</pre>
  
2. find the part of the file where the env variables are checked for the first time:
+
The above code needs to go into mythtv/include/objects/Database.php around line 90 which is just under the following section:
  
  // No database connection info defined?
+
<pre>
  if (empty($_SERVER['db_server']) || empty($_SERVER['db_name']) || empty($_SERVER['db_login'])) {
+
/**
      require_once 'templates/_db_vars_error.php';
+
* Legacy constructor to catch things that the abstract classification won't
      exit;
+
/**/
  }
+
    function Database() {
  ...
+
        trigger_error('The Database class should never be created as an object.  Use Database::connect() instead.', E_USER_ERROR);
 +
    }
 +
</pre>
  
3. enter the following ABOVE the part you found in step 2:
+
After saving you should notice the error has gone from all the pages and now MythWeb fully works as it would with Apache.
 +
== If Mythweb doesn't display correctly ==
 +
=== Symptom: ===
 +
Page loads without error and just shows two "MythTV" links to ~/mythweb/root_url.
 +
=== Cause: ===
 +
I found at [http://en.gentoo-wiki.com/wiki/MythWeb http://en.gentoo-wiki.com/wiki/MythWeb] there is a known variable translation issue.
 +
=== Solution: ===
 +
Edit mythweb/includes/init.php and add these lines near the top
 +
<pre>
 +
// Define db access for Lighttpd.
 +
$_SERVER["db_server"] = $_SERVER["DB_SERVER"];
 +
$_SERVER["db_name"] = $_SERVER["DB_NAME"];
 +
$_SERVER["db_login"] = $_SERVER["DB_LOGIN"];
 +
$_SERVER["db_password"] = $_SERVER["DB_PASSWORD"];
 +
</pre>
 +
== Secure MythWeb on Lighttpd ==
  
  $_SERVER["db_server"] = "localhost";
+
You sometimes hear stories of people gaining access to other peoples MythTV setup via the Internet so lets look into ways of securing MythWeb but still leaving access to MythWeb from the outside in case we ever need to access it from work or from a friends (or show off :D).
  $_SERVER["db_name"] = "mythconverg";
 
  $_SERVER["db_login"] = "mythtv_user";
 
  $_SERVER["db_password"] = "password";
 
  
After that, mythweb should find and be able to connect to the database.
+
=== Auth (Password) ===
  
Another way of doing this without modifying the mythweb code is to add a bin-environment to the fastcgi.server configuration in the lighttpd.conf file.  Your fastcgi.server section would now look something like this:
+
Nice and simple, lets put an username and password on the directory so then only we can access it.
  
  fastcgi.server            = ( ".php" =>
+
In the lighttpd.conf uncomment the mod_auth so it looks like this:
                              ( "localhost" =>
 
                                (
 
                                  "socket" => "/tmp/php-fastcgi.socket",
 
                                  "bin-path" => "/usr/local/bin/php",
 
                                  "broken-scriptfilename" => "enable",
 
                                  "bin-environment" => ( "db_server" => "localhost",
 
                                                        "db_name" => "mythconverg",
 
                                                        "db_login" => "mythtv_user",
 
                                                        "db_password" => "password" )
 
                                )
 
                              )
 
                            )
 
  
Now when you upgrade you won't have to go back into the init.php file and modify it.
+
<pre>
 +
server.modules = (
 +
mod_auth
 +
)
 +
</pre>
  
But things will be still screwed up, cause there are no rewrite rules.
+
We can then add the following rule to create the protected directory:
  
So, now we are going to specify those in the file lighttpd.conf.
+
<pre>
 +
auth.backend              = "htpasswd"
 +
auth.backend.htpasswd.userfile = "/var/www/localhost/lighttpd.user.htpasswd"
 +
auth.require              = ( "/mythweb/" =>
 +
                              (
 +
                                "method"  => "basic",
 +
                                "realm"  => "mythweb",
 +
                                "require" => "valid-user"
 +
                              )
 +
                        )
 +
</pre>
  
  # make sure the rewrite module is loaded
+
As you can see, we are using htpasswd (an Apache based tool) which on Gentoo can be installed with the app-admin/apache-tools package but other distributions will need to check the package they need.
  server.modules += ( "mod_rewrite" )
 
  
  #the actual rewrite rule
+
with htpasswd installed you now need to run the following command:
  url.rewrite = (
 
    "^(/tv.*|/music.*|/video.*|/weather.*|/settings.*|/status.*|/backend_log.*)$" =>  "mythweb.php/$1"
 
  )
 
  
This rule assumes that the mythweb directory is the actual server root.
+
<pre>
If it isn't you may want to create a virtual host like this:
+
htpassword -c /var/www/localhost/lighttpd.user.htpassword <user>
 +
</pre>
  
  $HTTP["host"] == "mythweb.some.domain" {
+
The more secure digest method can also be used which doesn't send plain text passwords. Uncomment mod_auth like above and use this in mod_auth.conf
    server.document-root = "/var/www/mythweb"
 
    index-file.names = ("mythweb.php")
 
    url.rewrite-once = (
 
      "^(/tv.*|/video.*|/weather.*|/settings.*|/status.*)$" =>    "mythweb.php/$1"
 
    )
 
  }
 
  
You may wonder if you could just take the rewrite rules from the .htaccess file and use those. Well, i thought so too, and the guys in #lighttpd said in should work, but it didn't...
+
<pre>
 +
auth.backend              = "htdigest"
 +
auth.backend.htdigest.userfile = "/var/www/localhost/lighttpd.user.htdigest"
 +
auth.require              = ( "/mythweb/" =>
 +
                              (
 +
                                "method"  => "digest",
 +
                                "realm"  => "mythweb",
 +
                                "require" => "valid-user"
 +
                              )
 +
                        )
 +
</pre>
  
Anyways, here is what it should look like if you want to try it out anyway:
+
then htdigest command instead of htpasswd
  
  url.rewrite-once = (
+
<pre>
    "^(css|data|images|js|themes|skins|[a-z_]+\.php)(/|$)" => "$0",
+
htdigest -c /var/www/localhost/lighttpd.user.htdigest <realm> <user>
    "^(.+)$" => "mythweb.php/$1",
+
</pre>
    "^(.*)$" => "mythweb.php"
 
  )
 
  
The $0 is needed instead of the "-" according to #lighttpd... and thats the only difference.
+
Chaning ''<user>'' to the username you desire. You will next be asked to type a password which I'm sure you don't need me to say needs to be secure.
  
You may need to edit your php.ini to allow opening of URLs as files:
+
After you restart Lighttpd when you point your browser to MythWeb you should be asked for your username and password.
  
  allow_url_fopen = On
+
== ToDo ==
  
Otherwise, you'll get errors like
+
I still need to add a section on using SSL with MythWeb on Lighttpd and any ideas are welcome place them in the Talk page or just add it yourself.
  
  Error at /var/www/localhost/htdocs/modules/weather/handler.php, line 96:
+
I also wrote this guide late at night and 3 days after the birth of my son (hence the lack of sleep) so if you find spelling or grammer mistakes please correct them.
  file() [function.file]: URL file-access is disabled in the server configuration
 
  
 +
The layout of this guide maybe change if you have any ideas on a better feel please let me know.
  
[[Category:HOWTO]]
+
[[Category:HOWTO]] [[Category:MythWeb]]

Latest revision as of 18:20, 20 September 2012

Time.png Outdated: The information on this page may no longer be relevant to the current release of MythTV, 34.0. Please consider helping to update it. This page was last modified on 2012-09-20.

MythWeb on Lighttpd

MythWeb provides a frontend for scheduling and managing recordings on your MythBox from a web browser located on any machine. In addition, it allows for changing key bindings and other settings.

This guide will provide you with a way to run MythWeb on Lighttpd rather then apache. Lighttpd has the benefit of faster page loading times for MythWeb, but comes at the expense of a longer setup time (which should be helped by this guide).


Installing

Before we get anywhere we need to install the programs needed for this. Use your package manager or compile from source.

PHP

PHP just needs the following options compiled as a minimum:

./configure --enable-fastcgi --enable-discard-path --enable-force-redirect --with-mysql

Gentoo would use the following USE Flags: cgi cli discard-path force-cgi-redirect mysql ssl pcre


Lighttpd

A default compile should pull everything needed in and the USE Flags for Gentoo would be: fastcgi mysql pcre php ssl


MythWeb

You need to copy the MythWeb files over to your web server's path. On some systems, that is /var/www/localhost/htdocs/ I also put MythWeb into a directory called mythweb and the rest of the guide will follow the layout of the path being /var/www/localhost/htdocs/mythweb/ and the address being http://localhost/mythweb, change to suit your needs.


Configuring

With everything installed we next need to configure our software for use.

PHP

Only one option here needs changing else you will be seeing the following error quite alot:

 Error at /var/www/localhost/htdocs/modules/weather/handler.php, line 96:
 file() [function.file]: URL file-access is disabled in the server configuration

You need to open your php.ini which in Gentoo's case is /etc/php/cgi-php5/php.ini and change the following:

allow_url_fopen = On

The above command allows URLs to be treated as files.


Lighttpd

There are many options in here that need changing to allow MythWeb to work.

fastcgi.server

MythWeb needs a php in cgi mode so we need to enable the module mod_fastcgi in the lighttpd.conf file as so:

server.modules = ( mod_fastcgi )

We need to configure fastcgi for PHP use so open the config file for it and leaving the parts which are already there as it may break you install we need to add the following line:

fastcgi.server             = ( ".php" =>
                              ( "localhost" =>
                                (
                                  "socket" => "/tmp/php-fastcgi.socket",
                                  "bin-path" => "/usr/local/bin/php",
                                  "broken-scriptfilename" => "enable"
                                )
                              )
                           )

Which should just be the broken-scriptfilename line

Important NOTE: except the last line, every line in the array must end with a comma, or else lighttpd won't start!

Lighttpd doesn't use .htaccess like Apache does so we need a workaround for access to the MythTV database.

Once again editing the fastcgi.server section place the following:

fastcgi.server             = ( ".php" =>
                              ( "localhost" =>
                                (
                                  "socket" => "/tmp/php-fastcgi.socket",
                                  "bin-path" => "/usr/local/bin/php",
                                  "broken-scriptfilename" => "enable",
                                  "bin-environment" => ( "db_server" => "localhost",
                                                         "db_name" => "mythconverg",
                                                         "db_login" => "mythtv",
                                                         "db_password" => "mythtv"
                                                        )
                                 )
                               )
                              )

Changing the values to match you install, e.g. if my login was Pompey the line would look like this

"db_login" => "Pompey",

MythWeb can now connect to the database.

Mod_Rewrite

MythWeb needs a rewrite rule to function properly so we need to enable the module mod_rewrite in the lighttpd.conf file as so:

server.modules = (
mod_rewrite
)

We now need to add the rule in the same config file that does the rewriting:

url.rewrite = (
   "^/mythweb(/tv.*|/music.*|/video.*|/weather.*|/settings.*|/status.*|/backend_log.*)$" =>   "/mythweb/mythweb.php/$1"
 )

The above rule is following my layout of being in the mythweb directory, If MythWeb was in the root of the web server '/' then we would use the following rule:

url.rewrite = (
   "^(/tv.*|/music.*|/video.*|/weather.*|/settings.*|/status.*|/backend_log.*)$" =>   "/mythweb.php/$1"
 )


Default Page

As most of you know when you type in an address such as http://www.immolo.net it really loads up the page http://www.immolo.net/index.php but MythWeb's main page is called mythweb.php so lets edit lighttpd.conf to also open mythweb.php as a default page so we can just type http://localhost/mythweb/ to access MythWeb

Find the following line:

server.indexfiles    = ("index.php", "index.html", "index.htm", "default.htm")

And change to:

server.indexfiles    = ("mythweb.php", "index.php", "index.html", "index.htm", "default.htm")

Note : on my version (1.4.13), server.indexfiles should be replaced by index-file.names so it becomes :

index-file.names           = ("mythweb.php", "index.php", "index.html", "index.htm", "default.htm")

Lighttpd is now configure for MythWeb usage but we need to restart Lighttpd for all the changes to take place.

MythWeb

When using MythWeb on Lighttpd you always get the following error: (Note: this is also applicable if using MythWeb on Apache)

Fatal error: Call to a member function query() on a non-object in /var/www/localhost/htdocs/mythweb/includes/session.php on line 60

To fix this we need to apply a few lines of code which I found on the Gentoo fourms


/**
+ * Destructor to save the session  before the database connection dies
/**/
    function __destruct() {
        // Restore global db object reference for session write
        global $db;
        $db = $this;
        // Ask session to write and close now, before we lose the db object forever
        session_write_close();
    } 

The above code needs to go into mythtv/include/objects/Database.php around line 90 which is just under the following section:

/**
 * Legacy constructor to catch things that the abstract classification won't
/**/
    function Database() {
        trigger_error('The Database class should never be created as an object.  Use Database::connect() instead.', E_USER_ERROR);
    }

After saving you should notice the error has gone from all the pages and now MythWeb fully works as it would with Apache.

If Mythweb doesn't display correctly

Symptom:

Page loads without error and just shows two "MythTV" links to ~/mythweb/root_url.

Cause:

I found at http://en.gentoo-wiki.com/wiki/MythWeb there is a known variable translation issue.

Solution:

Edit mythweb/includes/init.php and add these lines near the top

// Define db access for Lighttpd.
$_SERVER["db_server"] = $_SERVER["DB_SERVER"];
$_SERVER["db_name"] = $_SERVER["DB_NAME"];
$_SERVER["db_login"] = $_SERVER["DB_LOGIN"];
$_SERVER["db_password"] = $_SERVER["DB_PASSWORD"];

Secure MythWeb on Lighttpd

You sometimes hear stories of people gaining access to other peoples MythTV setup via the Internet so lets look into ways of securing MythWeb but still leaving access to MythWeb from the outside in case we ever need to access it from work or from a friends (or show off :D).

Auth (Password)

Nice and simple, lets put an username and password on the directory so then only we can access it.

In the lighttpd.conf uncomment the mod_auth so it looks like this:

server.modules = (
mod_auth
)

We can then add the following rule to create the protected directory:

auth.backend               = "htpasswd"
auth.backend.htpasswd.userfile = "/var/www/localhost/lighttpd.user.htpasswd"
auth.require               = ( "/mythweb/" =>
                               (
                                 "method"  => "basic",
                                 "realm"   => "mythweb",
                                 "require" => "valid-user"
                               )
                        )

As you can see, we are using htpasswd (an Apache based tool) which on Gentoo can be installed with the app-admin/apache-tools package but other distributions will need to check the package they need.

with htpasswd installed you now need to run the following command:

htpassword -c /var/www/localhost/lighttpd.user.htpassword <user>

The more secure digest method can also be used which doesn't send plain text passwords. Uncomment mod_auth like above and use this in mod_auth.conf

auth.backend               = "htdigest"
auth.backend.htdigest.userfile = "/var/www/localhost/lighttpd.user.htdigest"
auth.require               = ( "/mythweb/" =>
                               (
                                 "method"  => "digest",
                                 "realm"   => "mythweb",
                                 "require" => "valid-user"
                               )
                        )

then htdigest command instead of htpasswd

htdigest -c /var/www/localhost/lighttpd.user.htdigest <realm> <user>

Chaning <user> to the username you desire. You will next be asked to type a password which I'm sure you don't need me to say needs to be secure.

After you restart Lighttpd when you point your browser to MythWeb you should be asked for your username and password.

ToDo

I still need to add a section on using SSL with MythWeb on Lighttpd and any ideas are welcome place them in the Talk page or just add it yourself.

I also wrote this guide late at night and 3 days after the birth of my son (hence the lack of sleep) so if you find spelling or grammer mistakes please correct them.

The layout of this guide maybe change if you have any ideas on a better feel please let me know.