News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - l3mce

#21
So I wrote this a while back, and have made some adjustments to it. I need to do this the right way and use the DB to determine MDs instead of the cheat I am using, but for now it will do. I also need to log... so it is likely to change shortly, but what it does is upgrade your entire system at the same time, upgrading the MDs locally. The steps it takes are:

1. Update/upgrade the core.
2. Copies the packages files to /usr/pluto/deb-cache
3. Creates a new Packages.gz file
4. Backs up the entire /usr/pluto/diskless directory in a tarball in /usr/pluto/backup
5. Updates/upgrades MDs, regardless of their on/off state using NFS link to cores deb-cache (meaning, the upgrades for MDs are local)
6. Cleans up and exits.

So, at the moment, you shouldn't turn an MD off if it is on while it is upgrading. Nor should you try and use this if you have different MD versions (like 810 MD on a 1004 hybrid).

Would appreciate feedback. Just put it somewhere on the core (/usr/pluto/bin would be a good place), and run it as root.
svn co http://svn.linuxmce.org/svn/people/l3mce/GlobalUpgrades.sh
If you don't have subversion, then
wget http://svn.linuxmce.org/svn/people/l3mce/GlobalUpgrades.sh; chmod +x GlobalUpgrades.sh


This is an upgrade. It COULD break things. Remember, there is a backup of the MDs. This occurs before upgrade so you can restore.
This is an upgrade. ALL Machines will need to be restarted. I do not do this automatically in case they are in use.

This is a little bulky atm because I am a bit hesitant to use a mv command with the packages, so I am duplicating them. That WILL change. The backup also takes up some space... and atm this all happens on the core drive... so... you will need a little free space...
There is no more duplication of packages. I have also added some mounting which fixes certain kinds of package upgrades with MD's that are not active.

This will work on any version of LMCE.

#22
Users / 1004: The time has come.
April 14, 2012, 03:37:39 AM
No, not beta time.

The time has come where our DVD installer is stable enough that I need more people to use it and find bugs so we can get it to beta.

I can't break it any more.

What it does different than previous DVD installers

  • It is one process. It does not install Kubuntu, then run an installer. It installs Kubuntu with LMCE.
  • Almost everything pre-exists on the DVD. Very little downloading at all is necessary.
  • You can do offline installs.
  • It has its own installer, so (though I am not sure why one would) it can do side-by-side installs.
  • It has a hybrid or core-only install option.
  • It has greatly improved video detection/utilization. You can now use MOST nVidia, ATI, Intel, and VIA chipsets.
  • You no longer need to run the laborious Diskless_CreateTBZ.sh to run media directors. It is embedded. Just plug something in and boot.
  • There is a live boot option, which will take you directly into AVWizard. (You will want a decent amount of ram for this option)
  • The entire install process is less than 40 minutes including the MD stuff.
  • It's prettier.

You will want to use this snapshot, or newer: http://linuxmce.iptp.org/snapshots/LMCE-1004-20120412224425879.iso   Latest is latest, but doesn't always mean greatest.
And check the snapshot wiki for the BEST versions in the future: http://wiki.linuxmce.org/index.php/Snapshot_overview   (Snap ending in 118 is there atm but I am sure bongowongo will soon change it.)

Known problems:

  • The first time Setup Wizard tries to load, it is not actually finished generating, so while it is still installing the remaining pieces it spits two window errors "Cannot read orbiter configuration from the server" and "The UI is being regenerated. This may take 15-30 minutes". It does not take anywhere near 15 minutes to resolve itself. http://svn.linuxmce.org/trac.cgi/ticket/1446
  • Desktop spits an error when attempting to load. Workaround: where "USER" (in lower case) is the OS user you specify in the dvd installer: sudo chown -R USER.USER /home/USER/.kde
  • KVM vesa throws a failure to setup X.
  • SSH to core is broken.
  • AVWizard pre-installs the wrong driver for ATI cards not supported by the proprietary driver.
  • AVWizard creates an xorg.conf file prematurely.
  • Headless incorrectly warns that AVWizard is coming.

I am working to resolve these (obviously).

So... give it a go. PLEASE submit tickets for bugs you find not related to the above at http://svn.linuxmce.org/
Feel free to report success here.
Thanks for testing.
#23
I have done some things recently which have a lot of instant gratification, and curb appeal. The DVD installer is prettier and should end up easier to use than prior stuff. The video detection opened up a LOT of previously unavailable hardware opportunities for use with LMCE.

A lot of people have told me I'm cool. It makes me feel pretty inside.

Then I look over at golgoj's nic. Awake and plugging away when I am. Handling complaints about software he is writing in languages unknown to other devs, with no support outside of that which involves the existing system. He is in uncharted territory, building from scratch... and nobody has really picked up the invitation to help him (outside of Merk of course). He is unshaken by this, and when he encounters a problem, learns the language behind the problem and carries on.

The base code was there for everything I have done, except the dvd thing which I had a lot of existing other projects to steal from... and... it's just bash scripting. I can type #bash in IRC if I have a problem, and there are 15 experts who dump a solution I have been working on for hours or days in a couple of seconds. Golgoj IS one of the top guys in the qt channels. He has to understand the core architecture of LMCE, learn C++, js, qt, QML, mysql, build it all from scratch and make it all work... and people seem to be more complaining than alerting about problems.

So... while I am very happy with myself and my pet projects... they are NOTHING like the scope of things golgoj is doing, with little adulation or fanfare. Once I am satisfied that my projects are not causing any problems whatsoever, I will be helping him full time. I really do thank you all for your support of my instant gratification exercises... but... when you think about it... give golgoj the props. His stuff is a lot harder, without the YAY factor, and will end up completely changing how this project interacts with the users.


All hail Langston.
You f!@#$in rock.
#24
Users / Dual GPU laptops and LMCE
April 10, 2012, 07:56:18 PM
So I have written some code to handle disabling the discrete GPU and running the powerful GPU on laptops supplied with two for battery saving. Unfortunately I have no such hardware, so I have just sort of guessed at it. I would like someone with a laptop that has two GPU's to test this code. Chances are my first guess won't just work OOTB, so it would be helpful if someone would drop in IRC at their convenience to try and get this going. I am particularly interested in anyone with a weak and a powerful Intel based GPU pair. Typically there is a low power intel and a higher power nVidia or ATI, which is frankly a lot easier to deal with. Having the code figure out WHICH Intel to pick is a bit dicey, esp without any actual hardware to test on.

Thanks in advance to anyone who will test.
#25
At long last, as a side effect of dealing with the dvd snapshot maker, I picked up where I left off trying to get better video card support. I believe the next build should have video detection kicked wide open.

I need people to test Intel, ATI, and VIA MDs. I am trying not to be overly optimistic... but I am out of equipment to test on... and everything works (newest versions of nVidia hardware notwithstanding). However the new nVidia chipset interoperability is right around the corner. I have the source code, I just need to compile our own versions of the nVidia 295.20 drivers and nvidia-settings specific to that driver, and get it all happy in the DB. I have already written the detection scheme. On the newest nVidia chipsets there is a new VDPAU revision (rev D) which reports greatly improved h264 support, so I am looking forward to that.

LMCE should work on just about anything now. Just apt-get update, apt-get upgrade, and you will have to then run /usr/pluto/bin/Diskless_CreateTBZ.sh (again if run before, so that the new code is used for them).

Then pull out your abandoned cards/MD projects, and just plug them in. Set your laptops to network boot... MDs are all slim clients... your host OS will not be affected.

So, come on folks. Make me a liar.
Please report any failures along with output of lspci -v | grep "VGA"
#26
Users / New LMCE splash screen/logo!
January 31, 2012, 03:36:15 PM



No... that isn't it.

