Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: manit123 on November 07, 2013, 10:24:24 PM
-
Please see attached image.
on right clicking I get the menu & everything works.
It is just that desktop is black & terminal is white over black.
Is any component missing ?
-
Hi manit123
Are you booting from a CD or hard drive?
-
i am booting from hard disk.
If I kill x server & restart it then I get blue desktop with tiny core engraved on it , as desired.
-
Hi manit123
Your attached screen shot shows you are using a cde directory. That is only for read only media. You should be using
a tce directory.
-
currently i am booting 4.5.5 from hard disk partition using legacy grub.
tce folder of boot partition loads mydata.tgz which contains special /home/tc/.ashrc
# ~/.ashrc: Executed by SHells.
#
. /etc/init.d/tc-functions
set -o vi
# Alias definitions.
#
alias df='df -h'
alias du='du -sh'
#!/usr/local/bin/bash
root=$( blkid | grep -i sd | grep -i 93a0 | sed 's/\([/a-z0-9]*\).*/\1/' | sed 's/dev/mnt/')
# here 93a0 is a part of UUID of intended partition
if [ -z $root ];
then
echo tcz not found
echo you are on your own
else
echo you are booting from \"$root\"
if [ ! -f /home/tc/already-run.txt ];
then
echo we will load tcz from $root/cde/optional
cd "$root/cde/optional"
./load-extras.sh
touch /home/tc/already-run.txt
fi
fi
if [ -f /home/tc/already-run.txt ] ;
then
if [ -f "$root/tc/kundli.sh" ];
then
cd "$root/tc"
alias kundli="$root/tc/new-kundli.sh"
echo try kundli
fi
if [ -f "$root/tc/oxford.sh" ];
then
cd "$root/tc"
alias oxford="$root/tc/new-oxford.sh"
echo try oxford
fi
fi
alias ls='ls -phal'
alias ll='ls -l'
# Avoid errors... use -f to skip confirmation.
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
cd
then /home/tc/.ashrc installs required apps (using load-extras.sh) on first run
load-extras.sh
tce-load -i Xvesa.tcz Xlibs.tcz Xprogs.tcz
tce-load -i flwm_topside.tcz
tce-load -i ntfs-3g.tcz dosfstools.tcz pcmanfm2.tcz ntfsprogs.tcz gnome-icon-theme.tcz firefox.tcz foxit_reader.tcz file-roller.tcz
tce-load -i OSS.tcz gnome-mplayer.tcz
tce-load -i vim.tcz gqview1.tcz xvkbd.tcz bash.tcz
mkdir -p /tmp/tce/optional
sudo rm /etc/sysconfig/tcedir/
sudo ln -s /tmp/tce /etc/sysconfig/tcedir
cd wifi
tce-load -i tc-install.tcz
tce-load -i kmaps.tcz
tce-load -i wifi.tcz
tce-load -i wl-modules-3.0.21-tinycore.tcz
tce-load -i ndiswrapper.tcz
tce-load -i iw.tcz
tce-load -i firmware-atheros.tcz
tce-load -i firmware-bnx2.tcz
tce-load -i firmware-broadcom.tcz
tce-load -i firmware-ipw2100.tcz
tce-load -i firmware-ipw2200.tcz
tce-load -i firmware-iwlwifi.tcz
tce-load -i firmware-libertas.tcz
tce-load -i firmware-myri10ge.tcz
tce-load -i firmware-netxen.tcz
tce-load -i firmware-openfwwf.tcz
tce-load -i firmware-radeon.tcz
tce-load -i firmware.tcz
tce-load -i firmware-ti-connectivity.tcz
tce-load -i firmware-ueagle.tcz
tce-load -i firmware-vxge.tcz
tce-load -i firmware-wimax.tcz
tce-load -i firmware-zd1211.tcz
tce-load -i b43-fwcutter.tcz
tce-load -i pci-utils.tcz
tce-load -i ezremaster.tcz
cd ../../../tc
ossmix | grep -i 'leftvol' | grep -v 'known' | grep -v 'selected'| sed -n 's/ .*//p' | xargs -n 1 ./set-all-volume-control-full.txt
exit
Nothing wrong in this.
-
Your cd commands might interfere with startx being executed from ~.
-
Hi manit123
Nothing wrong in this.
Obviously, which is why it is working so well. ::) ::) ::)
You appear to be trying to bypass the mechanisms built into Tinycore for loading of extensions when booting. To what
end, I don't know, but I'll offer a few comments/observations.
alias df='df -h'
alias du='du -sh'
#!/usr/local/bin/bash
It looks like you are trying to add a shebang to set the interpreter to bash. To the best of my knowledge, that has to be the
first line in a script. Not to mention the fact that you don't load bash until you call load-extras.sh about a dozen lines
later.
Is any component missing ?
If I kill x server & restart it then I get blue desktop with tiny core engraved on it , as desired.
That would suggest you have all the required extensions.
root=$( blkid | grep -i sd | grep -i 93a0 | sed 's/\([/a-z0-9]*\).*/\1/' | sed 's/dev/mnt/')
# here 93a0 is a part of UUID of intended partition
if [ -z $root ];
then
echo tcz not found
echo you are on your own
else
echo you are booting from \"$root\"
if [ ! -f /home/tc/already-run.txt ];
then
echo we will load tcz from $root/cde/optional
cd "$root/cde/optional"
./load-extras.sh
touch /home/tc/already-run.txt
fi
fi
You might want to put this function into /opt/bootsynch.sh instead since it only runs once anyway, or at least let onboot.lst
handle the loading of Xvesa.tcz, Xlibs.tcz, Xprogs.tcz, and flwm_topside.tcz.
Your cd commands might interfere with startx being executed from ~.
The last command in his .ashrc file is cd which should return him to his home directory.
[EDIT] Added bootsync.sh only runs once.
-
Your cd commands might interfere with startx being executed from ~.
The last command in his .ashrc file is cd which should return him to his home directory.
Yes, but look at the outpout in screenie and compare with script.
-
On a sidenote, foxit_reader.tcz has been retired a long time ago.
http://forum.tinycorelinux.net/index.php/topic,14946.msg85218.html#msg85218
A "get-script" is available in the scripting subforum.
-
Hi tinypoodle
Yes, but look at the outpout in screenie and compare with script.
Yes, you are right. At any rate, I'm not so sure .ashrc is the right place to put all that stuff, see:
http://forum.tinycorelinux.net/index.php/topic,12162.msg65125.html#msg65125
-
The fun thing about tiny core is you can customise software that gets loaded on startup . Compiling a kernel or installing from tarball is not my cup of tea but still controlling the loading of extension is nice.
I know , my method ain't sophisticated but with your suggestions , i can tweak it a bit for good.
Thank you.
Will report ASAP.
-
Hi ,
I have noticed that adding tce-load commands to /opt/bootsync.sh does not help because that script gets run as root.
Also i have all my settings saved in mydata.tgz of tce folder in hard disk partition.
Where should I create onboot.lst if I want all my extensions to be loaded on startup instead of putting a script in .ashrc (Assume , I want mydata.tgz to be restored as it contains configuration of all my softwares) ?
-
Hi manit123
Where should I create onboot.lst if I want all my extensions to be loaded on startup instead of putting a script in .ashrc
It belongs in the tce directory.
-
that helped a bit
my tce/onboot.lst reads
Xvesa.tcz
Xlibs.tcz
Xprogs.tcz
flwm_topside.tcz
ntfs-3g.tcz
dosfstools.tcz
pcmanfm2.tcz
ntfsprogs.tcz
gnome-icon-theme.tcz
firefox.tcz
foxit_reader.tcz
file-roller.tcz
OSS.tcz
gnome-mplayer.tcz
vim.tcz
gqview1.tcz
xvkbd.tcz
bash.tcz
tree.tcz
all tcz & dep are in tce/optional which get loaded .
while my cde/optional/load-extras.sh reads
mkdir -p /tmp/tce/optional >> /home/tc/log 2>&1
sudo rm /etc/sysconfig/tcedir/ >> /home/tc/log 2>&1
sudo ln -s /tmp/tce /etc/sysconfig/tcedir >> /home/tc/log 2>&1
cd wifi >> /home/tc/log 2>&1
cd ../../../tc >> /home/tc/log 2>&1
ossmix | grep -i 'leftvol' | grep -v 'known' | grep -v 'selected'| sed -n 's/ .*//p' | xargs -n 1 ./set-all-volume-control-full.txt >> /home/tc/log 2>&1
exit
Still black screen
-
Your script seems to be rather unconventional, and it is not clear what exactly you are trying to achieve.
Maybe you could elaborate on each step and its respective purpose.
Restoring configuration of OSS4 from backup should work fine without any need of a script.
-
i had to edit .ashrc because
(1)'error , check network , mirror or writable extension directory'occur when /tmp/tce/optional directory absent
(2)/etc/sysconfig/tcedir points to /mnt/sda1/tce by default if sda1 has tce folder
(3)to set-all-volume-control to max
(4)mounting ntfs3g partition on startup
Taking cue from your replies I did
/opt/bootsync.sh
#!/bin/sh
# put other system startup commands here, the boot process will wait until they complete.
# Use bootlocal.sh for system startup commands that can run in the background
# and therefore not slow down the boot process.
/usr/bin/sethostname box
/opt/bootlocal.sh &
rm /etc/sysconfig/tcedir/
ln -s /tmp/tce /etc/sysconfig/tcedir
sudo ntfs-3g -o 'noexec,rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096' /dev/sda3 /mnt/sda3
/home/tc/.xsession
Xvesa -br -screen 1024x768x32 -shadow -2button -mouse /dev/input/mice,5 -nolisten tcp -I >/dev/null 2>&1 &
export XPID=$!
waitforX || ! echo failed in waitforX || exit
"$DESKTOP" 2>/tmp/wm_errors &
export WM_PID=$!
[ -x ./.setbackground ] && ./.setbackground
[ -x ./.mouse_config ] && ./.mouse_config &
[ $(which "$ICONS".sh) ] && ${ICONS}.sh &
[ -d ".X.d" ] && find ".X.d" -type f -print | while read F; do . "$F"; done
xset s 0 &
mkdir -p /tmp/tce/optional
ossmix | grep -i 'leftvol' | grep -v 'known' | grep -v 'selected'| sed -n 's/ .*//p' | xargs -n 1 /home/tc/set-all-volume-control-full.txt
touch /home/tc/already-run.txt
Now my /home/tc/.ashrc is
#!/usr/local/bin/bash
# ~/.ashrc: Executed by SHells.
#
. /etc/init.d/tc-functions
# Alias definitions.
#
alias df='df -h'
alias du='du -h'
alias ls='ls -p'
alias ll='ls -l'
alias la='ls -la'
# Avoid errors... use -f to skip confirmation.
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
root=$( blkid | grep -i sd | grep -i 8557 | sed 's/\([/a-z0-9]*\).*/\1/' | sed ' s/dev/mnt/')
#8557 is part of uuid of partition which has kundli,oxford extensions
if [ -f /home/tc/already-run.txt ] ;
then
if [ -f "$root/tc/kundli.sh" ];
then
alias kundli="$root/tc/new-kundli.sh"
echo try kundli
fi
if [ -f "$root/tc/oxford.sh" ];
then
alias oxford="$root/tc/new-oxford.sh"
echo try oxford
fi
fi
Things are fine again !
Thanks for your patience
-
.xsession is the wrong place for
mkdir -p /tmp/tce/optional
ossmix | grep -i 'leftvol' | grep -v 'known' | grep -v 'selected'| sed -n 's/ .*//p' | xargs -n 1 /home/tc/set-all-volume-control-full.txt
because commands in .xsession will be exexuted upon each run of startx, and only upon run of startx.
As already hinted in Reply #14, ossmixer state - and other OSS4 configurations - can be saved and added to filetool.lst.
-
$ossinfo
Version info: OSS 4.2 (b 2006/201202181035) (0x00040100) GPL
Platform: Linux/i686 3.0.21-tinycore #3021 SMP Sat Feb 18 11:54:11 EET 2012 (box)
Number of audio devices: 10
Number of audio engines: 14
Number of MIDI devices: 0
Number of mixer devices: 1
Device objects
0: osscore0 OSS core services
1: oss_hdaudio0 Intel HD Audio interrupts=569 (569)
HD Audio controller Intel HD Audio
Vendor ID 0x80861c20
Subvendor ID 0x10cf15dc
Codec 0: Unknown (0x10ec0269/0x10cf1100)
Codec 1: Agere HDA Modem (0x11c11040)
Codec 3: Unknown (0x80862805/0x80860101)
2: oss_usb0 USB audio core services
MIDI devices (/dev/midi*)
Mixer devices
0: High Definition Audio 0x10ec026 (Mixer 0 of device object 1)
Audio devices
HD Audio play pcm1 /dev/oss/oss_hdaudio0/pcm0 (device index 0)
HD Audio play pcm2 /dev/oss/oss_hdaudio0/pcm1 (device index 1)
HD Audio play pcm3 /dev/oss/oss_hdaudio0/pcm2 (device index 2)
HD Audio play pcm4 /dev/oss/oss_hdaudio0/pcm3 (device index 3)
HD Audio play pcm5 /dev/oss/oss_hdaudio0/pcm4 (device index 4)
HD Audio play pcm6 /dev/oss/oss_hdaudio0/pcm5 (device index 5)
HD Audio play pcm7 /dev/oss/oss_hdaudio0/pcm6 (device index 6)
HD Audio play pcm8 /dev/oss/oss_hdaudio0/pcm7 (device index 7)
HD Audio rec mix4 /dev/oss/oss_hdaudio0/pcmin0 (device index 8)
HD Audio rec select /dev/oss/oss_hdaudio0/pcmin1 (device index 9)
Nodes
/dev/dsp -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp_in -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp_out -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp_mmap -> /dev/oss/oss_hdaudio0/pcm0
/dev/dsp_multich -> /dev/oss/oss_hdaudio0/pcm0
That file 'set-all-volume-control-full.txt' contains
ossmix "$1" 90:90
I do not understand . Can you elucidate ?
-
http://man.cx/savemixer(8)
Last time I used OSS4, configuration files including saved mixer state where under /usr/lib/oss.