WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: CLI freaking: wanna video\music in as much min-stic env as possible  (Read 19343 times)

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Hi there,
I'm trying to set up as much minimalistic environment as I can to be able to:

1) Play videos with mplayer;
2) Listen to music with mplayer or something;
3) Edit files with vi;
4) Browse Internet with text-based browsers.

I want the core to boot in about 7 seconds, up to 10. The base core do this as quick as 5 secs. (My English may be rather poor.)
The issue is, which modules do I extend the core with to do the trick. I've tried with setting up wifi.tcz, mplayer.tcz, pulseaudio.tcz (dunno if it needed), and some more things but, it didn't work. The first is, mplayer couldn't open fb0; I ls-ed my /dev/ and /dev/fb0 was in there. I tried to add user 'tc' (default one, eh) to 'staff' group (which is named in the output of ls -l /dev/fb0), tried to do sudo mplayer or even sudo su; mplayer, nothing worked. So I decided maybe the base core doesn't work with frame buffer or something eh?
The second is, when I tried to run 'mplayer test.mp3' I've got something like 'couldn't open /dev/dsp: no such file or directory'. I checked it out, indeed there is no such file. I googled and tried to install pulseaudio but it won't work claiming there is no dbus files. I did it rather at  a guess.

Well. I can provide more detailed outputs (however it may be complicated task to do). But first I would like to get some theory advices. I know little of how to set up such a minimalistic environment. I can view videos with mplayer using fb in my openSUSE virtual terminals, after the X server's started.
« Last Edit: March 28, 2015, 12:06:15 PM by Scampada »
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: CLI freaking: wanna video\music in as much min-stic env as possible
« Reply #1 on: March 28, 2015, 12:19:51 PM »
Have you loaded Xfbdev.tcz (frame buffer)? I believe you also need Xvesa loaed - someone correct if wrong. Also, the last time i tried the boot code 'vga=788' it was reportedly deprecated and did not work - so this FAQ is likely out of date. Running xsetup.sh will, however, allow you to set resolution.

Quote
How to use framebuffer X server?

In order to use framebuffer (Xfbdev) you will need to have a persistent store, e.g., a PPR.
Boot Tiny Core as follows, using an appropriate vga code from the f2 boot help screen and an appropriate disk partition.

boot: tinycore tce=hda1 text vga=788

At the system prompt:

$ tce-load Xfbdev.tce wget install # This is for TC 2.2 and below
$ tce-load -w -i Xfbdev.tcz # This is for TC 2.3 and above

$ xsetup.sh
$ startx

From the X desktop, shutdown with backup. Your Xfbdev X settings will be saved and used on the next boot.
Do not use the text boot code and your framebuffer X server should start successfully.
http://distro.ibiblio.org/tinycorelinux/faq.html#framebuffer

Vi and text browsers should work no problem. Can't comment on mplayer or music. If you use the Apps GUI, just perform an extension search for music or video, etc and see what is available. I believe there was a CLI music player somewhere in the repository (not on TC ATM/can't check).

Edit: Also search old forum posts, example:
http://forum.tinycorelinux.net/index.php?topic=17976.0
« Last Edit: March 28, 2015, 12:24:33 PM by nitram »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14849
Re: CLI freaking: wanna video\music in as much min-stic env as possible
« Reply #2 on: March 28, 2015, 12:25:14 PM »
you'll need alsa or oss loaded to get rid of the /dev/dsp error

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: CLI freaking: wanna video\music in as much min-stic env as possible
« Reply #3 on: March 28, 2015, 12:27:38 PM »
you'll need alsa or oss loaded to get rid of the /dev/dsp error
But I've got it already! When I tried to 'tce-load -wi alsa' it replied that it was already installed. And mplayer printed something of alsa, and these weren't error messages, I believe...
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: CLI freaking: wanna video\music in as much min-stic env as possible
« Reply #4 on: March 28, 2015, 12:35:10 PM »
Have you loaded Xfbdev.tcz (frame buffer)? I believe you also need Xvesa loaed - someone correct if wrong. Also, the last time i tried the boot code 'vga=788' it was reportedly deprecated and did not work - so this FAQ is likely out of date. Running xsetup.sh will, however, allow you to set resolution.

Vi and text browsers should work no problem. Can't comment on mplayer or music. If you use the Apps GUI, just perform an extension search for music or video, etc and see what is available. I believe there was a CLI music player somewhere in the repository (not on TC ATM/can't check).

Edit: Also search old forum posts, example:
http://forum.tinycorelinux.net/index.php?topic=17976.0

Aye, I installed Xfbdev with no result; I also tried Xvesa. After installing the Xfbdev I typed 'sudo xsetup.sh' but nothing happened (it said there were not such file).
I have wifi and browsers working fine, yeah; however I had a problem using lynx. It won't work with HTTPS. I have googled that maybe I should install lynx-cur or compile it with --enable-ssl (or something) but how do I do it in TC? When I do 'tce-load lynx', it installs the only one lynx that's in the repo. Links works fine but it hasn't pretty colors as lynx do.
There won't be any problem finding CLI music player; there is no sound for now at all. It's much worse.
I know little of TC repositories, too. Are there many of them?
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: CLI freaking: wanna video\music in as much min-stic env as possible
« Reply #5 on: March 28, 2015, 12:39:13 PM »
Mplayer works fine with alsa.  Make sure you have alsa working.  Make sure you read the info files ( the info screen in Apps ).

Mplayer does not work with pulseaudio. For pulseaudio you will need vlc for videos. xmms-pulseaudio works well for audio.

If you do not use pulseaudio, then mplayer and xmms work fine with alsa.