You haven't made it yet. As I am graphically challenged I am asking for the LMCE communities help. We are working on a new branded lmce install dvd, and I need a 640x480 .png which looks awesome. My sense of design is stuck in 1992, so this, I thought, would be a great way for folks to contribute. Please look at the above image to get a sense of the menu/title. It is trapped there for all intents and purposes. No I cannot put it at the bottom or on the side. It goes there. There may be more options added, so leave some room underneath for a few more entries.

I thought if we got some submissions I would make a poll for people to vote on what we like best. I think this is a cool opportunity to contribute something for those who don't code, and even those who do. At the end of the day, you must release this image as GPL for use with LinuxMCE... so no grifting OK? Original work only please.

You are also free to make a bootloader image like phenigmas... You don't have to go full boat and make an actual bootloader package... but are welcome to. I am happy using phenigmas... I like it... but some have held reservations about poor little tux being a bit played out and dominating... or sort of out of place. Again, I love the little guy, and the ONLY official images he had to work with are loungetux. That is another thing... please make the logo you come up with a layer so we can use it elsewhere if you are struck with lightning. Transparency is supported, and is currently black.

Feel free to submit as many as you like. Try to remember though... this will be the first thing everyone who installs sees on their screen... so pretending we are professional is probably the best tack. So... show us what you got! You will not get any discouraging remarks.
#27
I believe I have found the problem with ATI and Intel auto-detection.
Please replace /usr/pluto/bin/Utils.sh with the following
#!/bin/bash

if [[ -n "$HEADER_Utils" ]]; then
        return 0
fi
HEADER_Utils=included

. /usr/pluto/bin/SQL_Ops.sh
. /usr/pluto/bin/Config_Ops.sh

DEVICETEMPLATE_OnScreen_Orbiter=62
DEVICEDATA_Use_OpenGL_effects=172
DEVICEDATA_Use_alpha_blended_UI=169
DEVICEDATA_PK_UI=104

function AddBookmark {
        return 0
        Url="$1"
        Name="$2"

        [[ ! -f /home/public/bookmarks.html ]] || return 0

        # Generate an id for this bookmark
        ID=$(echo "$Url" | sha1sum)
        ID='rdf:#$'${ID:0:6}

        # Generate the bookmark entry
        Bookmark='   <DT><A HREF="'$Url'" ADD_DATE="1126869382" LAST_MODIFIED="1126869442" ID="'$ID'">'$Name'</A>'
        Bookmark=$(echo $Bookmark | sed 's/"/\\\"/g')

        for BookmarksFile in /home/public/bookmarks.html /home/user_*/bookmarks.html ;do
                # See if the bookmark is already there
                if grep -q "ID=\"$ID\"" $BookmarksFile ;then
                        continue
                fi

                # Add the bookmark string to the file
                awk '
                        BEGIN { HR=0 }
                        HR==0 && /<HR>/ {print "'"$Bookmark"'"; HR=1}
                        {print}
                ' $BookmarksFile > $BookmarksFile.$$
                mv $BookmarksFile.$$ $BookmarksFile
        done

}

function DelBookmark {
        return 0
        Url="$1"
        Name="$2"

        [[ ! -f /home/public/bookmarks.html ]] || return 0

        # Generate an id for this bookmark
        ID=$(echo "$Url" | sha1sum)
        ID='rdf:#$'${ID:0:6}

        for BookmarksFile in /home/public/bookmarks.html /home/user_*/bookmarks.html ;do
                grep -v "ID=\"$ID\"" $BookmarksFile >> $BookmarksFile.$$
                mv $BookmarksFile.$$ $BookmarksFile
        done
}

TranslateSerialPort()
{
        local SearchFor="$1"
        local PCI USB

        SerialPort=
        if [[ "$SearchFor" == pci* ]]; then
                if [[ -d /sys/class/tty ]]; then
                        pushd /sys/class/tty &>/dev/null
                        for dev in ttyUSB*/device ttyACM*/device; do
                                id=$(readlink -f "$dev" | sed -r 's,^.*(pci.*)/usb[0-9]*/[0-9./-]*/[0-9]*-([0-9.]*):[0-9.]*(/ttyUSB[0-9]*)?$,\1+\2,g')
                                if [[ "$id" == "$SearchFor" ]]; then
                                        SerialPort="/dev/$(dirname "$dev")"
                                        break;
                                fi
                        done
                        popd &>/dev/null
                fi
        else
                SerialPort="$SearchFor"
        fi

        builtin echo "$SerialPort"
}

TranslateSoundCard()
{
        local SoundCard="$1" AlsaCard=
        local PCI USB
        local Cards Card Dev

        if [[ -d /sys/class/sound && "$SoundCard" == pci* ]]; then
                if [[ "$SoundCard" == *+* ]]; then
                        PCI="${SoundCard%+*}"
                        USB="${SoundCard#*+}"
                else
                        PCI="${SoundCard}"
                        USB=
                fi
                pushd /sys/class/sound &>/dev/null
                Cards=$(find -name 'controlC*')
                for Card in $Cards; do
                        Card="${Card#./}"
                        Dev=$(readlink "$Card/device"|cut -f3 -d/)
                        if [[ -n "$USB" ]]; then
                                if [[ "$Dev" == *"$PCI"*usb*"$USB:"* ]]; then
                                        AlsaCard="${Card#controlC}"
                                        break
                                fi
                        else
                                if [[ "$PCI" == *"$Dev" ]]; then
                                        AlsaCard="${Card#controlC}"
                                        break
                                fi
                        fi
                done
                popd &>/dev/null
        fi

        builtin echo "$AlsaCard"
}

UseAlternativeLibs()
{
        export LD_LIBRARY_PATH=/opt/libsdl/lib:/opt/libxine/lib:/opt/libsdl1.2-1.2.7+1.2.8cvs20041007/lib:/opt/linphone-1.3.5/lib
}

function ListTemplates_Category {
        local FK_DeviceCategory_Parent="$1"
        local PK_DeviceTemplate_List=""
        local PK_DeviceCategory=""
        local PK_DeviceTemplate=""

        R=$(RunSQL "SELECT PK_DeviceCategory FROM DeviceCategory WHERE FK_DeviceCategory_Parent = $FK_DeviceCategory_Parent")
        for PK_DeviceCategory in $R ;do
                PK_DeviceTemplate_List="$PK_DeviceTemplate_List $(ListTemplates_Category "$PK_DeviceCategory")"
        done

        R=$(RunSQL "SELECT PK_DeviceTemplate FROM DeviceTemplate WHERE FK_DeviceCategory=$FK_DeviceCategory_Parent")
        for PK_DeviceTemplate in $R ;do
                PK_DeviceTemplate_List="$PK_DeviceTemplate_List $PK_DeviceTemplate"
        done

        echo $PK_DeviceTemplate_List
}


