Midnight Commander for Samsung TV

Here are software that related with Samsung B series TVs. Like hex editors, new version of BusyBox or internal software, app programs that will run in your TV hardware.:!:This forum is NOT FOR USER QUESTIONS or Problems.

User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: Midnight Commander for Samsung TV

Post by juusso »

This script works well for me:

Code: Select all

vi /mtd_rwarea/mc.sh

Code: Select all

#!/bin/sh
#!SamyGO Midnight Commander
echo "Start MC"

export PATH=/mtd_rwarea/mc:$PATH; export MC_DATADIR=/mtd_rwarea/mc; export LD_LIBRARY_PATH=/mtd_rwarea/mc:$LD_LIBRARY_PATH; export TERM=xterm-color; export TERMINFO=/mtd_rwarea/mc/terminfo; export HOME=/mtd_rwarea/mc; export TMPDIR=/mtd_rwarea/mc/tmp; mc

echo "Done!"
exit
Make executable:

Code: Select all

chmod 755 /mtd_rwarea/mc.sh
to run mc just enter

Code: Select all

/mtd_rwarea/mc.sh
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
geo650
Official SamyGO Developer
Posts: 303
Joined: Wed Oct 07, 2009 12:03 pm

Re: Midnight Commander for Samsung TV

Post by geo650 »

I noticed that attached version of Midnight Commander works only in /mtd_rwarea/mc directory. Can you modify executables that you could run it in any directory (/mtd_tlib/mc for example) ?
It is not enough to edit mc.sh. Telnet says "Text file busy" error. The same files work when moved to /mtd_rwarea/mc. Unfortunately, I have too low free space on /mtd_rwarea partition.
Thanks.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: Midnight Commander for Samsung TV

Post by juusso »

I was always angry at writing full patch to mc.sh to start MC.
Few days ago i edited rootfs by adding symlinks to root, but after this i had to start my scripts with prefix "./" only.
Now i realized, that i do not need edit rootfs, it is enought to change /etc/profile by adding path to symlinks directory. And it works! Now i am happy :)
1. Copy whole /etc directory to /mtd_rwarea (or you can if you want elsewhere you have free space)
2. Modify profile in copied /etc by adding :/mtd_rwarea/scripts/symlinks at the end of PATH=:

Code: Select all

PATH="/usr/sbin:/usr/bin:/bin:/sbin:/mtd_rwarea/scripts/symlinks"
3. Add to samygo.sh command to mount changed /etc:

Code: Select all

mount --bind /mtd_rwarea/etc /etc
4. After reboot start MC by entering just mc in console:

Code: Select all

localhost login: root
-sh: id: not found
# mc
Start MC
Warning: file /opt/share/mc/extfs/extfs.ini not found
Warning: file /opt/share/mc/extfs/extfs.ininot found
Warning: file /opt/share/mc/extfs.ini not found
 
Done!
Edited:
After adding some missing files and export variables, here isn`t any error anymore. Read here.


My scripts are located in /mtd_rwarea/scripts directory and i made some symlinks to have short command in /mtd_rwarea/scripts/symlinks
Now i can start any script i want w/o entering full path to it.
I made some scripts for my needs to run this way (mc, ftp, wifi, remount, reboot, shutdown)...
I hope this info helps to someone :)

geo650,
I have checked and it works well:
1. move whole mc directory from /mtd_rwarea/ to /mtd_tlib
2. Create empty mc directory in /mtd_rwarea/
3. Add to samygo.sh script this row:

Code: Select all

mount --bind /mtd_tlib/mc /mtd_rwarea/mc
4. Run mc with /mtd_rwarea/path to/mc.sh (or as i made - with help of symlink)
mc.sh should load mc from /mtd_rwarea/mc/

I think i will move my stuff from /mtd_rwarea/ to /mtd_wiselink or /mtd_down - there are 78 + 148 Mb free space compared to 8 mb in rwarea.
Another way to get bigger /mtd_rwarea/ is to mount it to /mtd_wiselink/mtd_rwarea and have 148Mb space for it compared to 11Mb of original one :lol:
Add this to your samygo.sh file:

Code: Select all

mount --bind /mtd_wiselink/mtd_rwarea /mtd_rwarea
Just creaty empty dir, copy all content of original dir to wiselink/mtd_rwarea before restart...
To have original back, umount /mtd_rwarea helps.
P.s. anyone knows how to add missing files to mc (extfs.ini,extfs.ini, extfs.ini)?
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
arris69
Official SamyGO Developer
Posts: 1700
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)
Contact:

Re: Midnight Commander for Samsung TV

Post by arris69 »

juuso wrote:...
P.s. anyone knows how to add missing files to mc (extfs.ini,extfs.ini, extfs.ini)?
you have to put the files into datadir or sysconfdir (set it at compile time)
what's with mc in extensions pack? its full configured. should i drop it from the package?

arris
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: Midnight Commander for Samsung TV

Post by juusso »

hi, arris, i use another, attached in this topic mc. I think i should use one from samygo-all-extensions. I`ll try. Thanks!

Added:
Ok, i got it working. I serched mc binary for /opt/share/mc and found, that one variable was not set (MC_DATADIR). So i added to my mc.sh missing exports:

Code: Select all

export MC_DATADIR=/mtd_rwarea/mc
then copied missing extfs directory, some missing files like mc.charsets and other (thanks arris for hint) from all-extensions and now MC does not give me any error. I edited post, added missing files and info.
I couldn`t use mc attached in samygo-all-extensions as is, because i do not use all-extensions and rcSGO.

But here is another problem: archivers do not work. Neither gzip nor bzip2. i get error like:

Code: Select all

/bin/sh /mtd_rwarea/mc/tmp/mc-root/mcusrlFiNfa
/mtd_rwarea/mc/tmp/mc-root/mcusrlFiNfa: /mtd_rwarea/mc/tmp/mc-root/mcusrlFiNfa: 7: gzip: not found
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

Post Reply

Return to “[B] Software”