LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Only root can start app... suggestions for non-root xinit (http://www.linuxquestions.org/questions/linux-newbie-8/only-root-can-start-app-suggestions-for-non-root-xinit-885298/)

flipjarg 06-08-2011 06:50 PM

Only root can start app... suggestions for non-root xinit
 
I am trying to make bluetoothd startup when I startx. This is a non-root user. Yet, only when I do the following will bluetoothd really start.
Code:

nonRoot@bt$ su root
root@bt$ bluetoothd; exit;

Using `sudo bluetoothd` does not work. The odd thing, is that it is executable for everyone:
Code:

nonRoot@bt$ ls -l /usr/sbin/bluetoothd
-rwxr-xr-x 1 root root 648026 2011-04-30 04:25 /usr/sbin/bluetoothd

I use a Bluetooth mouse and may use other Bluetooth devices in the future. Any suggestions on how to make this work? I am using Backtrack 5 (ubuntu) and this is the last thing I need to get working. It has left me stumped.

RSridhar 06-08-2011 11:08 PM

bluetoothd - a daemon
start with chkconfig
or use menu system-administration-services

dimpleboy 06-09-2011 03:13 AM

it seems that the owner of that is root, have you try to change the owner and group? chown -R user:group /file/?

flipjarg 06-09-2011 06:09 PM

Yes, bluetoothd is a daemon... not sure if you were telling or asking.

I am trying to avoid, changing the permissions, but I did run chkconfig and it wasn't there. when I tried to add it (`chkconfig -a bluetoothd`) it said it is "an unknown service".

Code:

root@bt$ chkconfig | grep bluetooth
root@bt$

Code:

root@xanlabot# chkconfig
alsa-mixer-save            off
apache2                    off
apparmor                    on
apport                      off
atd                        off
avahi-daemon                off
binfmt-support              off
bootlogd                    off
bridge-network-interface    off
console-setup              off
cron                        off
cryptdisks                  0
cryptdisks-early            0
cups                        off
dbus                        off
decnet                      off
dmesg                      off
dns-clean                  on
etc-setserial              on
failsafe-x                  off
fancontrol                  on
farpd                      off
framework-postgres          2345
gpsd                        off
grub-common                on
gssd                        off
hostname                    off
hwclock                    off
hwclock-save                off
idmapd                      off
irqbalance                  off
killprocs                  on
lm-sensors                  on
module-init-tools          off
mysql                      off
nessusd                    off
network-interface          off
network-interface-security  off
networking                  off
ondemand                    on
openvpn                    off
pcmciautils                on
pcscd                      off
plymouth                    off
plymouth-log                off
plymouth-splash            off
plymouth-stop              off
portmap                    off
portmap-boot                off
portmap-wait                off
pppd-dns                    on
procps                      off
pulseaudio                  on
rc.local                    on
rcS                        off
rinetd                      off
rpc_pipefs                  off
rsync                      on
rsyslog                    off
screen-cleanup              off
sendsigs                    0
setserial                  on
snort                      off
ssh                        off
statd                      off
statd-mounting              off
stop-bootlogd              off
stop-bootlogd-single        off
udev                        off
udev-finish                off
udevmonitor                off
udevtrigger                off
ufw                        off
umountfs                    0
umountnfs.sh                0
umountroot                  0
urandom                    0S
wicd                        on
winbind                    off
wpa-ifupdown                0
x11-common                  on
xplico                      off


venikathir 06-10-2011 08:49 AM

Hi
Try edit the /etc/rc.local on your machine
put the entry to start the bluetoothd
by using /usr/sbin/bluetoothd

by next boot it will pick automatically


if this solves plz change to SOLVED

RSridhar 06-10-2011 10:26 AM

daemon once started by root at a particular runlevel
continues to auto start with subsequent boot.
In my fedora core 14 the bluetoothd autostarts at runlevel 3,4, and 5.
If it is not auto started on your system,
you need only start it once as root at runlevels 3,4,5 and
subsequent boot will have the daemon autostart and you do not have to do
anything about it.

chkconfig command to execute as root

chkconfig --level=345 bluetoothd on
see man chkconfig

flipjarg 06-10-2011 06:32 PM

Quote:

Originally Posted by venikathir (Post 4381880)
Hi
Try edit the /etc/rc.local on your machine put the entry to start the bluetoothd by using /usr/sbin/bluetoothd

by next boot it will pick automatically...

That did it! Thank you!

Quote:

Originally Posted by RSridhar (Post 4381962)
daemon once started by root at a particular runlevel
continues to auto start with subsequent boot.
In my fedora core 14 the bluetoothd autostarts at runlevel 3,4, and 5.
If it is not auto started on your system,
you need only start it once as root at runlevels 3,4,5 and
subsequent boot will have the daemon autostart and you do not have to do
anything about it.

chkconfig command to execute as root

chkconfig --level=345 bluetoothd on
see man chkconfig

I did not try the chkconfig command that you suggested however, this will be helpful for other things in the future. I did not know that about runlevels!


All times are GMT -5. The time now is 04:30 AM.