FindDevice_Template()
{
        local PK_Device_Parent="${1//\'}" FK_DeviceTemplate="${2//\'}" NoRecursion="$3" IncludeParent="$4" All="$5"
        local Limit Found=0

        if [[ -z "$PK_Device_Parent" || -z "$FK_DeviceTemplate" ]]; then
                echo ""
                return 1
        fi

        if [[ -z "$All" ]]; then
                Limit="LIMIT 1"
        fi

        local i R Q
        if [[ "$PK_Device_Parent" == 0 ]]; then
                Q="
                        SELECT PK_Device
                        FROM Device
                        WHERE FK_Device_ControlledVia IS NULL AND FK_DeviceTemplate IN ($FK_DeviceTemplate)
                        $Limit
                "
        elif [[ -z "$IncludeParent" ]]; then
                Q="
                        SELECT PK_Device
                        FROM Device
                        WHERE FK_Device_ControlledVia='$PK_Device_Parent' AND FK_DeviceTemplate IN ($FK_DeviceTemplate)
                        $Limit
                "
        else
                Q="
                        SELECT PK_Device
                        FROM Device
                        WHERE (FK_Device_ControlledVia='$PK_Device_Parent' OR PK_Device='$PK_Device_Parent') AND FK_DeviceTemplate IN ($FK_DeviceTemplate))
                        $Limit
                "
        fi
        R="$(RunSQL "$Q")"

        if [[ -n "$R" ]]; then
                echo "$R"
        fi

        if [[ ( -z "$R" || -n "$All" ) && -z "$NoRecursion" ]]; then
                Q="SELECT PK_Device FROM Device WHERE FK_Device_ControlledVia='$PK_Device_Parent'"
                R="$(RunSQL "$Q")"
                for i in $R; do
                        if FindDevice_Template "$i" "$FK_DeviceTemplate" "" "" "$All"; then
                                if [[ -z "$All" ]]; then
                                        return 0
                                else
                                        Found=1
                                fi
                        fi
                done
        else
                return 1
        fi

        [[ "$Found" -eq 1 ]]
        return $?
}

FindDevice_Category()
{
        local PK_Device_Parent="${1//\'}" FK_DeviceCategory="${2//\'}" NoRecursion="$3" IncludeParent="$4" All="$5"
        local Limit Found=0

        if [[ -z "$PK_Device_Parent" || -z "$FK_DeviceCategory" ]]; then
                echo ""
                return 1
        fi

        if [[ -z "$All" ]]; then
                Limit="LIMIT 1"
        fi

        local i R Q
        if [[ "$PK_Device_Parent" == 0 ]]; then
                Q="
                        SELECT PK_Device
                        FROM Device
                        JOIN DeviceTemplate ON FK_DeviceTemplate=PK_DeviceTemplate
                        WHERE FK_Device_ControlledVia IS NULL AND FK_DeviceCategory IN ($FK_DeviceCategory)
                        $Limit
                "
        elif [[ -z "$IncludeParent" ]]; then
                Q="
                        SELECT PK_Device
                        FROM Device
                        JOIN DeviceTemplate ON FK_DeviceTemplate=PK_DeviceTemplate
                        WHERE FK_Device_ControlledVia='$PK_Device_Parent' AND FK_DeviceCategory IN ($FK_DeviceCategory)
                        $Limit
                "
        else
                Q="
                        SELECT PK_Device
                        FROM Device
                        JOIN DeviceTemplate ON FK_DeviceTemplate=PK_DeviceTemplate
                        WHERE (FK_Device_ControlledVia='$PK_Device_Parent' OR PK_Device='$PK_Device_Parent') AND FK_DeviceCategory IN ($FK_DeviceCategory)
                        $Limit
                "
        fi
        R="$(RunSQL "$Q")"

        if [[ -n "$R" ]]; then
                echo "$R"
        fi

        if [[ ( -z "$R" || -n "$All" ) && -z "$NoRecursion" ]]; then
                Q="SELECT PK_Device FROM Device WHERE FK_Device_ControlledVia='$PK_Device_Parent'"
                R="$(RunSQL "$Q")"
                for i in $R; do
                        if FindDevice_Category "$i" "$FK_DeviceCategory" "" "" "$All"; then
                                if [[ -z "$All" ]]; then
                                        return 0
                                else
                                        Found=1
                                fi
                        fi
                done
        else
                return 1
        fi

        [[ "$Found" -eq 1 ]]
        return $?
}

# Get the device number for the parent of the given device
# Returns: number or empty string
GetDeviceParent()
{
        local PK_Device="$1"
        Q="
                SELECT FK_Device_ControlledVia
                FROM Device
                WHERE PK_Device='$PK_Device'
        "
        local R=$(RunSQL "$Q")

        if [[ "$R" == NULL ]]; then
                R=""
        fi
        echo "$R"
}

# Delete a device and make its children top level
# Does exactly the same thing as CMD_Delete_Device in General_Info_Plugin
DeleteDevice()
{
        local PK_Device="$1"
        local Q R

        # Delete embedded devices
        Q="SELECT PK_Device FROM Device where FK_Device_RouteTo=$PK_Device"
        R=$(RunSQL "$Q")
        for Device in $R; do
                DeleteDevice "$Device"
        done

        local -a Queries
        Queries=(
                "UPDATE Device SET FK_Device_ControlledVia=NULL WHERE FK_Device_ControlledVia=$PK_Device"
                "DELETE FROM Device WHERE PK_Device=$PK_Device"
                "DELETE FROM CommandGroup_Command WHERE FK_Device=$PK_Device"
                "DELETE FROM Device_Command WHERE FK_Device=$PK_Device"
                "DELETE FROM Device_CommandGroup WHERE FK_Device=$PK_Device"
                "DELETE FROM Device_DeviceData WHERE FK_Device=$PK_Device"
                "DELETE FROM Device_DeviceGroup WHERE FK_Device=$PK_Device"
                "DELETE FROM Device_Device_Related WHERE FK_Device=$PK_Device OR FK_Device_Related=$PK_Device"
                "DELETE FROM Device_EntertainArea WHERE FK_Device=$PK_Device"
                "DELETE FROM Device_HouseMode WHERE FK_Device=$PK_Device"
                "DELETE FROM Device_Orbiter WHERE FK_Device=$PK_Device"
                "DELETE FROM Device_StartupScript WHERE FK_Device=$PK_Device"
                "DELETE FROM Device_Users WHERE FK_Device=$PK_Device"
                "DELETE FROM Package_Device WHERE FK_Device=$PK_Device"
                "DELETE FROM PaidLicense WHERE FK_Device=$PK_Device"
                "DELETE FROM Device_Device_Pipe WHERE FK_Device_From=$PK_Device OR FK_Device_To=$PK_Device"
                "DELETE FROM PaidLicense WHERE FK_Device=$PK_Device"
        )

        for Q in "${Queries[@]}"; do
                RunSQL "$Q"
        done
}

XineConfSet()
{
        local Setting="$1"
        local Value="$2"
        local XineConf="${3:-/etc/pluto/xine.conf}"

        [[ -z "$Setting" || -z "$Value" ]] && return 1

        if grep -qF "$Setting" "$XineConf"; then
                sed -i "s/^.*$Setting:.*$/$Setting:$Value/" "$XineConf"
        else
                echo "$Setting:$Value" >>"$XineConf"
        fi
}

DeviceIsDisabled()
{
        local PK_Device="$1"
        local R Q

        [[ -z "$PK_Device" ]] && return 1

        Q="SELECT COUNT(*) FROM Device WHERE PK_Device='$PK_Device' AND Disabled=0"
        R=$(RunSQL "$Q")

        if [[ -n "$R" && "$R" -eq 0 ]]; then
                return 0 # Device is disabled or does not exist at all
        else
                return 1 # Device exists and is enabled
        fi
}

FindInArray()
{
        local Value="$1" Array i
        shift
        Array=("$@")

        for ((i = 0; i < ${#Array[*]}; i++)); do
                if [[ "${Array[$i]}" == "$Value" ]]; then
                        echo "$i"
                        return 0
                fi
        done
        return 1
}

FindInArray_Prefix()
{
        local Value="$1" Array i
        shift
        Array=("$@")

        for ((i = 0; i < ${#Array[*]}; i++)); do
                if [[ "${Array[$i]}" == "$Value"* ]]; then
                        echo "$i"
                        return 0
                fi
        done
        return 1
}

# Verify that the given string is a valid IPv4
ValidIP()
{
        local IP="$1"

        local IPn="[0-9]{1,3}"
        local IPpattern="^($IPn)\\.($IPn)\\.($IPn)\\.($IPn)$"
        local i Number

        # Bash 3.1 requires $IPpattern to be quoted, otherwise it gives a syntax error
        # Bash 3.2 requires $IPpattern to be unquoted, otherwise it fails to match the pattern
        # Ubuntu has Bash 3.2
        if [[ ! "$IP" =~ $IPpattern ]]; then
                return 1
        fi

        for ((i = 1; i <= 4; i++)); do
                Number="${BASH_REMATCH[$i]}"
                if ((Number < 0 || Number > 255)); then
                        return 1
                fi
        done

        return 0
}

GetVideoDriver()
{
        if [[ -n "$ForceVESA" ]]; then
                echo vesa
                return 0
        fi

        local VideoDriver
#
#<-mkr_B_via_b->
        VideoDriver=$(lspci | grep ' VGA ' | cut -d' ' -f5)
        # If we only detect a vesa based system, lets see if we can find out what else it might be
        #if [[ "$VideoDriver" == "vesa" ]]; then
        #{
        #        DisplayNote=$(lshwd|grep "Display controller"| cut -f 2 -d \|)
                # This should work beautifully for the ASUS eee Box
        #        if [[ "$DisplayNote" == "Mobile Integrated Graphics Controller (vesa)" ]]; then
        #        {
        #                VideoDriver="intel"
        #        }
        #        fi
        #}
        #fi
        case "$VideoDriver" in
                nVidia)
                        if PackageIsInstalled nvidia-glx || PackageIsInstalled nvidia-glx-new || PackageIsInstalled nvidia-glx-71 || PackageIsInstalled nvidia-glx-96 || PackageIsInstalled nvidia-glx-173 || PackageIsInstalled nvidia-glx-180 || PackageIsInstalled nvidia-glx-190 || PackageIsInstalled nvidia-glx-195 || PackageIsInstalled nvidia-glx-260 ;then
                                VideoDriver="nvidia"
                        fi
                ;;
                Radeon|ATI) PackageIsInstalled xorg-driver-fglrx && VideoDriver="fglrx" ;;
                Intel) VideoDriver="intel" ;;
                "") VideoDriver="vesa" ;; # just-in-case default
        esac
#<-mkr_B_via_e->
        echo "$VideoDriver"
}

ReloadDevicesOnThisMachine()
{
        for Dev in $(cat /usr/pluto/locks/pluto_spawned_local_devices.txt); do
                /usr/pluto/bin/MessageSend "$DCERouter" 0 "$Dev" 7 1 163 "Utils.sh ReloadDevicesOnThisMachine"
        done
}

OpenGLeffects()
{
        local Q

        Q="
                SELECT IK_DeviceData
                FROM Device
                LEFT JOIN Device AS Parent ON Parent.PK_Device=Device.FK_Device_ControlledVia
                JOIN Device_DeviceData ON Device.PK_Device=FK_Device
                WHERE
                        Device.FK_DeviceTemplate='$DEVICETEMPLATE_OnScreen_Orbiter'
                        AND (
                                Device.FK_Device_ControlledVia='$PK_Device'
                                OR Parent.FK_Device_ControlledVia='$PK_Device'
                        )
                AND FK_DeviceData='$DEVICEDATA_Use_OpenGL_effects'
        "
        RunSQL "$Q"
}

AlphaBlendingEnabled()
{
        local Q

        Q="
                SELECT IK_DeviceData
                FROM Device
                LEFT JOIN Device AS Parent ON Parent.PK_Device=Device.FK_Device_ControlledVia
                JOIN Device_DeviceData ON Device.PK_Device=FK_Device
                WHERE
                        Device.FK_DeviceTemplate='$DEVICETEMPLATE_OnScreen_Orbiter'
                        AND (
                                Device.FK_Device_ControlledVia='$PK_Device'
                                OR Parent.FK_Device_ControlledVia='$PK_Device'
                        )
                AND FK_DeviceData='$DEVICEDATA_Use_alpha_blended_UI'
        "
        RunSQL "$Q"
}

GetDeviceData()
{
        local Q
        local Device="$1" DeviceData="$2"

        Q="
                SELECT IK_DeviceData
                FROM Device_DeviceData
                WHERE FK_Device='$Device' AND FK_DeviceData='$DeviceData'
        "
        Field 1 "$(RunSQL "$Q")"
}

SetDeviceData()
{
        local Q
        local Device="$1" DeviceData="$2" Value="$3"

        Q="
                UPDATE Device_DeviceData
                SET IK_DeviceData='$Value'
                WHERE FK_Device=$Device AND FK_DeviceData=$DeviceData
        "
        RunSQL "$Q"
}

UI_SetOptions()
{
        local OrbiterDev="$1"
        local OpenGLeffects="$2"
        local AlphaBlending="$3"
        local UI_Version="$4"

        # disable OpenGL effects
        Q="
                REPLACE INTO Device_DeviceData(FK_Device, FK_DeviceData, IK_DeviceData)
                VALUES('$OrbiterDev', '$DEVICEDATA_Use_OpenGL_effects', '$OpenGLeffects')
        "
        RunSQL "$Q"
        # disable alpha blending
        Q="
                REPLACE INTO Device_DeviceData(FK_Device, FK_DeviceData, IK_DeviceData)
                VALUES('$OrbiterDev', '$DEVICEDATA_Use_alpha_blended_UI', '$AlphaBlending')
        "
        RunSQL "$Q"
        # select UI
        Q="
                REPLACE INTO Device_DeviceData(FK_Device, FK_DeviceData, IK_DeviceData)
                VALUES('$OrbiterDev', '$DEVICEDATA_PK_UI', '$UI_Version')
        "
        RunSQL "$Q"
}

function GeneratePassword() {
        #TODO: Replace with this --->  </dev/urandom tr -dc A-Za-z0-9_ | head -c8
        local -a alpha1=(Q W E R T Y U I O P A S D F G H J K L Z X C V B N M)
        local -a alpha2=(q w e r t y u i o p a s d f g h j k l z x c v b n m)
        local -a alpha3=(1 2 3 4 5 6 7 8 9 0)

        local pass=""
        pass=$pass"${alpha1[$(($RANDOM%26))]}${alpha1[$(($RANDOM%26))]}${alpha1[$(($RANDOM%26))]}"
        pass=$pass"${alpha2[$(($RANDOM%26))]}${alpha2[$(($RANDOM%26))]}${alpha2[$(($RANDOM%26))]}"
        pass=$pass"${alpha3[$(($RANDOM%10))]}${alpha3[$(($RANDOM%10))]}"

        local fromwhere=$(( $RANDOM % 3 + 1 ))
        [[ $fromwhere == 1 ]] && pass=$pass"${alpha1[$(($RANDOM%26))]}"
        [[ $fromwhere == 2 ]] && pass=$pass"${alpha2[$(($RANDOM%26))]}"
        [[ $fromwhere == 3 ]] && pass=$pass"${alpha3[$(($RANDOM%10))]}"


        for i in `seq 1 100` ;do
                local split=$(( $RANDOM % ${#pass} + 1 ))
                pass1=${pass:$split}
                pass2=${pass:0:$split}
                pass="${pass1}${pass2}"
        done

        echo $pass
}

function GeneratePasswordOf6Digits()
{
        local pass
        for ((i = 0; i < 6; i++)); do
                pass="${pass}$((RANDOM % 10))"
        done
        echo "$pass"
}

Log()
{
        local File="$1"; shift
        local Msg="$*"

        echo "LOG: $Msg"
        echo "$Msg" >>"$File"
}


function BlacklistConfFiles()
{
        local file=$1

        if [[ -e /etc/confblacklist ]] ;then
                while read line; do
                        if [[ "$line" == "$file" ]] ;then
                                return 0
                        fi
                done < /etc/confblacklist
        fi

        return 1
}

function VDRInstalled() {
        # Return true if VDR is installed
        DEVICETEMPLATE_VDR_Plugin="1704"
        Q="SELECT PK_Device FROM Device Where FK_DeviceTemplate = $DEVICETEMPLATE_VDR_Plugin"
        VDRDevice=$(RunSQL "$Q")                                         
        if [ "$VDRDevice" == "" ] ; then                                 
                RETURNVALUE=1                                             
        else                                                             
                RETURNVALUE=0                                             
        fi                                                               
        return $RETURNVALUE
}


Boot a new MD with either Intel or ATI.
Medium overlay at best please.

Please report results.
Thank you as always.
#28
I have attached a script that should blow open all mixer channels on all cards. This is meant to occur before AVWizard eventually.

It works for my onboard sound... but as AVWizard is doing its own switching magic, I intend to unmute and raise volume on everything (onboard, 1 card, 2 cards, whatever...) and then mute unneeded channels after AVWiz does its thing.

In order to use this script, please download onto your core someplace
then cd into the directory it lives in
sudo su
alsamixer

Mute everything and exit (esc).
chmod +x amix.sh
./amix.sh


Then please check your alsamixer and make sure everything is unmuted and report success or failure here. Then feel free to mute everything you normally do. Also let me know if the levels are all pegged, or if they (as intended) are at 60%. I will handle the re-muting after AVWizard.

Please then paste the output of a file which is created in the same directory named amix.log
This is mine:
cat amix.log

umamix.sh generated script
#!/bin/bash
amixer set -c 0 "Master Front,0" 60 unmute
amixer set -c 0 "Headphone,0" 60 unmute
amixer set -c 0 "PCM,0" 60 unmute
amixer set -c 0 "Front,0" 60 unmute
amixer set -c 0 "Front Mic,0" 60 unmute
amixer set -c 0 "Surround,0" 60 unmute
amixer set -c 0 "Center,0" 60 unmute
amixer set -c 0 "LFE,0" 60 unmute
amixer set -c 0 "Side,0" 60 unmute
amixer set -c 0 "Line,0" 60 unmute
amixer set -c 0 "CD,0" 60 unmute
amixer set -c 0 "Mic,0" 60 unmute
amixer set -c 0 "IEC958,0" 60 unmute
amixer set -c 0 "IEC958 Default PCM,0" 60 unmute
amixer set -c 0 "IEC958,1" 60 unmute
amixer set -c 0 "Capture,0" 60 unmute
amixer set -c 0 "Capture,1" 60 unmute
amixer set -c 0 "Independent HP,0" 60 unmute
amixer set -c 0 "Input Source,0" 60 unmute
amixer set -c 0 "Smart 5.1,0" 60 unmute
Mixer settings
Simple mixer control 'Master Front',0
 Capabilities: pvolume pswitch
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 31
 Mono:
 Front Left: Playback 31 [100%] [14.00dB] [on]
 Front Right: Playback 31 [100%] [14.00dB] [on]
Simple mixer control 'Headphone',0
 Capabilities: pvolume pswitch
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 27
 Mono:
 Front Left: Playback 27 [100%] [0.00dB] [on]
 Front Right: Playback 27 [100%] [0.00dB] [on]
Simple mixer control 'PCM',0
 Capabilities: pvolume
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 255
 Mono:
 Front Left: Playback 60 [24%] [-39.00dB]
 Front Right: Playback 60 [24%] [-39.00dB]
Simple mixer control 'Front',0
 Capabilities: pvolume pswitch
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 27
 Mono:
 Front Left: Playback 27 [100%] [0.00dB] [on]
 Front Right: Playback 27 [100%] [0.00dB] [on]
Simple mixer control 'Front Mic',0
 Capabilities: pvolume pswitch
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 31
 Mono:
 Front Left: Playback 31 [100%] [14.00dB] [on]
 Front Right: Playback 31 [100%] [14.00dB] [on]
Simple mixer control 'Surround',0
 Capabilities: pvolume pswitch
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 27
 Mono:
 Front Left: Playback 27 [100%] [0.00dB] [on]
 Front Right: Playback 27 [100%] [0.00dB] [on]
Simple mixer control 'Center',0
 Capabilities: pvolume pvolume-joined pswitch pswitch-joined
 Playback channels: Mono
 Limits: Playback 0 - 27
 Mono: Playback 27 [100%] [0.00dB] [on]
Simple mixer control 'LFE',0
 Capabilities: pvolume pvolume-joined pswitch pswitch-joined
 Playback channels: Mono
 Limits: Playback 0 - 27
 Mono: Playback 27 [100%] [0.00dB] [on]
Simple mixer control 'Side',0
 Capabilities: pvolume pswitch
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 27
 Mono:
 Front Left: Playback 27 [100%] [0.00dB] [on]
 Front Right: Playback 27 [100%] [0.00dB] [on]
Simple mixer control 'Line',0
 Capabilities: pvolume pswitch
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 31
 Mono:
 Front Left: Playback 31 [100%] [14.00dB] [on]
 Front Right: Playback 31 [100%] [14.00dB] [on]
Simple mixer control 'CD',0
 Capabilities: pvolume pswitch
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 31
 Mono:
 Front Left: Playback 31 [100%] [14.00dB] [on]
 Front Right: Playback 31 [100%] [14.00dB] [on]
Simple mixer control 'Mic',0
 Capabilities: pvolume pswitch
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 31
 Mono:
 Front Left: Playback 31 [100%] [14.00dB] [on]
 Front Right: Playback 31 [100%] [14.00dB] [on]
Simple mixer control 'IEC958',0
 Capabilities: pswitch pswitch-joined
 Playback channels: Mono
 Mono: Playback [on]
Simple mixer control 'IEC958 Default PCM',0
 Capabilities: pswitch pswitch-joined
 Playback channels: Mono
 Mono: Playback [on]
Simple mixer control 'IEC958',1
 Capabilities: pswitch pswitch-joined
 Playback channels: Mono
 Mono: Playback [on]
Simple mixer control 'Capture',0
 Capabilities: cvolume cswitch
 Capture channels: Front Left - Front Right
 Limits: Capture 0 - 20
 Front Left: Capture 20 [100%] [35.00dB] [on]
 Front Right: Capture 20 [100%] [35.00dB] [on]
Simple mixer control 'Capture',1
 Capabilities: cvolume cswitch
 Capture channels: Front Left - Front Right
 Limits: Capture 0 - 20
 Front Left: Capture 20 [100%] [35.00dB] [on]
 Front Right: Capture 20 [100%] [35.00dB] [on]
Simple mixer control 'Independent HP',0
 Capabilities: enum
 Items: 'OFF' 'ON'
 Item0: 'OFF'
Simple mixer control 'Input Source',0
 Capabilities: cenum
 Items: 'Stereo Mixer' 'Mic' 'Front Mic' 'Line' 'CD'
 Item0: 'Mic'
Simple mixer control 'Smart 5.1',0
 Capabilities: pswitch pswitch-joined
 Playback channels: Mono
 Mono: Playback [on]


To run on an md, as root, where XX is your moon number:
cp /wherever/exists/on/core/amix.sh /usr/pluto/diskless/XX/usr/pluto/bin   
ssh moonXX
/usr/pluto/bin/amix.sh

Then
cat /usr/pluto/bin/amix.log
and paste here...

Thanks for those who help.
#29
Users / Richard Van de Perre (rperre) is gone.
April 30, 2011, 07:25:32 PM
Our friend rperre was lost in a training exercise on Thursday. As those who knew him were aware, he was an Apache helicopter instructor, as well as a LinuxMCE enthusiast. Many of us secretly envied his expertise in so many fields, not the least of which was skilfully maneuvering one of the most difficult craft in the air to fly. Beyond simply being a brilliant guy, he was an admirable person just to talk with. I very much enjoyed his company, and was often taken aback by his even keel and demeanor, even when people deserved a bit of backlash. He was just an all around great guy. A Dutch native, he became a US Citizen in 2010. He served with honor in Afghanistan and Africa. He was just 39.

He is survived by his wife Wilma, and step children, Lindsey Fain, Brooks Latta, Emily Anne Latta, and his grandson, John Parker. For those of you who pray, keep them in yours. It must be dismal to endure this personal tragedy, surrounded by the destruction that has occurred in Alabama just a day earlier. He will be very sorely missed.


rust in vrede
#30
Installation issues / ATI chipsets: Seeking testers
April 26, 2011, 08:54:34 PM
A minor change has recently been made to the detection schema regarding ATI, and I am asking for some help figuring out what works, what doesn't, and why.

If you have spare equipment lying around with ATI, I would appreciate some feedback just attempting to make it autodetect correctly.
What I would ask that you do, for an MD, is:

  • Note the card/chipset
  • Note whether 810 or 1004
  • Attempt a normal MD creation
  • Note successful or failure (either failed to setup x or avwizard boots)
  • ssh into the MD (ssh moonXX  where XX is the moon number)
  • Note whether there is or is not a /etc/X11/xorg.conf file
  • If there is a file /etc/X11/pluto.xorg.conf.avwizard, AND you failed to setup X, please edit the file and change the driver from "fglxr" to "radeon" and reboot
  • Note if this behaves as expected

For a core install:

  • Note the card/chipset
  • Note whether 810 or 1004
  • After OS install, but before LMCE install scripts, copy the /etc/X11/xorg.conf file
  • Note successful or failure (either failed to setup x or avwizard boots)
  • Check existence of /etc/X11/xorg.conf file
  • If x fails AND If  /etc/X11/xorg.conf does not exist, copy saved file back and reboot
  • Note if this behaves as expected

Thanks to any who help.
#31
Developers / I made a monitoring tool for debugging.
March 18, 2011, 10:30:31 PM
For the install process (or really any changes you want to monitor that an executable produces), I have made a tool that monitors definable human readable files in a specific directory. You supply:
1 The folder to monitor, it will wait for it to exist to start if need be.
2 The pattern of files (eg *.conf) to read diffs from, if left blank will search all human readable files.
3 Where you want the diff files to live, default is /home/diffs.

You will have to run this, then execute your script in another terminal. I tried to launch scripts from it, and everything got gummed up.

It then spits out diff files whenever files change or are added, what script is running at that time, and what the difference is in which human readable file. I will tweak it more when I get some other things done. It needs to be recursive on demand. Need to be able to specify more folders.

diffmon1.6
Requires dialog and symlinks (local ubu repos)
#!/bin/bash
### This script is free.

#Needs to be the only instance running. Makes sure that happens but is name specific.
trap 'rm -r /tmp/difftmp' EXIT
procs=$(echo | ps -eo pid,user,args | grep 'diffmon.sh' | wc -l)
if (($procs > 3)); then echo "Multiple instances running. Terminating... please reload"; sleep 1; rm -r /tmp/difftmp; killall -v 'diffmon.sh'; fi

### Sets suffix numberer, installs dialog and cleans up after old operations
if [ -z $runonce ]; then
   suffix=1
   type -P dialog &>/dev/null || apt-get install dialog -y
   type -P symlinks &>/dev/null || apt-get install symlinks -y
   if [ -d /tmp/difftmp ]; then rm -r /tmp/difftmp; fi
   if [ -e /tmp/ast1.txt ]; then rm /tmp/ast1.txt; fi
   if [ -e /tmp/ast2.txt ]; then rm /tmp/ast2.txt; fi
   runonce=something
   getout=live
fi

### Sets the directory to monitor
thedir () {
   searchdir1=$(dialog --title "Directory to Monitor" --stdout --inputbox "Please choose a folder to monitor
   (eg /etc/asterisk ) cannot be blank" 14 48)
   if [ $? = 1 ]; then exit 0; fi
}
if [ -z $searchdir1 ]; then thedir; fi

### Figures out if the directory to monitor exists already and makes sure you didn't typo
if [ ! -d $searchdir1 ]; then dialog --title "Confirm" --yesno "The directory $searchdir1 does not exist. Are you expecting it to be created by the process?" 10 48; fi

### Sets the file pattern to monitor
#filemon=$(dialog --title "File Pattern" --stdout --inputbox "Please indicate a file pattern to monitor (eg *.conf, or for all readable files leave blank)" 14 48)

### Sets the output folder for diff files/deleted files
difhome=$(dialog --title "Output" --stdout --inputbox "Please specify a folder to put diff files in. If it does not exist it will be created. If left blank will default to /home/diffs" 14 48)
if [ -z $difhome ];then difhome=/home/diffs; fi

### Main loop
rundiff () {
   getin=die
   symlinks -dr $searchdir1
   ### Waits for directory to exist and creates the temporary environment.
   while [ ! -d $searchdir1 ]; do sleep 1; done
   if [ ! -d $difhome ]; then mkdir $difhome; chmod 777 $difhome; fi
   if [ ! -d /tmp/difftmp ]; then mkdir /tmp/difftmp; chmod 777 /tmp/difftmp; rsync -rtv --links $searchdir1/ /tmp/difftmp; fi
   while true; do
      if [ ! "$getout"="$getin" ]; then echo "-1"; break; fi
     
      ### Figures out if files are trying to be deleted by something, and moves them for review. If they come into existence then that is noted, but not read in diff.
      home=$(ls -R $searchdir1 | wc -l)
      target=$(ls -R /tmp/difftmp | wc -l)
      if [ "$home" -lt "$target" ]; then
         if [ ! -d $difhome/deleted ]; then mkdir -p $difhome/deleted; fi
         mover=$(diff -r $searchdir1 /tmp/difftmp | grep Only | sed -e 's/Only in /rsync -avb --remove-source-files /g;s/\: /\/*/g')
         movdir=$(echo "$mover $difhome/deleted")
         #   remover=$(diff -r $searchdir1 /tmp/difftmp | grep Only| sed -e 's/Only in /rm -r /g;s/\: /\/*/g')
         $movdir
         #   cleanrm=true;
      fi
     
      ### Finds diffs and spits them into format
      if (diff -r $searchdir1 /tmp/difftmp); then sleep 1; else
         if [ -z $filemon ]; then filemon=$(find $searchdir1 -name '*' -prune -readable -type f | sed 's_.*/__'); fi
         if [ ! -e /tmp/ast1.txt ]; then
            echo | ls -l $searchdir1 > /tmp/ast1.txt;
            input_variable=$"diffmon"${suffix}
            iv2=$input_variable;
            echo "" > $difhome/$iv2
            echo "" >> $difhome/$iv2
            echo "                ************** $iv2 ***************" >> $difhome/$iv2
            echo "" >> $difhome/$iv2
            echo "Files added > or removed <" >> $difhome/$iv2
            (echo | diff /tmp/ast1.txt /tmp/ast2.txt >> $difhome/$iv2);
            iv1=$(ls $searchdir1/$filemon);
            echo "" >> $difhome/$iv2
            echo  "****** Scripts running during change " >> $difhome/$iv2
            (echo | ps -eo pid,user,args | grep 'bin/bash' >> $difhome/$iv2);
            for iv1diff in $iv1; do
               if ! diff -r $searchdir1/$iv1diff /tmp/difftmp/$iv1diff; then
                  echo "" >> $difhome/$iv2
                  echo  "********* Changes in $searchdir1/$iv1diff"  >> $difhome/$iv2
                  (diff -r $searchdir1/$iv1diff /tmp/difftmp/$iv1diff >> $difhome/$iv2)
               fi
            done
            echo "Diff $difhome/$iv2 written";
            rsync -azdr $searchdir1/ /tmp/difftmp
            if [ -e /tmp/ast2.txt ]; then rm /tmp/ast2.txt; fi
            let suffix=$suffix+1
         else
           
            ### Redundant function allowing two files to always be contrasted and never confused
            echo | ls -l $searchdir1 > /tmp/ast2.txt;
            input_variable=$"diffmon"${suffix}
            iv2=$input_variable;
            echo "" > $difhome/$iv2
            echo "" >> $difhome/$iv2
            echo "                ************** $iv2 ***************" >> $difhome/$iv2
            echo "" >> $difhome/$iv2
            echo "Files added > or removed <" >> $difhome/$iv2
            (echo | diff /tmp/ast1.txt /tmp/ast2.txt >> $difhome/$iv2);
            iv1=$(ls $searchdir1/$filemon);
            echo "" >> $difhome/$iv2
            echo  "****** Scripts running during change " >> $difhome/$iv2
            (echo | ps -eo pid,user,args | grep 'bin/bash' >> $difhome/$iv2);
            for iv1diff in $iv1; do
               if ! diff -r $searchdir1/$iv1diff /tmp/difftmp/$iv1diff; then
                  echo "" >> $difhome/$iv2
                  echo  "********* Changes in $searchdir1/$iv1diff"  >> $difhome/$iv2
                  (diff -r $searchdir1/$iv1diff /tmp/difftmp/$iv1diff >> $difhome/$iv2)
               fi
            done
            echo "Diff $difhome/$iv2 written";
            rsync -azdr $searchdir1/ /tmp/difftmp
            if [ -e /tmp/ast1.txt ]; then rm /tmp/ast1.txt; fi
            let suffix=$suffix+1
         fi
         
         ### Backup insist one contrast file exist at all times.
         if [ ! -e /tmp/ast1.txt ] && [ ! -e /tmp/ast2.txt ]; then echo | ls -l $searchdir1 > /tmp/ast1.txt; fi
      fi
      sleep 1
   done
}

### Confirms input information is correct before launching
dialog --title "Confirm" --yesno "Choose ok to begin, or cancel to exit and start over" 10 48;
if  [ $? = 0 ]; then clear
   rundiff
fi
else
exit 0



I would appreciate feedback
#32
This is less than a perfect process... but the results are really neat. I need to test more to find more that is broken, but, rather unusually, I have solutions for the things I have found thus far which are not happy... if not a graceful implementation.

Let me tell you the results before I bore you with the details. Using the following methodology I have created an alternative "livecd" LMCE installer. The install option installs the system all the way to the AVWizard without requiring internet access, you never see KDE... the first screen you see after the 15 min install is AVWizard. As an unexpected surprise, which may be the only realistic benefit of the experiment, the "live" boot also boots to AVWizard, and allows you to configure and run a system from a disk or thumbdrive, creating a portable version of the system without touching the native drive. This installer is as hardware independent as I have access to, with better results on non-supported hardware than I have been able to achieve through regular installs, and supported hardware installs with some minor issues I will address at the end. I like my good news first... esp when the bad news isn't that bad.

Current method: 810
Follow the standard install until changing sources, making this addition.
deb http://www.geekconnection.org/remastersys/repository ubuntu/
We will remove it before install is made. As root:
apt-get update
apt-get install remastersys


Install LMCE. When you get to AVWizard, tty2 and root up:
cp -r  /home/USER_NAME/*? /etc/skel
(This makes these folders appear when a new user is created from future installs, -remastersys. Obviously substitute whatever your current user name is for USER_NAME)
Edit sources.list and get rid of that repo.
dist-upgrade
remastersys dist cdfs
remastersys dist LMCE.iso

burn the iso
apt-get install 'dvd+rw-tools'
growisofs -Z /dev/dvd=/home/remastersys/remastersys/LMCE.iso

Most of the work is done. I now create some scripts to deal with the problems and add them to the .iso.
growisofs -M /dev/dvd /tmp/fixbroken.sh
I will put it up here, but they need a bit of tweaking. I just figured all this out early this morn, and have been working all day, so bare with me. I am working on a graphical kicker for install, but for now you get 4 text options in isolinux. Boot live, boot forcing vesadrivers, install... and boot to hd.

Now the bad news. Building this way, on a normal system, breaks KDE. However there is documentation on how to build this in an Ubuntu server environment which preserves all the pesky hidden KDE stuff. The gparted installer also pukes about 12 errors about not being able to mount nd1, nd3... etc. Choose cancel on each warning. Also warns you that language packs are not available for install. Default values are all over the map, but easily changed when going through install process.

Installing or booting live, there are no nics in /etc/network/interfaces. Stealing from the new-installer scripts, I grep for existence of eth0 /etc/network/interfaces, and if not use chunks from the single/dual nic auto configuration script in one of the installers. For now if you are anxious, just edit (for dual nic)  to read:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.80.1
netmask 225.225.225.0

Or single nic
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth0:1
iface eth0:1 inet static
address 192.168.80.1
netmask 225.225.225.0

Then
/etc/init.d/networking restart
As I said, I will post a cleanup script once I have time to create/test them again to automate them.

There are also permission errors in some /var dir (watch boot)... I can't remember off the top of my head. This will also be addressed this weekend with a cleanup script, but for now change them.

Firefox has remembery issues, but I believe that may have been solved dumping into /etc/skel
I know there is more... but this is a fun start. I can't push a 4gb file from my homemade giant aluminum foil antenna I get internet on... so I encourage others to play with this along with me. I will add more after more napping, but the installed system works with everything I have, behaving nicely.
#33
Developers / Kubuntu prep script for 8.10 installs
February 19, 2011, 06:24:30 AM
This is a little script I wrote for those of us who install a lot.
It looks for references in sources.list that should not be there and changes them.
It then removes any duplicates.
It then performs update and then dist-upgrade.
It then starts the LMCE install.
This is not fully tested as of this second (am fresh installing now)... but it will not do any harm if it bombs.
Feel free to test, and post your results.

#!/bin/bash
n1=$(grep -e 'security.' -e 'archive.' /etc/apt/sources.list | wc -l) #looks for references that shouldn't be there and counts them
o1=0;
if [ "$n1" -gt "$o1" ] ; then echo "Changing Repositories"
sed -i.backup -e 's/us.archive/old-releases/' -e 's/security.ubuntu/old-releases.ubuntu/' -e 's/\/archive/\/old-releases/' /etc/apt/sources.list; #changes us.archive, security.ubuntu, and /archive to old-releases
sort -u /etc/apt/sources.list > /etc/apt/sources.tmp; #removes duplicates in temp file
cat /etc/apt/sources.tmp > /etc/apt/sources.list; #rewrites sources.list without duplicates
else
  echo "Repositories Correct, Running update, and dist-upgrade"
fi
apt-get update && apt-get dist-upgrade -ydu --force-yes
#echo "Installing LMCE"
#env
#sad=$SUDO_USER
#sh /home/$sad/Desktop/LinuxMCE


Save as something.sh
sudo chmod +x something.sh
sudo ./something.sh
Any feedback is welcome.
Spawning the installer appears to break things, so have commented out.
http://svn.linuxmce.org/trac.cgi/ticket/1003


#34
So I have a bunch of these Window$ MCE only cards around. ATSC/QAM/NTSC (note low profile adapter)

"Additional benefits of the Avermedia M780 TV card is that one can watch the Analog channel or the HD channel while recording the other. Alternatively, two channels can be recorded while a program which was previously recorded is watched, all at the same time. Other features of the product include a 32- bit as well as a 64- bit driver support, a stereo sound, Analog TV (NTSC) as well as digital TV (ATSC). It also has a HDTV quality support. It is worth noting that the HDTV will work only if the signal of the TV is HDTV format. Other requirements for HDTV include a VGA card which supports DirectX 9.0c as well as DxVA."

I got it working by first grabbing the firmware and installing mercurial:
sudo -s
apt-get install mercurial -y
apt-get install linux-firmware-nonfree -y
hg clone http://kernellabs.com/hg/~dheitmueller/ngene3
cd ngene3

Lately I have had to get rid of some bad code in ngene3/v4l/firedtv-1394.c so I just
echo > v4l/firedtv-1394.c
make
make install
reboot

This loads up a bunch of experimental drivers.

MythTV then picks it up as DVB DTV capture card (v3.x).


Have not got audio going, but the picture/change is fantastic. I would like some help getting it going right, so we can make this happy. I know there are a gazillion of these cards out there, they were pretty inexpensive for the quality... still are. Gateway shoved them into their media pc's for a while... so... calling all dingos...


*Mandingo, I will gladly send you a card
#35
Users / Samsung PN50B550 Plasma upgrade
February 14, 2011, 05:44:36 PM
It is a cheap TV that performs well, though woefully shy of an RS232 port. Just wanted to pass along some things I worked out and am trying to work out.

Service menu:
On factory remote, press MUTE, 1, 8, 2, and power in quick succession while the tv is off.This will open up the service menu. Go to options, and then model... change it to the 560. This enables hardware that allows 24p playback. They are the same tv, with different hardware access. I have been looking around trying to figure out if I can turn "overscanning" or some derivative of it off so that KDE will be the right size.


I also know that the 650b service code is INFO, MENU, MUTE, Power.

I also know that you shouldn't go around screwing with things you do not understand in these menus. Use at your own risk, but I can tell you that the upgrade works on the 550.
#36
Users / KDE oddities
February 13, 2011, 04:03:39 PM
On all of the 1080p TVs I have set up, during AV Wizard I have to drop the viewing area 5 sizes (-), the result leaves the KDE screen too large to display everything. In the beginning I tried screwing with video settings with some fairly disastrous results. Switching back and forth is also odd, and after a few log ins... NOTHING will kill KDE by itself. It will not "log off", init 3 doesn't stop it... kde stop doesn't kill it, /etc/init.d/kdm stop returns:
"Stopping K Display Manager: kdm not running (/var/run/kdm.pid not found)." And indeed it is not. If I hit ctrl alt backspace KDE dies but takes LMCE with it. For these reasons I do not ever enter the desktop environment. I am curious if others have had this experience, as it is always the same for me, regardless of the equip I use. I am going to try and develop, at the very least, a widget that switches from the desktop back to LMCE gracefully. I did this a long time ago, but was lost in one of many re-installs.
#37
Developers / LMCE in Dolphin's Places
February 13, 2011, 08:18:13 AM
Thom thought it would be convenient for KDE users to have a folder in Dolphins "Places" generated by the system, so I thought it would be an easy opportunity to write my first bash script. Of course it should have been a perl script, but I spent too much time learning the one to move. So this is my solution. I would appreciate review, laughter, whatever the case may be.
http://svn.linuxmce.org/trac.cgi/attachment/ticket/986/t4.sh

It works. I have tried to make it not work, but it always works. Dolphin is very lenient on order.
It will download an icon set. I will make something nice if people think that is a good idea. I don't get butt hurt at criticism. Thanks for your time.

This is a fresh 0810 bookmarks.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xbel>
<xbel xmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks" xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info" xmlns:kdepriv="http://www.kde.org/kdepriv" dbusName="kfilePlaces" >
<bookmark href="file:///home/mcc" >
  <title>Home</title>
  <info>
   <metadata owner="http://freedesktop.org" >
    <bookmark:icon name="user-home" />
   </metadata>
   <metadata owner="http://www.kde.org" >
    <ID>1297542459/0</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
</bookmark>
<bookmark href="remote:/" >
  <title>Network</title>
  <info>
   <metadata owner="http://freedesktop.org" >
    <bookmark:icon name="network-workgroup" />
   </metadata>
   <metadata owner="http://www.kde.org" >
    <ID>1297542459/1</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
</bookmark>
<bookmark href="file:///" >
  <title>Root</title>
  <info>
   <metadata owner="http://freedesktop.org" >
    <bookmark:icon name="folder-red" />
   </metadata>
   <metadata owner="http://www.kde.org" >
    <ID>1297542459/2</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
</bookmark>
<bookmark href="trash:/" >
  <title>Trash</title>
  <info>
   <metadata owner="http://freedesktop.org" >
    <bookmark:icon name="user-trash" />
   </metadata>
   <metadata owner="http://www.kde.org" >
    <ID>1297542459/3</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
</bookmark>
</xbel>


This is the result of the code. The bottom entry is new, and will generate without any conflicts or odd behavior no matter how many things or separators are there... of course ideally it would be run before Dolphin ever mounted anything.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xbel>
<xbel xmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks" xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info" xmlns:kdepriv="http://www.kde.org/kdepriv" dbusName="kfilePlaces">
<bookmark href="file:///home/rec">
  <title>Home</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="user-home"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1289787488/0</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
</bookmark>
<bookmark href="remote:/">
  <title>Network</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="network-workgroup"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1289787488/1</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
</bookmark>
<bookmark href="file:///">
  <title>Root</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="folder-red"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1289787488/2</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
</bookmark>
<bookmark href="trash:/">
  <title>Trash</title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name="user-trash"/>
   </metadata>
   <metadata owner="http://www.kde.org">
    <ID>1289787488/3</ID>
    <isSystemItem>true</isSystemItem>
   </metadata>
  </info>
</bookmark>
<bookmark href="file:///home/public/data" >
<title>LMCE_Data</title>
<info>
  <metadata owner="http://freedesktop.org" >
   <bookmark:icon name="folder-lmce" />
  </metadata>
  <metadata owner="http://www.kde.org" >
   <ID>1289787488/4</ID>
   <isSystemItem>true</isSystemItem>
  </metadata>
</info>
</bookmark>
</xbel>


I have figured a lot out the last few days and would like a more difficult task. Thanks.
#38
Users / Cool Droid toy
August 22, 2010, 06:40:23 PM
For the fellow droid heads... RemoteDroid turns your droid into a touchscreen mouse/keyboard over your wireless network.

Phone part here



Server side here
#39
Users / zwave metadata
June 05, 2010, 06:46:47 AM
I think this question is for hari... but will take an answer from anyone.

Can anyone tell me the limitations on zwave metadata? Google is not my friend on this issue. I think what I am needing to create is a zwave on/off contact strip which reports current draw to the system.
#40
I have an HDHomeRun (HDHR t1 us), and this device only has one usable tuner, though LMCE detects 2. I presume the second is some sort of fake to allow recording one thing and watching another. I have a couple of crap cards that do the same thing, though I know there is only one usable tuner. Snapshot 22982 (or later) with the MythTV .23 shoehorn prioritizes the fake tuner and will not access the correct one before crashing. Deleting the tuners and redefining the single usable tuner gets overwritten as soon as the changes are applied (presumably after mythfilldatabase is run).

In order to prevent this, or more accurately allow your changes in MythTV Setup to be applied and not overwritten, in the web admin drop to device tree/Core/DCERouter/Myth TV Plugin. Towards the bottom of the page is a checkbox which says "Dont autoconfigure"

Then delete all, define card/input, and when it says mythtv is ready... it is. I am sure many of you are already aware of that checkbox... but it cost me almost 2 days... so naturally I think it's discovery is like finding Atlantis. Hope this helps someone having troubles.