Do not use sudo when running 'xsetup'.
« Last Edit: March 28, 2015, 12:41:18 PM by gerald_clark »

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: CLI freaking: wanna video\music in as much min-stic env as possible
« Reply #6 on: March 28, 2015, 12:48:03 PM »
Quote
If you use the Apps GUI, just perform an extension search for music or video, etc and see what is available.
Nah. I installed the TC manually, with no use of GUI. Just copied vmlinuz and core.tz from iso to my /boot/ partition and booted them with grub2. Then I set up a persistent TCE folder in some way I didn't realized, really. Probably by using the very first 'tce-load -i /mnt/sda9/tinycore/tce/optional/wifi.tcz'.

And now I HAVE NO GUI! And can't make any use of Apps or something. It boot's right into CLI.
« Last Edit: March 28, 2015, 12:50:18 PM by Scampada »
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: CLI freaking: wanna video\music in as much min-stic env as possible
« Reply #7 on: March 28, 2015, 12:51:00 PM »
In addition to alsa.tcz ,  alsa-config.tcz  might also be needed.
Download a copy and keep it handy: Core book ;)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: CLI freaking: wanna video\music in as much min-stic env as possible
« Reply #8 on: March 28, 2015, 12:58:02 PM »
Core comes with tce-ab a command line apps browser.  It also displays the info files.

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: CLI freaking: wanna video\music in as much min-stic env as possible
« Reply #9 on: March 28, 2015, 12:59:24 PM »
Alsa's installed, I even ran alsamixer and it worked. But I still couldn't test any sound; mplayer complained of /dev/dsp being unavailable.
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: CLI freaking: wanna video\music in as much min-stic env as possible
« Reply #10 on: March 28, 2015, 01:00:23 PM »
Quote
Then I set up a persistent TCE folder in some way I didn't realized, really.
To have a persistent TCE folder, you would either just create a folder at the root of  /mnt/sda9  and name it  tce  (so it will be found automatically), or specify another location via boot code:
Code: [Select]
tce=/tinycore/tce
Or:
Code: [Select]
tce=UUID="1234567-8910111234-abcdef..."/tinycore/tce
(including quotes but the UUID is just an example)
Or:
Code: [Select]
tce=LABEL="YOUR_DRIVE_LABEL"/tinycore/tce
Download a copy and keep it handy: Core book ;)

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: CLI freaking: wanna video\music in as much min-stic env as possible
« Reply #11 on: March 28, 2015, 01:13:24 PM »
Okay thanks, it's clear for me now.
Well, I'll go and test somewhat in TC to get video and sound working... Does the order of modules in onboot.lst matter?
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: CLI freaking: wanna video\music in as much min-stic env as possible
« Reply #12 on: March 28, 2015, 01:21:21 PM »
Quote
No, it cannot mean that. You get ENOENT (No such file or directory) if
the device node doesn't exist in the filesystem. If you see ENODEV (No
such device), then the device node has major/minor number which the
kernel does not recognize as a valid device, i.e. you haven't compiled
in the driver or loaded the module.
Oh, that's it. I see definitely ENODEV error, "No such device", yeah. So..? (Continue reading...)
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: CLI freaking: wanna video\music in as much min-stic env as possible
« Reply #13 on: March 28, 2015, 02:23:37 PM »
During a fresh install i back up .xsession so it's easy to restore default settings if GUI breaks. Backing up the default onboot.lst is also a good idea.

For alsa on my system, alsa and alsa-config need to be loaded for sound to work.

To confirm what's loaded via CLI, use tce-status -i command.

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: CLI freaking: wanna video\music in as much min-stic env as possible
« Reply #14 on: March 28, 2015, 02:27:01 PM »
I've tried all as I was advised and still got nothing.

Here are my outputs:

onboot.lst
Quote
Xvesa.tcz
Xlibs.tcz
Xfbdev.tcz
wifi.tcz
alsa.tcz
links.tcz
mplayer.tcz

mplayer -vo fbdev Lowrider.avi (errors 2> )
Quote
MMX supported but disabled
MMX2 supported but disabled
SSE supported but disabled
SSE2 supported but disabled
Can't open /dev/fb0: No such device
Error opening/initializing the selected video_out (-vo) device.
Unknown/missing audio format -> no sound
Requested audio codec family [vorbis] (afm=libvorbis) not available.
Enable it at compilation.
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
[AO_ALSA] alsa-lib: conf.c:3512:(snd_config_hook_load) cannot stat file/directory /usr/local/share/alsa/cards/aliases.conf
[AO_ALSA] alsa-lib: pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.default
[AO_ALSA] Playback open error: No such file or directory
DVB card number must be between 1 and 4

standart output
Quote
MPlayer 1.1-4.9.1 (C) 2000-2012 MPlayer Team

Playing Lowrider.avi.
libavformat version 54.6.100 (internal)
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO:  [FMP4]  640x360  24bpp  25.000 fps  350.8 kbps (42.8 kbyte/s)
Clip info:
 Software: Lavf52.64.2
Load subtitles in ./
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 54.23.100 (internal)
ADecoder init failed :(
Opening audio decoder: [tremor] Ogg/Vorbis audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 96.0 kbit/6.80% (ratio: 12000->176400)
Selected audio codec: [tremor] afm: tremor (OggVorbis audio)
==========================================================================
AO: [null] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   0.0 (unknown) of 890.6 (14:50.5) ??,?% 

alsactl init
Quote
alsactl: parse:1670: Unable to open file '/usr/local/share/alsa/init/00main': No such file or directory
(there isn't init folder at all)

whether there is dsp
Quote
ls: /dev/dsp: No such file or directory

I have dmesg output too, but it exceeds maximum length. And there isn't any obvious clue.

Any idea? What am I doing wrong?

Btw I'd got also something like... er, failed waiting X or something alike after the very booting...
« Last Edit: March 28, 2015, 02:29:25 PM by Scampada »
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.