run X as spot...audio work successfully! thanks to GuestToo
-
- Posts: 23
- Joined: Sat 02 Sep 2006, 22:28
run X as spot...audio work successfully! thanks to GuestToo
how to run X as spot? what's the best way to login as spot?
i have open x as spot with jeffrey's tips
i have open x as spot with jeffrey's tips
Last edited by tux_friend on Sun 03 Sep 2006, 20:41, edited 7 times in total.
shut down Xhow to run X as spot? what's the best way to login as spot?
why do not create a tutorial?
su spot
cd
startx
you will have to setup configuration files in spot's home dir first ... you will have to set up permissions on various files and dirs and devices, for example, you will have to setuid X (in other words, X has to run as root anyway), and startx (xwin) writes to files in /tmp and /etc, these files must be made writable by spot
if you don't setup things first, spot will not be able to mount, unmount, or access drives ... spot will only be able to write to the home dir
there will be no way for spot to install programs ... many of the programs that are installed will not work ... for example, the program's configuration files are in /root, not in spot's home dir
also, many of my programs are in /root, and make symlinks in /usr when the program starts ... i did it this way because at one time, Puppy would simply delete everything that was installed in /usr when Puppy upgraded ... but spot can not create symlinks in /usr, so these programs will not run as spot
it's easy enough to run X as spot, or any user you create ... but don't expect Puppy to work exactly the same as it did before ... a lot of things will be broken
-
- Posts: 23
- Joined: Sat 02 Sep 2006, 22:28
thanks
hi guestToo,thanks for your help.
but...how to setuid X? i'm not know this....
but...how to setuid X? i'm not know this....
you just have to type:
chmod u+s /usr/X11R6/bin/Xorg
chmod u+s /usr/X11R6/bin/Xvesa
and X windows will run as if root was running it.
X needs this to be able to work with the hardware devices
if you already have got X to run as an unprivileged user, like spot, then it probably already has the setuid bit set ... you only have to do it once
once you get X running, you just have to deal with the various permissions problems that will occur ... if you want to make a simple system for your sister to browse the internet, that should not be difficult
chmod u+s /usr/X11R6/bin/Xorg
chmod u+s /usr/X11R6/bin/Xvesa
and X windows will run as if root was running it.
X needs this to be able to work with the hardware devices
if you already have got X to run as an unprivileged user, like spot, then it probably already has the setuid bit set ... you only have to do it once
once you get X running, you just have to deal with the various permissions problems that will occur ... if you want to make a simple system for your sister to browse the internet, that should not be difficult
-
- Posts: 23
- Joined: Sat 02 Sep 2006, 22:28
problem
hi,i have successfully setuid X.
the wallpaper does not work,...cannot set desktop background...
the sound does not work...the gxine program is not able to open the sound device as spot...
however,this is only little problems....
but,when i reboot my pc,i login as spot but X does not start,is needed to type again:
chown spot /tmp/xerrs.txt /etc/.XLOADED
how to make permanent this? when i have turn on the pc,is needed login as root,open terminal,type chown spot /tmp/xerrs.txt /etc/.XLOADED ,logout,and login as spot.
using spot user,the puppy pc is secure when my sister go to the pc
thanks
the wallpaper does not work,...cannot set desktop background...
the sound does not work...the gxine program is not able to open the sound device as spot...
however,this is only little problems....
but,when i reboot my pc,i login as spot but X does not start,is needed to type again:
chown spot /tmp/xerrs.txt /etc/.XLOADED
how to make permanent this? when i have turn on the pc,is needed login as root,open terminal,type chown spot /tmp/xerrs.txt /etc/.XLOADED ,logout,and login as spot.
using spot user,the puppy pc is secure when my sister go to the pc
thanks
you could start X from your own script ... normally you would type "startx" to start X windows ... you make a script and call it maybe "startx-as-spot" ... X is started from /etc/profile (the line "exec xwin"), just edit /etc/profile and change it to "exec startx-as-spot"
you could make the script by right clicking in the /root/my-applications/bin directory and clicking New, Script ... you could put something like this in the script:
#!/bin/sh
rm -f /tmp/xerrs.txt
chown spot /etc/.XLOADED
chown spot /tmp/currentvideomode
cd /root/spot
exec su spot -c xwin
or put the script in /usr/X11R6/bin/ if you like
anyway, something like that ... you have to get the details right, and Puppy should boot and start X as user "spot"
you could make the script by right clicking in the /root/my-applications/bin directory and clicking New, Script ... you could put something like this in the script:
#!/bin/sh
rm -f /tmp/xerrs.txt
chown spot /etc/.XLOADED
chown spot /tmp/currentvideomode
cd /root/spot
exec su spot -c xwin
or put the script in /usr/X11R6/bin/ if you like
anyway, something like that ... you have to get the details right, and Puppy should boot and start X as user "spot"
-
- Posts: 23
- Joined: Sat 02 Sep 2006, 22:28
ok
thanks for the help...
but,why the sound not work? gxine does not able to open the sound device...
the sound icon not is present in the tray-bar...is present only blinky and the clock
at the moment i use root account to listen songs
but,why the sound not work? gxine does not able to open the sound device...
the sound icon not is present in the tray-bar...is present only blinky and the clock
at the moment i use root account to listen songs
-
- Posts: 23
- Joined: Sat 02 Sep 2006, 22:28
why y can't set desktop background?
why y can't set desktop background? X display only a grey screen
hovewer,this is smaller problems...puppy is a linux distro built from scratch.
i have selected puppy because i dont like kde or gnome.
i have adsl flat to download but i dont like big distro (fedora,suse,mandriva).
my philosophy of life: the good wine is in the small glass.
hovewer,this is smaller problems...puppy is a linux distro built from scratch.
i have selected puppy because i dont like kde or gnome.
i have adsl flat to download but i dont like big distro (fedora,suse,mandriva).
my philosophy of life: the good wine is in the small glass.
the audio should work if you type this as user root:
chmod a+r /dev/audio0
chmod a+rw /dev/mixer
or you could put it in your startx as spot script ... it is not necessary to do it each time, but you can if you want
it depends which version of Puppy you are running ... i am running Puppy 2.10 alpha, and i put this in /root/.xinitrc to set the wallpaper:
qiv -z /usr/share/backgrounds/puppywallpaper1024x768.jpg
just before the line:
exec $CURRENTWM
(i was testing what Puppy 2.10 needs to run X as spot)
what exactly Puppy is doing to set the wallpaper depends on which version of Puppy you are running, and what programs you have installed
and i copied /root/.Xresources to /root/spot and to get bigger fonts, i changed:
Xft.dpi: 84
to
Xft.dpi: 100
chmod a+r /dev/audio0
chmod a+rw /dev/mixer
or you could put it in your startx as spot script ... it is not necessary to do it each time, but you can if you want
it depends which version of Puppy you are running ... i am running Puppy 2.10 alpha, and i put this in /root/.xinitrc to set the wallpaper:
qiv -z /usr/share/backgrounds/puppywallpaper1024x768.jpg
just before the line:
exec $CURRENTWM
(i was testing what Puppy 2.10 needs to run X as spot)
what exactly Puppy is doing to set the wallpaper depends on which version of Puppy you are running, and what programs you have installed
and i copied /root/.Xresources to /root/spot and to get bigger fonts, i changed:
Xft.dpi: 84
to
Xft.dpi: 100
to make the wallpaper setter in Puppy 2.10a work, you have to do this:
chmod a+x /usr/local/Puppybackground/Puppybackgroundmenu /usr/local/Puppybackground/resource/cachemanager /usr/local/Puppybackground/resource/list /usr/local/Puppybackground/resource/Puppybackgroundmenu.pb /usr/local/Puppybackground/resource/puppybackgroundsetterwrapper /usr/local/Puppybackground/resource/resamplefixedheight /usr/local/Puppybackground/resource/roxrestart.sh-deactivated /usr/local/Puppybackground/resource/waitwindowpbdesk.sh
this is all one line
but you will probably not be able to change the wallpaper, it will just be able to show whatever wallpaper was already set by user root
chmod a+x /usr/local/Puppybackground/Puppybackgroundmenu /usr/local/Puppybackground/resource/cachemanager /usr/local/Puppybackground/resource/list /usr/local/Puppybackground/resource/Puppybackgroundmenu.pb /usr/local/Puppybackground/resource/puppybackgroundsetterwrapper /usr/local/Puppybackground/resource/resamplefixedheight /usr/local/Puppybackground/resource/roxrestart.sh-deactivated /usr/local/Puppybackground/resource/waitwindowpbdesk.sh
this is all one line
but you will probably not be able to change the wallpaper, it will just be able to show whatever wallpaper was already set by user root
-
- Posts: 23
- Joined: Sat 02 Sep 2006, 22:28
thanks for all your help
hi GuestToo,thanks for all your help...i have my wallpaper selected from root account and i have open terminal as spot.
only the sound does not work...i have puppy 2.01 seamonkey.
...you have another ideas to open the sound as user spot?
only the sound does not work...i have puppy 2.01 seamonkey.
...you have another ideas to open the sound as user spot?
-
- Posts: 23
- Joined: Sat 02 Sep 2006, 22:28
Re: run X as spot...audio problem
hi GuestToo,
my error is:
error opening ALSA device default: Permission denied
i have a ati-ixp onboard sound card.
at the moment the audio work only from root account...
i have tryed all methods.
my error is:
error opening ALSA device default: Permission denied
i have a ati-ixp onboard sound card.
at the moment the audio work only from root account...
i have tryed all methods.
here are some lists of audio devices ... if the sound works for root but not for spot, it is probably a permissions problem for one of the sound devices
http://www.tdl.com/~netex/html/Sound-HOWTO-6.html
and here
you may need to copy the configuration files from /root to /root/spot ... for example, .gxine and .xine
actually, if the audio group is setup correctly in Puppy, so you should be able to do this:
chmod g+rw /dev/audio0
chmod g+rw /dev/mixer
chmod g+rw /dev/dsp
which should be a little safer than a+rw
http://www.tdl.com/~netex/html/Sound-HOWTO-6.html
and here
you may need to copy the configuration files from /root to /root/spot ... for example, .gxine and .xine
actually, if the audio group is setup correctly in Puppy, so you should be able to do this:
chmod g+rw /dev/audio0
chmod g+rw /dev/mixer
chmod g+rw /dev/dsp
which should be a little safer than a+rw
-
- Posts: 23
- Joined: Sat 02 Sep 2006, 22:28
Re: run X as spot...audio problem
hi GuestToo,the audio working,my device is /dev/dsp
i have write: chmod a+r /dev/dsp
at the moment,the spot access is complete
thanks for your assistance.
at the moment only small problem is present,at example the browser dillo does not work,but this problems is very very small!
i have write: chmod a+r /dev/dsp
at the moment,the spot access is complete
thanks for your assistance.
at the moment only small problem is present,at example the browser dillo does not work,but this problems is very very small!
-
- Posts: 23
- Joined: Sat 02 Sep 2006, 22:28
complete script
this is a complete script.
#!/bin/sh
chmod u+s /usr/X11R6/bin/Xorg
chmod u+s /usr/X11R6/bin/Xvesa
chown spot /tmp/xerrs.txt
chown spot /etc/.XLOADED
chown spot /tmp/currentvideomode
chmod g+r /dev/audio0
chmod g+rw /dev/mixer
chmod g+rw /dev/dsp
chmod a+w /dev/ptmx
chmod a+x /usr/local/Puppybackground/Puppybackgroundmenu /usr/local/Puppybackground/resource/cachemanager /usr/local/Puppybackground/resource/list /usr/local/Puppybackground/resource/Puppybackgroundmenu.pb /usr/local/Puppybackground/resource/puppybackgroundsetterwrapper /usr/local/Puppybackground/resource/resamplefixedheight /usr/local/Puppybackground/resource/roxrestart.sh-deactivated /usr/local/Puppybackground/resource/waitwindowpbdesk.sh
bye and thanks
#!/bin/sh
chmod u+s /usr/X11R6/bin/Xorg
chmod u+s /usr/X11R6/bin/Xvesa
chown spot /tmp/xerrs.txt
chown spot /etc/.XLOADED
chown spot /tmp/currentvideomode
chmod g+r /dev/audio0
chmod g+rw /dev/mixer
chmod g+rw /dev/dsp
chmod a+w /dev/ptmx
chmod a+x /usr/local/Puppybackground/Puppybackgroundmenu /usr/local/Puppybackground/resource/cachemanager /usr/local/Puppybackground/resource/list /usr/local/Puppybackground/resource/Puppybackgroundmenu.pb /usr/local/Puppybackground/resource/puppybackgroundsetterwrapper /usr/local/Puppybackground/resource/resamplefixedheight /usr/local/Puppybackground/resource/roxrestart.sh-deactivated /usr/local/Puppybackground/resource/waitwindowpbdesk.sh
bye and thanks
-
- Posts: 23
- Joined: Sat 02 Sep 2006, 22:28
correction
correction: do not use g+rw,because in my pc the sound device does not start...
this is a script corrected
!/bin/sh
chmod u+s /usr/X11R6/bin/Xorg
chmod u+s /usr/X11R6/bin/Xvesa
chown spot /tmp/xerrs.txt
chown spot /etc/.XLOADED
chown spot /tmp/currentvideomode
chmod a+r /dev/audio0
chmod a+rw /dev/mixer
chmod a+rw /dev/dsp
chmod a+w /dev/ptmx
chmod a+x /usr/local/Puppybackground/Puppybackgroundmenu /usr/local/Puppybackground/resource/cachemanager /usr/local/Puppybackground/resource/list /usr/local/Puppybackground/resource/Puppybackgroundmenu.pb /usr/local/Puppybackground/resource/puppybackgroundsetterwrapper /usr/local/Puppybackground/resource/resamplefixedheight /usr/local/Puppybackground/resource/roxrestart.sh-deactivated /usr/local/Puppybackground/resource/waitwindowpbdesk.sh
this is a script corrected
!/bin/sh
chmod u+s /usr/X11R6/bin/Xorg
chmod u+s /usr/X11R6/bin/Xvesa
chown spot /tmp/xerrs.txt
chown spot /etc/.XLOADED
chown spot /tmp/currentvideomode
chmod a+r /dev/audio0
chmod a+rw /dev/mixer
chmod a+rw /dev/dsp
chmod a+w /dev/ptmx
chmod a+x /usr/local/Puppybackground/Puppybackgroundmenu /usr/local/Puppybackground/resource/cachemanager /usr/local/Puppybackground/resource/list /usr/local/Puppybackground/resource/Puppybackgroundmenu.pb /usr/local/Puppybackground/resource/puppybackgroundsetterwrapper /usr/local/Puppybackground/resource/resamplefixedheight /usr/local/Puppybackground/resource/roxrestart.sh-deactivated /usr/local/Puppybackground/resource/waitwindowpbdesk.sh