Page 8 of 12 FirstFirst 123456789101112 LastLast
Results 71 to 80 of 118

Thread: Linux help needed - make fun of the N00b

  1. #71
    Constant Bitrate
    Join Date
    Aug 2007
    Location
    Northern VA
    Posts
    135
    Before I forget, I didn't mention that out of the box you can't write to the FB due to permissions restrictions. I chose to add a udev rule to change the owner to my non-root user I run my system as.

    To do this you need to identify some distinguishing info about your device - the vendor id and product id should be sufficient and these are shown in the output of "lsusb" otherwise you can use udevadm if you want to get fancy.

    Then just create a file /etc/udev/rules.d/50-fb.rules (any name you want as long as it starts with a number - which controls the order it is loaded - and ends in .rules). Inside it put

    Code:
    SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="000e", OWNER="cgalpin", MODE="0666"
    You'll want to change the "04d8", "000e" and "cgalpin" to suit your environment. The rule basically says if you match the device with this vendor id and product id, change the owner to cgalpin and set the permissions to 666.

    Then just unplug and re-plugin the FB and device permissions/owner will be changed if your rule is working.

    hth
    charles

  2. #72
    North of the land of Hey Huns
    Auto Apps:loading...

    Join Date
    Jun 2004
    Location
    Westminster, MD
    Posts
    2,127
    I should be fixing analog input this weekend, as well as cleaning up some of the digital output code so it works a lot smoother
    "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
    RevFE
    My Shop

  3. #73
    licensed to kill - FKA kev000
    Auto Apps:loading...
    tripzero's Avatar
    Join Date
    Aug 2006
    Location
    16.40618, 120.61106
    Posts
    2,494
    Quote Originally Posted by cgalpin View Post
    Before I forget, I didn't mention that out of the box you can't write to the FB due to permissions restrictions. I chose to add a udev rule to change the owner to my non-root user I run my system as.

    To do this you need to identify some distinguishing info about your device - the vendor id and product id should be sufficient and these are shown in the output of "lsusb" otherwise you can use udevadm if you want to get fancy.

    Then just create a file /etc/udev/rules.d/50-fb.rules (any name you want as long as it starts with a number - which controls the order it is loaded - and ends in .rules). Inside it put

    Code:
    SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="000e", OWNER="cgalpin", MODE="0666"
    You'll want to change the "04d8", "000e" and "cgalpin" to suit your environment. The rule basically says if you match the device with this vendor id and product id, change the owner to cgalpin and set the permissions to 666.

    Then just unplug and re-plugin the FB and device permissions/owner will be changed if your rule is working.

    hth
    charles
    running fbd as root also solves this issue. I'm kinda torn on the issue: fbd as root but use the system bus, fbd as user, use session bus, but add udev rule... Lose-lose situation

    The one thing I haven't been able to test on the fbd is the analog input dbus signal. have you been able to test that?
    Former author of LinuxICE, nghost, nobdy.
    Current author of Automotive Message Broker (AMB).
    Works on Tizen IVI. Does not represent anyone or anything but himself.

  4. #74
    Constant Bitrate
    Join Date
    Aug 2007
    Location
    Northern VA
    Posts
    135
    Quote Originally Posted by kev000 View Post
    running fbd as root also solves this issue. I'm kinda torn on the issue: fbd as root but use the system bus, fbd as user, use session bus, but add udev rule... Lose-lose situation
    In this application, running fbd as root is fine for sure and I would use it this way. And for Bugbyte he'll definitely want to keep it using the system bus as connecting to the session bus from apache/php opens up a whole can of worms that is not worth getting into if you can avoid it (permissions and X related).

    But If you want to use Malcom's GUI or any other direct access as a non-root user you'll need the rule there too of course and this is why I forgot about it - I only needed this when first trying out the FB without dbus.

    But in terms of setting up a system, this should be pretty easy to automate too if we want to make it easy for people to use this (a udev script that calls a slightly smarter script to determine the right user to give permissions, or just broaden the permissions a bit to a group the primary user should already be in, etc.)

    Quote Originally Posted by kev000 View Post
    The one thing I haven't been able to test on the fbd is the analog input dbus signal. have you been able to test that?
    I only got as far as trying to get an analog value and it segfaults at any attempt. I have not tried registering for any signals. I am not if it's a fbd or Fb issue. I plan on getting familiar with the code but don't expect to be able to spend too much time on this for the next few days.

    I'll tell you I was a bit surprised to see the polling. Maybe I shouldn't have, but I kind of expected the FB to be doing the polling and expose the changes as signals to the outside world. Not sure what else the chip is doing with it's cycles On my crappy little carputer this polling takes a fair amount of cpu - as much as 10% shown by top, which worries me. And I am not sure why, but the php calls to dbus seem to take a lot of memory when I'd expect it to take little to none.

    But really cool stuff - getting me excited enough to follow through on a lot of stuff I keep talking about doing but never do

    I'd really like to help with this, even if just doing grunt work like developing tests, documenting it and making sample test programs in various languages, although I should be able to contribute more significantly than that if it's wanted.

    charles
    p.s. Sorry if I have butchered people's names. I think I called you Kevin at some point and know know it's Kevron. As you can tell I don't get into the whole clever naming scheme, and never know what to call people

  5. #75
    Admin. Linux loser.
    Auto Apps:loading...
    Bugbyte's Avatar
    Join Date
    Sep 2004
    Location
    Corning, NY
    Posts
    7,359
    Blog Entries
    2
    Quote Originally Posted by cgalpin View Post
    I know you have apache, php, and mysql already installed, but if you have any trouble or just want to be sure, you can do it the lazy man's way with

    sudo tasksel install lamp-server

    Then you want to confirm it's working. We can test all 3 in one fell swoop with something that you might also mind useful in the future - phpmyadmin. So install it with

    sudo apt-get install phpmyadmin

    It will prompt you for your root mysql password, and then setup a phpmysqladmin user and prompt you for a password for that. Everything else is taken care of for you and you can run it by going to

    http://PLUGIP/phpmyadmin

    The login is phpmyadmin/passyougaveduringtheinstall

    You can of course go old-school and make your own test page under /var/www. Assuming you are doing this as root (for permissions), run

    echo "<?php phpinfo() ?>" > /var/www/phpinfo.php

    And then you can hit the page at

    http://PLUGIP/phpinfo.php
    Awesome! Thanks for the help!

    Okay, I tried to install phpmyadmin but I mistyped the root password and it failed. It said:

    "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).
    unable to connect to mysql server.
    error encountered creating user:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    dbconfig-common: phpmyadmin configure: trying again.
    dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf
    *** WARNING: ucf was run from a maintainer script that uses debconf, but
    the script did not pass --debconf-ok to ucf. The maintainer
    script should be fixed to not stop debconf before calling ucf,
    and pass it this parameter. For now, ucf will revert to using
    old-style, non-debconf prompting. Ugh!

    Please inform the package maintainer about this problem.
    Replacing config file /etc/phpmyadmin/config-db.php with new version
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).
    unable to connect to mysql server.
    error encountered creating user:

    See, this is where my n00bness gets me in trouble. I tried reinstalling it but got:

    Building dependency tree
    Reading state information... Done
    phpmyadmin is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

    On a side note, issuing http://plugIP/phpinfo.php does give me back a page with all the info on it. I had created that when I installed php. However, phpmyadmin gives me a 404 error.

    Also, on proftpd, I set it up as an inet server because it said it would use less resources, but now I get the following:

    root@iPlug:~# sudo /etc/init.d/proftpd start
    ProFTPd is started from inetd/xinetd.
    root@iPlug:~# ftp localhost
    -bash: ftp: command not found

    Sorry for being such a pain. Don't worry, my Perl scripting book and my Linux for dummies book arrived yesterday and I've got about 4 more that deal with php and administering apache server on the way.
    Quote Originally Posted by ghettocruzer View Post
    I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
    Want to:
    -Find out about the new iBug iPad install?
    -Find out about carPC's in just 5 minutes? View the Car PC 101 video

  6. #76
    FLAC
    Join Date
    Jan 2008
    Location
    Dartmouth, MA
    Posts
    914
    The fact that phpMyAdmin is in the package system is a great idea, but it's annoying in practice. All phpMyAdmin is is a set of php files. It doesn't need this "installation" bologna. Save yourself package management issues and go here:
    http://www.phpmyadmin.net/home_page/index.php
    download it, unarchive it and stick it in the root folder of your web directory. It has a configuration file in there too.

    That site also has a bunch of documentation on it.

    Your proftpd problems are not problems with proftpd. The problem is you don't have the ftp client installed on the the plug. See what apt-get turns up for apt-get install ftp. Otherwise, we'll need to talk about alternative FTP clients.

    You can also go to the mac terminal and try to ftp from there to the plug.
    My Nearly Complete Car:
    http://www.mp3car.com/vbulletin/show...ed-car-pc.html

    Micro Control Center... Control Your Car Across the Internet
    http://www.mp3car.com/fusion-brain/1...-internet.html

    Website: (It's a work in progress, really. All my projects have taken me from ever really developing it.)
    http://paulfurtado.com/

  7. #77
    Admin. Linux loser.
    Auto Apps:loading...
    Bugbyte's Avatar
    Join Date
    Sep 2004
    Location
    Corning, NY
    Posts
    7,359
    Blog Entries
    2
    Quote Originally Posted by PaulF View Post
    Your proftpd problems are not problems with proftpd. The problem is you don't have the ftp client installed on the the plug. See what apt-get turns up for apt-get install ftp. Otherwise, we'll need to talk about alternative FTP clients.

    You can also go to the mac terminal and try to ftp from there to the plug.
    Sure enough, that worked. So....what the hell is proftpd? I thought it was an implementation of ftp for debian? Sigh.
    Quote Originally Posted by ghettocruzer View Post
    I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
    Want to:
    -Find out about the new iBug iPad install?
    -Find out about carPC's in just 5 minutes? View the Car PC 101 video

  8. #78
    Variable Bitrate red_parchel's Avatar
    Join Date
    Jul 2006
    Location
    Boston, Ma
    Posts
    276
    Quote Originally Posted by Bugbyte View Post
    Sure enough, that worked. So....what the hell is proftpd? I thought it was an implementation of ftp for debian? Sigh.
    ftp is split up in a server [ in your case proftpd] and a client [in your case ftp on the mac]

    the d at the end of proftpd "suggests" that it's a daemon, or an application that runs in the back ground .. typically a server ... example: jabberd is the jabber messaging daemon[read server]

    ftp is the client this connects to the server just like your web browser on your mac connects to the apache web server on your plug, ftp [from any comptuer with an ftp client on it] will connect to the ftp server [proftpd] on the plug!

    so back to the SATS ftp:proftpd::firefox:apache2 [loosely]
    MobileThree: in car - Zotac Atom/ION - linuxICE 2.0.2

    --worklog--

  9. #79
    Constant Bitrate
    Join Date
    Aug 2007
    Location
    Northern VA
    Posts
    135
    Sounds like you got your ftp problem sorted out, great.

    Regarding phpmyadmin, regardless of if you choose to re-install using the package, or install from a tar ball, you will want to do two things

    1. Uninstall the package

    Code:
    sudo apt-get remove phpmyadmin
    2. Make sure you know your root password and can connect to mysql before reinstalling. You should be able to run

    Code:
    mysql -u root -p
    And enter your password and get a "mysql>" prompt.

    Oh and if you don't think you need it, just do #1 and scrap it. I just figured you'd find it useful and it does confirm you have a working installation.

    hth
    charles

  10. #80
    licensed to kill - FKA kev000
    Auto Apps:loading...
    tripzero's Avatar
    Join Date
    Aug 2006
    Location
    16.40618, 120.61106
    Posts
    2,494
    This is a very interesting idea. Would it be worth combining efforts and adding the results of this work into LinuxICE? Maybe a LinuxICE headless edition: doesn't have X, nGhost or any other graphical peices, just runs the services (wifi-proximity, fbd, obdgpslogger(d), apache, etc).

    I think an awesome web interface to these services can be produced if done right: create a sf.net project, subversion code repo so multiple coders can hack on it all at once, packages for LinuxICE/Ubuntu, etc.

    what say ye?
    Former author of LinuxICE, nghost, nobdy.
    Current author of Automotive Message Broker (AMB).
    Works on Tizen IVI. Does not represent anyone or anything but himself.

Similar Threads

  1. New Frontend for Windows and Linux
    By gbr in forum Other Cool Front Ends
    Replies: 68
    Last Post: 01-21-2009, 08:55 PM
  2. What is needed to make a mac run in a car?
    By purplebluengree in forum MacCar
    Replies: 1
    Last Post: 03-11-2005, 01:05 AM
  3. Possible EPIA distro for Linux, Can we make one?
    By adamis in forum Software & Software Development
    Replies: 15
    Last Post: 02-23-2005, 05:50 PM
  4. Those running Linux from CF, how to make bootable?
    By eugenen in forum Software & Software Development
    Replies: 1
    Last Post: 11-10-2003, 12:18 AM
  5. mp3/ogg player for Linux?
    By mpfreeze in forum Software & Software Development
    Replies: 5
    Last Post: 12-16-2002, 09:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •